diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b9492557..6b15679ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,9 @@ jobs: spm: name: Swift Package Manager 5.4 runs-on: macOS-11 - concurrency: spm + concurrency: + group: spm-${{ github.run_id }} + cancel-in-progress: false env: DEVELOPER_DIR: /Applications/Xcode_12.5.1.app/Contents/Developer steps: @@ -32,12 +34,22 @@ jobs: run: swift package resolve - name: Build run: swift build --build-tests - # - name: Run local tests - # run: swift test --skip-build -c debug --filter localTests + - name: Install ganache + run: npm install ganache --global + - name: Start ganache in background + run: ganache & + - name: Wait till ganache starts + run: sleep 1 + - name: Run local tests + run: swift test --skip-build -c debug --filter localTests + # - name: Run remote tests + # run: swift test --skip-build -c debug --filter remoteTests carthage: name: Carthage runs-on: macOS-11 - concurrency: carthage + concurrency: + group: carthage-${{ github.run_id }} + cancel-in-progress: false env: DEVELOPER_DIR: /Applications/Xcode_12.5.1.app/Contents/Developer strategy: @@ -53,5 +65,13 @@ jobs: run: carthage build --no-use-binaries --platform iOS Simulator --use-xcframeworks - name: Building framework run: xcodebuild build-for-testing -project "web3swift.xcodeproj" -scheme "web3swift" -destination "${{matrix.destination}}" -testPlan LocalTests - # - name: Running local tests - # run: xcodebuild test-without-building -project "web3swift.xcodeproj" -scheme "web3swift" -destination "${{matrix.destination}}" -testPlan LocalTests + - name: Install ganache + run: npm install ganache --global + - name: Start ganache in background + run: ganache & + - name: Wait till ganache starts + run: sleep 1 + - name: Run local tests + run: xcodebuild test-without-building -project "web3swift.xcodeproj" -scheme "web3swift" -destination "${{matrix.destination}}" -testPlan LocalTests + # - name: Run remote tests + # run: xcodebuild test-without-building -project "web3swift.xcodeproj" -scheme "web3swift" -destination "${{matrix.destination}}" -testPlan RemoteTests diff --git a/.gitignore b/.gitignore index 06b69c170..6b4f21edb 100755 --- a/.gitignore +++ b/.gitignore @@ -47,15 +47,13 @@ Package.pins # you should judge for yourself, the pros and cons are mentioned at: # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control # -# Pods/ -# Example/web3swiftBrowser/Pods +Example/**/Pods # Carthage # # Add this line if you want to avoid checking in source code from Carthage dependencies. -# Carthage/Checkouts - -#Carthage/Build +Carthage/Checkouts +Carthage/Build # fastlane # diff --git a/CHANGELOG.md b/CHANGELOG.md index 901774947..6c0da721c 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,428 +1,719 @@ # Changelog -## [Unreleased](https://github.com/matter-labs/web3swift/tree/HEAD) +## [Unreleased](https://github.com/skywinder/web3swift/tree/HEAD) -[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.3.0...HEAD) +[Full Changelog](https://github.com/skywinder/web3swift/compare/2.5.0...HEAD) + +**Merged pull requests:** + +- Syncing with master [\#428](https://github.com/skywinder/web3swift/pull/428) ([yaroslavyaroslav](https://github.com/yaroslavyaroslav)) + +## [2.5.0](https://github.com/skywinder/web3swift/tree/2.5.0) (2021-12-23) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/2.3.0...2.5.0) **Implemented enhancements:** -- Credentials: send "Authorization" header [\#267](https://github.com/matter-labs/web3swift/issues/267) +- Add support of EIP-712 signatures [\#323](https://github.com/skywinder/web3swift/issues/323) +- BIP39.mnemonicsToEntropy does not work for mnemonics of length 15, 18, 21 [\#300](https://github.com/skywinder/web3swift/issues/300) +- Support Solidity 0.6 & ABIEncoderV2 [\#258](https://github.com/skywinder/web3swift/issues/258) +- Omit zeros at the end of formatted string [\#117](https://github.com/skywinder/web3swift/issues/117) +- \[recreated\] Detect read function aborting by messaged require statement [\#276](https://github.com/skywinder/web3swift/pull/276) ([hakumai-iida](https://github.com/hakumai-iida)) + +**Fixed bugs:** + +- `subscribeOnLogs` method with specific contract address is not working!!!! [\#366](https://github.com/skywinder/web3swift/issues/366) +- EthereumContract with Custom ABI returns nil [\#342](https://github.com/skywinder/web3swift/issues/342) +- Error on running tests [\#290](https://github.com/skywinder/web3swift/issues/290) +- Serialisation of BIP32 misplaced address postition [\#257](https://github.com/skywinder/web3swift/issues/257) +- Xcode 10.2.1 carthage update hangs while building web3swift.xcodeproj [\#197](https://github.com/skywinder/web3swift/issues/197) **Closed issues:** -- Xcode 10.3 archive failed [\#266](https://github.com/matter-labs/web3swift/issues/266) -- Xcode 11 regenerating password [\#228](https://github.com/matter-labs/web3swift/issues/228) -- support Xocde 11 SPM for iOS [\#221](https://github.com/matter-labs/web3swift/issues/221) +- Error in Documentation Examples: "Failed to fetch gas estimate" [\#421](https://github.com/skywinder/web3swift/issues/421) +- BSC Network Transaction [\#418](https://github.com/skywinder/web3swift/issues/418) +- How to sign and send ERC20 token [\#413](https://github.com/skywinder/web3swift/issues/413) +- Example [\#409](https://github.com/skywinder/web3swift/issues/409) +- How install for macOS? [\#408](https://github.com/skywinder/web3swift/issues/408) +- Use case for Web3Swift [\#405](https://github.com/skywinder/web3swift/issues/405) +- Make and example on how to use ENS domains [\#404](https://github.com/skywinder/web3swift/issues/404) +- Make an example on how to check your wallet balance [\#402](https://github.com/skywinder/web3swift/issues/402) +- Implement a functionality to add custom chains [\#401](https://github.com/skywinder/web3swift/issues/401) +- Prepare and example on how to use mnemonics [\#399](https://github.com/skywinder/web3swift/issues/399) +- Expired Discord invitation link [\#382](https://github.com/skywinder/web3swift/issues/382) +- How to estimate gas limit and gas price ? [\#380](https://github.com/skywinder/web3swift/issues/380) +- let block = try? web3.eth.getBlockNumber\(\) [\#376](https://github.com/skywinder/web3swift/issues/376) +- Support carthage both M1 and Intel processors [\#375](https://github.com/skywinder/web3swift/issues/375) +- Support for Xcode 12 SPM [\#373](https://github.com/skywinder/web3swift/issues/373) +- promisekit: warning: `wait()` called on main thread! [\#372](https://github.com/skywinder/web3swift/issues/372) +- How to generate web3swift framework file from source [\#369](https://github.com/skywinder/web3swift/issues/369) +- how to maintain multiple wallet ,need to store separate key json file? [\#367](https://github.com/skywinder/web3swift/issues/367) +- Extremely slow init BIP39 and keystore in current dev branch [\#365](https://github.com/skywinder/web3swift/issues/365) +- How can i get EventLogs and topics from a transaction response? [\#359](https://github.com/skywinder/web3swift/issues/359) +- Cannot parse ABI with tuple\[\] [\#358](https://github.com/skywinder/web3swift/issues/358) +- Send Transaction issue, processingError\(desc: "Failed to fetch gas estimate"\) [\#356](https://github.com/skywinder/web3swift/issues/356) +- Instance member 'contract' cannot be used on type 'web3'; did you mean to use a value of this type instead? [\#352](https://github.com/skywinder/web3swift/issues/352) +- Could not build Objective-C module 'web3swift' [\#344](https://github.com/skywinder/web3swift/issues/344) +- Building the latest web3Swift example [\#341](https://github.com/skywinder/web3swift/issues/341) +- cannot open https://exchange.pancakeswap.finance/\#/swap [\#338](https://github.com/skywinder/web3swift/issues/338) +- Crash with parsing custom ABI Contract [\#333](https://github.com/skywinder/web3swift/issues/333) +- @ravi-ranjan-oodles thanks for the update. [\#329](https://github.com/skywinder/web3swift/issues/329) +- Issue in Uploading to Test Flight [\#328](https://github.com/skywinder/web3swift/issues/328) +- Update CryptoSwift podspec [\#322](https://github.com/skywinder/web3swift/issues/322) +- cann't open DApp, such as "https://uniswap.tokenpocket.pro/\#/swap" [\#321](https://github.com/skywinder/web3swift/issues/321) +- CryptoSwift version is too low to work properly in Xcode12.5 [\#318](https://github.com/skywinder/web3swift/issues/318) +- web3swift.Web3Error.processingError\(desc: "Failed to fetch gas estimate"\)(BSC Chain) [\#317](https://github.com/skywinder/web3swift/issues/317) +- Quick simple steps for minting ERC20 or ERC721 tokens [\#314](https://github.com/skywinder/web3swift/issues/314) +- Generate Contract Bytecode / Address [\#313](https://github.com/skywinder/web3swift/issues/313) +- I can't find func 'Web3.InfuraKovanWeb3\(\)' [\#311](https://github.com/skywinder/web3swift/issues/311) +- web3 instance error: Variable used within its own initial value [\#310](https://github.com/skywinder/web3swift/issues/310) +- Failed to fetch gas estimate when sending erc20 [\#307](https://github.com/skywinder/web3swift/issues/307) +- DApp browser cann't open Uniswap in a right way [\#304](https://github.com/skywinder/web3swift/issues/304) +- Update cocoapods bigint to 5.0 [\#288](https://github.com/skywinder/web3swift/issues/288) +- When I use getBlockByNumber , hash Unable to check [\#287](https://github.com/skywinder/web3swift/issues/287) +- How to parse the return value of read transaction [\#284](https://github.com/skywinder/web3swift/issues/284) +- Failed to fetch gas estimate [\#283](https://github.com/skywinder/web3swift/issues/283) +- Generic parameter 'Element' could not be inferred [\#282](https://github.com/skywinder/web3swift/issues/282) +- Unable to send ether using send function [\#279](https://github.com/skywinder/web3swift/issues/279) +- This request is not supported because your node is running with state pruning. Run with --pruning=archive. [\#274](https://github.com/skywinder/web3swift/issues/274) +- Send ERC20 token error And get token name error [\#262](https://github.com/skywinder/web3swift/issues/262) +- Problem when decoding raw transaction input data [\#216](https://github.com/skywinder/web3swift/issues/216) +- Is it necessary to use password in creating Bip32keystore ? [\#213](https://github.com/skywinder/web3swift/issues/213) + +**Merged pull requests:** -## [2.3.0](https://github.com/matter-labs/web3swift/tree/2.3.0) (2020-09-21) +- Fix-up [\#427](https://github.com/skywinder/web3swift/pull/427) ([yaroslavyaroslav](https://github.com/yaroslavyaroslav)) +- 2.5.0 [\#426](https://github.com/skywinder/web3swift/pull/426) ([yaroslavyaroslav](https://github.com/yaroslavyaroslav)) +- Bugfix: Derive PublicKey [\#423](https://github.com/skywinder/web3swift/pull/423) ([yuzhiyou1990](https://github.com/yuzhiyou1990)) +- Enabling GitHub actions [\#422](https://github.com/skywinder/web3swift/pull/422) ([yaroslavyaroslav](https://github.com/yaroslavyaroslav)) +- Fix building issue [\#410](https://github.com/skywinder/web3swift/pull/410) ([yaroslavyaroslav](https://github.com/yaroslavyaroslav)) +- Fixed keystore backward compatibility [\#397](https://github.com/skywinder/web3swift/pull/397) ([BaldyAsh](https://github.com/BaldyAsh)) +- add support of EIP-712 signature [\#396](https://github.com/skywinder/web3swift/pull/396) ([BaldyAsh](https://github.com/BaldyAsh)) +- Fix ENS.getContentHash to return Data [\#395](https://github.com/skywinder/web3swift/pull/395) ([battlmonstr](https://github.com/battlmonstr)) +- Fix Serialisation of BIP32 Keystore [\#394](https://github.com/skywinder/web3swift/pull/394) ([BaldyAsh](https://github.com/BaldyAsh)) +- Dependency update | M1 support [\#389](https://github.com/skywinder/web3swift/pull/389) ([Valter4578](https://github.com/Valter4578)) +- Fixed typo in function name [\#386](https://github.com/skywinder/web3swift/pull/386) ([JeneaVranceanu](https://github.com/JeneaVranceanu)) +- Updated Example and Updated Version for BigInt , CryptoSwift and PromiseKit dependency [\#383](https://github.com/skywinder/web3swift/pull/383) ([veerChauhan](https://github.com/veerChauhan)) +- add support of EIP-712 signature [\#381](https://github.com/skywinder/web3swift/pull/381) ([AndreyMaksimkin](https://github.com/AndreyMaksimkin)) +- fixed parsing of ABIs with tuples + wrong gas info when transactionOptions created from json [\#379](https://github.com/skywinder/web3swift/pull/379) ([izakpavel](https://github.com/izakpavel)) +- fixed: websocket delegate issue \(new\) [\#378](https://github.com/skywinder/web3swift/pull/378) ([amirhossein7](https://github.com/amirhossein7)) +- Added Promise: Support for getCode function [\#368](https://github.com/skywinder/web3swift/pull/368) ([SwiftyLimi](https://github.com/SwiftyLimi)) +- Added: Receive type at ABI.Element [\#348](https://github.com/skywinder/web3swift/pull/348) ([SwiftyLimi](https://github.com/SwiftyLimi)) +- Update local Tests and refactoring [\#347](https://github.com/skywinder/web3swift/pull/347) ([BaldyAsh](https://github.com/BaldyAsh)) +- update carthage build scripts to support xcode 11-12 [\#345](https://github.com/skywinder/web3swift/pull/345) ([skywinder](https://github.com/skywinder)) +- Update libs versions, Cartfile and Pods dependencies [\#334](https://github.com/skywinder/web3swift/pull/334) ([AnnaYatsun1](https://github.com/AnnaYatsun1)) +- fix crash when 'payable' nil [\#332](https://github.com/skywinder/web3swift/pull/332) ([xdozorx](https://github.com/xdozorx)) +- Update README.md [\#331](https://github.com/skywinder/web3swift/pull/331) ([Iysbaera](https://github.com/Iysbaera)) +- CrytoSwift update version 1.4.0 [\#327](https://github.com/skywinder/web3swift/pull/327) ([lzttxs](https://github.com/lzttxs)) +- Update carthage libraries [\#325](https://github.com/skywinder/web3swift/pull/325) ([alex78pro](https://github.com/alex78pro)) +- Gas estimate fix [\#324](https://github.com/skywinder/web3swift/pull/324) ([frostiq](https://github.com/frostiq)) +- Update README.md [\#306](https://github.com/skywinder/web3swift/pull/306) ([manuG420](https://github.com/manuG420)) +- fix mnemonicsToEntropy mnemonic length check [\#301](https://github.com/skywinder/web3swift/pull/301) ([sche](https://github.com/sche)) +- Updated Contract transaction method with Your ABI string [\#299](https://github.com/skywinder/web3swift/pull/299) ([veerChauhan](https://github.com/veerChauhan)) +- fix crash abi parsing [\#296](https://github.com/skywinder/web3swift/pull/296) ([nerzh](https://github.com/nerzh)) +- Examples, Fixed Crashes, Refactoring [\#286](https://github.com/skywinder/web3swift/pull/286) ([skywinder](https://github.com/skywinder)) +- Master [\#281](https://github.com/skywinder/web3swift/pull/281) ([skywinder](https://github.com/skywinder)) +- Fix Serialisation of BIP32 Keystore [\#278](https://github.com/skywinder/web3swift/pull/278) ([podkovyrin](https://github.com/podkovyrin)) + +## [2.3.0](https://github.com/skywinder/web3swift/tree/2.3.0) (2020-09-26) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/2.2.2...2.3.0) -[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.2.2...2.3.0) +**Implemented enhancements:** + +- Credentials: send "Authorization" header [\#267](https://github.com/skywinder/web3swift/issues/267) **Fixed bugs:** -- How to add web3swift in my framework ? [\#167](https://github.com/matter-labs/web3swift/issues/167) -- Documentation link 404 in README.md [\#164](https://github.com/matter-labs/web3swift/issues/164) +- How to add web3swift in my framework ? [\#167](https://github.com/skywinder/web3swift/issues/167) +- Documentation link 404 in README.md [\#164](https://github.com/skywinder/web3swift/issues/164) **Closed issues:** -- web3swift.Web3Error.processingError\("Failed to fetch nonce"\) [\#272](https://github.com/matter-labs/web3swift/issues/272) -- WebView: Dapp & Connect Wallet [\#264](https://github.com/matter-labs/web3swift/issues/264) -- Create new contract method. [\#261](https://github.com/matter-labs/web3swift/issues/261) -- Not able to Deploy smart contract [\#214](https://github.com/matter-labs/web3swift/issues/214) -- unable to create archive file for testflight [\#161](https://github.com/matter-labs/web3swift/issues/161) +- web3swift.Web3Error.processingError\("Failed to fetch nonce"\) [\#272](https://github.com/skywinder/web3swift/issues/272) +- Xcode 10.3 archive failed [\#266](https://github.com/skywinder/web3swift/issues/266) +- WebView: Dapp & Connect Wallet [\#264](https://github.com/skywinder/web3swift/issues/264) +- Create new contract method. [\#261](https://github.com/skywinder/web3swift/issues/261) +- Xcode 11 regenerating password [\#228](https://github.com/skywinder/web3swift/issues/228) +- support Xocde 11 SPM for iOS [\#221](https://github.com/skywinder/web3swift/issues/221) +- Not able to Deploy smart contract [\#214](https://github.com/skywinder/web3swift/issues/214) +- unable to create archive file for testflight [\#161](https://github.com/skywinder/web3swift/issues/161) **Merged pull requests:** -- Added web3-react-native to libraries that use web3swift [\#263](https://github.com/matter-labs/web3swift/pull/263) ([cawfree](https://github.com/cawfree)) +- Added web3-react-native to libraries that use web3swift [\#263](https://github.com/skywinder/web3swift/pull/263) ([cawfree](https://github.com/cawfree)) -## [2.2.2](https://github.com/matter-labs/web3swift/tree/2.2.2) (2020-04-04) +## [2.2.2](https://github.com/skywinder/web3swift/tree/2.2.2) (2020-04-04) -[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.2.1...2.2.2) +[Full Changelog](https://github.com/skywinder/web3swift/compare/2.2.1...2.2.2) **Implemented enhancements:** -- ENS Registry migration [\#237](https://github.com/matter-labs/web3swift/issues/237) -- WKWebView with injected "web3 [\#202](https://github.com/matter-labs/web3swift/issues/202) +- ENS Registry migration [\#237](https://github.com/skywinder/web3swift/issues/237) +- WKWebView with injected "web3 [\#202](https://github.com/skywinder/web3swift/issues/202) **Fixed bugs:** -- Fix build dependencies [\#244](https://github.com/matter-labs/web3swift/issues/244) -- Carthage build fails [\#226](https://github.com/matter-labs/web3swift/issues/226) +- Fix build dependencies [\#244](https://github.com/skywinder/web3swift/issues/244) +- Carthage build fails [\#226](https://github.com/skywinder/web3swift/issues/226) **Closed issues:** -- Event filters by Param not working [\#248](https://github.com/matter-labs/web3swift/issues/248) -- KeysService\(\) in Migration guide not found [\#240](https://github.com/matter-labs/web3swift/issues/240) -- How to get seed phrase from private key? [\#236](https://github.com/matter-labs/web3swift/issues/236) -- Sender Value nil [\#219](https://github.com/matter-labs/web3swift/issues/219) +- Event filters by Param not working [\#248](https://github.com/skywinder/web3swift/issues/248) +- KeysService\(\) in Migration guide not found [\#240](https://github.com/skywinder/web3swift/issues/240) +- How to get seed phrase from private key? [\#236](https://github.com/skywinder/web3swift/issues/236) +- Sender Value nil [\#219](https://github.com/skywinder/web3swift/issues/219) **Merged pull requests:** -- value as optional parameter [\#256](https://github.com/matter-labs/web3swift/pull/256) ([skywinder](https://github.com/skywinder)) -- 2.2.2 [\#253](https://github.com/matter-labs/web3swift/pull/253) ([BaldyAsh](https://github.com/BaldyAsh)) -- \#248 [\#250](https://github.com/matter-labs/web3swift/pull/250) ([hakumai-iida](https://github.com/hakumai-iida)) -- Baldyash/webview [\#249](https://github.com/matter-labs/web3swift/pull/249) ([BaldyAsh](https://github.com/BaldyAsh)) -- policy [\#247](https://github.com/matter-labs/web3swift/pull/247) ([BaldyAsh](https://github.com/BaldyAsh)) -- Fix dependencies, build [\#245](https://github.com/matter-labs/web3swift/pull/245) ([BaldyAsh](https://github.com/BaldyAsh)) -- chore: update ENS Registry migration [\#243](https://github.com/matter-labs/web3swift/pull/243) ([aranhaagency](https://github.com/aranhaagency)) -- improtant notice update [\#232](https://github.com/matter-labs/web3swift/pull/232) ([skywinder](https://github.com/skywinder)) -- Add Alice Wallet to project list [\#230](https://github.com/matter-labs/web3swift/pull/230) ([lmcmz](https://github.com/lmcmz)) -- Update Extensions.swift [\#225](https://github.com/matter-labs/web3swift/pull/225) ([kocherovets](https://github.com/kocherovets)) -- correct gasLimit [\#222](https://github.com/matter-labs/web3swift/pull/222) ([luqz](https://github.com/luqz)) -- Change BIP39 word list extension from array of strings to one string … [\#217](https://github.com/matter-labs/web3swift/pull/217) ([husamettinor](https://github.com/husamettinor)) -- Expose BIP39 words and separator [\#212](https://github.com/matter-labs/web3swift/pull/212) ([dawiddr](https://github.com/dawiddr)) +- value as optional parameter [\#256](https://github.com/skywinder/web3swift/pull/256) ([skywinder](https://github.com/skywinder)) +- 2.2.2 [\#253](https://github.com/skywinder/web3swift/pull/253) ([BaldyAsh](https://github.com/BaldyAsh)) +- \#248 [\#250](https://github.com/skywinder/web3swift/pull/250) ([hakumai-iida](https://github.com/hakumai-iida)) +- Baldyash/webview [\#249](https://github.com/skywinder/web3swift/pull/249) ([BaldyAsh](https://github.com/BaldyAsh)) +- policy [\#247](https://github.com/skywinder/web3swift/pull/247) ([BaldyAsh](https://github.com/BaldyAsh)) +- Fix dependencies, build [\#245](https://github.com/skywinder/web3swift/pull/245) ([BaldyAsh](https://github.com/BaldyAsh)) +- chore: update ENS Registry migration [\#243](https://github.com/skywinder/web3swift/pull/243) ([aranhaagency](https://github.com/aranhaagency)) +- improtant notice update [\#232](https://github.com/skywinder/web3swift/pull/232) ([skywinder](https://github.com/skywinder)) +- Add Alice Wallet to project list [\#230](https://github.com/skywinder/web3swift/pull/230) ([lmcmz](https://github.com/lmcmz)) +- Update Extensions.swift [\#225](https://github.com/skywinder/web3swift/pull/225) ([kocherovets](https://github.com/kocherovets)) +- correct gasLimit [\#222](https://github.com/skywinder/web3swift/pull/222) ([luqz](https://github.com/luqz)) +- Change BIP39 word list extension from array of strings to one string … [\#217](https://github.com/skywinder/web3swift/pull/217) ([husamettinor](https://github.com/husamettinor)) +- Expose BIP39 words and separator [\#212](https://github.com/skywinder/web3swift/pull/212) ([dawiddr](https://github.com/dawiddr)) -## [2.2.1](https://github.com/matter-labs/web3swift/tree/2.2.1) (2019-06-24) +## [2.2.1](https://github.com/skywinder/web3swift/tree/2.2.1) (2019-06-24) -[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.2.0...2.2.1) +[Full Changelog](https://github.com/skywinder/web3swift/compare/2.2.0...2.2.1) **Implemented enhancements:** -- 2.2.0 [\#155](https://github.com/matter-labs/web3swift/issues/155) +- 2.2.0 [\#155](https://github.com/skywinder/web3swift/issues/155) **Closed issues:** -- BigInt 3.1 [\#207](https://github.com/matter-labs/web3swift/issues/207) -- recevied transaction id from geth node server but not able to see that transaction id at etherscan.io [\#200](https://github.com/matter-labs/web3swift/issues/200) -- How do I fetch information such as balance, decimal,symbol and name of ERC20token ? [\#199](https://github.com/matter-labs/web3swift/issues/199) -- Starscream 3.1.0 not compatible with Swift 5.0 [\#195](https://github.com/matter-labs/web3swift/issues/195) -- How to Connect infuraWebsocket and subsribe perticular event in swift? [\#193](https://github.com/matter-labs/web3swift/issues/193) -- Use of unresolved identifier 'Wallet' [\#192](https://github.com/matter-labs/web3swift/issues/192) -- V in Signed Message Hash not being calculated properly [\#191](https://github.com/matter-labs/web3swift/issues/191) -- Not possible to calculate fast, normal and cheap transaction fee ? [\#190](https://github.com/matter-labs/web3swift/issues/190) -- SocketProvider does not receive messages [\#188](https://github.com/matter-labs/web3swift/issues/188) -- Cannot build example in v2.1.6 [\#177](https://github.com/matter-labs/web3swift/issues/177) -- EIP67Code missing in web3swift 2.1.6 [\#176](https://github.com/matter-labs/web3swift/issues/176) -- 'internal' protection level on Web3Error description property [\#172](https://github.com/matter-labs/web3swift/issues/172) -- ENS initializer is inaccessible due to `internal` protection level [\#171](https://github.com/matter-labs/web3swift/issues/171) -- Archive on Xcode 10.2 [\#166](https://github.com/matter-labs/web3swift/issues/166) -- carthage not support on Xcode 10.2 [\#138](https://github.com/matter-labs/web3swift/issues/138) +- BigInt 3.1 [\#207](https://github.com/skywinder/web3swift/issues/207) +- recevied transaction id from geth node server but not able to see that transaction id at etherscan.io [\#200](https://github.com/skywinder/web3swift/issues/200) +- How do I fetch information such as balance, decimal,symbol and name of ERC20token ? [\#199](https://github.com/skywinder/web3swift/issues/199) +- Starscream 3.1.0 not compatible with Swift 5.0 [\#195](https://github.com/skywinder/web3swift/issues/195) +- How to Connect infuraWebsocket and subsribe perticular event in swift? [\#193](https://github.com/skywinder/web3swift/issues/193) +- Use of unresolved identifier 'Wallet' [\#192](https://github.com/skywinder/web3swift/issues/192) +- V in Signed Message Hash not being calculated properly [\#191](https://github.com/skywinder/web3swift/issues/191) +- Not possible to calculate fast, normal and cheap transaction fee ? [\#190](https://github.com/skywinder/web3swift/issues/190) +- SocketProvider does not receive messages [\#188](https://github.com/skywinder/web3swift/issues/188) +- Cannot build example in v2.1.6 [\#177](https://github.com/skywinder/web3swift/issues/177) +- EIP67Code missing in web3swift 2.1.6 [\#176](https://github.com/skywinder/web3swift/issues/176) +- 'internal' protection level on Web3Error description property [\#172](https://github.com/skywinder/web3swift/issues/172) +- ENS initializer is inaccessible due to `internal` protection level [\#171](https://github.com/skywinder/web3swift/issues/171) +- Archive on Xcode 10.2 [\#166](https://github.com/skywinder/web3swift/issues/166) +- carthage not support on Xcode 10.2 [\#138](https://github.com/skywinder/web3swift/issues/138) **Merged pull requests:** -- 2.2.1 [\#210](https://github.com/matter-labs/web3swift/pull/210) ([BaldyAsh](https://github.com/BaldyAsh)) -- infura v3 complete update [\#209](https://github.com/matter-labs/web3swift/pull/209) ([BaldyAsh](https://github.com/BaldyAsh)) -- merge Master -\> develop [\#205](https://github.com/matter-labs/web3swift/pull/205) ([skywinder](https://github.com/skywinder)) -- update documentation, prettify doc style [\#204](https://github.com/matter-labs/web3swift/pull/204) ([skywinder](https://github.com/skywinder)) -- V handle fix [\#201](https://github.com/matter-labs/web3swift/pull/201) ([BaldyAsh](https://github.com/BaldyAsh)) -- Update ENSBaseRegistrar.swift [\#198](https://github.com/matter-labs/web3swift/pull/198) ([barrasso](https://github.com/barrasso)) -- Websockets improvements and fixes [\#189](https://github.com/matter-labs/web3swift/pull/189) ([BaldyAsh](https://github.com/BaldyAsh)) -- Update ETHRegistrarController.swift [\#187](https://github.com/matter-labs/web3swift/pull/187) ([barrasso](https://github.com/barrasso)) -- Update ETHRegistrarController.swift [\#183](https://github.com/matter-labs/web3swift/pull/183) ([barrasso](https://github.com/barrasso)) -- Fix typo in Usage [\#182](https://github.com/matter-labs/web3swift/pull/182) ([sweepty](https://github.com/sweepty)) -- Expose errorDescription. [\#181](https://github.com/matter-labs/web3swift/pull/181) ([andresousa](https://github.com/andresousa)) -- Update ENS Resolver [\#180](https://github.com/matter-labs/web3swift/pull/180) ([barrasso](https://github.com/barrasso)) +- 2.2.1 [\#210](https://github.com/skywinder/web3swift/pull/210) ([BaldyAsh](https://github.com/BaldyAsh)) +- infura v3 complete update [\#209](https://github.com/skywinder/web3swift/pull/209) ([BaldyAsh](https://github.com/BaldyAsh)) +- merge Master -\> develop [\#205](https://github.com/skywinder/web3swift/pull/205) ([skywinder](https://github.com/skywinder)) +- update documentation, prettify doc style [\#204](https://github.com/skywinder/web3swift/pull/204) ([skywinder](https://github.com/skywinder)) +- V handle fix [\#201](https://github.com/skywinder/web3swift/pull/201) ([BaldyAsh](https://github.com/BaldyAsh)) +- Update ENSBaseRegistrar.swift [\#198](https://github.com/skywinder/web3swift/pull/198) ([barrasso](https://github.com/barrasso)) +- Websockets improvements and fixes [\#189](https://github.com/skywinder/web3swift/pull/189) ([BaldyAsh](https://github.com/BaldyAsh)) +- Update ETHRegistrarController.swift [\#187](https://github.com/skywinder/web3swift/pull/187) ([barrasso](https://github.com/barrasso)) +- Update ETHRegistrarController.swift [\#183](https://github.com/skywinder/web3swift/pull/183) ([barrasso](https://github.com/barrasso)) +- Fix typo in Usage [\#182](https://github.com/skywinder/web3swift/pull/182) ([sweepty](https://github.com/sweepty)) +- Expose errorDescription. [\#181](https://github.com/skywinder/web3swift/pull/181) ([andresousa](https://github.com/andresousa)) +- Update ENS Resolver [\#180](https://github.com/skywinder/web3swift/pull/180) ([barrasso](https://github.com/barrasso)) -## [2.2.0](https://github.com/matter-labs/web3swift/tree/2.2.0) (2019-04-30) +## [2.2.0](https://github.com/skywinder/web3swift/tree/2.2.0) (2019-04-30) -[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.1.6...2.2.0) +[Full Changelog](https://github.com/skywinder/web3swift/compare/2.1.6...2.2.0) **Closed issues:** -- Failed to fetch gas estimate [\#178](https://github.com/matter-labs/web3swift/issues/178) +- Failed to fetch gas estimate [\#178](https://github.com/skywinder/web3swift/issues/178) **Merged pull requests:** -- 2.2.0 [\#179](https://github.com/matter-labs/web3swift/pull/179) ([BaldyAsh](https://github.com/BaldyAsh)) +- 2.2.0 [\#179](https://github.com/skywinder/web3swift/pull/179) ([BaldyAsh](https://github.com/BaldyAsh)) -## [2.1.6](https://github.com/matter-labs/web3swift/tree/2.1.6) (2019-04-26) +## [2.1.6](https://github.com/skywinder/web3swift/tree/2.1.6) (2019-04-26) -[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.1.5...2.1.6) +[Full Changelog](https://github.com/skywinder/web3swift/compare/2.1.5...2.1.6) **Merged pull requests:** -- 2.1.6 [\#175](https://github.com/matter-labs/web3swift/pull/175) ([BaldyAsh](https://github.com/BaldyAsh)) -- Quickfix ens [\#174](https://github.com/matter-labs/web3swift/pull/174) ([BaldyAsh](https://github.com/BaldyAsh)) +- 2.1.6 [\#175](https://github.com/skywinder/web3swift/pull/175) ([BaldyAsh](https://github.com/BaldyAsh)) +- Quickfix ens [\#174](https://github.com/skywinder/web3swift/pull/174) ([BaldyAsh](https://github.com/BaldyAsh)) -## [2.1.5](https://github.com/matter-labs/web3swift/tree/2.1.5) (2019-04-24) +## [2.1.5](https://github.com/skywinder/web3swift/tree/2.1.5) (2019-04-24) -[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.1.4...2.1.5) +[Full Changelog](https://github.com/skywinder/web3swift/compare/2.1.4...2.1.5) **Merged pull requests:** -- Documentation update [\#153](https://github.com/matter-labs/web3swift/pull/153) ([BaldyAsh](https://github.com/BaldyAsh)) +- Documentation update [\#153](https://github.com/skywinder/web3swift/pull/153) ([BaldyAsh](https://github.com/BaldyAsh)) -## [2.1.4](https://github.com/matter-labs/web3swift/tree/2.1.4) (2019-04-24) +## [2.1.4](https://github.com/skywinder/web3swift/tree/2.1.4) (2019-04-24) -[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.1.3...2.1.4) +[Full Changelog](https://github.com/skywinder/web3swift/compare/2.1.3...2.1.4) **Fixed bugs:** -- Cannot load module 'Web3swift' as 'web3swift [\#133](https://github.com/matter-labs/web3swift/issues/133) +- Cannot load module 'Web3swift' as 'web3swift [\#133](https://github.com/skywinder/web3swift/issues/133) **Closed issues:** -- How to convert 21000 BigUInt estimated gas price into Wei ? [\#163](https://github.com/matter-labs/web3swift/issues/163) -- ENS Permanent Registrar Support [\#159](https://github.com/matter-labs/web3swift/issues/159) -- web3swift 2.1.3 [\#154](https://github.com/matter-labs/web3swift/issues/154) -- Sending ETH always results in zero value [\#149](https://github.com/matter-labs/web3swift/issues/149) -- WebSockets subscriptions [\#145](https://github.com/matter-labs/web3swift/issues/145) -- 依赖该库生成framework,真机情况下会出现问题 [\#143](https://github.com/matter-labs/web3swift/issues/143) -- Building fails with compilation errors [\#140](https://github.com/matter-labs/web3swift/issues/140) +- How to convert 21000 BigUInt estimated gas price into Wei ? [\#163](https://github.com/skywinder/web3swift/issues/163) +- ENS Permanent Registrar Support [\#159](https://github.com/skywinder/web3swift/issues/159) +- web3swift 2.1.3 [\#154](https://github.com/skywinder/web3swift/issues/154) +- Sending ETH always results in zero value [\#149](https://github.com/skywinder/web3swift/issues/149) +- WebSockets subscriptions [\#145](https://github.com/skywinder/web3swift/issues/145) +- 依赖该库生成framework,真机情况下会出现问题 [\#143](https://github.com/skywinder/web3swift/issues/143) +- Building fails with compilation errors [\#140](https://github.com/skywinder/web3swift/issues/140) **Merged pull requests:** -- Fix travis [\#169](https://github.com/matter-labs/web3swift/pull/169) ([BaldyAsh](https://github.com/BaldyAsh)) -- Fix warnings [\#168](https://github.com/matter-labs/web3swift/pull/168) ([BaldyAsh](https://github.com/BaldyAsh)) -- Added reverse registrar [\#165](https://github.com/matter-labs/web3swift/pull/165) ([BaldyAsh](https://github.com/BaldyAsh)) -- WIP: ENS BaseRegistrar and RegistrarController support [\#162](https://github.com/matter-labs/web3swift/pull/162) ([BaldyAsh](https://github.com/BaldyAsh)) -- Updated example to 2.1.3 [\#158](https://github.com/matter-labs/web3swift/pull/158) ([BaldyAsh](https://github.com/BaldyAsh)) +- Fix travis [\#169](https://github.com/skywinder/web3swift/pull/169) ([BaldyAsh](https://github.com/BaldyAsh)) +- Fix warnings [\#168](https://github.com/skywinder/web3swift/pull/168) ([BaldyAsh](https://github.com/BaldyAsh)) +- Added reverse registrar [\#165](https://github.com/skywinder/web3swift/pull/165) ([BaldyAsh](https://github.com/BaldyAsh)) +- WIP: ENS BaseRegistrar and RegistrarController support [\#162](https://github.com/skywinder/web3swift/pull/162) ([BaldyAsh](https://github.com/BaldyAsh)) +- Updated example to 2.1.3 [\#158](https://github.com/skywinder/web3swift/pull/158) ([BaldyAsh](https://github.com/BaldyAsh)) -## [2.1.3](https://github.com/matter-labs/web3swift/tree/2.1.3) (2019-04-06) +## [2.1.3](https://github.com/skywinder/web3swift/tree/2.1.3) (2019-04-06) -[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.1.2...2.1.3) +[Full Changelog](https://github.com/skywinder/web3swift/compare/2.1.2...2.1.3) **Implemented enhancements:** -- WIP: WebSockets subscriptions [\#144](https://github.com/matter-labs/web3swift/pull/144) ([BaldyAsh](https://github.com/BaldyAsh)) +- WIP: WebSockets subscriptions [\#144](https://github.com/skywinder/web3swift/pull/144) ([BaldyAsh](https://github.com/BaldyAsh)) **Closed issues:** -- Use custom JSONRPCmethod and Units [\#148](https://github.com/matter-labs/web3swift/issues/148) -- ERC20 some functions are not working [\#146](https://github.com/matter-labs/web3swift/issues/146) -- fix `pod install` absolute paths [\#97](https://github.com/matter-labs/web3swift/issues/97) -- Installing issue by pod [\#76](https://github.com/matter-labs/web3swift/issues/76) +- Use custom JSONRPCmethod and Units [\#148](https://github.com/skywinder/web3swift/issues/148) +- ERC20 some functions are not working [\#146](https://github.com/skywinder/web3swift/issues/146) +- fix `pod install` absolute paths [\#97](https://github.com/skywinder/web3swift/issues/97) +- Installing issue by pod [\#76](https://github.com/skywinder/web3swift/issues/76) **Merged pull requests:** -- 2.1.3 fix No2 [\#152](https://github.com/matter-labs/web3swift/pull/152) ([BaldyAsh](https://github.com/BaldyAsh)) -- 2.1.3 fix [\#151](https://github.com/matter-labs/web3swift/pull/151) ([BaldyAsh](https://github.com/BaldyAsh)) -- 2.1.3 [\#150](https://github.com/matter-labs/web3swift/pull/150) ([BaldyAsh](https://github.com/BaldyAsh)) +- 2.1.3 fix No2 [\#152](https://github.com/skywinder/web3swift/pull/152) ([BaldyAsh](https://github.com/BaldyAsh)) +- 2.1.3 fix [\#151](https://github.com/skywinder/web3swift/pull/151) ([BaldyAsh](https://github.com/BaldyAsh)) +- 2.1.3 [\#150](https://github.com/skywinder/web3swift/pull/150) ([BaldyAsh](https://github.com/BaldyAsh)) -## [2.1.2](https://github.com/matter-labs/web3swift/tree/2.1.2) (2019-03-30) +## [2.1.2](https://github.com/skywinder/web3swift/tree/2.1.2) (2019-03-30) -[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.1.1...2.1.2) +[Full Changelog](https://github.com/skywinder/web3swift/compare/2.1.1...2.1.2) **Merged pull requests:** -- Swift 5 update [\#141](https://github.com/matter-labs/web3swift/pull/141) ([BaldyAsh](https://github.com/BaldyAsh)) -- Swift 5 update [\#139](https://github.com/matter-labs/web3swift/pull/139) ([BaldyAsh](https://github.com/BaldyAsh)) -- 2.1.1 [\#136](https://github.com/matter-labs/web3swift/pull/136) ([BaldyAsh](https://github.com/BaldyAsh)) +- Swift 5 update [\#141](https://github.com/skywinder/web3swift/pull/141) ([BaldyAsh](https://github.com/BaldyAsh)) +- Swift 5 update [\#139](https://github.com/skywinder/web3swift/pull/139) ([BaldyAsh](https://github.com/BaldyAsh)) +- 2.1.1 [\#136](https://github.com/skywinder/web3swift/pull/136) ([BaldyAsh](https://github.com/BaldyAsh)) -## [2.1.1](https://github.com/matter-labs/web3swift/tree/2.1.1) (2019-03-26) +## [2.1.1](https://github.com/skywinder/web3swift/tree/2.1.1) (2019-03-26) -[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.1.0...2.1.1) +[Full Changelog](https://github.com/skywinder/web3swift/compare/2.1.0...2.1.1) **Implemented enhancements:** -- Support ST-20 [\#103](https://github.com/matter-labs/web3swift/issues/103) +- Support ST-20 [\#103](https://github.com/skywinder/web3swift/issues/103) **Closed issues:** -- Expected to decode Array\ but found a dictionary instead. [\#128](https://github.com/matter-labs/web3swift/issues/128) -- Decoding Input/Output data [\#127](https://github.com/matter-labs/web3swift/issues/127) -- nodeError\("replacement transaction underpriced"\) [\#42](https://github.com/matter-labs/web3swift/issues/42) +- Expected to decode Array\ but found a dictionary instead. [\#128](https://github.com/skywinder/web3swift/issues/128) +- Decoding Input/Output data [\#127](https://github.com/skywinder/web3swift/issues/127) +- nodeError\("replacement transaction underpriced"\) [\#42](https://github.com/skywinder/web3swift/issues/42) **Merged pull requests:** -- Fix/podspec [\#135](https://github.com/matter-labs/web3swift/pull/135) ([BaldyAsh](https://github.com/BaldyAsh)) -- let some functions public for customization [\#132](https://github.com/matter-labs/web3swift/pull/132) ([scottphc](https://github.com/scottphc)) -- WIP: ST-20 and Security Token support [\#130](https://github.com/matter-labs/web3swift/pull/130) ([BaldyAsh](https://github.com/BaldyAsh)) -- Fix/remove deprecated [\#120](https://github.com/matter-labs/web3swift/pull/120) ([BaldyAsh](https://github.com/BaldyAsh)) +- Fix/podspec [\#135](https://github.com/skywinder/web3swift/pull/135) ([BaldyAsh](https://github.com/BaldyAsh)) +- let some functions public for customization [\#132](https://github.com/skywinder/web3swift/pull/132) ([scottphc](https://github.com/scottphc)) +- WIP: ST-20 and Security Token support [\#130](https://github.com/skywinder/web3swift/pull/130) ([BaldyAsh](https://github.com/BaldyAsh)) +- Fix/remove deprecated [\#120](https://github.com/skywinder/web3swift/pull/120) ([BaldyAsh](https://github.com/BaldyAsh)) -## [2.1.0](https://github.com/matter-labs/web3swift/tree/2.1.0) (2019-03-06) +## [2.1.0](https://github.com/skywinder/web3swift/tree/2.1.0) (2019-03-06) -[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.0.4...2.1.0) +[Full Changelog](https://github.com/skywinder/web3swift/compare/2.0.4...2.1.0) **Implemented enhancements:** -- Support ERC-888 [\#102](https://github.com/matter-labs/web3swift/issues/102) -- Support SRC-20 [\#101](https://github.com/matter-labs/web3swift/issues/101) -- Support S3 [\#99](https://github.com/matter-labs/web3swift/issues/99) -- Support ERC-1400 [\#98](https://github.com/matter-labs/web3swift/issues/98) -- ERC-165 support [\#82](https://github.com/matter-labs/web3swift/issues/82) -- ERC-777 support [\#81](https://github.com/matter-labs/web3swift/issues/81) -- How do I add an account to a node [\#78](https://github.com/matter-labs/web3swift/issues/78) -- Support Web3View functionality [\#30](https://github.com/matter-labs/web3swift/issues/30) +- Support ERC-888 [\#102](https://github.com/skywinder/web3swift/issues/102) +- Support SRC-20 [\#101](https://github.com/skywinder/web3swift/issues/101) +- Support S3 [\#99](https://github.com/skywinder/web3swift/issues/99) +- Support ERC-1400 [\#98](https://github.com/skywinder/web3swift/issues/98) +- ERC-165 support [\#82](https://github.com/skywinder/web3swift/issues/82) +- ERC-777 support [\#81](https://github.com/skywinder/web3swift/issues/81) +- How do I add an account to a node [\#78](https://github.com/skywinder/web3swift/issues/78) +- ERC20 API Support [\#41](https://github.com/skywinder/web3swift/issues/41) +- Support Web3View functionality [\#30](https://github.com/skywinder/web3swift/issues/30) **Closed issues:** -- eth\_estimateGas is not supplied the gasPrice parameter [\#118](https://github.com/matter-labs/web3swift/issues/118) -- Carthage support missing. [\#115](https://github.com/matter-labs/web3swift/issues/115) -- \[Utility\] Contract event listener [\#112](https://github.com/matter-labs/web3swift/issues/112) -- Support ERC-1644 [\#111](https://github.com/matter-labs/web3swift/issues/111) -- Support ERC-1643 [\#110](https://github.com/matter-labs/web3swift/issues/110) -- Support ERC-1594 [\#109](https://github.com/matter-labs/web3swift/issues/109) -- Support ERC-1410 [\#108](https://github.com/matter-labs/web3swift/issues/108) -- Support ERC-820 [\#107](https://github.com/matter-labs/web3swift/issues/107) -- Error: Failed to fetch gas estimate on intermediate call [\#106](https://github.com/matter-labs/web3swift/issues/106) -- Can't use ENS in 2.0 [\#92](https://github.com/matter-labs/web3swift/issues/92) -- Can't use EIP681 parser [\#91](https://github.com/matter-labs/web3swift/issues/91) -- enhancement - end to end newbie instructions to deploy erc20 token locally / initialize wallets - then successfully transfer it in app [\#89](https://github.com/matter-labs/web3swift/issues/89) -- Can you support objective-c [\#88](https://github.com/matter-labs/web3swift/issues/88) -- SolidityType has no member 'allSatisfy'? [\#87](https://github.com/matter-labs/web3swift/issues/87) -- How to encode data for appending constructor to bytecode for deploying contract? [\#86](https://github.com/matter-labs/web3swift/issues/86) -- web3swift.Web3Error error 4 for get balance [\#77](https://github.com/matter-labs/web3swift/issues/77) -- How to signed Transaction ? get raw [\#62](https://github.com/matter-labs/web3swift/issues/62) -- how to get token using Signing Transaction [\#58](https://github.com/matter-labs/web3swift/issues/58) -- Can the signtypedMessage function be added [\#45](https://github.com/matter-labs/web3swift/issues/45) -- How to get Keystore by PrivateKeyData ? [\#19](https://github.com/matter-labs/web3swift/issues/19) -- encoding name\(ens\) for sending register contract [\#15](https://github.com/matter-labs/web3swift/issues/15) +- eth\_estimateGas is not supplied the gasPrice parameter [\#118](https://github.com/skywinder/web3swift/issues/118) +- Carthage support missing. [\#115](https://github.com/skywinder/web3swift/issues/115) +- \[Utility\] Contract event listener [\#112](https://github.com/skywinder/web3swift/issues/112) +- Support ERC-1644 [\#111](https://github.com/skywinder/web3swift/issues/111) +- Support ERC-1643 [\#110](https://github.com/skywinder/web3swift/issues/110) +- Support ERC-1594 [\#109](https://github.com/skywinder/web3swift/issues/109) +- Support ERC-1410 [\#108](https://github.com/skywinder/web3swift/issues/108) +- Support ERC-820 [\#107](https://github.com/skywinder/web3swift/issues/107) +- Error: Failed to fetch gas estimate on intermediate call [\#106](https://github.com/skywinder/web3swift/issues/106) +- Can't use ENS in 2.0 [\#92](https://github.com/skywinder/web3swift/issues/92) +- Can't use EIP681 parser [\#91](https://github.com/skywinder/web3swift/issues/91) +- enhancement - end to end newbie instructions to deploy erc20 token locally / initialize wallets - then successfully transfer it in app [\#89](https://github.com/skywinder/web3swift/issues/89) +- Can you support objective-c [\#88](https://github.com/skywinder/web3swift/issues/88) +- SolidityType has no member 'allSatisfy'? [\#87](https://github.com/skywinder/web3swift/issues/87) +- How to encode data for appending constructor to bytecode for deploying contract? [\#86](https://github.com/skywinder/web3swift/issues/86) +- web3swift.Web3Error error 4 for get balance [\#77](https://github.com/skywinder/web3swift/issues/77) +- How to signed Transaction ? get raw [\#62](https://github.com/skywinder/web3swift/issues/62) +- how to get token using Signing Transaction [\#58](https://github.com/skywinder/web3swift/issues/58) +- Can the signtypedMessage function be added [\#45](https://github.com/skywinder/web3swift/issues/45) +- Migration to web3 format \(create account\) [\#40](https://github.com/skywinder/web3swift/issues/40) +- How to get Keystore by PrivateKeyData ? [\#19](https://github.com/skywinder/web3swift/issues/19) +- encoding name\(ens\) for sending register contract [\#15](https://github.com/skywinder/web3swift/issues/15) **Merged pull requests:** -- 2.1.0 [\#124](https://github.com/matter-labs/web3swift/pull/124) ([BaldyAsh](https://github.com/BaldyAsh)) -- Fix/remove deprecated [\#123](https://github.com/matter-labs/web3swift/pull/123) ([BaldyAsh](https://github.com/BaldyAsh)) -- fixed estimate gas problem [\#119](https://github.com/matter-labs/web3swift/pull/119) ([BaldyAsh](https://github.com/BaldyAsh)) -- Added Deed and Registrar ABI to Web3+Utils [\#114](https://github.com/matter-labs/web3swift/pull/114) ([barrasso](https://github.com/barrasso)) -- Fixed EIP681 and EIP67, added and improved a lot of ERCs [\#113](https://github.com/matter-labs/web3swift/pull/113) ([BaldyAsh](https://github.com/BaldyAsh)) -- Documentation [\#105](https://github.com/matter-labs/web3swift/pull/105) ([BaldyAsh](https://github.com/BaldyAsh)) -- recent changes [\#104](https://github.com/matter-labs/web3swift/pull/104) ([BaldyAsh](https://github.com/BaldyAsh)) -- Migration to 2.0 [\#96](https://github.com/matter-labs/web3swift/pull/96) ([BaldyAsh](https://github.com/BaldyAsh)) -- Master to develop for 2.0.2 [\#94](https://github.com/matter-labs/web3swift/pull/94) ([shamatar](https://github.com/shamatar)) -- Feature/readme improvement [\#85](https://github.com/matter-labs/web3swift/pull/85) ([BaldyAsh](https://github.com/BaldyAsh)) -- Get recent develop changes [\#80](https://github.com/matter-labs/web3swift/pull/80) ([BaldyAsh](https://github.com/BaldyAsh)) - -## [2.0.4](https://github.com/matter-labs/web3swift/tree/2.0.4) (2018-11-20) +- 2.1.0 [\#124](https://github.com/skywinder/web3swift/pull/124) ([BaldyAsh](https://github.com/BaldyAsh)) +- Fix/remove deprecated [\#123](https://github.com/skywinder/web3swift/pull/123) ([BaldyAsh](https://github.com/BaldyAsh)) +- fixed estimate gas problem [\#119](https://github.com/skywinder/web3swift/pull/119) ([BaldyAsh](https://github.com/BaldyAsh)) +- Added Deed and Registrar ABI to Web3+Utils [\#114](https://github.com/skywinder/web3swift/pull/114) ([barrasso](https://github.com/barrasso)) +- Fixed EIP681 and EIP67, added and improved a lot of ERCs [\#113](https://github.com/skywinder/web3swift/pull/113) ([BaldyAsh](https://github.com/BaldyAsh)) +- Documentation [\#105](https://github.com/skywinder/web3swift/pull/105) ([BaldyAsh](https://github.com/BaldyAsh)) +- recent changes [\#104](https://github.com/skywinder/web3swift/pull/104) ([BaldyAsh](https://github.com/BaldyAsh)) +- Migration to 2.0 [\#96](https://github.com/skywinder/web3swift/pull/96) ([BaldyAsh](https://github.com/BaldyAsh)) +- Master to develop for 2.0.2 [\#94](https://github.com/skywinder/web3swift/pull/94) ([shamatar](https://github.com/shamatar)) +- 2.0.2 [\#93](https://github.com/skywinder/web3swift/pull/93) ([shamatar](https://github.com/shamatar)) +- Feature/readme improvement [\#85](https://github.com/skywinder/web3swift/pull/85) ([BaldyAsh](https://github.com/BaldyAsh)) +- Get recent develop changes [\#80](https://github.com/skywinder/web3swift/pull/80) ([BaldyAsh](https://github.com/BaldyAsh)) -[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.0.3...2.0.4) +## [2.0.4](https://github.com/skywinder/web3swift/tree/2.0.4) (2018-11-20) -**Merged pull requests:** +[Full Changelog](https://github.com/skywinder/web3swift/compare/2.0.3...2.0.4) -- introduce a fix for invalid value in gas estimation, call and send transactions [\#95](https://github.com/matter-labs/web3swift/pull/95) ([shamatar](https://github.com/shamatar)) -- 2.0.2 [\#93](https://github.com/matter-labs/web3swift/pull/93) ([shamatar](https://github.com/shamatar)) +## [2.0.3](https://github.com/skywinder/web3swift/tree/2.0.3) (2018-11-20) -## [2.0.3](https://github.com/matter-labs/web3swift/tree/2.0.3) (2018-11-20) +[Full Changelog](https://github.com/skywinder/web3swift/compare/2.0.2...2.0.3) -[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.0.2...2.0.3) +## [2.0.2](https://github.com/skywinder/web3swift/tree/2.0.2) (2018-11-06) -## [2.0.2](https://github.com/matter-labs/web3swift/tree/2.0.2) (2018-11-06) - -[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.0.1...2.0.2) +[Full Changelog](https://github.com/skywinder/web3swift/compare/2.0.1...2.0.2) **Merged pull requests:** -- 2.0.1 [\#84](https://github.com/matter-labs/web3swift/pull/84) ([shamatar](https://github.com/shamatar)) +- 2.0.1 [\#84](https://github.com/skywinder/web3swift/pull/84) ([shamatar](https://github.com/shamatar)) -## [2.0.1](https://github.com/matter-labs/web3swift/tree/2.0.1) (2018-11-05) +## [2.0.1](https://github.com/skywinder/web3swift/tree/2.0.1) (2018-11-05) -[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.0.0...2.0.1) +[Full Changelog](https://github.com/skywinder/web3swift/compare/2.0.0...2.0.1) **Closed issues:** -- ENS Functionality [\#56](https://github.com/matter-labs/web3swift/issues/56) +- ENS Functionality [\#56](https://github.com/skywinder/web3swift/issues/56) **Merged pull requests:** -- ENS fix [\#83](https://github.com/matter-labs/web3swift/pull/83) ([BaldyAsh](https://github.com/BaldyAsh)) +- ENS fix [\#83](https://github.com/skywinder/web3swift/pull/83) ([BaldyAsh](https://github.com/BaldyAsh)) -## [2.0.0](https://github.com/matter-labs/web3swift/tree/2.0.0) (2018-10-30) +## [2.0.0](https://github.com/skywinder/web3swift/tree/2.0.0) (2018-10-30) -[Full Changelog](https://github.com/matter-labs/web3swift/compare/1.5.1...2.0.0) +[Full Changelog](https://github.com/skywinder/web3swift/compare/1.5.1...2.0.0) **Implemented enhancements:** -- Carthage support [\#44](https://github.com/matter-labs/web3swift/issues/44) -- How to get pending transactions by this framework [\#36](https://github.com/matter-labs/web3swift/issues/36) -- ENS for wallets [\#12](https://github.com/matter-labs/web3swift/issues/12) -- Recover passphrase from BIP32 store [\#5](https://github.com/matter-labs/web3swift/issues/5) -- ERC20 API Support [\#41](https://github.com/matter-labs/web3swift/issues/41) +- Carthage support [\#44](https://github.com/skywinder/web3swift/issues/44) +- How to get pending transactions by this framework [\#36](https://github.com/skywinder/web3swift/issues/36) +- ENS for wallets [\#12](https://github.com/skywinder/web3swift/issues/12) +- Recover passphrase from BIP32 store [\#5](https://github.com/skywinder/web3swift/issues/5) +- ERC20 API Support [\#41](https://github.com/skywinder/web3swift/issues/41) **Closed issues:** -- failed to send transaction due to known transaction [\#65](https://github.com/matter-labs/web3swift/issues/65) -- List of all transactions related to account \(private key\) [\#57](https://github.com/matter-labs/web3swift/issues/57) -- Make A README & doc [\#46](https://github.com/matter-labs/web3swift/issues/46) -- 'BigUInt' is ambiguous for type lookup in this conte [\#43](https://github.com/matter-labs/web3swift/issues/43) -- Migration to web3 format \(create account\) [\#40](https://github.com/matter-labs/web3swift/issues/40) -- Interface ideas are welcome for v2.0 [\#3](https://github.com/matter-labs/web3swift/issues/3) +- failed to send transaction due to known transaction [\#65](https://github.com/skywinder/web3swift/issues/65) +- List of all transactions related to account \(private key\) [\#57](https://github.com/skywinder/web3swift/issues/57) +- Make A README & doc [\#46](https://github.com/skywinder/web3swift/issues/46) +- 'BigUInt' is ambiguous for type lookup in this conte [\#43](https://github.com/skywinder/web3swift/issues/43) +- Migration to web3 format \(create account\) [\#40](https://github.com/skywinder/web3swift/issues/40) +- Interface ideas are welcome for v2.0 [\#3](https://github.com/skywinder/web3swift/issues/3) **Merged pull requests:** -- Carthage [\#75](https://github.com/matter-labs/web3swift/pull/75) ([BaldyAsh](https://github.com/BaldyAsh)) -- Carthage fixes [\#74](https://github.com/matter-labs/web3swift/pull/74) ([BaldyAsh](https://github.com/BaldyAsh)) +- Carthage [\#75](https://github.com/skywinder/web3swift/pull/75) ([BaldyAsh](https://github.com/BaldyAsh)) +- Carthage fixes [\#74](https://github.com/skywinder/web3swift/pull/74) ([BaldyAsh](https://github.com/BaldyAsh)) -## [1.5.1](https://github.com/matter-labs/web3swift/tree/1.5.1) (2018-10-22) +## [1.5.1](https://github.com/skywinder/web3swift/tree/1.5.1) (2018-10-22) -[Full Changelog](https://github.com/matter-labs/web3swift/compare/1.5...1.5.1) +[Full Changelog](https://github.com/skywinder/web3swift/compare/1.5...1.5.1) **Merged pull requests:** -- Function visibility fix [\#70](https://github.com/matter-labs/web3swift/pull/70) ([shamatar](https://github.com/shamatar)) +- Function visibility fix [\#70](https://github.com/skywinder/web3swift/pull/70) ([shamatar](https://github.com/shamatar)) -## [1.5](https://github.com/matter-labs/web3swift/tree/1.5) (2018-10-18) +## [1.5](https://github.com/skywinder/web3swift/tree/1.5) (2018-10-18) -[Full Changelog](https://github.com/matter-labs/web3swift/compare/1.1.10...1.5) +[Full Changelog](https://github.com/skywinder/web3swift/compare/1.1.10...1.5) **Implemented enhancements:** -- Can you add support for ERC-721 tokens [\#7](https://github.com/matter-labs/web3swift/issues/7) +- Can you add support for ERC-721 tokens [\#7](https://github.com/skywinder/web3swift/issues/7) **Closed issues:** -- Creating a new wallet is too slow [\#63](https://github.com/matter-labs/web3swift/issues/63) -- need to update for Xcode10 [\#49](https://github.com/matter-labs/web3swift/issues/49) -- Web3.Utils.formatToEthereumUnits [\#48](https://github.com/matter-labs/web3swift/issues/48) +- Creating a new wallet is too slow [\#63](https://github.com/skywinder/web3swift/issues/63) +- need to update for Xcode10 [\#49](https://github.com/skywinder/web3swift/issues/49) +- Web3.Utils.formatToEthereumUnits [\#48](https://github.com/skywinder/web3swift/issues/48) +- Interface ideas are welcome for v2.0 [\#3](https://github.com/skywinder/web3swift/issues/3) **Merged pull requests:** -- Add TxPool and ERC721 native class [\#68](https://github.com/matter-labs/web3swift/pull/68) ([shamatar](https://github.com/shamatar)) -- Feature/erc721 [\#67](https://github.com/matter-labs/web3swift/pull/67) ([BaldyAsh](https://github.com/BaldyAsh)) -- Feature/adding logo [\#66](https://github.com/matter-labs/web3swift/pull/66) ([BaldyAsh](https://github.com/BaldyAsh)) -- adds txpool function and its local node test [\#64](https://github.com/matter-labs/web3swift/pull/64) ([currybab](https://github.com/currybab)) -- License got reverted somewhere after PRs [\#60](https://github.com/matter-labs/web3swift/pull/60) ([shamatar](https://github.com/shamatar)) +- Add TxPool and ERC721 native class [\#68](https://github.com/skywinder/web3swift/pull/68) ([shamatar](https://github.com/shamatar)) +- Feature/erc721 [\#67](https://github.com/skywinder/web3swift/pull/67) ([BaldyAsh](https://github.com/BaldyAsh)) +- Feature/adding logo [\#66](https://github.com/skywinder/web3swift/pull/66) ([BaldyAsh](https://github.com/BaldyAsh)) +- adds txpool function and its local node test [\#64](https://github.com/skywinder/web3swift/pull/64) ([currybab](https://github.com/currybab)) +- License got reverted somewhere after PRs [\#60](https://github.com/skywinder/web3swift/pull/60) ([shamatar](https://github.com/shamatar)) -## [1.1.10](https://github.com/matter-labs/web3swift/tree/1.1.10) (2018-10-04) +## [1.1.10](https://github.com/skywinder/web3swift/tree/1.1.10) (2018-10-04) -[Full Changelog](https://github.com/matter-labs/web3swift/compare/1.1.9...1.1.10) +[Full Changelog](https://github.com/skywinder/web3swift/compare/1.1.9...1.1.10) **Merged pull requests:** -- Preliminary ENS support, start module splitting [\#59](https://github.com/matter-labs/web3swift/pull/59) ([shamatar](https://github.com/shamatar)) -- Feature/readme improvement [\#55](https://github.com/matter-labs/web3swift/pull/55) ([BaldyAsh](https://github.com/BaldyAsh)) -- Feature/support obj c [\#54](https://github.com/matter-labs/web3swift/pull/54) ([BaldyAsh](https://github.com/BaldyAsh)) -- Feature/ENSsupport [\#53](https://github.com/matter-labs/web3swift/pull/53) ([FesenkoG](https://github.com/FesenkoG)) -- Add Travis configuration [\#52](https://github.com/matter-labs/web3swift/pull/52) ([skywinder](https://github.com/skywinder)) -- Added ERC-20 token for testing web3swift lib [\#50](https://github.com/matter-labs/web3swift/pull/50) ([BaldyAsh](https://github.com/BaldyAsh)) +- Preliminary ENS support, start module splitting [\#59](https://github.com/skywinder/web3swift/pull/59) ([shamatar](https://github.com/shamatar)) +- Feature/readme improvement [\#55](https://github.com/skywinder/web3swift/pull/55) ([BaldyAsh](https://github.com/BaldyAsh)) +- Feature/support obj c [\#54](https://github.com/skywinder/web3swift/pull/54) ([BaldyAsh](https://github.com/BaldyAsh)) +- Feature/ENSsupport [\#53](https://github.com/skywinder/web3swift/pull/53) ([FesenkoG](https://github.com/FesenkoG)) +- Add Travis configuration [\#52](https://github.com/skywinder/web3swift/pull/52) ([skywinder](https://github.com/skywinder)) +- Added ERC-20 token for testing web3swift lib [\#50](https://github.com/skywinder/web3swift/pull/50) ([BaldyAsh](https://github.com/BaldyAsh)) -## [1.1.9](https://github.com/matter-labs/web3swift/tree/1.1.9) (2018-09-18) +## [1.1.9](https://github.com/skywinder/web3swift/tree/1.1.9) (2018-09-18) -[Full Changelog](https://github.com/matter-labs/web3swift/compare/1.1.7...1.1.9) +[Full Changelog](https://github.com/skywinder/web3swift/compare/1.1.7...1.1.9) **Fixed bugs:** -- eth.getAccounts\(\) function returns an empty address Array [\#24](https://github.com/matter-labs/web3swift/issues/24) -- EIP681 bug fixes, accessibility in Function changed [\#35](https://github.com/matter-labs/web3swift/pull/35) ([FesenkoG](https://github.com/FesenkoG)) +- eth.getAccounts\(\) function returns an empty address Array [\#24](https://github.com/skywinder/web3swift/issues/24) +- EIP681 bug fixes, accessibility in Function changed [\#35](https://github.com/skywinder/web3swift/pull/35) ([FesenkoG](https://github.com/FesenkoG)) **Closed issues:** -- the version 1.1.6 couldn't from password and keystore to get the privateKey [\#32](https://github.com/matter-labs/web3swift/issues/32) -- Need implementation of EIP-681 parsing [\#25](https://github.com/matter-labs/web3swift/issues/25) +- the version 1.1.6 couldn't from password and keystore to get the privateKey [\#32](https://github.com/skywinder/web3swift/issues/32) +- Need implementation of EIP-681 parsing [\#25](https://github.com/skywinder/web3swift/issues/25) **Merged pull requests:** -- Update for XCode 10 [\#39](https://github.com/matter-labs/web3swift/pull/39) ([shamatar](https://github.com/shamatar)) -- Basic ENS support added, EIP681 parsing supports ENS from now. [\#38](https://github.com/matter-labs/web3swift/pull/38) ([FesenkoG](https://github.com/FesenkoG)) +- Update for XCode 10 [\#39](https://github.com/skywinder/web3swift/pull/39) ([shamatar](https://github.com/shamatar)) +- Basic ENS support added, EIP681 parsing supports ENS from now. [\#38](https://github.com/skywinder/web3swift/pull/38) ([FesenkoG](https://github.com/FesenkoG)) -## [1.1.7](https://github.com/matter-labs/web3swift/tree/1.1.7) (2018-09-13) +## [1.1.7](https://github.com/skywinder/web3swift/tree/1.1.7) (2018-09-13) -[Full Changelog](https://github.com/matter-labs/web3swift/compare/1.1.6...1.1.7) +[Full Changelog](https://github.com/skywinder/web3swift/compare/1.1.6...1.1.7) **Fixed bugs:** -- Thread blocked [\#16](https://github.com/matter-labs/web3swift/issues/16) +- Thread blocked [\#16](https://github.com/skywinder/web3swift/issues/16) **Closed issues:** -- How to create same address and keystore by mnemonics? [\#22](https://github.com/matter-labs/web3swift/issues/22) +- How to create same address and keystore by mnemonics? [\#22](https://github.com/skywinder/web3swift/issues/22) **Merged pull requests:** -- Fix ethereum address parsing, add readme [\#34](https://github.com/matter-labs/web3swift/pull/34) ([shamatar](https://github.com/shamatar)) -- complete EIP681, fix the most stupid Ethereum address parsing [\#33](https://github.com/matter-labs/web3swift/pull/33) ([shamatar](https://github.com/shamatar)) -- Add examples to readme, prettify formatting [\#31](https://github.com/matter-labs/web3swift/pull/31) ([skywinder](https://github.com/skywinder)) -- continue eip681 work [\#27](https://github.com/matter-labs/web3swift/pull/27) ([shamatar](https://github.com/shamatar)) -- Implement EIP681 parser \(untested\) [\#26](https://github.com/matter-labs/web3swift/pull/26) ([shamatar](https://github.com/shamatar)) -- Change access control of function fromRaw in struct EthereumTransaction [\#11](https://github.com/matter-labs/web3swift/pull/11) ([Plazmathron](https://github.com/Plazmathron)) +- Fix ethereum address parsing, add readme [\#34](https://github.com/skywinder/web3swift/pull/34) ([shamatar](https://github.com/shamatar)) +- complete EIP681, fix the most stupid Ethereum address parsing [\#33](https://github.com/skywinder/web3swift/pull/33) ([shamatar](https://github.com/shamatar)) +- Add examples to readme, prettify formatting [\#31](https://github.com/skywinder/web3swift/pull/31) ([skywinder](https://github.com/skywinder)) +- continue eip681 work [\#27](https://github.com/skywinder/web3swift/pull/27) ([shamatar](https://github.com/shamatar)) +- Implement EIP681 parser \(untested\) [\#26](https://github.com/skywinder/web3swift/pull/26) ([shamatar](https://github.com/shamatar)) +- Change access control of function fromRaw in struct EthereumTransaction [\#11](https://github.com/skywinder/web3swift/pull/11) ([Plazmathron](https://github.com/Plazmathron)) -## [1.1.6](https://github.com/matter-labs/web3swift/tree/1.1.6) (2018-09-04) +## [1.1.6](https://github.com/skywinder/web3swift/tree/1.1.6) (2018-09-04) -[Full Changelog](https://github.com/matter-labs/web3swift/compare/1.1.5...1.1.6) +[Full Changelog](https://github.com/skywinder/web3swift/compare/1.1.5...1.1.6) **Merged pull requests:** -- Quick fix for scrypt performance [\#17](https://github.com/matter-labs/web3swift/pull/17) ([shamatar](https://github.com/shamatar)) -- adding description string to Web3Error [\#1](https://github.com/matter-labs/web3swift/pull/1) ([GabCas](https://github.com/GabCas)) +- Quick fix for scrypt performance [\#17](https://github.com/skywinder/web3swift/pull/17) ([shamatar](https://github.com/shamatar)) +- adding description string to Web3Error [\#1](https://github.com/skywinder/web3swift/pull/1) ([GabCas](https://github.com/GabCas)) + +## [1.1.5](https://github.com/skywinder/web3swift/tree/1.1.5) (2018-08-10) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/1.1.1...1.1.5) + +## [1.1.1](https://github.com/skywinder/web3swift/tree/1.1.1) (2018-07-30) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/1.1.0...1.1.1) + +## [1.1.0](https://github.com/skywinder/web3swift/tree/1.1.0) (2018-07-27) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/1.0.1...1.1.0) + +## [1.0.1](https://github.com/skywinder/web3swift/tree/1.0.1) (2018-07-12) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/1.0.0...1.0.1) + +## [1.0.0](https://github.com/skywinder/web3swift/tree/1.0.0) (2018-07-04) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.9.0...1.0.0) + +## [0.9.0](https://github.com/skywinder/web3swift/tree/0.9.0) (2018-06-18) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.8.1...0.9.0) + +## [0.8.1](https://github.com/skywinder/web3swift/tree/0.8.1) (2018-06-10) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.8.0...0.8.1) + +## [0.8.0](https://github.com/skywinder/web3swift/tree/0.8.0) (2018-05-31) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.7.9...0.8.0) + +## [0.7.9](https://github.com/skywinder/web3swift/tree/0.7.9) (2018-05-31) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.7.0...0.7.9) + +## [0.7.0](https://github.com/skywinder/web3swift/tree/0.7.0) (2018-05-11) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.6.0...0.7.0) + +## [0.6.0](https://github.com/skywinder/web3swift/tree/0.6.0) (2018-04-24) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.5.6...0.6.0) + +## [0.5.6](https://github.com/skywinder/web3swift/tree/0.5.6) (2018-04-20) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.5.5...0.5.6) + +## [0.5.5](https://github.com/skywinder/web3swift/tree/0.5.5) (2018-04-18) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.5.4...0.5.5) + +## [0.5.4](https://github.com/skywinder/web3swift/tree/0.5.4) (2018-04-16) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.5.3...0.5.4) + +## [0.5.3](https://github.com/skywinder/web3swift/tree/0.5.3) (2018-04-16) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.5.2...0.5.3) + +## [0.5.2](https://github.com/skywinder/web3swift/tree/0.5.2) (2018-04-16) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.5.1...0.5.2) + +## [0.5.1](https://github.com/skywinder/web3swift/tree/0.5.1) (2018-04-11) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.5.0...0.5.1) + +## [0.5.0](https://github.com/skywinder/web3swift/tree/0.5.0) (2018-04-10) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.4.1...0.5.0) + +## [0.4.1](https://github.com/skywinder/web3swift/tree/0.4.1) (2018-04-07) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.4.0...0.4.1) + +## [0.4.0](https://github.com/skywinder/web3swift/tree/0.4.0) (2018-04-04) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.3.6...0.4.0) + +## [0.3.6](https://github.com/skywinder/web3swift/tree/0.3.6) (2018-04-02) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.3.5...0.3.6) + +## [0.3.5](https://github.com/skywinder/web3swift/tree/0.3.5) (2018-03-20) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.3.4...0.3.5) + +## [0.3.4](https://github.com/skywinder/web3swift/tree/0.3.4) (2018-03-18) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.3.3...0.3.4) + +## [0.3.3](https://github.com/skywinder/web3swift/tree/0.3.3) (2018-03-05) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.3.2...0.3.3) + +## [0.3.2](https://github.com/skywinder/web3swift/tree/0.3.2) (2018-03-03) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.3.1...0.3.2) + +## [0.3.1](https://github.com/skywinder/web3swift/tree/0.3.1) (2018-03-01) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.3.0...0.3.1) + +## [0.3.0](https://github.com/skywinder/web3swift/tree/0.3.0) (2018-02-27) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.2.99...0.3.0) + +## [0.2.99](https://github.com/skywinder/web3swift/tree/0.2.99) (2018-02-27) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.2.98...0.2.99) + +## [0.2.98](https://github.com/skywinder/web3swift/tree/0.2.98) (2018-02-27) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.2.12...0.2.98) + +## [0.2.12](https://github.com/skywinder/web3swift/tree/0.2.12) (2018-02-01) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.2.11...0.2.12) + +## [0.2.11](https://github.com/skywinder/web3swift/tree/0.2.11) (2018-02-01) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.2.10...0.2.11) + +## [0.2.10](https://github.com/skywinder/web3swift/tree/0.2.10) (2018-01-31) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.2.9...0.2.10) + +## [0.2.9](https://github.com/skywinder/web3swift/tree/0.2.9) (2018-01-29) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.2.8...0.2.9) + +## [0.2.8](https://github.com/skywinder/web3swift/tree/0.2.8) (2018-01-18) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.2.7...0.2.8) + +## [0.2.7](https://github.com/skywinder/web3swift/tree/0.2.7) (2018-01-15) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.2.5...0.2.7) + +## [0.2.5](https://github.com/skywinder/web3swift/tree/0.2.5) (2018-01-12) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.2.0...0.2.5) + +## [0.2.0](https://github.com/skywinder/web3swift/tree/0.2.0) (2017-12-30) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.1.2...0.2.0) + +## [0.1.2](https://github.com/skywinder/web3swift/tree/0.1.2) (2017-12-27) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.1.1...0.1.2) + +## [0.1.1](https://github.com/skywinder/web3swift/tree/0.1.1) (2017-12-26) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.1.0...0.1.1) + +## [0.1.0](https://github.com/skywinder/web3swift/tree/0.1.0) (2017-12-26) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.0.6...0.1.0) + +## [0.0.6](https://github.com/skywinder/web3swift/tree/0.0.6) (2017-12-26) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.0.5...0.0.6) + +## [0.0.5](https://github.com/skywinder/web3swift/tree/0.0.5) (2017-12-21) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.0.4...0.0.5) + +## [0.0.4](https://github.com/skywinder/web3swift/tree/0.0.4) (2017-12-21) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.0.3...0.0.4) + +## [0.0.3](https://github.com/skywinder/web3swift/tree/0.0.3) (2017-12-20) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.0.2...0.0.3) + +## [0.0.2](https://github.com/skywinder/web3swift/tree/0.0.2) (2017-12-20) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/0.0.1...0.0.2) + +## [0.0.1](https://github.com/skywinder/web3swift/tree/0.0.1) (2017-12-19) + +[Full Changelog](https://github.com/skywinder/web3swift/compare/3b32224461f8510e743fa23bccbb437269f98525...0.0.1) diff --git a/Carthage/Checkouts/BigInt/.codecov.yml b/Carthage/Checkouts/BigInt/.codecov.yml deleted file mode 100644 index e3be23030..000000000 --- a/Carthage/Checkouts/BigInt/.codecov.yml +++ /dev/null @@ -1,14 +0,0 @@ -ignore: -- "/Tests/*" -comment: - layout: "header, diff" - behavior: default - require_changes: no -coverage: - status: - project: - default: - target: auto - threshold: null - base: auto - paths: "Sources/*" diff --git a/Carthage/Checkouts/BigInt/.github/workflows/jazzy.yml b/Carthage/Checkouts/BigInt/.github/workflows/jazzy.yml deleted file mode 100644 index 4ae6fb70b..000000000 --- a/Carthage/Checkouts/BigInt/.github/workflows/jazzy.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Swift - -on: - push: - tags: - - '*' - -jobs: - macos: - runs-on: macos-latest - steps: - - uses: actions/checkout@v2 - - name: Install jazzy - run: gem install jazzy - - name: Generate documentation - run: | - jazzy \ - --clean \ - --github-file-prefix "https://github.com/attaswift/$module/tree/${GITHUB_REF}" \ - --module-version "${{ github.event.release.tag_name }}" \ - --copyright "© $(date '+%Y') [Károly Lőrentey](https://twitter.com/lorentey). (Last updated: $(date '+%Y-%m-%d'))" \ - --config .jazzy.yml - - name: Commit docs - run: | - git config --local user.email "bot@github.com" - git config --local user.name "GitHub Actions" - git add ./docs - git commit -m "Update docs" - git push origin HEAD:master diff --git a/Carthage/Checkouts/BigInt/.github/workflows/swift.yml b/Carthage/Checkouts/BigInt/.github/workflows/swift.yml deleted file mode 100644 index 3b977ac3a..000000000 --- a/Carthage/Checkouts/BigInt/.github/workflows/swift.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: Swift - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - macos: - runs-on: macos-latest - steps: - - uses: actions/checkout@v2 - - name: Build - run: swift build --build-tests - - name: Run tests - run: swift test - xcode: - runs-on: macos-latest - strategy: - matrix: - scheme: [BigInt-macOS, BigInt-iOS, BigInt-watchOS, BigInt-tvOS] - steps: - - uses: actions/checkout@v2 - - name: Build - run: xcrun xcodebuild -workspace BigInt.xcworkspace -scheme ${{ matrix.scheme }} - linux: - container: - image: swift:${{ matrix.linux }} - runs-on: ubuntu-latest - strategy: - matrix: - linux: [bionic, xenial, focal] - steps: - - uses: actions/checkout@v2 - - name: Build - run: swift build --build-tests --enable-test-discovery - - name: Test - run: swift test --enable-test-discovery - codecov: - runs-on: macos-latest - steps: - - uses: actions/checkout@v2 - - name: Test and generate code coverage report - run: xcrun xcodebuild -workspace BigInt.xcworkspace -scheme BigInt-macOS test - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1 diff --git a/Carthage/Checkouts/BigInt/.gitignore b/Carthage/Checkouts/BigInt/.gitignore deleted file mode 100644 index 59f40b169..000000000 --- a/Carthage/Checkouts/BigInt/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -/Carthage/Build -/.build -/Packages -xcuserdata -/Package.pins -/Package.resolved diff --git a/Carthage/Checkouts/BigInt/.jazzy.yml b/Carthage/Checkouts/BigInt/.jazzy.yml deleted file mode 100644 index 3698439d3..000000000 --- a/Carthage/Checkouts/BigInt/.jazzy.yml +++ /dev/null @@ -1,8 +0,0 @@ -module: BigInt -author: Károly Lőrentey -theme: fullwidth -output: ./docs -author_url: "https://twitter.com/lorentey" -github_url: "https://github.com/attaswift/BigInt" -root_url: "https://attaswift.github.io/BigInt/reference/" -xcodebuild_arguments: ["-workspace", "BigInt.xcworkspace", "-scheme", "BigInt-macOS"] \ No newline at end of file diff --git a/Carthage/Checkouts/BigInt/.swift-version b/Carthage/Checkouts/BigInt/.swift-version deleted file mode 100644 index 819e07a22..000000000 --- a/Carthage/Checkouts/BigInt/.swift-version +++ /dev/null @@ -1 +0,0 @@ -5.0 diff --git a/Carthage/Checkouts/BigInt/.travis.yml b/Carthage/Checkouts/BigInt/.travis.yml deleted file mode 100644 index 47753fd23..000000000 --- a/Carthage/Checkouts/BigInt/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: swift -osx_image: xcode11 -script: -- swift build -- swift test -- xcrun xcodebuild -workspace BigInt.xcworkspace -scheme BigInt-macOS test -- xcrun xcodebuild -workspace BigInt.xcworkspace -scheme BigInt-iOS -destination generic/platform=iOS -- xcrun xcodebuild -workspace BigInt.xcworkspace -scheme BigInt-watchOS -- xcrun xcodebuild -workspace BigInt.xcworkspace -scheme BigInt-tvOS -after_success: bash <(curl -s https://codecov.io/bash) diff --git a/Carthage/Checkouts/BigInt/BigInt.podspec b/Carthage/Checkouts/BigInt/BigInt.podspec deleted file mode 100644 index cdb493eb9..000000000 --- a/Carthage/Checkouts/BigInt/BigInt.podspec +++ /dev/null @@ -1,17 +0,0 @@ - -Pod::Spec.new do |spec| - spec.name = 'BigInt' - spec.version = '5.3.0' - spec.ios.deployment_target = "8.0" - spec.osx.deployment_target = "10.9" - spec.tvos.deployment_target = "9.0" - spec.watchos.deployment_target = "2.0" - spec.license = { :type => 'MIT', :file => 'LICENSE.md' } - spec.summary = 'Arbitrary-precision arithmetic in pure Swift' - spec.homepage = 'https://github.com/attaswift/BigInt' - spec.author = 'Károly Lőrentey' - spec.source = { :git => 'https://github.com/attaswift/BigInt.git', :tag => 'v' + String(spec.version) } - spec.source_files = 'Sources/*.swift' - spec.social_media_url = 'https://twitter.com/lorentey' - spec.documentation_url = 'http://attaswift.github.io/BigInt/' -end diff --git a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/project.pbxproj b/Carthage/Checkouts/BigInt/BigInt.xcodeproj/project.pbxproj deleted file mode 100644 index 2402d2b9a..000000000 --- a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1301 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 48; - objects = { - -/* Begin PBXBuildFile section */ - BB241C441DDB70600067F917 /* Addition.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C301DDB70600067F917 /* Addition.swift */; }; - BB241C451DDB70600067F917 /* Bitwise Ops.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C311DDB70600067F917 /* Bitwise Ops.swift */; }; - BB241C461DDB70600067F917 /* Comparable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C321DDB70600067F917 /* Comparable.swift */; }; - BB241C471DDB70600067F917 /* Data Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C331DDB70600067F917 /* Data Conversion.swift */; }; - BB241C481DDB70600067F917 /* Division.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C341DDB70600067F917 /* Division.swift */; }; - BB241C491DDB70600067F917 /* Exponentiation.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C351DDB70600067F917 /* Exponentiation.swift */; }; - BB241C4A1DDB70600067F917 /* GCD.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C361DDB70600067F917 /* GCD.swift */; }; - BB241C4B1DDB70600067F917 /* Hashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C371DDB70600067F917 /* Hashable.swift */; }; - BB241C4C1DDB70600067F917 /* Multiplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C381DDB70600067F917 /* Multiplication.swift */; }; - BB241C4D1DDB70600067F917 /* Prime Test.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C391DDB70600067F917 /* Prime Test.swift */; }; - BB241C4E1DDB70600067F917 /* String Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3A1DDB70600067F917 /* String Conversion.swift */; }; - BB241C4F1DDB70600067F917 /* Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3B1DDB70600067F917 /* Random.swift */; }; - BB241C501DDB70600067F917 /* Shifts.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3C1DDB70600067F917 /* Shifts.swift */; }; - BB241C511DDB70600067F917 /* Square Root.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3D1DDB70600067F917 /* Square Root.swift */; }; - BB241C521DDB70600067F917 /* Subtraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3E1DDB70600067F917 /* Subtraction.swift */; }; - BB241C531DDB70600067F917 /* BigUInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3F1DDB70600067F917 /* BigUInt.swift */; }; - BB241C651DDB70B00067F917 /* BigInt.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBB55AD41C8F88F20050DDA9 /* BigInt.framework */; }; - BB241C6F1DDB71910067F917 /* BigUInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3F1DDB70600067F917 /* BigUInt.swift */; }; - BB241C701DDB71910067F917 /* Comparable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C321DDB70600067F917 /* Comparable.swift */; }; - BB241C711DDB71910067F917 /* Hashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C371DDB70600067F917 /* Hashable.swift */; }; - BB241C721DDB71910067F917 /* Data Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C331DDB70600067F917 /* Data Conversion.swift */; }; - BB241C731DDB71910067F917 /* Addition.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C301DDB70600067F917 /* Addition.swift */; }; - BB241C741DDB71910067F917 /* Subtraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3E1DDB70600067F917 /* Subtraction.swift */; }; - BB241C751DDB71910067F917 /* Multiplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C381DDB70600067F917 /* Multiplication.swift */; }; - BB241C761DDB71910067F917 /* Division.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C341DDB70600067F917 /* Division.swift */; }; - BB241C771DDB71910067F917 /* Exponentiation.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C351DDB70600067F917 /* Exponentiation.swift */; }; - BB241C781DDB71910067F917 /* Bitwise Ops.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C311DDB70600067F917 /* Bitwise Ops.swift */; }; - BB241C791DDB71910067F917 /* Shifts.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3C1DDB70600067F917 /* Shifts.swift */; }; - BB241C7A1DDB71910067F917 /* Square Root.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3D1DDB70600067F917 /* Square Root.swift */; }; - BB241C7B1DDB71910067F917 /* GCD.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C361DDB70600067F917 /* GCD.swift */; }; - BB241C7C1DDB71910067F917 /* Prime Test.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C391DDB70600067F917 /* Prime Test.swift */; }; - BB241C7D1DDB71910067F917 /* String Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3A1DDB70600067F917 /* String Conversion.swift */; }; - BB241C7E1DDB71910067F917 /* Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3B1DDB70600067F917 /* Random.swift */; }; - BB241C831DDB71920067F917 /* BigUInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3F1DDB70600067F917 /* BigUInt.swift */; }; - BB241C841DDB71920067F917 /* Comparable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C321DDB70600067F917 /* Comparable.swift */; }; - BB241C851DDB71920067F917 /* Hashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C371DDB70600067F917 /* Hashable.swift */; }; - BB241C861DDB71920067F917 /* Data Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C331DDB70600067F917 /* Data Conversion.swift */; }; - BB241C871DDB71920067F917 /* Addition.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C301DDB70600067F917 /* Addition.swift */; }; - BB241C881DDB71920067F917 /* Subtraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3E1DDB70600067F917 /* Subtraction.swift */; }; - BB241C891DDB71920067F917 /* Multiplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C381DDB70600067F917 /* Multiplication.swift */; }; - BB241C8A1DDB71920067F917 /* Division.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C341DDB70600067F917 /* Division.swift */; }; - BB241C8B1DDB71920067F917 /* Exponentiation.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C351DDB70600067F917 /* Exponentiation.swift */; }; - BB241C8C1DDB71920067F917 /* Bitwise Ops.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C311DDB70600067F917 /* Bitwise Ops.swift */; }; - BB241C8D1DDB71920067F917 /* Shifts.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3C1DDB70600067F917 /* Shifts.swift */; }; - BB241C8E1DDB71920067F917 /* Square Root.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3D1DDB70600067F917 /* Square Root.swift */; }; - BB241C8F1DDB71920067F917 /* GCD.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C361DDB70600067F917 /* GCD.swift */; }; - BB241C901DDB71920067F917 /* Prime Test.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C391DDB70600067F917 /* Prime Test.swift */; }; - BB241C911DDB71920067F917 /* String Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3A1DDB70600067F917 /* String Conversion.swift */; }; - BB241C921DDB71920067F917 /* Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3B1DDB70600067F917 /* Random.swift */; }; - BB241C971DDB71920067F917 /* BigUInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3F1DDB70600067F917 /* BigUInt.swift */; }; - BB241C981DDB71920067F917 /* Comparable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C321DDB70600067F917 /* Comparable.swift */; }; - BB241C991DDB71920067F917 /* Hashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C371DDB70600067F917 /* Hashable.swift */; }; - BB241C9A1DDB71920067F917 /* Data Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C331DDB70600067F917 /* Data Conversion.swift */; }; - BB241C9B1DDB71920067F917 /* Addition.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C301DDB70600067F917 /* Addition.swift */; }; - BB241C9C1DDB71920067F917 /* Subtraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3E1DDB70600067F917 /* Subtraction.swift */; }; - BB241C9D1DDB71920067F917 /* Multiplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C381DDB70600067F917 /* Multiplication.swift */; }; - BB241C9E1DDB71920067F917 /* Division.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C341DDB70600067F917 /* Division.swift */; }; - BB241C9F1DDB71920067F917 /* Exponentiation.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C351DDB70600067F917 /* Exponentiation.swift */; }; - BB241CA01DDB71920067F917 /* Bitwise Ops.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C311DDB70600067F917 /* Bitwise Ops.swift */; }; - BB241CA11DDB71920067F917 /* Shifts.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3C1DDB70600067F917 /* Shifts.swift */; }; - BB241CA21DDB71920067F917 /* Square Root.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3D1DDB70600067F917 /* Square Root.swift */; }; - BB241CA31DDB71920067F917 /* GCD.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C361DDB70600067F917 /* GCD.swift */; }; - BB241CA41DDB71920067F917 /* Prime Test.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C391DDB70600067F917 /* Prime Test.swift */; }; - BB241CA51DDB71920067F917 /* String Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3A1DDB70600067F917 /* String Conversion.swift */; }; - BB241CA61DDB71920067F917 /* Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3B1DDB70600067F917 /* Random.swift */; }; - BB241CBB1DDB71A50067F917 /* ProfileTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C5A1DDB70690067F917 /* ProfileTests.swift */; }; - BB241CC51DDB71A60067F917 /* ProfileTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C5A1DDB70690067F917 /* ProfileTests.swift */; }; - BB241CDC1DDB79E20067F917 /* BigUIntTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C571DDB70690067F917 /* BigUIntTests.swift */; }; - BB241CE41DDB79E30067F917 /* BigUIntTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C571DDB70690067F917 /* BigUIntTests.swift */; }; - BB4273F61F24AFCC00065766 /* Tools.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB4273F41F24AFC800065766 /* Tools.swift */; }; - BB4273F71F24AFCD00065766 /* Tools.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB4273F41F24AFC800065766 /* Tools.swift */; }; - BB4273F81F24AFCD00065766 /* Tools.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB4273F41F24AFC800065766 /* Tools.swift */; }; - BB4273F91F24AFCE00065766 /* Tools.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB4273F41F24AFC800065766 /* Tools.swift */; }; - BB64CD611F1D65D000C1B077 /* BigInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C2F1DDB70600067F917 /* BigInt.swift */; }; - BB9889A51F3E5C3100014740 /* Strideable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB9889A41F3E5C3100014740 /* Strideable.swift */; }; - BB9889A61F3E5C3100014740 /* Strideable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB9889A41F3E5C3100014740 /* Strideable.swift */; }; - BB9889A71F3E5C3100014740 /* Strideable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB9889A41F3E5C3100014740 /* Strideable.swift */; }; - BB9889A81F3E5C3100014740 /* Strideable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB9889A41F3E5C3100014740 /* Strideable.swift */; }; - BB9889AA1F3E5CC600014740 /* Integer Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB9889A91F3E5CC600014740 /* Integer Conversion.swift */; }; - BB9889AB1F3E5CC600014740 /* Integer Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB9889A91F3E5CC600014740 /* Integer Conversion.swift */; }; - BB9889AC1F3E5CC600014740 /* Integer Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB9889A91F3E5CC600014740 /* Integer Conversion.swift */; }; - BB9889AD1F3E5CC600014740 /* Integer Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB9889A91F3E5CC600014740 /* Integer Conversion.swift */; }; - BB99168F1F32610700CCFDDC /* BigIntTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C561DDB70690067F917 /* BigIntTests.swift */; }; - BB9916901F32610A00CCFDDC /* BigUIntTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C571DDB70690067F917 /* BigUIntTests.swift */; }; - BB9916911F33C32000CCFDDC /* WordTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBEAE4DC1F28C37800F4E329 /* WordTests.swift */; }; - BBABCDD21F3E17A8009CA8BC /* Floating Point Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBABCDD11F3E17A8009CA8BC /* Floating Point Conversion.swift */; }; - BBABCDD31F3E17A8009CA8BC /* Floating Point Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBABCDD11F3E17A8009CA8BC /* Floating Point Conversion.swift */; }; - BBABCDD41F3E17A8009CA8BC /* Floating Point Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBABCDD11F3E17A8009CA8BC /* Floating Point Conversion.swift */; }; - BBABCDD51F3E17A8009CA8BC /* Floating Point Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBABCDD11F3E17A8009CA8BC /* Floating Point Conversion.swift */; }; - BBABCDD71F3E2038009CA8BC /* Words and Bits.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBABCDD61F3E2038009CA8BC /* Words and Bits.swift */; }; - BBABCDD81F3E2038009CA8BC /* Words and Bits.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBABCDD61F3E2038009CA8BC /* Words and Bits.swift */; }; - BBABCDD91F3E2038009CA8BC /* Words and Bits.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBABCDD61F3E2038009CA8BC /* Words and Bits.swift */; }; - BBABCDDA1F3E2038009CA8BC /* Words and Bits.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBABCDD61F3E2038009CA8BC /* Words and Bits.swift */; }; - BBB55ABD1C8F80020050DDA9 /* BigInt.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBB55AB21C8F80020050DDA9 /* BigInt.framework */; }; - BBB55ADE1C8F88F20050DDA9 /* BigInt.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBB55AD41C8F88F20050DDA9 /* BigInt.framework */; }; - BBB55B081C8F8CBC0050DDA9 /* BigInt.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBB55AFE1C8F8CBB0050DDA9 /* BigInt.framework */; }; - BBC944371F24C25A00ED6C30 /* BigInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C2F1DDB70600067F917 /* BigInt.swift */; }; - BBC944381F24C25B00ED6C30 /* BigInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C2F1DDB70600067F917 /* BigInt.swift */; }; - BBC944391F24C25C00ED6C30 /* BigInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C2F1DDB70600067F917 /* BigInt.swift */; }; - BBC9443A1F24C27E00ED6C30 /* BigIntTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C561DDB70690067F917 /* BigIntTests.swift */; }; - BBC9443C1F24C27F00ED6C30 /* BigIntTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C561DDB70690067F917 /* BigIntTests.swift */; }; - BBE4CA4E1F3DA5AB0062A281 /* Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBE4CA4D1F3DA5AB0062A281 /* Codable.swift */; }; - BBE4CA4F1F3DAD380062A281 /* Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBE4CA4D1F3DA5AB0062A281 /* Codable.swift */; }; - BBE4CA501F3DAD390062A281 /* Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBE4CA4D1F3DA5AB0062A281 /* Codable.swift */; }; - BBE4CA511F3DAD390062A281 /* Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBE4CA4D1F3DA5AB0062A281 /* Codable.swift */; }; - BBEAE4DD1F28C37800F4E329 /* WordTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBEAE4DC1F28C37800F4E329 /* WordTests.swift */; }; - BBEAE4DF1F28C37800F4E329 /* WordTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBEAE4DC1F28C37800F4E329 /* WordTests.swift */; }; - BBF16BD51F2BA51B00402089 /* ProfileTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C5A1DDB70690067F917 /* ProfileTests.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - BB241C621DDB70B00067F917 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BBB55AA91C8F80020050DDA9 /* Project object */; - proxyType = 1; - remoteGlobalIDString = BBB55AD31C8F88F20050DDA9; - remoteInfo = BigInt; - }; - BBB55ABE1C8F80020050DDA9 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BBB55AA91C8F80020050DDA9 /* Project object */; - proxyType = 1; - remoteGlobalIDString = BBB55AB11C8F80020050DDA9; - remoteInfo = BigInt; - }; - BBB55ADF1C8F88F20050DDA9 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BBB55AA91C8F80020050DDA9 /* Project object */; - proxyType = 1; - remoteGlobalIDString = BBB55AD31C8F88F20050DDA9; - remoteInfo = BigInt; - }; - BBB55B091C8F8CBC0050DDA9 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BBB55AA91C8F80020050DDA9 /* Project object */; - proxyType = 1; - remoteGlobalIDString = BBB55AFD1C8F8CBB0050DDA9; - remoteInfo = BigInt; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - BB241BC51DD9F6490067F917 /* Package.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; - BB241BC71DD9F7D60067F917 /* BigInt.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; path = BigInt.podspec; sourceTree = ""; }; - BB241C2F1DDB70600067F917 /* BigInt.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BigInt.swift; sourceTree = ""; }; - BB241C301DDB70600067F917 /* Addition.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Addition.swift; sourceTree = ""; }; - BB241C311DDB70600067F917 /* Bitwise Ops.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Bitwise Ops.swift"; sourceTree = ""; }; - BB241C321DDB70600067F917 /* Comparable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Comparable.swift; sourceTree = ""; }; - BB241C331DDB70600067F917 /* Data Conversion.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Data Conversion.swift"; sourceTree = ""; }; - BB241C341DDB70600067F917 /* Division.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Division.swift; sourceTree = ""; }; - BB241C351DDB70600067F917 /* Exponentiation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Exponentiation.swift; sourceTree = ""; }; - BB241C361DDB70600067F917 /* GCD.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GCD.swift; sourceTree = ""; }; - BB241C371DDB70600067F917 /* Hashable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Hashable.swift; sourceTree = ""; }; - BB241C381DDB70600067F917 /* Multiplication.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Multiplication.swift; sourceTree = ""; }; - BB241C391DDB70600067F917 /* Prime Test.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Prime Test.swift"; sourceTree = ""; }; - BB241C3A1DDB70600067F917 /* String Conversion.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String Conversion.swift"; sourceTree = ""; }; - BB241C3B1DDB70600067F917 /* Random.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Random.swift; sourceTree = ""; }; - BB241C3C1DDB70600067F917 /* Shifts.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Shifts.swift; sourceTree = ""; }; - BB241C3D1DDB70600067F917 /* Square Root.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Square Root.swift"; sourceTree = ""; }; - BB241C3E1DDB70600067F917 /* Subtraction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Subtraction.swift; sourceTree = ""; }; - BB241C3F1DDB70600067F917 /* BigUInt.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BigUInt.swift; sourceTree = ""; }; - BB241C561DDB70690067F917 /* BigIntTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BigIntTests.swift; sourceTree = ""; }; - BB241C571DDB70690067F917 /* BigUIntTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BigUIntTests.swift; sourceTree = ""; }; - BB241C5A1DDB70690067F917 /* ProfileTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProfileTests.swift; sourceTree = ""; }; - BB241C6A1DDB70B00067F917 /* BigInt Benchmark.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "BigInt Benchmark.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - BB241CE81DDB7B620067F917 /* CHANGELOG.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = ""; }; - BB241CE91DDB7B620067F917 /* Demo.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = Demo.playground; sourceTree = ""; }; - BB241CF01DDB84210067F917 /* .codecov.yml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = .codecov.yml; sourceTree = ""; }; - BB4273F41F24AFC800065766 /* Tools.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Tools.swift; sourceTree = ""; }; - BB9889A41F3E5C3100014740 /* Strideable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Strideable.swift; sourceTree = ""; }; - BB9889A91F3E5CC600014740 /* Integer Conversion.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Integer Conversion.swift"; sourceTree = ""; }; - BBABCDD11F3E17A8009CA8BC /* Floating Point Conversion.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Floating Point Conversion.swift"; sourceTree = ""; }; - BBABCDD61F3E2038009CA8BC /* Words and Bits.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Words and Bits.swift"; sourceTree = ""; }; - BBB55AB21C8F80020050DDA9 /* BigInt.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BigInt.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - BBB55AB71C8F80020050DDA9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - BBB55ABC1C8F80020050DDA9 /* BigInt-Test.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "BigInt-Test.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - BBB55AC31C8F80020050DDA9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - BBB55ACC1C8F80660050DDA9 /* version.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = version.xcconfig; sourceTree = ""; }; - BBB55AD41C8F88F20050DDA9 /* BigInt.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BigInt.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - BBB55ADD1C8F88F20050DDA9 /* BigInt-Test.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "BigInt-Test.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - BBB55AF11C8F8BE00050DDA9 /* BigInt.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BigInt.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - BBB55AFE1C8F8CBB0050DDA9 /* BigInt.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BigInt.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - BBB55B071C8F8CBB0050DDA9 /* BigInt-Test.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "BigInt-Test.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - BBB55B1D1C8F9E850050DDA9 /* LICENSE.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = LICENSE.md; sourceTree = ""; }; - BBB55B1E1C8F9E920050DDA9 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; - BBE4CA4D1F3DA5AB0062A281 /* Codable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Codable.swift; sourceTree = ""; }; - BBEAE4DC1F28C37800F4E329 /* WordTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WordTests.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - BB241C641DDB70B00067F917 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - BB241C651DDB70B00067F917 /* BigInt.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55AAE1C8F80020050DDA9 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55AB91C8F80020050DDA9 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - BBB55ABD1C8F80020050DDA9 /* BigInt.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55AD01C8F88F20050DDA9 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55ADA1C8F88F20050DDA9 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - BBB55ADE1C8F88F20050DDA9 /* BigInt.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55AED1C8F8BE00050DDA9 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55AFA1C8F8CBB0050DDA9 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55B041C8F8CBB0050DDA9 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - BBB55B081C8F8CBC0050DDA9 /* BigInt.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - BB241CCB1DDB71DB0067F917 /* Frameworks */ = { - isa = PBXGroup; - children = ( - ); - name = Frameworks; - sourceTree = ""; - }; - BBB55AA81C8F80020050DDA9 = { - isa = PBXGroup; - children = ( - BBB55B1E1C8F9E920050DDA9 /* README.md */, - BBB55B1D1C8F9E850050DDA9 /* LICENSE.md */, - BB241CE81DDB7B620067F917 /* CHANGELOG.md */, - BB241BC51DD9F6490067F917 /* Package.swift */, - BB241BC71DD9F7D60067F917 /* BigInt.podspec */, - BB241CF01DDB84210067F917 /* .codecov.yml */, - BBB55ACC1C8F80660050DDA9 /* version.xcconfig */, - BB241CE91DDB7B620067F917 /* Demo.playground */, - BBB55AB41C8F80020050DDA9 /* Sources */, - BBB55AC01C8F80020050DDA9 /* Tests */, - BBB55AB31C8F80020050DDA9 /* Products */, - BB241CCB1DDB71DB0067F917 /* Frameworks */, - ); - sourceTree = ""; - }; - BBB55AB31C8F80020050DDA9 /* Products */ = { - isa = PBXGroup; - children = ( - BBB55AB21C8F80020050DDA9 /* BigInt.framework */, - BBB55ABC1C8F80020050DDA9 /* BigInt-Test.xctest */, - BBB55AD41C8F88F20050DDA9 /* BigInt.framework */, - BBB55ADD1C8F88F20050DDA9 /* BigInt-Test.xctest */, - BBB55AF11C8F8BE00050DDA9 /* BigInt.framework */, - BBB55AFE1C8F8CBB0050DDA9 /* BigInt.framework */, - BBB55B071C8F8CBB0050DDA9 /* BigInt-Test.xctest */, - BB241C6A1DDB70B00067F917 /* BigInt Benchmark.xctest */, - ); - name = Products; - sourceTree = ""; - }; - BBB55AB41C8F80020050DDA9 /* Sources */ = { - isa = PBXGroup; - children = ( - BB241C3F1DDB70600067F917 /* BigUInt.swift */, - BB241C2F1DDB70600067F917 /* BigInt.swift */, - BBABCDD61F3E2038009CA8BC /* Words and Bits.swift */, - BB9889A91F3E5CC600014740 /* Integer Conversion.swift */, - BBABCDD11F3E17A8009CA8BC /* Floating Point Conversion.swift */, - BB241C3A1DDB70600067F917 /* String Conversion.swift */, - BB241C331DDB70600067F917 /* Data Conversion.swift */, - BB241C321DDB70600067F917 /* Comparable.swift */, - BB241C371DDB70600067F917 /* Hashable.swift */, - BBE4CA4D1F3DA5AB0062A281 /* Codable.swift */, - BB241C301DDB70600067F917 /* Addition.swift */, - BB241C3E1DDB70600067F917 /* Subtraction.swift */, - BB9889A41F3E5C3100014740 /* Strideable.swift */, - BB241C381DDB70600067F917 /* Multiplication.swift */, - BB241C341DDB70600067F917 /* Division.swift */, - BB241C351DDB70600067F917 /* Exponentiation.swift */, - BB241C311DDB70600067F917 /* Bitwise Ops.swift */, - BB241C3C1DDB70600067F917 /* Shifts.swift */, - BB241C3D1DDB70600067F917 /* Square Root.swift */, - BB241C361DDB70600067F917 /* GCD.swift */, - BB241C391DDB70600067F917 /* Prime Test.swift */, - BB241C3B1DDB70600067F917 /* Random.swift */, - BBB55AB71C8F80020050DDA9 /* Info.plist */, - ); - path = Sources; - sourceTree = ""; - }; - BBB55AC01C8F80020050DDA9 /* Tests */ = { - isa = PBXGroup; - children = ( - BB241C561DDB70690067F917 /* BigIntTests.swift */, - BB241C571DDB70690067F917 /* BigUIntTests.swift */, - BBEAE4DC1F28C37800F4E329 /* WordTests.swift */, - BB241C5A1DDB70690067F917 /* ProfileTests.swift */, - BB4273F41F24AFC800065766 /* Tools.swift */, - BBB55AC31C8F80020050DDA9 /* Info.plist */, - ); - name = Tests; - path = Tests/BigIntTests; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - BBB55AAF1C8F80020050DDA9 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55AD11C8F88F20050DDA9 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55AEE1C8F8BE00050DDA9 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55AFB1C8F8CBB0050DDA9 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - BB241C601DDB70B00067F917 /* BigInt Benchmark */ = { - isa = PBXNativeTarget; - buildConfigurationList = BB241C671DDB70B00067F917 /* Build configuration list for PBXNativeTarget "BigInt Benchmark" */; - buildPhases = ( - BB241C631DDB70B00067F917 /* Sources */, - BB241C641DDB70B00067F917 /* Frameworks */, - BB241C661DDB70B00067F917 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - BB241C611DDB70B00067F917 /* PBXTargetDependency */, - ); - name = "BigInt Benchmark"; - productName = BigIntTests; - productReference = BB241C6A1DDB70B00067F917 /* BigInt Benchmark.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - BBB55AB11C8F80020050DDA9 /* BigInt-iOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = BBB55AC61C8F80020050DDA9 /* Build configuration list for PBXNativeTarget "BigInt-iOS" */; - buildPhases = ( - BBB55AAD1C8F80020050DDA9 /* Sources */, - BBB55AAE1C8F80020050DDA9 /* Frameworks */, - BBB55AAF1C8F80020050DDA9 /* Headers */, - BBB55AB01C8F80020050DDA9 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "BigInt-iOS"; - productName = BigInt; - productReference = BBB55AB21C8F80020050DDA9 /* BigInt.framework */; - productType = "com.apple.product-type.framework"; - }; - BBB55ABB1C8F80020050DDA9 /* BigInt iOS Tests */ = { - isa = PBXNativeTarget; - buildConfigurationList = BBB55AC91C8F80020050DDA9 /* Build configuration list for PBXNativeTarget "BigInt iOS Tests" */; - buildPhases = ( - BBB55AB81C8F80020050DDA9 /* Sources */, - BBB55AB91C8F80020050DDA9 /* Frameworks */, - BBB55ABA1C8F80020050DDA9 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - BBB55ABF1C8F80020050DDA9 /* PBXTargetDependency */, - ); - name = "BigInt iOS Tests"; - productName = BigIntTests; - productReference = BBB55ABC1C8F80020050DDA9 /* BigInt-Test.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - BBB55AD31C8F88F20050DDA9 /* BigInt-macOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = BBB55AE51C8F88F20050DDA9 /* Build configuration list for PBXNativeTarget "BigInt-macOS" */; - buildPhases = ( - BBB55ACF1C8F88F20050DDA9 /* Sources */, - BBB55AD01C8F88F20050DDA9 /* Frameworks */, - BBB55AD11C8F88F20050DDA9 /* Headers */, - BBB55AD21C8F88F20050DDA9 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "BigInt-macOS"; - productName = BigInt; - productReference = BBB55AD41C8F88F20050DDA9 /* BigInt.framework */; - productType = "com.apple.product-type.framework"; - }; - BBB55ADC1C8F88F20050DDA9 /* BigInt macOS Tests */ = { - isa = PBXNativeTarget; - buildConfigurationList = BBB55AE81C8F88F20050DDA9 /* Build configuration list for PBXNativeTarget "BigInt macOS Tests" */; - buildPhases = ( - BBB55AD91C8F88F20050DDA9 /* Sources */, - BBB55ADA1C8F88F20050DDA9 /* Frameworks */, - BBB55ADB1C8F88F20050DDA9 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - BBB55AE01C8F88F20050DDA9 /* PBXTargetDependency */, - ); - name = "BigInt macOS Tests"; - productName = BigIntTests; - productReference = BBB55ADD1C8F88F20050DDA9 /* BigInt-Test.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - BBB55AF01C8F8BE00050DDA9 /* BigInt-watchOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = BBB55AF61C8F8BE00050DDA9 /* Build configuration list for PBXNativeTarget "BigInt-watchOS" */; - buildPhases = ( - BBB55AEC1C8F8BE00050DDA9 /* Sources */, - BBB55AED1C8F8BE00050DDA9 /* Frameworks */, - BBB55AEE1C8F8BE00050DDA9 /* Headers */, - BBB55AEF1C8F8BE00050DDA9 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "BigInt-watchOS"; - productName = BigInt; - productReference = BBB55AF11C8F8BE00050DDA9 /* BigInt.framework */; - productType = "com.apple.product-type.framework"; - }; - BBB55AFD1C8F8CBB0050DDA9 /* BigInt-tvOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = BBB55B0F1C8F8CBC0050DDA9 /* Build configuration list for PBXNativeTarget "BigInt-tvOS" */; - buildPhases = ( - BBB55AF91C8F8CBB0050DDA9 /* Sources */, - BBB55AFA1C8F8CBB0050DDA9 /* Frameworks */, - BBB55AFB1C8F8CBB0050DDA9 /* Headers */, - BBB55AFC1C8F8CBB0050DDA9 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "BigInt-tvOS"; - productName = BigInt; - productReference = BBB55AFE1C8F8CBB0050DDA9 /* BigInt.framework */; - productType = "com.apple.product-type.framework"; - }; - BBB55B061C8F8CBB0050DDA9 /* BigInt tvOS Tests */ = { - isa = PBXNativeTarget; - buildConfigurationList = BBB55B121C8F8CBC0050DDA9 /* Build configuration list for PBXNativeTarget "BigInt tvOS Tests" */; - buildPhases = ( - BBB55B031C8F8CBB0050DDA9 /* Sources */, - BBB55B041C8F8CBB0050DDA9 /* Frameworks */, - BBB55B051C8F8CBB0050DDA9 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - BBB55B0A1C8F8CBC0050DDA9 /* PBXTargetDependency */, - ); - name = "BigInt tvOS Tests"; - productName = BigIntTests; - productReference = BBB55B071C8F8CBB0050DDA9 /* BigInt-Test.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - BBB55AA91C8F80020050DDA9 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 1300; - ORGANIZATIONNAME = "Károly Lőrentey"; - TargetAttributes = { - BBB55AB11C8F80020050DDA9 = { - CreatedOnToolsVersion = 7.3; - LastSwiftMigration = 1020; - }; - BBB55ABB1C8F80020050DDA9 = { - CreatedOnToolsVersion = 7.3; - LastSwiftMigration = 1020; - }; - BBB55AD31C8F88F20050DDA9 = { - CreatedOnToolsVersion = 7.3; - LastSwiftMigration = 1020; - }; - BBB55ADC1C8F88F20050DDA9 = { - CreatedOnToolsVersion = 7.3; - LastSwiftMigration = 1020; - }; - BBB55AF01C8F8BE00050DDA9 = { - CreatedOnToolsVersion = 7.3; - LastSwiftMigration = 1020; - }; - BBB55AFD1C8F8CBB0050DDA9 = { - CreatedOnToolsVersion = 7.3; - }; - BBB55B061C8F8CBB0050DDA9 = { - CreatedOnToolsVersion = 7.3; - }; - }; - }; - buildConfigurationList = BBB55AAC1C8F80020050DDA9 /* Build configuration list for PBXProject "BigInt" */; - compatibilityVersion = "Xcode 8.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = BBB55AA81C8F80020050DDA9; - productRefGroup = BBB55AB31C8F80020050DDA9 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - BBB55AB11C8F80020050DDA9 /* BigInt-iOS */, - BBB55AD31C8F88F20050DDA9 /* BigInt-macOS */, - BBB55AF01C8F8BE00050DDA9 /* BigInt-watchOS */, - BBB55AFD1C8F8CBB0050DDA9 /* BigInt-tvOS */, - BBB55ABB1C8F80020050DDA9 /* BigInt iOS Tests */, - BBB55ADC1C8F88F20050DDA9 /* BigInt macOS Tests */, - BBB55B061C8F8CBB0050DDA9 /* BigInt tvOS Tests */, - BB241C601DDB70B00067F917 /* BigInt Benchmark */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - BB241C661DDB70B00067F917 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55AB01C8F80020050DDA9 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55ABA1C8F80020050DDA9 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55AD21C8F88F20050DDA9 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55ADB1C8F88F20050DDA9 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55AEF1C8F8BE00050DDA9 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55AFC1C8F8CBB0050DDA9 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55B051C8F8CBB0050DDA9 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - BB241C631DDB70B00067F917 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BB4273F91F24AFCE00065766 /* Tools.swift in Sources */, - BBF16BD51F2BA51B00402089 /* ProfileTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55AAD1C8F80020050DDA9 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BB241C441DDB70600067F917 /* Addition.swift in Sources */, - BB241C531DDB70600067F917 /* BigUInt.swift in Sources */, - BB241C4F1DDB70600067F917 /* Random.swift in Sources */, - BBABCDD71F3E2038009CA8BC /* Words and Bits.swift in Sources */, - BBC944391F24C25C00ED6C30 /* BigInt.swift in Sources */, - BB241C4D1DDB70600067F917 /* Prime Test.swift in Sources */, - BBABCDD21F3E17A8009CA8BC /* Floating Point Conversion.swift in Sources */, - BB241C4B1DDB70600067F917 /* Hashable.swift in Sources */, - BB241C4A1DDB70600067F917 /* GCD.swift in Sources */, - BB9889AA1F3E5CC600014740 /* Integer Conversion.swift in Sources */, - BB241C4E1DDB70600067F917 /* String Conversion.swift in Sources */, - BB241C481DDB70600067F917 /* Division.swift in Sources */, - BB241C501DDB70600067F917 /* Shifts.swift in Sources */, - BB241C521DDB70600067F917 /* Subtraction.swift in Sources */, - BB241C4C1DDB70600067F917 /* Multiplication.swift in Sources */, - BB9889A51F3E5C3100014740 /* Strideable.swift in Sources */, - BB241C511DDB70600067F917 /* Square Root.swift in Sources */, - BB241C471DDB70600067F917 /* Data Conversion.swift in Sources */, - BB241C461DDB70600067F917 /* Comparable.swift in Sources */, - BBE4CA4E1F3DA5AB0062A281 /* Codable.swift in Sources */, - BB241C491DDB70600067F917 /* Exponentiation.swift in Sources */, - BB241C451DDB70600067F917 /* Bitwise Ops.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55AB81C8F80020050DDA9 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BBC9443A1F24C27E00ED6C30 /* BigIntTests.swift in Sources */, - BB241CBB1DDB71A50067F917 /* ProfileTests.swift in Sources */, - BB4273F61F24AFCC00065766 /* Tools.swift in Sources */, - BBEAE4DD1F28C37800F4E329 /* WordTests.swift in Sources */, - BB241CE41DDB79E30067F917 /* BigUIntTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55ACF1C8F88F20050DDA9 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BB241C8C1DDB71920067F917 /* Bitwise Ops.swift in Sources */, - BB241C921DDB71920067F917 /* Random.swift in Sources */, - BB241C901DDB71920067F917 /* Prime Test.swift in Sources */, - BBABCDD81F3E2038009CA8BC /* Words and Bits.swift in Sources */, - BB64CD611F1D65D000C1B077 /* BigInt.swift in Sources */, - BB241C851DDB71920067F917 /* Hashable.swift in Sources */, - BBABCDD31F3E17A8009CA8BC /* Floating Point Conversion.swift in Sources */, - BB241C881DDB71920067F917 /* Subtraction.swift in Sources */, - BB241C8A1DDB71920067F917 /* Division.swift in Sources */, - BB9889AB1F3E5CC600014740 /* Integer Conversion.swift in Sources */, - BB241C831DDB71920067F917 /* BigUInt.swift in Sources */, - BB241C841DDB71920067F917 /* Comparable.swift in Sources */, - BB241C911DDB71920067F917 /* String Conversion.swift in Sources */, - BB241C861DDB71920067F917 /* Data Conversion.swift in Sources */, - BB241C891DDB71920067F917 /* Multiplication.swift in Sources */, - BB9889A61F3E5C3100014740 /* Strideable.swift in Sources */, - BB241C8D1DDB71920067F917 /* Shifts.swift in Sources */, - BB241C8F1DDB71920067F917 /* GCD.swift in Sources */, - BB241C8E1DDB71920067F917 /* Square Root.swift in Sources */, - BBE4CA4F1F3DAD380062A281 /* Codable.swift in Sources */, - BB241C8B1DDB71920067F917 /* Exponentiation.swift in Sources */, - BB241C871DDB71920067F917 /* Addition.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55AD91C8F88F20050DDA9 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BB4273F71F24AFCD00065766 /* Tools.swift in Sources */, - BB9916911F33C32000CCFDDC /* WordTests.swift in Sources */, - BB9916901F32610A00CCFDDC /* BigUIntTests.swift in Sources */, - BB99168F1F32610700CCFDDC /* BigIntTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55AEC1C8F8BE00050DDA9 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BB241C781DDB71910067F917 /* Bitwise Ops.swift in Sources */, - BB241C7E1DDB71910067F917 /* Random.swift in Sources */, - BB241C7C1DDB71910067F917 /* Prime Test.swift in Sources */, - BBABCDD91F3E2038009CA8BC /* Words and Bits.swift in Sources */, - BBC944371F24C25A00ED6C30 /* BigInt.swift in Sources */, - BB241C711DDB71910067F917 /* Hashable.swift in Sources */, - BBABCDD41F3E17A8009CA8BC /* Floating Point Conversion.swift in Sources */, - BB241C741DDB71910067F917 /* Subtraction.swift in Sources */, - BB241C761DDB71910067F917 /* Division.swift in Sources */, - BB9889AC1F3E5CC600014740 /* Integer Conversion.swift in Sources */, - BB241C6F1DDB71910067F917 /* BigUInt.swift in Sources */, - BB241C701DDB71910067F917 /* Comparable.swift in Sources */, - BB241C7D1DDB71910067F917 /* String Conversion.swift in Sources */, - BB241C721DDB71910067F917 /* Data Conversion.swift in Sources */, - BB241C751DDB71910067F917 /* Multiplication.swift in Sources */, - BB9889A71F3E5C3100014740 /* Strideable.swift in Sources */, - BB241C791DDB71910067F917 /* Shifts.swift in Sources */, - BB241C7B1DDB71910067F917 /* GCD.swift in Sources */, - BB241C7A1DDB71910067F917 /* Square Root.swift in Sources */, - BBE4CA501F3DAD390062A281 /* Codable.swift in Sources */, - BB241C771DDB71910067F917 /* Exponentiation.swift in Sources */, - BB241C731DDB71910067F917 /* Addition.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55AF91C8F8CBB0050DDA9 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BB241CA01DDB71920067F917 /* Bitwise Ops.swift in Sources */, - BB241CA61DDB71920067F917 /* Random.swift in Sources */, - BB241CA41DDB71920067F917 /* Prime Test.swift in Sources */, - BBABCDDA1F3E2038009CA8BC /* Words and Bits.swift in Sources */, - BBC944381F24C25B00ED6C30 /* BigInt.swift in Sources */, - BB241C991DDB71920067F917 /* Hashable.swift in Sources */, - BBABCDD51F3E17A8009CA8BC /* Floating Point Conversion.swift in Sources */, - BB241C9C1DDB71920067F917 /* Subtraction.swift in Sources */, - BB241C9E1DDB71920067F917 /* Division.swift in Sources */, - BB9889AD1F3E5CC600014740 /* Integer Conversion.swift in Sources */, - BB241C971DDB71920067F917 /* BigUInt.swift in Sources */, - BB241C981DDB71920067F917 /* Comparable.swift in Sources */, - BB241CA51DDB71920067F917 /* String Conversion.swift in Sources */, - BB241C9A1DDB71920067F917 /* Data Conversion.swift in Sources */, - BB241C9D1DDB71920067F917 /* Multiplication.swift in Sources */, - BB9889A81F3E5C3100014740 /* Strideable.swift in Sources */, - BB241CA11DDB71920067F917 /* Shifts.swift in Sources */, - BB241CA31DDB71920067F917 /* GCD.swift in Sources */, - BB241CA21DDB71920067F917 /* Square Root.swift in Sources */, - BBE4CA511F3DAD390062A281 /* Codable.swift in Sources */, - BB241C9F1DDB71920067F917 /* Exponentiation.swift in Sources */, - BB241C9B1DDB71920067F917 /* Addition.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55B031C8F8CBB0050DDA9 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BBC9443C1F24C27F00ED6C30 /* BigIntTests.swift in Sources */, - BB241CC51DDB71A60067F917 /* ProfileTests.swift in Sources */, - BB4273F81F24AFCD00065766 /* Tools.swift in Sources */, - BBEAE4DF1F28C37800F4E329 /* WordTests.swift in Sources */, - BB241CDC1DDB79E20067F917 /* BigUIntTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - BB241C611DDB70B00067F917 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = BBB55AD31C8F88F20050DDA9 /* BigInt-macOS */; - targetProxy = BB241C621DDB70B00067F917 /* PBXContainerItemProxy */; - }; - BBB55ABF1C8F80020050DDA9 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = BBB55AB11C8F80020050DDA9 /* BigInt-iOS */; - targetProxy = BBB55ABE1C8F80020050DDA9 /* PBXContainerItemProxy */; - }; - BBB55AE01C8F88F20050DDA9 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = BBB55AD31C8F88F20050DDA9 /* BigInt-macOS */; - targetProxy = BBB55ADF1C8F88F20050DDA9 /* PBXContainerItemProxy */; - }; - BBB55B0A1C8F8CBC0050DDA9 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = BBB55AFD1C8F8CBB0050DDA9 /* BigInt-tvOS */; - targetProxy = BBB55B091C8F8CBC0050DDA9 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - BB241C681DDB70B00067F917 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - APPLICATION_EXTENSION_API_ONLY = NO; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Tests/BigIntTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).Tests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - }; - name = Debug; - }; - BB241C691DDB70B00067F917 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - APPLICATION_EXTENSION_API_ONLY = NO; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Tests/BigIntTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).Tests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - }; - name = Release; - }; - BBB55AC41C8F80020050DDA9 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = BBB55ACC1C8F80660050DDA9 /* version.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = "$(BUILD_NUMBER)"; - DEBUG_INFORMATION_FORMAT = dwarf; - DYLIB_COMPATIBILITY_VERSION = "$(BUILD_NUMBER)"; - DYLIB_CURRENT_VERSION = "$(BUILD_NUMBER)"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - OTHER_SWIFT_FLAGS = "-DDebug"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 5.0; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - BBB55AC51C8F80020050DDA9 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = BBB55ACC1C8F80660050DDA9 /* version.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = "$(BUILD_NUMBER)"; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DYLIB_COMPATIBILITY_VERSION = "$(BUILD_NUMBER)"; - DYLIB_CURRENT_VERSION = "$(BUILD_NUMBER)"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_SWIFT_FLAGS = "-DProfile"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 5.0; - VALIDATE_PRODUCT = YES; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - BBB55AC71C8F80020050DDA9 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - DEFINES_MODULE = YES; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Sources/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).$(PLATFORM_DISPLAY_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(PROJECT_NAME)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SUPPORTS_MACCATALYST = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - BBB55AC81C8F80020050DDA9 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - DEFINES_MODULE = YES; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Sources/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).$(PLATFORM_DISPLAY_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(PROJECT_NAME)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SUPPORTS_MACCATALYST = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - BBB55ACA1C8F80020050DDA9 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - APPLICATION_EXTENSION_API_ONLY = NO; - INFOPLIST_FILE = Tests/BigIntTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).Tests"; - PRODUCT_NAME = "$(PROJECT_NAME)-Test"; - SDKROOT = iphoneos; - }; - name = Debug; - }; - BBB55ACB1C8F80020050DDA9 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - APPLICATION_EXTENSION_API_ONLY = NO; - INFOPLIST_FILE = Tests/BigIntTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).Tests"; - PRODUCT_NAME = "$(PROJECT_NAME)-Test"; - SDKROOT = iphoneos; - }; - name = Release; - }; - BBB55AE61C8F88F20050DDA9 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - COMBINE_HIDPI_IMAGES = YES; - DEFINES_MODULE = YES; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_VERSION = A; - INFOPLIST_FILE = Sources/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).$(PLATFORM_DISPLAY_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(PROJECT_NAME)"; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - BBB55AE71C8F88F20050DDA9 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - COMBINE_HIDPI_IMAGES = YES; - DEFINES_MODULE = YES; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_VERSION = A; - INFOPLIST_FILE = Sources/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).$(PLATFORM_DISPLAY_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(PROJECT_NAME)"; - SDKROOT = macosx; - SKIP_INSTALL = YES; - }; - name = Release; - }; - BBB55AE91C8F88F20050DDA9 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - APPLICATION_EXTENSION_API_ONLY = NO; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Tests/BigIntTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).Tests"; - PRODUCT_NAME = "$(PROJECT_NAME)-Test"; - SDKROOT = macosx; - }; - name = Debug; - }; - BBB55AEA1C8F88F20050DDA9 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - APPLICATION_EXTENSION_API_ONLY = NO; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Tests/BigIntTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).Tests"; - PRODUCT_NAME = "$(PROJECT_NAME)-Test"; - SDKROOT = macosx; - }; - name = Release; - }; - BBB55AF71C8F8BE00050DDA9 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - DEFINES_MODULE = YES; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Sources/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).$(PLATFORM_DISPLAY_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(PROJECT_NAME)"; - SDKROOT = watchos; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = 4; - }; - name = Debug; - }; - BBB55AF81C8F8BE00050DDA9 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - DEFINES_MODULE = YES; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Sources/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).$(PLATFORM_DISPLAY_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(PROJECT_NAME)"; - SDKROOT = watchos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = 4; - }; - name = Release; - }; - BBB55B101C8F8CBC0050DDA9 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - DEFINES_MODULE = YES; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Sources/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).$(PLATFORM_DISPLAY_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(PROJECT_NAME)"; - SDKROOT = appletvos; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = 3; - }; - name = Debug; - }; - BBB55B111C8F8CBC0050DDA9 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - DEFINES_MODULE = YES; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Sources/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).$(PLATFORM_DISPLAY_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(PROJECT_NAME)"; - SDKROOT = appletvos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = 3; - }; - name = Release; - }; - BBB55B131C8F8CBC0050DDA9 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - APPLICATION_EXTENSION_API_ONLY = NO; - FRAMEWORK_SEARCH_PATHS = "$(inherited)"; - INFOPLIST_FILE = Tests/BigIntTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).Tests"; - PRODUCT_NAME = "$(PROJECT_NAME)-Test"; - SDKROOT = appletvos; - }; - name = Debug; - }; - BBB55B141C8F8CBC0050DDA9 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - APPLICATION_EXTENSION_API_ONLY = NO; - FRAMEWORK_SEARCH_PATHS = "$(inherited)"; - INFOPLIST_FILE = Tests/BigIntTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).Tests"; - PRODUCT_NAME = "$(PROJECT_NAME)-Test"; - SDKROOT = appletvos; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - BB241C671DDB70B00067F917 /* Build configuration list for PBXNativeTarget "BigInt Benchmark" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BB241C681DDB70B00067F917 /* Debug */, - BB241C691DDB70B00067F917 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - BBB55AAC1C8F80020050DDA9 /* Build configuration list for PBXProject "BigInt" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BBB55AC41C8F80020050DDA9 /* Debug */, - BBB55AC51C8F80020050DDA9 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - BBB55AC61C8F80020050DDA9 /* Build configuration list for PBXNativeTarget "BigInt-iOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BBB55AC71C8F80020050DDA9 /* Debug */, - BBB55AC81C8F80020050DDA9 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - BBB55AC91C8F80020050DDA9 /* Build configuration list for PBXNativeTarget "BigInt iOS Tests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BBB55ACA1C8F80020050DDA9 /* Debug */, - BBB55ACB1C8F80020050DDA9 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - BBB55AE51C8F88F20050DDA9 /* Build configuration list for PBXNativeTarget "BigInt-macOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BBB55AE61C8F88F20050DDA9 /* Debug */, - BBB55AE71C8F88F20050DDA9 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - BBB55AE81C8F88F20050DDA9 /* Build configuration list for PBXNativeTarget "BigInt macOS Tests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BBB55AE91C8F88F20050DDA9 /* Debug */, - BBB55AEA1C8F88F20050DDA9 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - BBB55AF61C8F8BE00050DDA9 /* Build configuration list for PBXNativeTarget "BigInt-watchOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BBB55AF71C8F8BE00050DDA9 /* Debug */, - BBB55AF81C8F8BE00050DDA9 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - BBB55B0F1C8F8CBC0050DDA9 /* Build configuration list for PBXNativeTarget "BigInt-tvOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BBB55B101C8F8CBC0050DDA9 /* Debug */, - BBB55B111C8F8CBC0050DDA9 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - BBB55B121C8F8CBC0050DDA9 /* Build configuration list for PBXNativeTarget "BigInt tvOS Tests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BBB55B131C8F8CBC0050DDA9 /* Debug */, - BBB55B141C8F8CBC0050DDA9 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = BBB55AA91C8F80020050DDA9 /* Project object */; -} diff --git a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Carthage/Checkouts/BigInt/BigInt.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 0713bb13e..000000000 --- a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Carthage/Checkouts/BigInt/BigInt.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcbaselines/BB241C601DDB70B00067F917.xcbaseline/3714311D-5102-4569-B213-8DC87DC6C2F3.plist b/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcbaselines/BB241C601DDB70B00067F917.xcbaseline/3714311D-5102-4569-B213-8DC87DC6C2F3.plist deleted file mode 100644 index 096fe76f8..000000000 --- a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcbaselines/BB241C601DDB70B00067F917.xcbaseline/3714311D-5102-4569-B213-8DC87DC6C2F3.plist +++ /dev/null @@ -1,92 +0,0 @@ - - - - - classNames - - ProfileTests - - testBalancedMultiplication() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.41604 - baselineIntegrationDisplayName - 2016-11-15 18:19:04 - - - testDivision() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.70161 - baselineIntegrationDisplayName - 2016-11-15 18:19:04 - - - testFibonacciAddition() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 2.3569 - baselineIntegrationDisplayName - 2016-11-15 18:19:04 - - - testGCD() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 1.801 - baselineIntegrationDisplayName - 2016-11-15 18:19:04 - - - testMersennePrimes() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 4.184 - baselineIntegrationDisplayName - 2016-11-15 18:19:04 - - - testModularExponentiation() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 2.1938 - baselineIntegrationDisplayName - 2016-11-15 18:19:04 - - - testMultiplicationByDigit() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.91891 - baselineIntegrationDisplayName - 2016-11-15 18:19:04 - - - testSquareRoot() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.48118 - baselineIntegrationDisplayName - 2016-11-15 18:19:04 - - - - - - diff --git a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcbaselines/BB241C601DDB70B00067F917.xcbaseline/3B06D4DF-FC61-43AE-8115-CA5059B5AB1B.plist b/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcbaselines/BB241C601DDB70B00067F917.xcbaseline/3B06D4DF-FC61-43AE-8115-CA5059B5AB1B.plist deleted file mode 100644 index d1b347466..000000000 --- a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcbaselines/BB241C601DDB70B00067F917.xcbaseline/3B06D4DF-FC61-43AE-8115-CA5059B5AB1B.plist +++ /dev/null @@ -1,92 +0,0 @@ - - - - - classNames - - ProfileTests - - testBalancedMultiplication() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.31603 - baselineIntegrationDisplayName - Jun 21, 2017, 5:03:36 PM - - - testDivision() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.60765 - baselineIntegrationDisplayName - Jun 21, 2017, 5:03:36 PM - - - testFibonacciAddition() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 2.0927 - baselineIntegrationDisplayName - Jun 21, 2017, 5:03:36 PM - - - testGCD() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 1.3631 - baselineIntegrationDisplayName - Jun 21, 2017, 5:03:36 PM - - - testMersennePrimes() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 3.4959 - baselineIntegrationDisplayName - Jun 21, 2017, 5:03:36 PM - - - testModularExponentiation() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 1.7139 - baselineIntegrationDisplayName - Jun 21, 2017, 5:03:36 PM - - - testMultiplicationByDigit() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.60397 - baselineIntegrationDisplayName - Jun 21, 2017, 5:03:36 PM - - - testSquareRoot() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.40256 - baselineIntegrationDisplayName - Jun 21, 2017, 5:03:36 PM - - - - - - diff --git a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcbaselines/BB241C601DDB70B00067F917.xcbaseline/E75E9014-DB8C-4424-B05B-83660CCFB7ED.plist b/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcbaselines/BB241C601DDB70B00067F917.xcbaseline/E75E9014-DB8C-4424-B05B-83660CCFB7ED.plist deleted file mode 100644 index bf59955f7..000000000 --- a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcbaselines/BB241C601DDB70B00067F917.xcbaseline/E75E9014-DB8C-4424-B05B-83660CCFB7ED.plist +++ /dev/null @@ -1,122 +0,0 @@ - - - - - classNames - - ProfileTests - - testBalancedFactorial() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.33337 - baselineIntegrationDisplayName - Jul 23, 2017, 12:47:59 - - - testDivision() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.59507 - baselineIntegrationDisplayName - Jul 23, 2017, 12:47:59 - - - testDivisionOfFactorial() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 3.6987 - baselineIntegrationDisplayName - Jul 23, 2017, 12:47:59 - - - testFactorial() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.66551 - baselineIntegrationDisplayName - Jul 23, 2017, 12:47:59 - - - testFibonacciAddition() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 2.0881 - baselineIntegrationDisplayName - Jul 23, 2017, 12:47:59 - - - testGCD() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 1.3696 - baselineIntegrationDisplayName - Jul 23, 2017, 12:47:59 - - - testMersennePrimes() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 3.71 - baselineIntegrationDisplayName - Jul 23, 2017, 12:47:59 - - - testModularExponentiation() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 1.8318 - baselineIntegrationDisplayName - Jul 23, 2017, 12:47:59 - - - testPrintingFactorial() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.95106 - baselineIntegrationDisplayName - Jul 23, 2017, 12:47:59 - - - testReadingFactorial() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.48879 - baselineIntegrationDisplayName - Jul 23, 2017, 12:47:59 - - - testSquareRoot() - - com.apple.XCTPerformanceMetric_WallClockTime - - baselineAverage - 0.45393 - baselineIntegrationDisplayName - Jul 23, 2017, 12:47:59 - - - - - - diff --git a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcbaselines/BB241C601DDB70B00067F917.xcbaseline/Info.plist b/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcbaselines/BB241C601DDB70B00067F917.xcbaseline/Info.plist deleted file mode 100644 index 3d624f11a..000000000 --- a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcbaselines/BB241C601DDB70B00067F917.xcbaseline/Info.plist +++ /dev/null @@ -1,57 +0,0 @@ - - - - - runDestinationsByUUID - - 3714311D-5102-4569-B213-8DC87DC6C2F3 - - localComputer - - busSpeedInMHz - 100 - cpuCount - 1 - cpuKind - Intel Core i7 - cpuSpeedInMHz - 2600 - logicalCPUCoresPerPackage - 8 - modelCode - MacBookPro10,1 - physicalCPUCoresPerPackage - 4 - platformIdentifier - com.apple.platform.macosx - - targetArchitecture - x86_64 - - E75E9014-DB8C-4424-B05B-83660CCFB7ED - - localComputer - - busSpeedInMHz - 100 - cpuCount - 1 - cpuKind - Intel Core i7 - cpuSpeedInMHz - 2900 - logicalCPUCoresPerPackage - 8 - modelCode - MacBookPro14,3 - physicalCPUCoresPerPackage - 4 - platformIdentifier - com.apple.platform.macosx - - targetArchitecture - x86_64 - - - - diff --git a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcschemes/BigInt Benchmark.xcscheme b/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcschemes/BigInt Benchmark.xcscheme deleted file mode 100644 index 5b99a9330..000000000 --- a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcschemes/BigInt Benchmark.xcscheme +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcschemes/BigInt-iOS.xcscheme b/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcschemes/BigInt-iOS.xcscheme deleted file mode 100644 index 0fc086a8d..000000000 --- a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcschemes/BigInt-iOS.xcscheme +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcschemes/BigInt-macOS.xcscheme b/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcschemes/BigInt-macOS.xcscheme deleted file mode 100644 index 50d05aa75..000000000 --- a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcschemes/BigInt-macOS.xcscheme +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcschemes/BigInt-tvOS.xcscheme b/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcschemes/BigInt-tvOS.xcscheme deleted file mode 100644 index 16589b0d4..000000000 --- a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcschemes/BigInt-tvOS.xcscheme +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcschemes/BigInt-watchOS.xcscheme b/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcschemes/BigInt-watchOS.xcscheme deleted file mode 100644 index 784c3d88e..000000000 --- a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcschemes/BigInt-watchOS.xcscheme +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/BigInt/BigInt.xcworkspace/contents.xcworkspacedata b/Carthage/Checkouts/BigInt/BigInt.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 8fad35107..000000000 --- a/Carthage/Checkouts/BigInt/BigInt.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Carthage/Checkouts/BigInt/BigInt.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Carthage/Checkouts/BigInt/BigInt.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/Carthage/Checkouts/BigInt/BigInt.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Carthage/Checkouts/BigInt/CHANGELOG.md b/Carthage/Checkouts/BigInt/CHANGELOG.md deleted file mode 100644 index c77eae6e3..000000000 --- a/Carthage/Checkouts/BigInt/CHANGELOG.md +++ /dev/null @@ -1,232 +0,0 @@ -# 5.3.0 (2021-09-06) - -This release contains the following changes: - -- Make access level for isZero the same for signed and unsigned types (#93) - -- NFC: Add protocol conformance to Comparable for BigInt for consistency (#88) - -# 5.2.1 (2020-11-15) - -This release contains the following changes: - -- Added a temporary fix for [SR-13491](https://bugs.swift.org/browse/SR-13491) - -# 5.2.0 (2020-08-24) - -This release contains the following changes: - -- Added support for the use of RandomNumberGenerator - -# 5.1.0 (2020-03-17) - -This release contains the following changes: - -- Added support to serialize/deserialize BigInt in a manner similar to BigUInt - -# 5.0.0 (2019-08-24) - -This release contains the following changes: - -- Swift 5 compatibility - -There were no functional changes. - -# 4.0.1 (2019-05-09) - -This release contains the following changes: - -- Cleaned warnings on Swift 5 - -There were no functional changes. - -# 4.0.0 (2019-04-03) - -This release contains the following changes: - -- Swift 5.0 compatibility for Linux and macOS -- Removed SipHash dependency - -There were no functional changes. - -# 3.1.0 (2018-06-08) - -This release contains the following changes: - -- Swift 4.1 compatibility for Linux and macOS -- Fix warnings for Swift 4.1 - -There were no functional changes. - -# 3.0.2 (2017-12-25) - -This release contains the following packaging fix: - -- Fixed product definitions in Package.swift not to create a duplicate library. (Issue #37) - -There were no functional changes. - -# 3.0.1 (2017-10-10) - -This release contains the following bug fixes: - -- Issue #27 — changing scope of `BigUInt` methods `kind` and `storage` to be `fileprivate` -- Making `subscript` method of `BigUInt` public - -# 3.0.0 (2017-09-07) - -This is a major release upgrading BigInt to the new integer protocols introduced in Swift 4 as part of [SE-0104, Protocol-oriented integers][se-0104]. - -[se-0104]: https://github.com/apple/swift-evolution/blob/master/proposals/0104-improved-integers.md - -- Adopting the new protocols involved major, breaking changes throughout the API. These aren't individually listed here. -- The `BigUInt` struct now provides inline storage for big integers that fit inside two words. This optimization speeds up conversions from built-in fixed-width integer types, amongst other frequent operations. -- `BigInt` and `BigUInt` implements the new `Codable` protocol. In both cases, values are encoded in an unkeyed container starting with a string indicating the sign (`"+"` or `"-"`), followed by a sequence of 64-bit unsigned integers representing component words, from least to most significant. -- New method: `BigInt.modulo`, contributed by @FabioTacke. -- `BigUInt` does not implement `Collection` in this release. The collection of words is available in the standard read-only `words` property. Direct public access to collection methods have been removed; if you have been manipulating big integers using collection methods, you need to rewrite your code. If you have a usecase that isn't covered by the public API, please submit a PR adding the missing functionality. (Public read-write access to the underlying storage inside `BigUInt` will not be restored, though.) - -BigInt is now part of the Attaswift project. The bundle identifiers in the supplied Xcode project have been updated accordingly. - -Note that the URL for the package's Git repository has changed; please update your references. - -# 2.2.0 (2017-06-20) - -This release contains the following changes: - -- `BigUInt.randomIntegerLessThan(_:)` was renamed to `BigUInt.randomInteger(lessThan:)` to match Swift 3 naming conventions. (The old name is still available for compatibility.) -- The `ShiftOperations` protocol was merged into `BigDigit` and removed. It was previously public by accident. (Issue #9) -- `BigInt.modulus(_:,_:)` is a new static method that returns the nonnegative modulus value of its two arguments. (PR #19 by @FabioTacke) - - -# 2.1.2 (2017-02-03) - -This release contains the following bugfix: - -- Issue #12: The iOS target in the supplied Xcode project file no longer copies extraneous files - as resources into the framework bundle. The set of such files included generate-docs.sh, which - led to App Store rejections for apps that build BigInt using the project file. - (Thanks to @arrrnas and @wuftymerguftyguff) - -No source-level changes were made. - -# 2.1.1 (2016-11-23) - -This release restores support for iOS 8.0 and macOS 10.9. - -# 2.1.0 (2016-11-15) - -This release contains the following changes: - -- BigInt now uses the SipHash hashing algorithm instead of implementing its own hashing. -- The `SipHash` package has been added as a required dependency. I suggest you use a dependency manager. -- Minimum deployment targets have been bumped to iOS 9.0 and macOS 10.0 to match those of `SipHash`. -- BigInt now requires Swift 3.0.1, included in Xcode 8.1. -- The Xcode project file has been regenerated from scratch, with new names for targets and schemes. -- The bundle identifiers of frameworks generated from the Xcode project file have been changed to `hu.lorentey.BigInt.`. - -# 2.0.1 (2016-11-08) - -This release contains the following bugfixes: - -- The Swift version number is now correctly set in all targets (PR #7 by @mAu888). -- BigInt now builds on Linux (PR #5 by @ratranqu). -- Building BigInt with the Swift Package Manager bundled with Swift 3.0.1 works correctly. - -Additionally, Foundation imports that weren't actually needed were removed from sources. - -# 2.0.0 (2016-09-20) - -This release updates the project for Swift 3.0, including adapting the API to the new naming conventions. - -Further changes: - -- The behavior of `BigUInt.gcd` when one of the arguments is zero has been fixed; the result in this case is now equal to the other argument. -- `BigInt` now conforms to `Strideable`, `IntegerArithmetic`, `SignedNumber` and `AbsoluteValuable`. -- `BigUInt` now conforms to `Strideable`, `IntegerArithmetic` and `BitwiseOperations`. - -# 1.3.0 (2016-03-23) - -This release updates the project to require Swift 2.2 and Xcode 7.3. There have been no other changes. - -# 1.2.3 (2016-01-12) - -This release adds experimental support for the Swift Package Manager and Swift 2.2. -There were no source-level changes. - -# 1.2.2 (2016-01-08) - -This release fixes version numbers embedded in build products. - -# 1.2.1 (2016-01-07) - -This release simply removes the stray LICENSE.md file from iOS builds. - - -# 1.2.0 (2016-01-06) - -With this release, BigInt supports watchOS and tvOS in addition to OS X and iOS. Deployment targets are as follows: - -- OS X 10.9 -- iOS 8 -- watchOS 2 -- tvOS 9 - -BigInt 1.2.0 also features support for both Carthage and CocoaPods deployments. - - -# 1.1.0 (2016-01-06) - -`BigInt` now contains enough functionality to pretend it's a respectable big integer lib. Some of the new additions since 1.0.0: - -- Conversion to/from `NSData` -- Vanilla exponentiation -- Algorithm to find the multiplicative inverse of an integer in modulo arithmetic -- An implementation of the Miller-Rabin primality test -- Support for generating random big integers -- Better support for playgrounds in Xcode -- Documentation for all public API -- Fun new calculation samples - - -# 1.0.0 (2016-01-04) - -This is the first release of the BigInt module, providing arbitrary precision integer arithmetic operations -in pure Swift. - -Two big integer types are included: `BigUInt` and `BigInt`, the latter being the signed variant. -Both of these are Swift structs with copy-on-write value semantics, and they can be used much -like any other integer type. - -The library provides implementations for some of the most frequently useful functions on -big integers, including - -- All functionality from `Comparable` and `Hashable` -- The full set of arithmetic operators: `+`, `-`, `*`, `/`, `%`, `+=`, `-=`, `*=`, `/=`, `%=` -- Addition and subtraction have variants that allow for shifting the digits of the second -operand on the fly. -- Unsigned subtraction will trap when the result would be negative. (There are variants -that return an overflow flag.) -- Multiplication uses brute force for numbers up to 1024 digits, then switches to Karatsuba's recursive method. -(This limit is configurable, see `BigUInt.directMultiplicationLimit`.) -A fused multiply-add method is also available. -- Division uses Knuth's Algorithm D, with its 3/2 digits wide quotient approximation. -It will trap when the divisor is zero. `BigUInt.divmod` returns the quotient and -remainder at once; this is faster than calculating them separately. -- Bitwise operators: `~`, `|`, `&`, `^`, `|=`, `&=`, `^=`, plus the following read-only properties: -- `width`: the minimum number of bits required to store the integer, -- `trailingZeroBitCount`: the number of trailing zero bits in the binary representation, -- `leadingZeroBitCount`: the number of leading zero bits (when the last digit isn't full), -- Shift operators: `>>`, `<<`, `>>=`, `<<=` -- Left shifts need to allocate memory to extend the digit array, so it's probably not a good idea -to left shift a `BigUInt` by 2^50 bits. -- Radix conversion between `String`s and big integers up to base 36 (using repeated divisions). -- Big integers use this to implement `StringLiteralConvertible` (in base 10). -- `sqrt(n)`: The square root of an integer (using Newton's method) -- `BigUInt.gcd(n, m)`: The greatest common divisor of two integers (Stein's algorithm) -- `BigUInt.powmod(base, exponent, modulus)`: Modular exponentiation (right-to-left binary method): - -The implementations are intended to be reasonably efficient, but they are unlikely to be -competitive with GMP at all, even when I happened to implement an algorithm with same asymptotic -behavior as GMP. (I haven't performed a comparison benchmark, though.) - -The library has 100% unit test coverage. diff --git a/Carthage/Checkouts/BigInt/Demo.playground/Contents.o b/Carthage/Checkouts/BigInt/Demo.playground/Contents.o deleted file mode 100644 index b8daafd61..000000000 Binary files a/Carthage/Checkouts/BigInt/Demo.playground/Contents.o and /dev/null differ diff --git a/Carthage/Checkouts/BigInt/Demo.playground/Pages/Digits of Pi.xcplaygroundpage/Contents.swift b/Carthage/Checkouts/BigInt/Demo.playground/Pages/Digits of Pi.xcplaygroundpage/Contents.swift deleted file mode 100644 index 092120fe7..000000000 --- a/Carthage/Checkouts/BigInt/Demo.playground/Pages/Digits of Pi.xcplaygroundpage/Contents.swift +++ /dev/null @@ -1,28 +0,0 @@ -//: [Previous](@previous) -import BigInt -//: ## Let's calculate the first thousand digits of π -//: -//: A fun application of BigInts is generating the digits of π. -//: Let's implement [Jeremy Gibbon's spigot algorithm][spigot] as an infinite `GeneratorType`. -//: This is a quite slow algorithm, but it makes up for it with its grooviness factor. -//: -//: [spigot]: http://www.cs.ox.ac.uk/jeremy.gibbons/publications/spigot.pdf -func digitsOfPi() -> AnyIterator { - var q: BigUInt = 1 - var r: BigUInt = 180 - var t: BigUInt = 60 - var i: UInt = 2 // Works until digit #826_566_842 - return AnyIterator { - let u: UInt = 3 * (3 * i + 1) * (3 * i + 2) - let y = (q.multiplied(byWord: 27 * i - 12) + 5 * r) / (5 * t) - (q, r, t) = ( - 10 * q.multiplied(byWord: i * (2 * i - 1)), - 10 * (q.multiplied(byWord: 5 * i - 2) + r - y * t).multiplied(byWord: u), - t.multiplied(byWord: u)) - i += 1 - return Int(y.words[0]) - } -} -//: Well, that was surprisingly easy. Does it work? You bet: -let digits = digitsOfPi().prefix(999).reduce("") { $0 + String($1) } -//: [Next](@next) diff --git a/Carthage/Checkouts/BigInt/Demo.playground/Pages/Factorials.xcplaygroundpage/Contents.swift b/Carthage/Checkouts/BigInt/Demo.playground/Pages/Factorials.xcplaygroundpage/Contents.swift deleted file mode 100644 index 24e7992b3..000000000 --- a/Carthage/Checkouts/BigInt/Demo.playground/Pages/Factorials.xcplaygroundpage/Contents.swift +++ /dev/null @@ -1,30 +0,0 @@ -//: [Previous](@previous) -import Foundation -import BigInt -//: The canonical way to demo big integers is with the factorial function. Here is a fancy definition for it: -func fact(_ n: Int) -> BigInt { - return (1 ... n).map { BigInt($0) }.reduce(BigInt(1), *) -} - -let f1 = fact(1) -let f2 = fact(2) -let f3 = fact(3) -let f4 = fact(4) -let f10 = fact(10) -let f100 = fact(100) -let f1000 = fact(1000) -//: That last value seems quite large. Just how many decimal digits is it? Let's convert it to a `String` to find out. -let decimal = String(f1000) -let digitCount = decimal.characters.count -//: Wow. 2500 digits is peanuts for `BigInt`, but Xcode's playground tech isn't designed to perform well with much more loop iterations, so let's stay at this level for now. -let ff2 = f1000 * f1000 -String(ff2).characters.count - -let ff4 = ff2 * ff2 -String(ff4).characters.count - -let ff8 = ff4 * ff4 -String(ff8).characters.count -//: That last operation multiplied two 10000-digit numbers; you may have noticed it took a couple of seconds to compute that value. Converting such huge values to decimal isn't particularly cheap, either. -//: -//: [Next](@next) diff --git a/Carthage/Checkouts/BigInt/Demo.playground/Pages/Generating Large Primes.xcplaygroundpage/Contents.swift b/Carthage/Checkouts/BigInt/Demo.playground/Pages/Generating Large Primes.xcplaygroundpage/Contents.swift deleted file mode 100644 index bc08ca525..000000000 --- a/Carthage/Checkouts/BigInt/Demo.playground/Pages/Generating Large Primes.xcplaygroundpage/Contents.swift +++ /dev/null @@ -1,25 +0,0 @@ -//: [Previous](@previous) -import Foundation -import BigInt -//: # Generating Large Prime Numbers -//: -//: `BigUInt` has an `isPrime()` method that does a [Miller-Rabin Primality Test][mrpt]. Let's use -//: this to create a function that finds the next prime number after any integer: -//: -//: [mrpt]: https://en.wikipedia.org/wiki/Miller%2dRabin_primality_test -func findNextPrime(after integer: BigUInt) -> BigUInt { - var candidate = integer - repeat { - candidate.increment() - } while !candidate.isPrime() - return candidate -} - -findNextPrime(after: 100) -findNextPrime(after: 1000) -findNextPrime(after: 10000) -findNextPrime(after: 100000000000) -findNextPrime(after: BigUInt(1) << 64) -findNextPrime(after: BigUInt(1) << 128) -findNextPrime(after: BigUInt(1) << 256) -//: [Next](@next) diff --git a/Carthage/Checkouts/BigInt/Demo.playground/Pages/Introduction.xcplaygroundpage/Contents.swift b/Carthage/Checkouts/BigInt/Demo.playground/Pages/Introduction.xcplaygroundpage/Contents.swift deleted file mode 100644 index 375a30581..000000000 --- a/Carthage/Checkouts/BigInt/Demo.playground/Pages/Introduction.xcplaygroundpage/Contents.swift +++ /dev/null @@ -1,31 +0,0 @@ -//: # Introduction -//: -//: The `BigInt` module provides a `BigInt` type that implements an [https://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic](integer type of arbitrary width). -//: These work much like `Int`s, but they don't have a preset maximum value---so they will never overflow. -//: The only practical limit to their capacity is the amount of memory & address space that your computer has, and the -//: amount of time you're willing to spend waiting for results---when their operands are truly huge, -//: big integer operations can take a long time to execute. -//: (`BigInt` represents integers in base 2^64, storing digits in an `Array`, so the theoretical -//: maximum value it can store is (2^64)^`Int.max` - 1.) -import Foundation -import BigInt -//: `BigInt` has several interesting initializers, but for now, the simplest way to create big integers is to use integer -//: or string literals. The latter is useful when you want to create a number that's larger than `UIntMax.max`: -let a: BigInt = 123 -let b: BigInt = 12345678 -let c: BigInt = 1234567890123456 -let d: BigInt = "12345678901234567890123456789012345678901234567890123456789012345678" -//: To work with `BigInt`s, you use the same arithmetic operators as you do with everyday `Int` values: -a + b -b - a --b -a * b -a * b * c -a * b * c * d - -d / c -d % c -d / (c * c) -d / (c * c * c) -d / (c * c * c * c) -//: [Next](@next) diff --git a/Carthage/Checkouts/BigInt/Demo.playground/Pages/The RSA algorithm.xcplaygroundpage/Contents.swift b/Carthage/Checkouts/BigInt/Demo.playground/Pages/The RSA algorithm.xcplaygroundpage/Contents.swift deleted file mode 100644 index 43e759411..000000000 --- a/Carthage/Checkouts/BigInt/Demo.playground/Pages/The RSA algorithm.xcplaygroundpage/Contents.swift +++ /dev/null @@ -1,57 +0,0 @@ -//: [Previous](@previous) -import Foundation -import BigInt -//: # RSA cryptography -//: -//: Another useful thing to have is a function that finds a random n-bit prime number: -func generatePrime(ofWidth width: Int) -> BigUInt { - while true { - var random = BigUInt.randomInteger(withExactWidth: width) - random |= BigUInt(1) - if random.isPrime() { - return random - } - } -} -//: For instance, here are two random 1024-bit prime numbers: -let p = generatePrime(ofWidth: 1024) -let q = generatePrime(ofWidth: 1024) -//: We know their product isn't prime, and `BigInt`'s primality test agrees: -let n = p * q -n.isPrime() -//: But we'd be in serious trouble if we had to get `p` and `q` back by factoring `n`---and this observation is -//: what makes RSA work. -//: -//: So let's derive a public/private RSA keypair out of these two primes: -//: -//: (Note though that in a real RSA cryptosystem, primes are chosen much more carefully.) -let phi = (p - 1) * (q - 1) -let e: BigUInt = 65537 -let d = e.inverse(phi)! - -d * e % phi - -typealias Key = (modulus: BigUInt, exponent: BigUInt) - -let publicKey: Key = (n, e) -let privateKey: Key = (n, d) -//: Given a key and a message, encryption is simply a modular exponentiation: -//: (Again, this is an oversimplification. In the real RSA system, the message is first transformed by a -//: [complex padding scheme][oaep].) -//: -//: [oaep]: https://en.wikipedia.org/wiki/Optimal_asymmetric_encryption_padding -func encrypt(_ message: BigUInt, key: Key) -> BigUInt { - return message.power(key.exponent, modulus: key.modulus) -} -//: Let's try encrypting some message with the public key. -let secret: BigUInt = BigUInt("Arbitrary precision arithmetic is fun!".data(using: .utf8)!) - -let cyphertext = encrypt(secret, key: publicKey) -//: Well that was easy. In theory, we can decrypt the cyphertext by simply encrypting it with the private key. -//: But does it really work? Yep: -let plaintext = encrypt(cyphertext, key: privateKey) - -let message = String(data: plaintext.serialize(), encoding: .utf8) -//: Isn't that awesome? -//: -//: [Next](@next) diff --git a/Carthage/Checkouts/BigInt/Demo.playground/contents.xcplayground b/Carthage/Checkouts/BigInt/Demo.playground/contents.xcplayground deleted file mode 100644 index 5a1e6af0e..000000000 --- a/Carthage/Checkouts/BigInt/Demo.playground/contents.xcplayground +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/Carthage/Checkouts/BigInt/LICENSE.md b/Carthage/Checkouts/BigInt/LICENSE.md deleted file mode 100644 index 18cefd118..000000000 --- a/Carthage/Checkouts/BigInt/LICENSE.md +++ /dev/null @@ -1,20 +0,0 @@ - -Copyright (c) 2016-2017 Károly Lőrentey - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Carthage/Checkouts/BigInt/LinuxMain.swift b/Carthage/Checkouts/BigInt/LinuxMain.swift deleted file mode 100644 index 1d6ba3763..000000000 --- a/Carthage/Checkouts/BigInt/LinuxMain.swift +++ /dev/null @@ -1,7 +0,0 @@ -import XCTest -@testable import BigIntTests - -XCTMain([ - testCase(BigIntTests.allTests), - testCase(BigUIntTests.allTests), -]) diff --git a/Carthage/Checkouts/BigInt/Package.swift b/Carthage/Checkouts/BigInt/Package.swift deleted file mode 100644 index 7bc0b9771..000000000 --- a/Carthage/Checkouts/BigInt/Package.swift +++ /dev/null @@ -1,21 +0,0 @@ -// swift-tools-version:5.0 -// -// Package.swift -// BigInt -// -// Created by Károly Lőrentey on 2016-01-12. -// Copyright © 2016-2017 Károly Lőrentey. -// - -import PackageDescription - -let package = Package( - name: "BigInt", - products: [ - .library(name: "BigInt", targets: ["BigInt"]) - ], - targets: [ - .target(name: "BigInt", path: "Sources"), - .testTarget(name: "BigIntTests", dependencies: ["BigInt"], path: "Tests") - ] -) diff --git a/Carthage/Checkouts/BigInt/README.md b/Carthage/Checkouts/BigInt/README.md deleted file mode 100644 index 66061769b..000000000 --- a/Carthage/Checkouts/BigInt/README.md +++ /dev/null @@ -1,431 +0,0 @@ -[![BigInt](https://github.com/attaswift/BigInt/raw/master/images/banner.png)](https://github.com/attaswift/BigInt) - -* [Overview](#overview) -* [API Documentation](#api) -* [License](#license) -* [Requirements and Integration](#integration) -* [Implementation Notes](#notes) - * [Full-width multiplication and division primitives](#fullwidth) - * [Why is there no generic `BigInt` type?](#generics) -* [Calculation Samples](#samples) - * [Obligatory factorial demo](#factorial) - * [RSA Cryptography](#rsa) - * [Calculating the Digits of π](#pi) - -[![Swift 5](https://img.shields.io/badge/Swift-5-blue.svg)](https://developer.apple.com/swift/) -[![License](https://img.shields.io/badge/licence-MIT-blue.svg)](http://cocoapods.org/pods/BigInt) -[![Platform](https://img.shields.io/cocoapods/p/BigInt.svg)](http://cocoapods.org/pods/BigInt) - -![Build Status](https://github.com/attaswift/BigInt/workflows/Swift/badge.svg?branch=master) -[![Code Coverage](https://codecov.io/github/attaswift/BigInt/coverage.svg?branch=master)](https://codecov.io/github/attaswift/BigInt?branch=master) -[![jazzy](https://raw.githubusercontent.com/attaswift/BigInt/master/docs/badge.svg)](https://attaswift.github.io/BigInt/) -[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg)](https://github.com/Carthage/Carthage) -[![Version](https://img.shields.io/cocoapods/v/BigInt.svg)](http://cocoapods.org/pods/BigInt) - -## Overview - -This repository provides [integer types of arbitrary width][wiki] implemented -in 100% pure Swift. The underlying representation is in base 2^64, using `Array`. - -[wiki]: https://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic - -This module is handy when you need an integer type that's wider than `UIntMax`, but -you don't want to add [The GNU Multiple Precision Arithmetic Library][GMP] -as a dependency. - -[GMP]: https://gmplib.org - -Two big integer types are included: [`BigUInt`][BigUInt] and [`BigInt`][BigInt], -the latter being the signed variant. -Both of these are Swift structs with copy-on-write value semantics, and they can be used much -like any other integer type. - -The library provides implementations for some of the most frequently useful functions on -big integers, including - -- All functionality from [`Comparable`][comparison] and [`Hashable`][hashing] - -- [The full set of arithmetic operators][addition]: `+`, `-`, `*`, `/`, `%`, `+=`, `-=`, `*=`, `/=`, `%=` - - [Addition][addition] and [subtraction][subtraction] have variants that allow for - shifting the digits of the second operand on the fly. - - Unsigned subtraction will trap when the result would be negative. - ([There are variants][subtraction] that return an overflow flag.) - - [Multiplication][mul] uses brute force for numbers up to 1024 digits, then switches to Karatsuba's recursive method. - (This limit is configurable, see `BigUInt.directMultiplicationLimit`.) - - A [fused multiply-add][fused] method is also available, along with other [special-case variants][multiplication]. - - [Division][division] uses Knuth's Algorithm D, with its 3/2 digits wide quotient approximation. - It will trap when the divisor is zero. - - [`BigUInt.divide`][divide] returns the quotient and - remainder at once; this is faster than calculating them separately. - -- [Bitwise operators][bitwise]: `~`, `|`, `&`, `^`, `|=`, `&=`, `^=`, plus the following read-only properties: - - [`width`][width]: the minimum number of bits required to store the integer, - - [`trailingZeroBitCount`][trailingZeroBitCount]: the number of trailing zero bits in the binary representation, - - [`leadingZeroBitCount`][leadingZeroBitCount]: the number of leading zero bits (when the last digit isn't full), - -- [Shift operators][shift]: `>>`, `<<`, `>>=`, `<<=` - -- Methods to [convert `NSData` to big integers][data] and vice versa. - -- Support for [generating random integers][random] of specified maximum width or magnitude. - -- Radix conversion to/from [`String`s][radix1] and [big integers][radix2] up to base 36 (using repeated divisions). - - Big integers use this to implement `StringLiteralConvertible` (in base 10). - -- [`sqrt(n)`][sqrt]: The square root of an integer (using Newton's method). - -- [`BigUInt.gcd(n, m)`][GCD]: The greatest common divisor of two integers (Stein's algorithm). - -- [`base.power(exponent, modulus)`][powmod]: Modular exponentiation (right-to-left binary method). - [Vanilla exponentiation][power] is also available. -- [`n.inverse(modulus)`][inverse]: Multiplicative inverse in modulo arithmetic (extended Euclidean algorithm). -- [`n.isPrime()`][prime]: Miller–Rabin primality test. - -The implementations are intended to be reasonably efficient, but they are unlikely to be -competitive with GMP at all, even when I happened to implement an algorithm with same asymptotic -behavior as GMP. (I haven't performed a comparison benchmark, though.) - -The library has 100% unit test coverage. Sadly this does not imply that there are no bugs -in it. - -## API Documentation - -Generated API docs are available at https://attaswift.github.io/BigInt/. - -## License - -BigInt can be used, distributed and modified under [the MIT license][license]. - -## Requirements and Integration - -BigInt 4.0.0 requires Swift 4.2 (The last version with support for Swift 3.x was BigInt 2.1.0. -The last version with support for Swift 2 was BigInt 1.3.0.) - -| Swift Version | last BigInt Version| -| ------------- |:-------------------| -| 3.x | 2.1.0 | -| 4.0 | 3.1.0 | -| 4.2 | 4.0.0 | -| 5.x | 5.3.0 | - -BigInt deploys to macOS 10.10, iOS 9, watchOS 2 and tvOS 9. -It has been tested on the latest OS releases only---however, as the module uses very few platform-provided APIs, -there should be very few issues with earlier versions. - -BigInt uses no APIs specific to Apple platforms, so -it should be easy to port it to other operating systems. - -Setup instructions: - -- **Swift Package Manager:** - Although the Package Manager is still in its infancy, BigInt provides experimental support for it. - Add this to the dependency section of your `Package.swift` manifest: - - ```Swift - .package(url: "https://github.com/attaswift/BigInt.git", from: "5.3.0") - ``` - -- **CocoaPods:** Put this in your `Podfile`: - - ```Ruby - pod 'BigInt', '~> 5.3' - ``` - -- **Carthage:** Put this in your `Cartfile`: - - ``` - github "attaswift/BigInt" ~> 5.3 - ``` - -## Implementation notes - -[`BigUInt`][BigUInt] is a `MutableCollectionType` of its 64-bit digits, with the least significant -digit at index 0. As a convenience, [`BigUInt`][BigUInt] allows you to subscript it with indexes at -or above its `count`. [The subscript operator][subscript] returns 0 for out-of-bound `get`s and -automatically extends the array on out-of-bound `set`s. This makes memory management simpler. - -[`BigInt`][BigInt] is just a tiny wrapper around a `BigUInt` [absolute value][magnitude] and a -[sign bit][negative], both of which are accessible as public read-write properties. - -### Why is there no generic `BigInt` type? - -The types provided by `BigInt` are not parametric—this is very much intentional, as -Swift generics cost us dearly at runtime in this use case. In every approach I tried, -making arbitrary-precision arithmetic operations work with a generic `Digit` type parameter -resulted in code that was literally *ten times slower*. If you can make the algorithms generic -without such a huge performance hit, [please enlighten me][twitter]! - -This is an area that I plan to investigate more, as it would be useful to have generic -implementations for arbitrary-width arithmetic operations. (Polynomial division and decimal bases -are two examples.) The library already implements double-digit multiplication and division as -extension methods on a protocol with an associated type requirement; this has not measurably affected -performance. Unfortunately, the same is not true for `BigUInt`'s methods. - -Of course, as a last resort, we could just duplicate the code to create a separate -generic variant that was slower but more flexible. - -[license]: https://github.com/attaswift/BigInt/blob/master/LICENSE.md -[twitter]: https://twitter.com/lorentey -[BigUInt]: http://attaswift.github.io/BigInt/Structs/BigUInt.html -[BigInt]: http://attaswift.github.io/BigInt/Structs/BigInt.html -[comparison]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/Comparison -[hashing]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/Hashing -[addition]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/Addition -[subtraction]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/Subtraction -[mul]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/s:ZFV6BigInt7BigUIntoi1mFTS0_S0__S0_ -[fused]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/s:FV6BigInt7BigUInt14multiplyAndAddFTS0_Vs6UInt6410atPositionSi_T_ -[multiplication]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/Multiplication -[division]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/Division -[divide]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/s:FV6BigInt7BigUInt7dividedFT2byS0__T8quotientS0_9remainderS0__ -[bitwise]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/Bitwise%20Operations -[width]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/s:vV6BigInt7BigUInt5widthSi -[leadingZeroBitCount]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/s:vV6BigInt7BigUInt13leadingZeroBitCountSi -[trailingZeroBitCount]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/s:vV6BigInt7BigUInt14trailingZeroBitCountSi -[shift]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/Shift%20Operators -[data]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/NSData%20Conversion -[random]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/Random%20Integers -[radix1]: http://attaswift.github.io/BigInt/Extensions/String.html#/s:FE6BigIntSScFTVS_7BigUInt5radixSi9uppercaseSb_SS -[radix2]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/s:FV6BigInt7BigUIntcFTSS5radixSi_GSqS0__ -[sqrt]: http://attaswift.github.io/BigInt/Functions.html#/s:F6BigInt4sqrtFVS_7BigUIntS0_ -[GCD]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/s:ZFV6BigInt7BigUInt3gcdFTS0_S0__S0_ -[powmod]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/s:FV6BigInt7BigUInt5powerFTS0_7modulusS0__S0_ -[power]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/s:FV6BigInt7BigUInt5powerFSiS0_ -[inverse]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/s:FV6BigInt7BigUInt7inverseFS0_GSqS0__ -[prime]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/Primality%20Testing -[abs]: http://attaswift.github.io/BigInt/Structs/BigInt.html#/s:vV6BigInt6BigInt3absVS_7BigUInt -[negative]: http://attaswift.github.io/BigInt/Structs/BigInt.html#/s:vV6BigInt6BigInt8negativeSb -[subscript]: https://github.com/attaswift/BigInt/blob/v2.0.0/Sources/BigUInt.swift#L216-L239 -[fullmuldiv]: https://github.com/attaswift/BigInt/blob/v2.0.0/Sources/BigDigit.swift#L96-L167 - - -## Calculation Samples - -### Obligatory Factorial Demo - -It is easy to use `BigInt` to calculate the factorial function for any integer: - -```Swift -import BigInt - -func factorial(_ n: Int) -> BigInt { - return (1 ... n).map { BigInt($0) }.reduce(BigInt(1), *) -} - -print(factorial(10)) -==> 362880 - -print(factorial(100)) -==> 93326215443944152681699238856266700490715968264381621468592963895217599993229915 - 6089414639761565182862536979208272237582511852109168640000000000000000000000 - -print(factorial(1000)) -==> 40238726007709377354370243392300398571937486421071463254379991042993851239862902 - 05920442084869694048004799886101971960586316668729948085589013238296699445909974 - 24504087073759918823627727188732519779505950995276120874975462497043601418278094 - 64649629105639388743788648733711918104582578364784997701247663288983595573543251 - 31853239584630755574091142624174743493475534286465766116677973966688202912073791 - 43853719588249808126867838374559731746136085379534524221586593201928090878297308 - 43139284440328123155861103697680135730421616874760967587134831202547858932076716 - 91324484262361314125087802080002616831510273418279777047846358681701643650241536 - 91398281264810213092761244896359928705114964975419909342221566832572080821333186 - 11681155361583654698404670897560290095053761647584772842188967964624494516076535 - 34081989013854424879849599533191017233555566021394503997362807501378376153071277 - 61926849034352625200015888535147331611702103968175921510907788019393178114194545 - 25722386554146106289218796022383897147608850627686296714667469756291123408243920 - 81601537808898939645182632436716167621791689097799119037540312746222899880051954 - 44414282012187361745992642956581746628302955570299024324153181617210465832036786 - 90611726015878352075151628422554026517048330422614397428693306169089796848259012 - 54583271682264580665267699586526822728070757813918581788896522081643483448259932 - 66043367660176999612831860788386150279465955131156552036093988180612138558600301 - 43569452722420634463179746059468257310379008402443243846565724501440282188525247 - 09351906209290231364932734975655139587205596542287497740114133469627154228458623 - 77387538230483865688976461927383814900140767310446640259899490222221765904339901 - 88601856652648506179970235619389701786004081188972991831102117122984590164192106 - 88843871218556461249607987229085192968193723886426148396573822911231250241866493 - 53143970137428531926649875337218940694281434118520158014123344828015051399694290 - 15348307764456909907315243327828826986460278986432113908350621709500259738986355 - 42771967428222487575867657523442202075736305694988250879689281627538488633969099 - 59826280956121450994871701244516461260379029309120889086942028510640182154399457 - 15680594187274899809425474217358240106367740459574178516082923013535808184009699 - 63725242305608559037006242712434169090041536901059339838357779394109700277534720 - 00000000000000000000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000000000000000000000000000000 - 00000 -``` - -Well, I guess that's all right, but it's not very interesting. Let's try something more useful. - -### RSA Cryptography - -The `BigInt` module provides all necessary parts to implement an (overly) -simple [RSA cryptography system][RSA]. - -[RSA]: https://en.wikipedia.org/wiki/RSA_(cryptosystem) - -Let's start with a simple function that generates a random n-bit prime. The module -includes a function to generate random integers of a specific size, and also an -`isPrime` method that performs the Miller–Rabin primality test. These are all we need: - -```Swift -func generatePrime(_ width: Int) -> BigUInt { - while true { - var random = BigUInt.randomInteger(withExactWidth: width) - random |= BigUInt(1) - if random.isPrime() { - return random - } - } -} - -let p = generatePrime(1024) -==> 13308187650642192396256419911012544845370493728424936791561478318443071617242872 - 81980956747087187419914435169914161116601678883358611076800743580556055714173922 - 08406194264346635072293912609713085260354070700055888678514690878149253177960273 - 775659537560220378850112471985434373425534121373466492101182463962031 - -let q = generatePrime(1024) -==> 17072954422657145489547308812333368925007949054501204983863958355897172093173783 - 10108226596943999553784252564650624766276133157586733504784616138305701168410157 - 80784336308507083874651158029602582993233111593356512531869546706885170044355115 - 669728424124141763799008880327106952436883614887277350838425336156327 -``` - -Cool! Now that we have two large primes, we can produce an RSA public/private keypair -out of them. - -```Swift -typealias Key = (modulus: BigUInt, exponent: BigUInt) - -let n = p * q -==> 22721008120758282530010953362926306641542233757318103044313144976976529789946696 - 15454966720907712515917481418981591379647635391260569349099666410127279690367978 - 81184375533755888994370640857883754985364288413796100527262763202679037134021810 - 57933883525572232242690805678883227791774442041516929419640051653934584376704034 - 63953169772816907280591934423237977258358097846511079947337857778137177570668391 - 57455417707100275487770399281417352829897118140972240757708561027087217205975220 - 02207275447810167397968435583004676293892340103729490987263776871467057582629588 - 916498579594964478080508868267360515953225283461208420137 - -let e: BigUInt = 65537 -let phi = (p - 1) * (q - 1) -let d = e.inverse(phi)! // d * e % phi == 1 -==> 13964664343869014759736350480776837992604500903989703383202366291905558996277719 - 77822086142456362972689566985925179681282432115598451765899180050962461295573831 - 37069237934291884106584820998146965085531433195106686745474222222620986858696591 - 69836532468835154412554521152103642453158895363417640676611704542784576974374954 - 45789456921660619938185093118762690200980720312508614337759620606992462563490422 - 76669559556568917533268479190948959560397579572761529852891246283539604545691244 - 89999692877158676643042118662613875863504016129837099223040687512684532694527109 - 80742873307409704484365002175294665608486688146261327793 - -let publicKey: Key = (n, e) -let privateKey: Key = (n, d) -``` - -In RSA, modular exponentiation is used to encrypt (and decrypt) messages. - -```Swift -func encrypt(_ message: BigUInt, key: Key) -> BigUInt { - return message.power(key.exponent, modulus: key.modulus) -} -``` - -Let's try out our new keypair by converting a string into UTF-8, interpreting -the resulting binary representation as a big integer, and encrypting it with the -public key. `BigUInt` has an initializer that takes an `NSData`, so this is pretty -easy to do: - -```Swift -let secret: BigUInt = BigUInt("Arbitrary precision arithmetic is fun!".dataUsingEncoding(NSUTF8StringEncoding)!) -==> 83323446846105976078466731524728681905293067701804838925389198929123912971229457 - 68818568737 - -let cyphertext = encrypt(secret, key: publicKey) -==> 95186982543485985200666516508066093880038842892337880561554910904277290917831453 - 54854954722744805432145474047391353716305176389470779020645959135298322520888633 - 61674945129099575943384767330342554525120384485469428048962027149169876127890306 - 77028183904699491962050888974524603226290836984166164759586952419343589385279641 - 47999991283152843977988979846238236160274201261075188190509539751990119132013021 - 74866638595734222867005089157198503204192264814750832072844208520394603054901706 - 06024394731371973402595826456435944968439153664617188570808940022471990638468783 - 49208193955207336172861151720299024935127021719852700882 -``` - -Well, it looks encrypted all right, but can we get the original message back? -In theory, encrypting the cyphertext with the private key returns the original message. -Let's see: - -```Swift -let plaintext = encrypt(cyphertext, key: privateKey) -==> 83323446846105976078466731524728681905293067701804838925389198929123912971229457 - 68818568737 - -let received = String(data: plaintext.serialize(), encoding: NSUTF8StringEncoding) -==> "Arbitrary precision arithmetic is fun!" -``` - -Yay! This is truly terrific, but please don't use this example code in an actual -cryptography system. RSA has lots of subtle (and some not so subtle) complications -that we ignored to keep this example short. - -### Calculating the Digits of π - -Another fun activity to try with `BigInt`s is to generate the digits of π. -Let's try implementing [Jeremy Gibbon's spigot algorithm][spigot]. -This is a rather slow algorithm as π-generators go, but it makes up for it with its grooviness -factor: it's remarkably short, it only uses (big) integer arithmetic, and every iteration -produces a single new digit in the base-10 representation of π. This naturally leads to an -implementation as an infinite `GeneratorType`: - -[spigot]: http://www.cs.ox.ac.uk/jeremy.gibbons/publications/spigot.pdf - -```Swift -func digitsOfPi() -> AnyGenerator { - var q: BigUInt = 1 - var r: BigUInt = 180 - var t: BigUInt = 60 - var i: UInt64 = 2 // Does not overflow until digit #826_566_842 - return AnyIterator { - let u: UInt64 = 3 * (3 * i + 1) * (3 * i + 2) - let y = (q.multiplied(byDigit: 27 * i - 12) + 5 * r) / (5 * t) - (q, r, t) = ( - 10 * q.multiplied(byDigit: i * (2 * i - 1)), - 10 * (q.multiplied(byDigit: 5 * i - 2) + r - y * t).multiplied(byDigit: u), - t.multiplied(byDigit: u)) - i += 1 - return Int(y[0]) - } -} -``` - -Well, that was surprisingly easy. But does it work? Of course it does! - -```Swift -var digits = "π ≈ " -var count = 0 -for digit in digitsOfPi() { - assert(digit < 10) - digits += String(digit) - count += 1 - if count == 1 { digits += "." } - if count == 1000 { break } -} - -digits -==> π ≈ 3.14159265358979323846264338327950288419716939937510582097494459230781640628 - 62089986280348253421170679821480865132823066470938446095505822317253594081284811 - 17450284102701938521105559644622948954930381964428810975665933446128475648233786 - 78316527120190914564856692346034861045432664821339360726024914127372458700660631 - 55881748815209209628292540917153643678925903600113305305488204665213841469519415 - 11609433057270365759591953092186117381932611793105118548074462379962749567351885 - 75272489122793818301194912983367336244065664308602139494639522473719070217986094 - 37027705392171762931767523846748184676694051320005681271452635608277857713427577 - 89609173637178721468440901224953430146549585371050792279689258923542019956112129 - 02196086403441815981362977477130996051870721134999999837297804995105973173281609 - 63185950244594553469083026425223082533446850352619311881710100031378387528865875 - 33208381420617177669147303598253490428755468731159562863882353787593751957781857 - 780532171226806613001927876611195909216420198 -``` - -Now go and have some fun with big integers on your own! diff --git a/Carthage/Checkouts/BigInt/Sources/Addition.swift b/Carthage/Checkouts/BigInt/Sources/Addition.swift deleted file mode 100644 index 34f4d44e8..000000000 --- a/Carthage/Checkouts/BigInt/Sources/Addition.swift +++ /dev/null @@ -1,126 +0,0 @@ -// -// Addition.swift -// BigInt -// -// Created by Károly Lőrentey on 2016-01-03. -// Copyright © 2016-2017 Károly Lőrentey. -// - -extension BigUInt { - //MARK: Addition - - /// Add `word` to this integer in place. - /// `word` is shifted `shift` words to the left before being added. - /// - /// - Complexity: O(max(count, shift)) - internal mutating func addWord(_ word: Word, shiftedBy shift: Int = 0) { - precondition(shift >= 0) - var carry = word - var i = shift - while carry > 0 { - let (d, c) = self[i].addingReportingOverflow(carry) - self[i] = d - carry = (c ? 1 : 0) - i += 1 - } - } - - /// Add the digit `d` to this integer and return the result. - /// `d` is shifted `shift` words to the left before being added. - /// - /// - Complexity: O(max(count, shift)) - internal func addingWord(_ word: Word, shiftedBy shift: Int = 0) -> BigUInt { - var r = self - r.addWord(word, shiftedBy: shift) - return r - } - - /// Add `b` to this integer in place. - /// `b` is shifted `shift` words to the left before being added. - /// - /// - Complexity: O(max(count, b.count + shift)) - internal mutating func add(_ b: BigUInt, shiftedBy shift: Int = 0) { - precondition(shift >= 0) - var carry = false - var bi = 0 - let bc = b.count - while bi < bc || carry { - let ai = shift + bi - let (d, c) = self[ai].addingReportingOverflow(b[bi]) - if carry { - let (d2, c2) = d.addingReportingOverflow(1) - self[ai] = d2 - carry = c || c2 - } - else { - self[ai] = d - carry = c - } - bi += 1 - } - } - - /// Add `b` to this integer and return the result. - /// `b` is shifted `shift` words to the left before being added. - /// - /// - Complexity: O(max(count, b.count + shift)) - internal func adding(_ b: BigUInt, shiftedBy shift: Int = 0) -> BigUInt { - var r = self - r.add(b, shiftedBy: shift) - return r - } - - /// Increment this integer by one. If `shift` is non-zero, it selects - /// the word that is to be incremented. - /// - /// - Complexity: O(count + shift) - internal mutating func increment(shiftedBy shift: Int = 0) { - self.addWord(1, shiftedBy: shift) - } - - /// Add `a` and `b` together and return the result. - /// - /// - Complexity: O(max(a.count, b.count)) - public static func +(a: BigUInt, b: BigUInt) -> BigUInt { - return a.adding(b) - } - - /// Add `a` and `b` together, and store the sum in `a`. - /// - /// - Complexity: O(max(a.count, b.count)) - public static func +=(a: inout BigUInt, b: BigUInt) { - a.add(b, shiftedBy: 0) - } -} - -extension BigInt { - /// Add `a` to `b` and return the result. - public static func +(a: BigInt, b: BigInt) -> BigInt { - switch (a.sign, b.sign) { - case (.plus, .plus): - return BigInt(sign: .plus, magnitude: a.magnitude + b.magnitude) - case (.minus, .minus): - return BigInt(sign: .minus, magnitude: a.magnitude + b.magnitude) - case (.plus, .minus): - if a.magnitude >= b.magnitude { - return BigInt(sign: .plus, magnitude: a.magnitude - b.magnitude) - } - else { - return BigInt(sign: .minus, magnitude: b.magnitude - a.magnitude) - } - case (.minus, .plus): - if b.magnitude >= a.magnitude { - return BigInt(sign: .plus, magnitude: b.magnitude - a.magnitude) - } - else { - return BigInt(sign: .minus, magnitude: a.magnitude - b.magnitude) - } - } - } - - /// Add `b` to `a` in place. - public static func +=(a: inout BigInt, b: BigInt) { - a = a + b - } -} - diff --git a/Carthage/Checkouts/BigInt/Sources/BigInt.swift b/Carthage/Checkouts/BigInt/Sources/BigInt.swift deleted file mode 100644 index 8119bad50..000000000 --- a/Carthage/Checkouts/BigInt/Sources/BigInt.swift +++ /dev/null @@ -1,74 +0,0 @@ -// -// BigInt.swift -// BigInt -// -// Created by Károly Lőrentey on 2015-12-27. -// Copyright © 2016-2017 Károly Lőrentey. -// - -//MARK: BigInt - -/// An arbitary precision signed integer type, also known as a "big integer". -/// -/// Operations on big integers never overflow, but they might take a long time to execute. -/// The amount of memory (and address space) available is the only constraint to the magnitude of these numbers. -/// -/// This particular big integer type uses base-2^64 digits to represent integers. -/// -/// `BigInt` is essentially a tiny wrapper that extends `BigUInt` with a sign bit and provides signed integer -/// operations. Both the underlying absolute value and the negative/positive flag are available as read-write -/// properties. -/// -/// Not all algorithms of `BigUInt` are available for `BigInt` values; for example, there is no square root or -/// primality test for signed integers. When you need to call one of these, just extract the absolute value: -/// -/// ```Swift -/// BigInt(255).magnitude.isPrime() // Returns false -/// ``` -/// -public struct BigInt: SignedInteger { - public enum Sign { - case plus - case minus - } - - public typealias Magnitude = BigUInt - - /// The type representing a digit in `BigInt`'s underlying number system. - public typealias Word = BigUInt.Word - - public static var isSigned: Bool { - return true - } - - /// The absolute value of this integer. - public var magnitude: BigUInt - - /// True iff the value of this integer is negative. - public var sign: Sign - - /// Initializes a new big integer with the provided absolute number and sign flag. - public init(sign: Sign, magnitude: BigUInt) { - self.sign = (magnitude.isZero ? .plus : sign) - self.magnitude = magnitude - } - - /// Return true iff this integer is zero. - /// - /// - Complexity: O(1) - public var isZero: Bool { - return magnitude.isZero - } - - /// Returns `-1` if this value is negative and `1` if it’s positive; otherwise, `0`. - /// - /// - Returns: The sign of this number, expressed as an integer of the same type. - public func signum() -> BigInt { - switch sign { - case .plus: - return isZero ? 0 : 1 - case .minus: - return -1 - } - } -} diff --git a/Carthage/Checkouts/BigInt/Sources/BigUInt.swift b/Carthage/Checkouts/BigInt/Sources/BigUInt.swift deleted file mode 100644 index 759f2aa74..000000000 --- a/Carthage/Checkouts/BigInt/Sources/BigUInt.swift +++ /dev/null @@ -1,386 +0,0 @@ -// -// BigUInt.swift -// BigInt -// -// Created by Károly Lőrentey on 2015-12-26. -// Copyright © 2016-2017 Károly Lőrentey. -// - -/// An arbitary precision unsigned integer type, also known as a "big integer". -/// -/// Operations on big integers never overflow, but they may take a long time to execute. -/// The amount of memory (and address space) available is the only constraint to the magnitude of these numbers. -/// -/// This particular big integer type uses base-2^64 digits to represent integers; you can think of it as a wrapper -/// around `Array`. (In fact, `BigUInt` only uses an array if there are more than two digits.) -public struct BigUInt: UnsignedInteger { - /// The type representing a digit in `BigUInt`'s underlying number system. - public typealias Word = UInt - - /// The storage variants of a `BigUInt`. - enum Kind { - /// Value consists of the two specified words (low and high). Either or both words may be zero. - case inline(Word, Word) - /// Words are stored in a slice of the storage array. - case slice(from: Int, to: Int) - /// Words are stored in the storage array. - case array - } - - internal fileprivate (set) var kind: Kind // Internal for testing only - internal fileprivate (set) var storage: [Word] // Internal for testing only; stored separately to prevent COW copies - - /// Initializes a new BigUInt with value 0. - public init() { - self.kind = .inline(0, 0) - self.storage = [] - } - - internal init(word: Word) { - self.kind = .inline(word, 0) - self.storage = [] - } - - internal init(low: Word, high: Word) { - self.kind = .inline(low, high) - self.storage = [] - } - - /// Initializes a new BigUInt with the specified digits. The digits are ordered from least to most significant. - public init(words: [Word]) { - self.kind = .array - self.storage = words - normalize() - } - - internal init(words: [Word], from startIndex: Int, to endIndex: Int) { - self.kind = .slice(from: startIndex, to: endIndex) - self.storage = words - normalize() - } -} - -extension BigUInt { - public static var isSigned: Bool { - return false - } - - /// Return true iff this integer is zero. - /// - /// - Complexity: O(1) - public var isZero: Bool { - switch kind { - case .inline(0, 0): return true - case .array: return storage.isEmpty - default: - return false - } - } - - /// Returns `1` if this value is, positive; otherwise, `0`. - /// - /// - Returns: The sign of this number, expressed as an integer of the same type. - public func signum() -> BigUInt { - return isZero ? 0 : 1 - } -} - -extension BigUInt { - mutating func ensureArray() { - switch kind { - case let .inline(w0, w1): - kind = .array - storage = w1 != 0 ? [w0, w1] - : w0 != 0 ? [w0] - : [] - case let .slice(from: start, to: end): - kind = .array - storage = Array(storage[start ..< end]) - case .array: - break - } - } - - var capacity: Int { - guard case .array = kind else { return 0 } - return storage.capacity - } - - mutating func reserveCapacity(_ minimumCapacity: Int) { - switch kind { - case let .inline(w0, w1): - kind = .array - storage.reserveCapacity(minimumCapacity) - if w1 != 0 { - storage.append(w0) - storage.append(w1) - } - else if w0 != 0 { - storage.append(w0) - } - case let .slice(from: start, to: end): - kind = .array - var words: [Word] = [] - words.reserveCapacity(Swift.max(end - start, minimumCapacity)) - words.append(contentsOf: storage[start ..< end]) - storage = words - case .array: - storage.reserveCapacity(minimumCapacity) - } - } - - /// Gets rid of leading zero digits in the digit array and converts slices into inline digits when possible. - internal mutating func normalize() { - switch kind { - case .slice(from: let start, to: var end): - assert(start >= 0 && end <= storage.count && start <= end) - while start < end, storage[end - 1] == 0 { - end -= 1 - } - switch end - start { - case 0: - kind = .inline(0, 0) - storage = [] - case 1: - kind = .inline(storage[start], 0) - storage = [] - case 2: - kind = .inline(storage[start], storage[start + 1]) - storage = [] - case storage.count: - assert(start == 0) - kind = .array - default: - kind = .slice(from: start, to: end) - } - case .array where storage.last == 0: - while storage.last == 0 { - storage.removeLast() - } - default: - break - } - } - - /// Set this integer to 0 without releasing allocated storage capacity (if any). - mutating func clear() { - self.load(0) - } - - /// Set this integer to `value` by copying its digits without releasing allocated storage capacity (if any). - mutating func load(_ value: BigUInt) { - switch kind { - case .inline, .slice: - self = value - case .array: - self.storage.removeAll(keepingCapacity: true) - self.storage.append(contentsOf: value.words) - } - } -} - -extension BigUInt { - //MARK: Collection-like members - - /// The number of digits in this integer, excluding leading zero digits. - var count: Int { - switch kind { - case let .inline(w0, w1): - return w1 != 0 ? 2 - : w0 != 0 ? 1 - : 0 - case let .slice(from: start, to: end): - return end - start - case .array: - return storage.count - } - } - - /// Get or set a digit at a given index. - /// - /// - Note: Unlike a normal collection, it is OK for the index to be greater than or equal to `endIndex`. - /// The subscripting getter returns zero for indexes beyond the most significant digit. - /// Setting these extended digits automatically appends new elements to the underlying digit array. - /// - Requires: index >= 0 - /// - Complexity: The getter is O(1). The setter is O(1) if the conditions below are true; otherwise it's O(count). - /// - The integer's storage is not shared with another integer - /// - The integer wasn't created as a slice of another integer - /// - `index < count` - subscript(_ index: Int) -> Word { - get { - precondition(index >= 0) - switch (kind, index) { - case (.inline(let w0, _), 0): return w0 - case (.inline(_, let w1), 1): return w1 - case (.slice(from: let start, to: let end), _) where index < end - start: - return storage[start + index] - case (.array, _) where index < storage.count: - return storage[index] - default: - return 0 - } - } - set(word) { - precondition(index >= 0) - switch (kind, index) { - case let (.inline(_, w1), 0): - kind = .inline(word, w1) - case let (.inline(w0, _), 1): - kind = .inline(w0, word) - case let (.slice(from: start, to: end), _) where index < end - start: - replace(at: index, with: word) - case (.array, _) where index < storage.count: - replace(at: index, with: word) - default: - extend(at: index, with: word) - } - } - } - - private mutating func replace(at index: Int, with word: Word) { - ensureArray() - precondition(index < storage.count) - storage[index] = word - if word == 0, index == storage.count - 1 { - normalize() - } - } - - private mutating func extend(at index: Int, with word: Word) { - guard word != 0 else { return } - reserveCapacity(index + 1) - precondition(index >= storage.count) - storage.append(contentsOf: repeatElement(0, count: index - storage.count)) - storage.append(word) - } - - /// Returns an integer built from the digits of this integer in the given range. - internal func extract(_ bounds: Range) -> BigUInt { - switch kind { - case let .inline(w0, w1): - let bounds = bounds.clamped(to: 0 ..< 2) - if bounds == 0 ..< 2 { - return BigUInt(low: w0, high: w1) - } - else if bounds == 0 ..< 1 { - return BigUInt(word: w0) - } - else if bounds == 1 ..< 2 { - return BigUInt(word: w1) - } - else { - return BigUInt() - } - case let .slice(from: start, to: end): - let s = Swift.min(end, start + Swift.max(bounds.lowerBound, 0)) - let e = Swift.max(s, (bounds.upperBound > end - start ? end : start + bounds.upperBound)) - return BigUInt(words: storage, from: s, to: e) - case .array: - let b = bounds.clamped(to: storage.startIndex ..< storage.endIndex) - return BigUInt(words: storage, from: b.lowerBound, to: b.upperBound) - } - } - - internal func extract(_ bounds: Bounds) -> BigUInt where Bounds.Bound == Int { - return self.extract(bounds.relative(to: 0 ..< Int.max)) - } -} - -extension BigUInt { - internal mutating func shiftRight(byWords amount: Int) { - assert(amount >= 0) - guard amount > 0 else { return } - switch kind { - case let .inline(_, w1) where amount == 1: - kind = .inline(w1, 0) - case .inline(_, _): - kind = .inline(0, 0) - case let .slice(from: start, to: end): - let s = start + amount - if s >= end { - kind = .inline(0, 0) - } - else { - kind = .slice(from: s, to: end) - normalize() - } - case .array: - if amount >= storage.count { - storage.removeAll(keepingCapacity: true) - } - else { - storage.removeFirst(amount) - } - } - } - - internal mutating func shiftLeft(byWords amount: Int) { - assert(amount >= 0) - guard amount > 0 else { return } - guard !isZero else { return } - switch kind { - case let .inline(w0, 0) where amount == 1: - kind = .inline(0, w0) - case let .inline(w0, w1): - let c = (w1 == 0 ? 1 : 2) - storage.reserveCapacity(amount + c) - storage.append(contentsOf: repeatElement(0, count: amount)) - storage.append(w0) - if w1 != 0 { - storage.append(w1) - } - kind = .array - case let .slice(from: start, to: end): - var words: [Word] = [] - words.reserveCapacity(amount + count) - words.append(contentsOf: repeatElement(0, count: amount)) - words.append(contentsOf: storage[start ..< end]) - storage = words - kind = .array - case .array: - storage.insert(contentsOf: repeatElement(0, count: amount), at: 0) - } - } -} - -extension BigUInt { - //MARK: Low and High - - /// Split this integer into a high-order and a low-order part. - /// - /// - Requires: count > 1 - /// - Returns: `(low, high)` such that - /// - `self == low.add(high, shiftedBy: middleIndex)` - /// - `high.width <= floor(width / 2)` - /// - `low.width <= ceil(width / 2)` - /// - Complexity: Typically O(1), but O(count) in the worst case, because high-order zero digits need to be removed after the split. - internal var split: (high: BigUInt, low: BigUInt) { - precondition(count > 1) - let mid = middleIndex - return (self.extract(mid...), self.extract(.. 1 - internal var low: BigUInt { - return self.extract(0 ..< middleIndex) - } - - /// The high-order half of this BigUInt. - /// - /// - Returns: `self[middleIndex ..< count]` - /// - Requires: count > 1 - internal var high: BigUInt { - return self.extract(middleIndex ..< count) - } -} - diff --git a/Carthage/Checkouts/BigInt/Sources/Bitwise Ops.swift b/Carthage/Checkouts/BigInt/Sources/Bitwise Ops.swift deleted file mode 100644 index 0d00148bd..000000000 --- a/Carthage/Checkouts/BigInt/Sources/Bitwise Ops.swift +++ /dev/null @@ -1,121 +0,0 @@ -// -// Bitwise Ops.swift -// BigInt -// -// Created by Károly Lőrentey on 2016-01-03. -// Copyright © 2016-2017 Károly Lőrentey. -// - -//MARK: Bitwise Operations - -extension BigUInt { - /// Return the ones' complement of `a`. - /// - /// - Complexity: O(a.count) - public static prefix func ~(a: BigUInt) -> BigUInt { - return BigUInt(words: a.words.map { ~$0 }) - } - - /// Calculate the bitwise OR of `a` and `b`, and store the result in `a`. - /// - /// - Complexity: O(max(a.count, b.count)) - public static func |= (a: inout BigUInt, b: BigUInt) { - a.reserveCapacity(b.count) - for i in 0 ..< b.count { - a[i] |= b[i] - } - } - - /// Calculate the bitwise AND of `a` and `b` and return the result. - /// - /// - Complexity: O(max(a.count, b.count)) - public static func &= (a: inout BigUInt, b: BigUInt) { - for i in 0 ..< Swift.max(a.count, b.count) { - a[i] &= b[i] - } - } - - /// Calculate the bitwise XOR of `a` and `b` and return the result. - /// - /// - Complexity: O(max(a.count, b.count)) - public static func ^= (a: inout BigUInt, b: BigUInt) { - a.reserveCapacity(b.count) - for i in 0 ..< b.count { - a[i] ^= b[i] - } - } -} - -extension BigInt { - public static prefix func ~(x: BigInt) -> BigInt { - switch x.sign { - case .plus: - return BigInt(sign: .minus, magnitude: x.magnitude + 1) - case .minus: - return BigInt(sign: .plus, magnitude: x.magnitude - 1) - } - } - - public static func &(lhs: inout BigInt, rhs: BigInt) -> BigInt { - let left = lhs.words - let right = rhs.words - // Note we aren't using left.count/right.count here; we account for the sign bit separately later. - let count = Swift.max(lhs.magnitude.count, rhs.magnitude.count) - var words: [UInt] = [] - words.reserveCapacity(count) - for i in 0 ..< count { - words.append(left[i] & right[i]) - } - if lhs.sign == .minus && rhs.sign == .minus { - words.twosComplement() - return BigInt(sign: .minus, magnitude: BigUInt(words: words)) - } - return BigInt(sign: .plus, magnitude: BigUInt(words: words)) - } - - public static func |(lhs: inout BigInt, rhs: BigInt) -> BigInt { - let left = lhs.words - let right = rhs.words - // Note we aren't using left.count/right.count here; we account for the sign bit separately later. - let count = Swift.max(lhs.magnitude.count, rhs.magnitude.count) - var words: [UInt] = [] - words.reserveCapacity(count) - for i in 0 ..< count { - words.append(left[i] | right[i]) - } - if lhs.sign == .minus || rhs.sign == .minus { - words.twosComplement() - return BigInt(sign: .minus, magnitude: BigUInt(words: words)) - } - return BigInt(sign: .plus, magnitude: BigUInt(words: words)) - } - - public static func ^(lhs: inout BigInt, rhs: BigInt) -> BigInt { - let left = lhs.words - let right = rhs.words - // Note we aren't using left.count/right.count here; we account for the sign bit separately later. - let count = Swift.max(lhs.magnitude.count, rhs.magnitude.count) - var words: [UInt] = [] - words.reserveCapacity(count) - for i in 0 ..< count { - words.append(left[i] ^ right[i]) - } - if (lhs.sign == .minus) != (rhs.sign == .minus) { - words.twosComplement() - return BigInt(sign: .minus, magnitude: BigUInt(words: words)) - } - return BigInt(sign: .plus, magnitude: BigUInt(words: words)) - } - - public static func &=(lhs: inout BigInt, rhs: BigInt) { - lhs = lhs & rhs - } - - public static func |=(lhs: inout BigInt, rhs: BigInt) { - lhs = lhs | rhs - } - - public static func ^=(lhs: inout BigInt, rhs: BigInt) { - lhs = lhs ^ rhs - } -} diff --git a/Carthage/Checkouts/BigInt/Sources/Codable.swift b/Carthage/Checkouts/BigInt/Sources/Codable.swift deleted file mode 100644 index b53b30be5..000000000 --- a/Carthage/Checkouts/BigInt/Sources/Codable.swift +++ /dev/null @@ -1,155 +0,0 @@ -// -// Codable.swift -// BigInt -// -// Created by Károly Lőrentey on 2017-8-11. -// Copyright © 2016-2017 Károly Lőrentey. -// - - -// Little-endian to big-endian -struct Units: RandomAccessCollection -where Words.Element: FixedWidthInteger, Words.Index == Int { - typealias Word = Words.Element - let words: Words - init(of type: Unit.Type, _ words: Words) { - precondition(Word.bitWidth % Unit.bitWidth == 0 || Unit.bitWidth % Word.bitWidth == 0) - self.words = words - } - var count: Int { return (words.count * Word.bitWidth + Unit.bitWidth - 1) / Unit.bitWidth } - var startIndex: Int { return 0 } - var endIndex: Int { return count } - subscript(_ index: Int) -> Unit { - let index = count - 1 - index - if Unit.bitWidth == Word.bitWidth { - return Unit(words[index]) - } - else if Unit.bitWidth > Word.bitWidth { - let c = Unit.bitWidth / Word.bitWidth - var unit: Unit = 0 - var j = 0 - for i in (c * index) ..< Swift.min(c * (index + 1), words.endIndex) { - unit |= Unit(words[i]) << j - j += Word.bitWidth - } - return unit - } - // Unit.bitWidth < Word.bitWidth - let c = Word.bitWidth / Unit.bitWidth - let i = index / c - let j = index % c - return Unit(truncatingIfNeeded: words[i] >> (j * Unit.bitWidth)) - } -} - -extension Array where Element: FixedWidthInteger { - // Big-endian to little-endian - init(count: Int?, generator: () throws -> Unit?) rethrows { - typealias Word = Element - precondition(Word.bitWidth % Unit.bitWidth == 0 || Unit.bitWidth % Word.bitWidth == 0) - self = [] - if Unit.bitWidth == Word.bitWidth { - if let count = count { - self.reserveCapacity(count) - } - while let unit = try generator() { - self.append(Word(unit)) - } - } - else if Unit.bitWidth > Word.bitWidth { - let wordsPerUnit = Unit.bitWidth / Word.bitWidth - if let count = count { - self.reserveCapacity(count * wordsPerUnit) - } - while let unit = try generator() { - var shift = Unit.bitWidth - Word.bitWidth - while shift >= 0 { - self.append(Word(truncatingIfNeeded: unit >> shift)) - shift -= Word.bitWidth - } - } - } - else { - let unitsPerWord = Word.bitWidth / Unit.bitWidth - if let count = count { - self.reserveCapacity((count + unitsPerWord - 1) / unitsPerWord) - } - var word: Word = 0 - var c = 0 - while let unit = try generator() { - word <<= Unit.bitWidth - word |= Word(unit) - c += Unit.bitWidth - if c == Word.bitWidth { - self.append(word) - word = 0 - c = 0 - } - } - if c > 0 { - self.append(word << c) - var shifted: Word = 0 - for i in self.indices { - let word = self[i] - self[i] = shifted | (word >> c) - shifted = word << (Word.bitWidth - c) - } - } - } - self.reverse() - } -} - -extension BigInt: Codable { - public init(from decoder: Decoder) throws { - var container = try decoder.unkeyedContainer() - - // Decode sign - let sign: BigInt.Sign - switch try container.decode(String.self) { - case "+": - sign = .plus - case "-": - sign = .minus - default: - throw DecodingError.dataCorrupted(.init(codingPath: container.codingPath, - debugDescription: "Invalid big integer sign")) - } - - // Decode magnitude - let words = try [UInt](count: container.count?.advanced(by: -1)) { () -> UInt64? in - guard !container.isAtEnd else { return nil } - return try container.decode(UInt64.self) - } - let magnitude = BigUInt(words: words) - - self.init(sign: sign, magnitude: magnitude) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.unkeyedContainer() - try container.encode(sign == .plus ? "+" : "-") - let units = Units(of: UInt64.self, self.magnitude.words) - if units.isEmpty { - try container.encode(0 as UInt64) - } - else { - try container.encode(contentsOf: units) - } - } -} - -extension BigUInt: Codable { - public init(from decoder: Decoder) throws { - let value = try BigInt(from: decoder) - guard value.sign == .plus else { - throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath, - debugDescription: "BigUInt cannot hold a negative value")) - } - self = value.magnitude - } - - public func encode(to encoder: Encoder) throws { - try BigInt(sign: .plus, magnitude: self).encode(to: encoder) - } -} diff --git a/Carthage/Checkouts/BigInt/Sources/Comparable.swift b/Carthage/Checkouts/BigInt/Sources/Comparable.swift deleted file mode 100644 index a5c98ffe3..000000000 --- a/Carthage/Checkouts/BigInt/Sources/Comparable.swift +++ /dev/null @@ -1,63 +0,0 @@ -// -// Comparable.swift -// BigInt -// -// Created by Károly Lőrentey on 2016-01-03. -// Copyright © 2016-2017 Károly Lőrentey. -// - -import Foundation - -extension BigUInt: Comparable { - //MARK: Comparison - - /// Compare `a` to `b` and return an `NSComparisonResult` indicating their order. - /// - /// - Complexity: O(count) - public static func compare(_ a: BigUInt, _ b: BigUInt) -> ComparisonResult { - if a.count != b.count { return a.count > b.count ? .orderedDescending : .orderedAscending } - for i in (0 ..< a.count).reversed() { - let ad = a[i] - let bd = b[i] - if ad != bd { return ad > bd ? .orderedDescending : .orderedAscending } - } - return .orderedSame - } - - /// Return true iff `a` is equal to `b`. - /// - /// - Complexity: O(count) - public static func ==(a: BigUInt, b: BigUInt) -> Bool { - return BigUInt.compare(a, b) == .orderedSame - } - - /// Return true iff `a` is less than `b`. - /// - /// - Complexity: O(count) - public static func <(a: BigUInt, b: BigUInt) -> Bool { - return BigUInt.compare(a, b) == .orderedAscending - } -} - -extension BigInt: Comparable { - /// Return true iff `a` is equal to `b`. - public static func ==(a: BigInt, b: BigInt) -> Bool { - return a.sign == b.sign && a.magnitude == b.magnitude - } - - /// Return true iff `a` is less than `b`. - public static func <(a: BigInt, b: BigInt) -> Bool { - switch (a.sign, b.sign) { - case (.plus, .plus): - return a.magnitude < b.magnitude - case (.plus, .minus): - return false - case (.minus, .plus): - return true - case (.minus, .minus): - return a.magnitude > b.magnitude - } - } -} - - diff --git a/Carthage/Checkouts/BigInt/Sources/Data Conversion.swift b/Carthage/Checkouts/BigInt/Sources/Data Conversion.swift deleted file mode 100644 index 25c65521d..000000000 --- a/Carthage/Checkouts/BigInt/Sources/Data Conversion.swift +++ /dev/null @@ -1,179 +0,0 @@ -// -// Data Conversion.swift -// BigInt -// -// Created by Károly Lőrentey on 2016-01-04. -// Copyright © 2016-2017 Károly Lőrentey. -// - -import Foundation - -extension BigUInt { - //MARK: NSData Conversion - - /// Initialize a BigInt from bytes accessed from an UnsafeRawBufferPointer - public init(_ buffer: UnsafeRawBufferPointer) { - // This assumes Word is binary. - precondition(Word.bitWidth % 8 == 0) - - self.init() - - let length = buffer.count - guard length > 0 else { return } - let bytesPerDigit = Word.bitWidth / 8 - var index = length / bytesPerDigit - var c = bytesPerDigit - length % bytesPerDigit - if c == bytesPerDigit { - c = 0 - index -= 1 - } - - var word: Word = 0 - for byte in buffer { - word <<= 8 - word += Word(byte) - c += 1 - if c == bytesPerDigit { - self[index] = word - index -= 1 - c = 0 - word = 0 - } - } - assert(c == 0 && word == 0 && index == -1) - } - - - /// Initializes an integer from the bits stored inside a piece of `Data`. - /// The data is assumed to be in network (big-endian) byte order. - public init(_ data: Data) { - // This assumes Word is binary. - precondition(Word.bitWidth % 8 == 0) - - self.init() - - let length = data.count - guard length > 0 else { return } - let bytesPerDigit = Word.bitWidth / 8 - var index = length / bytesPerDigit - var c = bytesPerDigit - length % bytesPerDigit - if c == bytesPerDigit { - c = 0 - index -= 1 - } - let word: Word = data.withUnsafeBytes { buffPtr in - var word: Word = 0 - let p = buffPtr.bindMemory(to: UInt8.self) - for byte in p { - word <<= 8 - word += Word(byte) - c += 1 - if c == bytesPerDigit { - self[index] = word - index -= 1 - c = 0 - word = 0 - } - } - return word - } - assert(c == 0 && word == 0 && index == -1) - } - - /// Return a `Data` value that contains the base-256 representation of this integer, in network (big-endian) byte order. - public func serialize() -> Data { - // This assumes Digit is binary. - precondition(Word.bitWidth % 8 == 0) - - let byteCount = (self.bitWidth + 7) / 8 - - guard byteCount > 0 else { return Data() } - - var data = Data(count: byteCount) - data.withUnsafeMutableBytes { buffPtr in - let p = buffPtr.bindMemory(to: UInt8.self) - var i = byteCount - 1 - for var word in self.words { - for _ in 0 ..< Word.bitWidth / 8 { - p[i] = UInt8(word & 0xFF) - word >>= 8 - if i == 0 { - assert(word == 0) - break - } - i -= 1 - } - } - } - return data - } -} - -extension BigInt { - - /// Initialize a BigInt from bytes accessed from an UnsafeRawBufferPointer, - /// where the first byte indicates sign (0 for positive, 1 for negative) - public init(_ buffer: UnsafeRawBufferPointer) { - // This assumes Word is binary. - precondition(Word.bitWidth % 8 == 0) - - self.init() - - let length = buffer.count - - // Serialized data for a BigInt should contain at least 2 bytes: one representing - // the sign, and another for the non-zero magnitude. Zero is represented by an - // empty Data struct, and negative zero is not supported. - guard length > 1, let firstByte = buffer.first else { return } - - // The first byte gives the sign - // This byte is compared to a bitmask to allow additional functionality to be added - // to this byte in the future. - self.sign = firstByte & 0b1 == 0 ? .plus : .minus - - self.magnitude = BigUInt(UnsafeRawBufferPointer(rebasing: buffer.dropFirst(1))) - } - - /// Initializes an integer from the bits stored inside a piece of `Data`. - /// The data is assumed to be in network (big-endian) byte order with a first - /// byte to represent the sign (0 for positive, 1 for negative) - public init(_ data: Data) { - // This assumes Word is binary. - // This is the same assumption made when initializing BigUInt from Data - precondition(Word.bitWidth % 8 == 0) - - self.init() - - // Serialized data for a BigInt should contain at least 2 bytes: one representing - // the sign, and another for the non-zero magnitude. Zero is represented by an - // empty Data struct, and negative zero is not supported. - guard data.count > 1, let firstByte = data.first else { return } - - // The first byte gives the sign - // This byte is compared to a bitmask to allow additional functionality to be added - // to this byte in the future. - self.sign = firstByte & 0b1 == 0 ? .plus : .minus - - // The remaining bytes are read and stored as the magnitude - self.magnitude = BigUInt(data.dropFirst(1)) - } - - /// Return a `Data` value that contains the base-256 representation of this integer, in network (big-endian) byte order and a prepended byte to indicate the sign (0 for positive, 1 for negative) - public func serialize() -> Data { - // Create a data object for the magnitude portion of the BigInt - let magnitudeData = self.magnitude.serialize() - - // Similar to BigUInt, a value of 0 should return an initialized, empty Data struct - guard magnitudeData.count > 0 else { return magnitudeData } - - // Create a new Data struct for the signed BigInt value - var data = Data(capacity: magnitudeData.count + 1) - - // The first byte should be 0 for a positive value, or 1 for a negative value - // i.e., the sign bit is the LSB - data.append(self.sign == .plus ? 0 : 1) - - data.append(magnitudeData) - return data - } -} diff --git a/Carthage/Checkouts/BigInt/Sources/Division.swift b/Carthage/Checkouts/BigInt/Sources/Division.swift deleted file mode 100644 index 4b30dbb56..000000000 --- a/Carthage/Checkouts/BigInt/Sources/Division.swift +++ /dev/null @@ -1,375 +0,0 @@ -// -// Division.swift -// BigInt -// -// Created by Károly Lőrentey on 2016-01-03. -// Copyright © 2016-2017 Károly Lőrentey. -// - -//MARK: Full-width multiplication and division - -// TODO: Return to `where Magnitude == Self` when SR-13491 is resolved -extension FixedWidthInteger { - private var halfShift: Self { - return Self(Self.bitWidth / 2) - - } - private var high: Self { - return self &>> halfShift - } - - private var low: Self { - let mask: Self = 1 &<< halfShift - 1 - return self & mask - } - - private var upshifted: Self { - return self &<< halfShift - } - - private var split: (high: Self, low: Self) { - return (self.high, self.low) - } - - private init(_ value: (high: Self, low: Self)) { - self = value.high.upshifted + value.low - } - - /// Divide the double-width integer `dividend` by `self` and return the quotient and remainder. - /// - /// - Requires: `dividend.high < self`, so that the result will fit in a single digit. - /// - Complexity: O(1) with 2 divisions, 6 multiplications and ~12 or so additions/subtractions. - internal func fastDividingFullWidth(_ dividend: (high: Self, low: Self.Magnitude)) -> (quotient: Self, remainder: Self) { - // Division is complicated; doing it with single-digit operations is maddeningly complicated. - // This is a Swift adaptation for "divlu2" in Hacker's Delight, - // which is in turn a C adaptation of Knuth's Algorithm D (TAOCP vol 2, 4.3.1). - precondition(dividend.high < self) - - // This replaces the implementation in stdlib, which is much slower. - // FIXME: Speed up stdlib. It should use full-width idiv on Intel processors, and - // fall back to a reasonably fast algorithm elsewhere. - - // The trick here is that we're actually implementing a 4/2 long division using half-words, - // with the long division loop unrolled into two 3/2 half-word divisions. - // Luckily, 3/2 half-word division can be approximated by a single full-word division operation - // that, when the divisor is normalized, differs from the correct result by at most 2. - - /// Find the half-word quotient in `u / vn`, which must be normalized. - /// `u` contains three half-words in the two halves of `u.high` and the lower half of - /// `u.low`. (The weird distribution makes for a slightly better fit with the input.) - /// `vn` contains the normalized divisor, consisting of two half-words. - /// - /// - Requires: u.high < vn && u.low.high == 0 && vn.leadingZeroBitCount == 0 - func quotient(dividing u: (high: Self, low: Self), by vn: Self) -> Self { - let (vn1, vn0) = vn.split - // Get approximate quotient. - let (q, r) = u.high.quotientAndRemainder(dividingBy: vn1) - let p = q * vn0 - // q is often already correct, but sometimes the approximation overshoots by at most 2. - // The code that follows checks for this while being careful to only perform single-digit operations. - if q.high == 0 && p <= r.upshifted + u.low { return q } - let r2 = r + vn1 - if r2.high != 0 { return q - 1 } - if (q - 1).high == 0 && p - vn0 <= r2.upshifted + u.low { return q - 1 } - //assert((r + 2 * vn1).high != 0 || p - 2 * vn0 <= (r + 2 * vn1).upshifted + u.low) - return q - 2 - } - /// Divide 3 half-digits by 2 half-digits to get a half-digit quotient and a full-digit remainder. - /// - /// - Requires: u.high < v && u.low.high == 0 && vn.width = width(Digit) - func quotientAndRemainder(dividing u: (high: Self, low: Self), by v: Self) -> (quotient: Self, remainder: Self) { - let q = quotient(dividing: u, by: v) - // Note that `uh.low` masks off a couple of bits, and `q * v` and the - // subtraction are likely to overflow. Despite this, the end result (remainder) will - // still be correct and it will fit inside a single (full) Digit. - let r = Self(u) &- q &* v - assert(r < v) - return (q, r) - } - - // Normalize the dividend and the divisor (self) such that the divisor has no leading zeroes. - let z = Self(self.leadingZeroBitCount) - let w = Self(Self.bitWidth) - z - let vn = self << z - - let un32 = (z == 0 ? dividend.high : (dividend.high &<< z) | ((dividend.low as! Self) &>> w)) // No bits are lost - let un10 = dividend.low &<< z - let (un1, un0) = un10.split - - // Divide `(un32,un10)` by `vn`, splitting the full 4/2 division into two 3/2 ones. - let (q1, un21) = quotientAndRemainder(dividing: (un32, (un1 as! Self)), by: vn) - let (q0, rn) = quotientAndRemainder(dividing: (un21, (un0 as! Self)), by: vn) - - // Undo normalization of the remainder and combine the two halves of the quotient. - let mod = rn >> z - let div = Self((q1, q0)) - return (div, mod) - } - - /// Return the quotient of the 3/2-word division `x/y` as a single word. - /// - /// - Requires: (x.0, x.1) <= y && y.0.high != 0 - /// - Returns: The exact value when it fits in a single word, otherwise `Self`. - static func approximateQuotient(dividing x: (Self, Self, Self), by y: (Self, Self)) -> Self { - // Start with q = (x.0, x.1) / y.0, (or Word.max on overflow) - var q: Self - var r: Self - if x.0 == y.0 { - q = Self.max - let (s, o) = x.0.addingReportingOverflow(x.1) - if o { return q } - r = s - } - else { - (q, r) = y.0.fastDividingFullWidth((x.0, (x.1 as! Magnitude))) - } - // Now refine q by considering x.2 and y.1. - // Note that since y is normalized, q * y - x is between 0 and 2. - let (ph, pl) = q.multipliedFullWidth(by: y.1) - if ph < r || (ph == r && pl <= x.2) { return q } - - let (r1, ro) = r.addingReportingOverflow(y.0) - if ro { return q - 1 } - - let (pl1, so) = pl.subtractingReportingOverflow((y.1 as! Magnitude)) - let ph1 = (so ? ph - 1 : ph) - - if ph1 < r1 || (ph1 == r1 && pl1 <= x.2) { return q - 1 } - return q - 2 - } -} - -extension BigUInt { - //MARK: Division - - /// Divide this integer by the word `y`, leaving the quotient in its place and returning the remainder. - /// - /// - Requires: y > 0 - /// - Complexity: O(count) - internal mutating func divide(byWord y: Word) -> Word { - precondition(y > 0) - if y == 1 { return 0 } - - var remainder: Word = 0 - for i in (0 ..< count).reversed() { - let u = self[i] - (self[i], remainder) = y.fastDividingFullWidth((remainder, u)) - } - return remainder - } - - /// Divide this integer by the word `y` and return the resulting quotient and remainder. - /// - /// - Requires: y > 0 - /// - Returns: (quotient, remainder) where quotient = floor(x/y), remainder = x - quotient * y - /// - Complexity: O(x.count) - internal func quotientAndRemainder(dividingByWord y: Word) -> (quotient: BigUInt, remainder: Word) { - var div = self - let mod = div.divide(byWord: y) - return (div, mod) - } - - /// Divide `x` by `y`, putting the quotient in `x` and the remainder in `y`. - /// Reusing integers like this reduces the number of allocations during the calculation. - static func divide(_ x: inout BigUInt, by y: inout BigUInt) { - // This is a Swift adaptation of "divmnu" from Hacker's Delight, which is in - // turn a C adaptation of Knuth's Algorithm D (TAOCP vol 2, 4.3.1). - - precondition(!y.isZero) - - // First, let's take care of the easy cases. - if x < y { - (x, y) = (0, x) - return - } - if y.count == 1 { - // The single-word case reduces to a simpler loop. - y = BigUInt(x.divide(byWord: y[0])) - return - } - - // In the hard cases, we will perform the long division algorithm we learned in school. - // It works by successively calculating the single-word quotient of the top y.count + 1 - // words of x divided by y, replacing the top of x with the remainder, and repeating - // the process one word lower. - // - // The tricky part is that the algorithm needs to be able to do n+1/n word divisions, - // but we only have a primitive for dividing two words by a single - // word. (Remember that this step is also tricky when we do it on paper!) - // - // The solution is that the long division can be approximated by a single full division - // using just the most significant words. We can then use multiplications and - // subtractions to refine the approximation until we get the correct quotient word. - // - // We could do this by doing a simple 2/1 full division, but Knuth goes one step further, - // and implements a 3/2 division. This results in an exact approximation in the - // vast majority of cases, eliminating an extra subtraction over big integers. - // - // The function `approximateQuotient` above implements Knuth's 3/2 division algorithm. - // It requires that the divisor's most significant word is larger than - // Word.max / 2. This ensures that the approximation has tiny error bounds, - // which is what makes this entire approach viable. - // To satisfy this requirement, we will normalize the division by multiplying - // both the divisor and the dividend by the same (small) factor. - let z = y.leadingZeroBitCount - y <<= z - x <<= z // We'll calculate the remainder in the normalized dividend. - var quotient = BigUInt() - assert(y.leadingZeroBitCount == 0) - - // We're ready to start the long division! - let dc = y.count - let d1 = y[dc - 1] - let d0 = y[dc - 2] - var product: BigUInt = 0 - for j in (dc ... x.count).reversed() { - // Approximate dividing the top dc+1 words of `remainder` using the topmost 3/2 words. - let r2 = x[j] - let r1 = x[j - 1] - let r0 = x[j - 2] - let q = Word.approximateQuotient(dividing: (r2, r1, r0), by: (d1, d0)) - - // Multiply the entire divisor with `q` and subtract the result from remainder. - // Normalization ensures the 3/2 quotient will either be exact for the full division, or - // it may overshoot by at most 1, in which case the product will be greater - // than the remainder. - product.load(y) - product.multiply(byWord: q) - if product <= x.extract(j - dc ..< j + 1) { - x.subtract(product, shiftedBy: j - dc) - quotient[j - dc] = q - } - else { - // This case is extremely rare -- it has a probability of 1/2^(Word.bitWidth - 1). - x.add(y, shiftedBy: j - dc) - x.subtract(product, shiftedBy: j - dc) - quotient[j - dc] = q - 1 - } - } - // The remainder's normalization needs to be undone, but otherwise we're done. - x >>= z - y = x - x = quotient - } - - /// Divide `x` by `y`, putting the remainder in `x`. - mutating func formRemainder(dividingBy y: BigUInt, normalizedBy shift: Int) { - precondition(!y.isZero) - assert(y.leadingZeroBitCount == 0) - if y.count == 1 { - let remainder = self.divide(byWord: y[0] >> shift) - self.load(BigUInt(remainder)) - return - } - self <<= shift - if self >= y { - let dc = y.count - let d1 = y[dc - 1] - let d0 = y[dc - 2] - var product: BigUInt = 0 - for j in (dc ... self.count).reversed() { - let r2 = self[j] - let r1 = self[j - 1] - let r0 = self[j - 2] - let q = Word.approximateQuotient(dividing: (r2, r1, r0), by: (d1, d0)) - product.load(y) - product.multiply(byWord: q) - if product <= self.extract(j - dc ..< j + 1) { - self.subtract(product, shiftedBy: j - dc) - } - else { - self.add(y, shiftedBy: j - dc) - self.subtract(product, shiftedBy: j - dc) - } - } - } - self >>= shift - } - - - /// Divide this integer by `y` and return the resulting quotient and remainder. - /// - /// - Requires: `y > 0` - /// - Returns: `(quotient, remainder)` where `quotient = floor(self/y)`, `remainder = self - quotient * y` - /// - Complexity: O(count^2) - public func quotientAndRemainder(dividingBy y: BigUInt) -> (quotient: BigUInt, remainder: BigUInt) { - var x = self - var y = y - BigUInt.divide(&x, by: &y) - return (x, y) - } - - /// Divide `x` by `y` and return the quotient. - /// - /// - Note: Use `divided(by:)` if you also need the remainder. - public static func /(x: BigUInt, y: BigUInt) -> BigUInt { - return x.quotientAndRemainder(dividingBy: y).quotient - } - - /// Divide `x` by `y` and return the remainder. - /// - /// - Note: Use `divided(by:)` if you also need the remainder. - public static func %(x: BigUInt, y: BigUInt) -> BigUInt { - var x = x - let shift = y.leadingZeroBitCount - x.formRemainder(dividingBy: y << shift, normalizedBy: shift) - return x - } - - /// Divide `x` by `y` and store the quotient in `x`. - /// - /// - Note: Use `divided(by:)` if you also need the remainder. - public static func /=(x: inout BigUInt, y: BigUInt) { - var y = y - BigUInt.divide(&x, by: &y) - } - - /// Divide `x` by `y` and store the remainder in `x`. - /// - /// - Note: Use `divided(by:)` if you also need the remainder. - public static func %=(x: inout BigUInt, y: BigUInt) { - let shift = y.leadingZeroBitCount - x.formRemainder(dividingBy: y << shift, normalizedBy: shift) - } -} - -extension BigInt { - /// Divide this integer by `y` and return the resulting quotient and remainder. - /// - /// - Requires: `y > 0` - /// - Returns: `(quotient, remainder)` where `quotient = floor(self/y)`, `remainder = self - quotient * y` - /// - Complexity: O(count^2) - public func quotientAndRemainder(dividingBy y: BigInt) -> (quotient: BigInt, remainder: BigInt) { - var a = self.magnitude - var b = y.magnitude - BigUInt.divide(&a, by: &b) - return (BigInt(sign: self.sign == y.sign ? .plus : .minus, magnitude: a), - BigInt(sign: self.sign, magnitude: b)) - } - - /// Divide `a` by `b` and return the quotient. Traps if `b` is zero. - public static func /(a: BigInt, b: BigInt) -> BigInt { - return BigInt(sign: a.sign == b.sign ? .plus : .minus, magnitude: a.magnitude / b.magnitude) - } - - /// Divide `a` by `b` and return the remainder. The result has the same sign as `a`. - public static func %(a: BigInt, b: BigInt) -> BigInt { - return BigInt(sign: a.sign, magnitude: a.magnitude % b.magnitude) - } - - /// Return the result of `a` mod `b`. The result is always a nonnegative integer that is less than the absolute value of `b`. - public func modulus(_ mod: BigInt) -> BigInt { - let remainder = self.magnitude % mod.magnitude - return BigInt( - self.sign == .minus && !remainder.isZero - ? mod.magnitude - remainder - : remainder) - } -} - -extension BigInt { - /// Divide `a` by `b` storing the quotient in `a`. - public static func /=(a: inout BigInt, b: BigInt) { a = a / b } - /// Divide `a` by `b` storing the remainder in `a`. - public static func %=(a: inout BigInt, b: BigInt) { a = a % b } -} diff --git a/Carthage/Checkouts/BigInt/Sources/Exponentiation.swift b/Carthage/Checkouts/BigInt/Sources/Exponentiation.swift deleted file mode 100644 index 9d7ee85da..000000000 --- a/Carthage/Checkouts/BigInt/Sources/Exponentiation.swift +++ /dev/null @@ -1,119 +0,0 @@ -// -// Exponentiation.swift -// BigInt -// -// Created by Károly Lőrentey on 2016-01-03. -// Copyright © 2016-2017 Károly Lőrentey. -// - -extension BigUInt { - //MARK: Exponentiation - - /// Returns this integer raised to the power `exponent`. - /// - /// This function calculates the result by [successively squaring the base while halving the exponent][expsqr]. - /// - /// [expsqr]: https://en.wikipedia.org/wiki/Exponentiation_by_squaring - /// - /// - Note: This function can be unreasonably expensive for large exponents, which is why `exponent` is - /// a simple integer value. If you want to calculate big exponents, you'll probably need to use - /// the modulo arithmetic variant. - /// - Returns: 1 if `exponent == 0`, otherwise `self` raised to `exponent`. (This implies that `0.power(0) == 1`.) - /// - SeeAlso: `BigUInt.power(_:, modulus:)` - /// - Complexity: O((exponent * self.count)^log2(3)) or somesuch. The result may require a large amount of memory, too. - public func power(_ exponent: Int) -> BigUInt { - if exponent == 0 { return 1 } - if exponent == 1 { return self } - if exponent < 0 { - precondition(!self.isZero) - return self == 1 ? 1 : 0 - } - if self <= 1 { return self } - var result = BigUInt(1) - var b = self - var e = exponent - while e > 0 { - if e & 1 == 1 { - result *= b - } - e >>= 1 - b *= b - } - return result - } - - /// Returns the remainder of this integer raised to the power `exponent` in modulo arithmetic under `modulus`. - /// - /// Uses the [right-to-left binary method][rtlb]. - /// - /// [rtlb]: https://en.wikipedia.org/wiki/Modular_exponentiation#Right-to-left_binary_method - /// - /// - Complexity: O(exponent.count * modulus.count^log2(3)) or somesuch - public func power(_ exponent: BigUInt, modulus: BigUInt) -> BigUInt { - precondition(!modulus.isZero) - if modulus == (1 as BigUInt) { return 0 } - let shift = modulus.leadingZeroBitCount - let normalizedModulus = modulus << shift - var result = BigUInt(1) - var b = self - b.formRemainder(dividingBy: normalizedModulus, normalizedBy: shift) - for var e in exponent.words { - for _ in 0 ..< Word.bitWidth { - if e & 1 == 1 { - result *= b - result.formRemainder(dividingBy: normalizedModulus, normalizedBy: shift) - } - e >>= 1 - b *= b - b.formRemainder(dividingBy: normalizedModulus, normalizedBy: shift) - } - } - return result - } -} - -extension BigInt { - /// Returns this integer raised to the power `exponent`. - /// - /// This function calculates the result by [successively squaring the base while halving the exponent][expsqr]. - /// - /// [expsqr]: https://en.wikipedia.org/wiki/Exponentiation_by_squaring - /// - /// - Note: This function can be unreasonably expensive for large exponents, which is why `exponent` is - /// a simple integer value. If you want to calculate big exponents, you'll probably need to use - /// the modulo arithmetic variant. - /// - Returns: 1 if `exponent == 0`, otherwise `self` raised to `exponent`. (This implies that `0.power(0) == 1`.) - /// - SeeAlso: `BigUInt.power(_:, modulus:)` - /// - Complexity: O((exponent * self.count)^log2(3)) or somesuch. The result may require a large amount of memory, too. - public func power(_ exponent: Int) -> BigInt { - return BigInt(sign: self.sign == .minus && exponent & 1 != 0 ? .minus : .plus, - magnitude: self.magnitude.power(exponent)) - } - - /// Returns the remainder of this integer raised to the power `exponent` in modulo arithmetic under `modulus`. - /// - /// Uses the [right-to-left binary method][rtlb]. - /// - /// [rtlb]: https://en.wikipedia.org/wiki/Modular_exponentiation#Right-to-left_binary_method - /// - /// - Complexity: O(exponent.count * modulus.count^log2(3)) or somesuch - public func power(_ exponent: BigInt, modulus: BigInt) -> BigInt { - precondition(!modulus.isZero) - if modulus.magnitude == 1 { return 0 } - if exponent.isZero { return 1 } - if exponent == 1 { return self.modulus(modulus) } - if exponent < 0 { - precondition(!self.isZero) - guard magnitude == 1 else { return 0 } - guard sign == .minus else { return 1 } - guard exponent.magnitude[0] & 1 != 0 else { return 1 } - return BigInt(modulus.magnitude - 1) - } - let power = self.magnitude.power(exponent.magnitude, - modulus: modulus.magnitude) - if self.sign == .plus || exponent.magnitude[0] & 1 == 0 || power.isZero { - return BigInt(power) - } - return BigInt(modulus.magnitude - power) - } -} diff --git a/Carthage/Checkouts/BigInt/Sources/Floating Point Conversion.swift b/Carthage/Checkouts/BigInt/Sources/Floating Point Conversion.swift deleted file mode 100644 index 6c2395a31..000000000 --- a/Carthage/Checkouts/BigInt/Sources/Floating Point Conversion.swift +++ /dev/null @@ -1,73 +0,0 @@ -// -// Floating Point Conversion.swift -// BigInt -// -// Created by Károly Lőrentey on 2017-08-11. -// Copyright © 2016-2017 Károly Lőrentey. -// - -extension BigUInt { - public init?(exactly source: T) { - guard source.isFinite else { return nil } - guard !source.isZero else { self = 0; return } - guard source.sign == .plus else { return nil } - let value = source.rounded(.towardZero) - guard value == source else { return nil } - assert(value.floatingPointClass == .positiveNormal) - assert(value.exponent >= 0) - let significand = value.significandBitPattern - self = (BigUInt(1) << value.exponent) + BigUInt(significand) >> (T.significandBitCount - Int(value.exponent)) - } - - public init(_ source: T) { - self.init(exactly: source.rounded(.towardZero))! - } -} - -extension BigInt { - public init?(exactly source: T) { - switch source.sign{ - case .plus: - guard let magnitude = BigUInt(exactly: source) else { return nil } - self = BigInt(sign: .plus, magnitude: magnitude) - case .minus: - guard let magnitude = BigUInt(exactly: -source) else { return nil } - self = BigInt(sign: .minus, magnitude: magnitude) - } - } - - public init(_ source: T) { - self.init(exactly: source.rounded(.towardZero))! - } -} - -extension BinaryFloatingPoint where RawExponent: FixedWidthInteger, RawSignificand: FixedWidthInteger { - public init(_ value: BigInt) { - guard !value.isZero else { self = 0; return } - let v = value.magnitude - let bitWidth = v.bitWidth - var exponent = bitWidth - 1 - let shift = bitWidth - Self.significandBitCount - 1 - var significand = value.magnitude >> (shift - 1) - if significand[0] & 3 == 3 { // Handle rounding - significand >>= 1 - significand += 1 - if significand.trailingZeroBitCount >= Self.significandBitCount { - exponent += 1 - } - } - else { - significand >>= 1 - } - let bias = 1 << (Self.exponentBitCount - 1) - 1 - guard exponent <= bias else { self = Self.infinity; return } - significand &= 1 << Self.significandBitCount - 1 - self = Self.init(sign: value.sign == .plus ? .plus : .minus, - exponentBitPattern: RawExponent(bias + exponent), - significandBitPattern: RawSignificand(significand)) - } - - public init(_ value: BigUInt) { - self.init(BigInt(sign: .plus, magnitude: value)) - } -} diff --git a/Carthage/Checkouts/BigInt/Sources/GCD.swift b/Carthage/Checkouts/BigInt/Sources/GCD.swift deleted file mode 100644 index d55605dce..000000000 --- a/Carthage/Checkouts/BigInt/Sources/GCD.swift +++ /dev/null @@ -1,80 +0,0 @@ -// -// GCD.swift -// BigInt -// -// Created by Károly Lőrentey on 2016-01-03. -// Copyright © 2016-2017 Károly Lőrentey. -// - -extension BigUInt { - //MARK: Greatest Common Divisor - - /// Returns the greatest common divisor of `self` and `b`. - /// - /// - Complexity: O(count^2) where count = max(self.count, b.count) - public func greatestCommonDivisor(with b: BigUInt) -> BigUInt { - // This is Stein's algorithm: https://en.wikipedia.org/wiki/Binary_GCD_algorithm - if self.isZero { return b } - if b.isZero { return self } - - let az = self.trailingZeroBitCount - let bz = b.trailingZeroBitCount - let twos = Swift.min(az, bz) - - var (x, y) = (self >> az, b >> bz) - if x < y { swap(&x, &y) } - - while !x.isZero { - x >>= x.trailingZeroBitCount - if x < y { swap(&x, &y) } - x -= y - } - return y << twos - } - - /// Returns the [multiplicative inverse of this integer in modulo `modulus` arithmetic][inverse], - /// or `nil` if there is no such number. - /// - /// [inverse]: https://en.wikipedia.org/wiki/Extended_Euclidean_algorithm#Modular_integers - /// - /// - Returns: If `gcd(self, modulus) == 1`, the value returned is an integer `a < modulus` such that `(a * self) % modulus == 1`. If `self` and `modulus` aren't coprime, the return value is `nil`. - /// - Requires: modulus > 1 - /// - Complexity: O(count^3) - public func inverse(_ modulus: BigUInt) -> BigUInt? { - precondition(modulus > 1) - var t1 = BigInt(0) - var t2 = BigInt(1) - var r1 = modulus - var r2 = self - while !r2.isZero { - let quotient = r1 / r2 - (t1, t2) = (t2, t1 - BigInt(quotient) * t2) - (r1, r2) = (r2, r1 - quotient * r2) - } - if r1 > 1 { return nil } - if t1.sign == .minus { return modulus - t1.magnitude } - return t1.magnitude - } -} - -extension BigInt { - /// Returns the greatest common divisor of `a` and `b`. - /// - /// - Complexity: O(count^2) where count = max(a.count, b.count) - public func greatestCommonDivisor(with b: BigInt) -> BigInt { - return BigInt(self.magnitude.greatestCommonDivisor(with: b.magnitude)) - } - - /// Returns the [multiplicative inverse of this integer in modulo `modulus` arithmetic][inverse], - /// or `nil` if there is no such number. - /// - /// [inverse]: https://en.wikipedia.org/wiki/Extended_Euclidean_algorithm#Modular_integers - /// - /// - Returns: If `gcd(self, modulus) == 1`, the value returned is an integer `a < modulus` such that `(a * self) % modulus == 1`. If `self` and `modulus` aren't coprime, the return value is `nil`. - /// - Requires: modulus.magnitude > 1 - /// - Complexity: O(count^3) - public func inverse(_ modulus: BigInt) -> BigInt? { - guard let inv = self.magnitude.inverse(modulus.magnitude) else { return nil } - return BigInt(self.sign == .plus || inv.isZero ? inv : modulus.magnitude - inv) - } -} diff --git a/Carthage/Checkouts/BigInt/Sources/Hashable.swift b/Carthage/Checkouts/BigInt/Sources/Hashable.swift deleted file mode 100644 index c5dc0e642..000000000 --- a/Carthage/Checkouts/BigInt/Sources/Hashable.swift +++ /dev/null @@ -1,26 +0,0 @@ -// -// Hashable.swift -// BigInt -// -// Created by Károly Lőrentey on 2016-01-03. -// Copyright © 2016-2017 Károly Lőrentey. -// - -extension BigUInt: Hashable { - //MARK: Hashing - - /// Append this `BigUInt` to the specified hasher. - public func hash(into hasher: inout Hasher) { - for word in self.words { - hasher.combine(word) - } - } -} - -extension BigInt: Hashable { - /// Append this `BigInt` to the specified hasher. - public func hash(into hasher: inout Hasher) { - hasher.combine(sign) - hasher.combine(magnitude) - } -} diff --git a/Carthage/Checkouts/BigInt/Sources/Info.plist b/Carthage/Checkouts/BigInt/Sources/Info.plist deleted file mode 100644 index 63135fb1e..000000000 --- a/Carthage/Checkouts/BigInt/Sources/Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - $(VERSION_STRING) - CFBundleSignature - ???? - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - NSHumanReadableCopyright - Copyright © 2016 Károly Lőrentey. - - diff --git a/Carthage/Checkouts/BigInt/Sources/Integer Conversion.swift b/Carthage/Checkouts/BigInt/Sources/Integer Conversion.swift deleted file mode 100644 index 9a210e4a4..000000000 --- a/Carthage/Checkouts/BigInt/Sources/Integer Conversion.swift +++ /dev/null @@ -1,89 +0,0 @@ -// -// Integer Conversion.swift -// BigInt -// -// Created by Károly Lőrentey on 2017-08-11. -// Copyright © 2016-2017 Károly Lőrentey. -// - -extension BigUInt { - public init?(exactly source: T) { - guard source >= (0 as T) else { return nil } - if source.bitWidth <= 2 * Word.bitWidth { - var it = source.words.makeIterator() - self.init(low: it.next() ?? 0, high: it.next() ?? 0) - precondition(it.next() == nil, "Length of BinaryInteger.words is greater than its bitWidth") - } - else { - self.init(words: source.words) - } - } - - public init(_ source: T) { - precondition(source >= (0 as T), "BigUInt cannot represent negative values") - self.init(exactly: source)! - } - - public init(truncatingIfNeeded source: T) { - self.init(words: source.words) - } - - public init(clamping source: T) { - if source <= (0 as T) { - self.init() - } - else { - self.init(words: source.words) - } - } -} - -extension BigInt { - public init() { - self.init(sign: .plus, magnitude: 0) - } - - /// Initializes a new signed big integer with the same value as the specified unsigned big integer. - public init(_ integer: BigUInt) { - self.magnitude = integer - self.sign = .plus - } - - public init(_ source: T) where T : BinaryInteger { - if source >= (0 as T) { - self.init(sign: .plus, magnitude: BigUInt(source)) - } - else { - var words = Array(source.words) - words.twosComplement() - self.init(sign: .minus, magnitude: BigUInt(words: words)) - } - } - - public init?(exactly source: T) where T : BinaryInteger { - self.init(source) - } - - public init(clamping source: T) where T : BinaryInteger { - self.init(source) - } - - public init(truncatingIfNeeded source: T) where T : BinaryInteger { - self.init(source) - } -} - -extension BigUInt: ExpressibleByIntegerLiteral { - /// Initialize a new big integer from an integer literal. - public init(integerLiteral value: UInt64) { - self.init(value) - } -} - -extension BigInt: ExpressibleByIntegerLiteral { - /// Initialize a new big integer from an integer literal. - public init(integerLiteral value: Int64) { - self.init(value) - } -} - diff --git a/Carthage/Checkouts/BigInt/Sources/Multiplication.swift b/Carthage/Checkouts/BigInt/Sources/Multiplication.swift deleted file mode 100644 index 635c36a5f..000000000 --- a/Carthage/Checkouts/BigInt/Sources/Multiplication.swift +++ /dev/null @@ -1,165 +0,0 @@ -// -// Multiplication.swift -// BigInt -// -// Created by Károly Lőrentey on 2016-01-03. -// Copyright © 2016-2017 Károly Lőrentey. -// - -extension BigUInt { - - //MARK: Multiplication - - /// Multiply this big integer by a single word, and store the result in place of the original big integer. - /// - /// - Complexity: O(count) - public mutating func multiply(byWord y: Word) { - guard y != 0 else { self = 0; return } - guard y != 1 else { return } - var carry: Word = 0 - let c = self.count - for i in 0 ..< c { - let (h, l) = self[i].multipliedFullWidth(by: y) - let (low, o) = l.addingReportingOverflow(carry) - self[i] = low - carry = (o ? h + 1 : h) - } - self[c] = carry - } - - /// Multiply this big integer by a single Word, and return the result. - /// - /// - Complexity: O(count) - public func multiplied(byWord y: Word) -> BigUInt { - var r = self - r.multiply(byWord: y) - return r - } - - /// Multiply `x` by `y`, and add the result to this integer, optionally shifted `shift` words to the left. - /// - /// - Note: This is the fused multiply/shift/add operation; it is more efficient than doing the components - /// individually. (The fused operation doesn't need to allocate space for temporary big integers.) - /// - Returns: `self` is set to `self + (x * y) << (shift * 2^Word.bitWidth)` - /// - Complexity: O(count) - public mutating func multiplyAndAdd(_ x: BigUInt, _ y: Word, shiftedBy shift: Int = 0) { - precondition(shift >= 0) - guard y != 0 && x.count > 0 else { return } - guard y != 1 else { self.add(x, shiftedBy: shift); return } - var mulCarry: Word = 0 - var addCarry = false - let xc = x.count - var xi = 0 - while xi < xc || addCarry || mulCarry > 0 { - let (h, l) = x[xi].multipliedFullWidth(by: y) - let (low, o) = l.addingReportingOverflow(mulCarry) - mulCarry = (o ? h + 1 : h) - - let ai = shift + xi - let (sum1, so1) = self[ai].addingReportingOverflow(low) - if addCarry { - let (sum2, so2) = sum1.addingReportingOverflow(1) - self[ai] = sum2 - addCarry = so1 || so2 - } - else { - self[ai] = sum1 - addCarry = so1 - } - xi += 1 - } - } - - /// Multiply this integer by `y` and return the result. - /// - /// - Note: This uses the naive O(n^2) multiplication algorithm unless both arguments have more than - /// `BigUInt.directMultiplicationLimit` words. - /// - Complexity: O(n^log2(3)) - public func multiplied(by y: BigUInt) -> BigUInt { - // This method is mostly defined for symmetry with the rest of the arithmetic operations. - return self * y - } - - /// Multiplication switches to an asymptotically better recursive algorithm when arguments have more words than this limit. - public static var directMultiplicationLimit: Int = 1024 - - /// Multiply `a` by `b` and return the result. - /// - /// - Note: This uses the naive O(n^2) multiplication algorithm unless both arguments have more than - /// `BigUInt.directMultiplicationLimit` words. - /// - Complexity: O(n^log2(3)) - public static func *(x: BigUInt, y: BigUInt) -> BigUInt { - let xc = x.count - let yc = y.count - if xc == 0 { return BigUInt() } - if yc == 0 { return BigUInt() } - if yc == 1 { return x.multiplied(byWord: y[0]) } - if xc == 1 { return y.multiplied(byWord: x[0]) } - - if Swift.min(xc, yc) <= BigUInt.directMultiplicationLimit { - // Long multiplication. - let left = (xc < yc ? y : x) - let right = (xc < yc ? x : y) - var result = BigUInt() - for i in (0 ..< right.count).reversed() { - result.multiplyAndAdd(left, right[i], shiftedBy: i) - } - return result - } - - if yc < xc { - let (xh, xl) = x.split - var r = xl * y - r.add(xh * y, shiftedBy: x.middleIndex) - return r - } - else if xc < yc { - let (yh, yl) = y.split - var r = yl * x - r.add(yh * x, shiftedBy: y.middleIndex) - return r - } - - let shift = x.middleIndex - - // Karatsuba multiplication: - // x * y = * = (ignoring carry) - let (a, b) = x.split - let (c, d) = y.split - - let high = a * c - let low = b * d - let xp = a >= b - let yp = c >= d - let xm = (xp ? a - b : b - a) - let ym = (yp ? c - d : d - c) - let m = xm * ym - - var r = low - r.add(high, shiftedBy: 2 * shift) - r.add(low, shiftedBy: shift) - r.add(high, shiftedBy: shift) - if xp == yp { - r.subtract(m, shiftedBy: shift) - } - else { - r.add(m, shiftedBy: shift) - } - return r - } - - /// Multiply `a` by `b` and store the result in `a`. - public static func *=(a: inout BigUInt, b: BigUInt) { - a = a * b - } -} - -extension BigInt { - /// Multiply `a` with `b` and return the result. - public static func *(a: BigInt, b: BigInt) -> BigInt { - return BigInt(sign: a.sign == b.sign ? .plus : .minus, magnitude: a.magnitude * b.magnitude) - } - - /// Multiply `a` with `b` in place. - public static func *=(a: inout BigInt, b: BigInt) { a = a * b } -} diff --git a/Carthage/Checkouts/BigInt/Sources/Prime Test.swift b/Carthage/Checkouts/BigInt/Sources/Prime Test.swift deleted file mode 100644 index 7f1871104..000000000 --- a/Carthage/Checkouts/BigInt/Sources/Prime Test.swift +++ /dev/null @@ -1,153 +0,0 @@ -// -// Prime Test.swift -// BigInt -// -// Created by Károly Lőrentey on 2016-01-04. -// Copyright © 2016-2017 Károly Lőrentey. -// - -/// The first several [prime numbers][primes]. -/// -/// [primes]: https://oeis.org/A000040 -let primes: [BigUInt.Word] = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41] - -/// The ith element in this sequence is the smallest composite number that passes the strong probable prime test -/// for all of the first (i+1) primes. -/// -/// This is sequence [A014233](http://oeis.org/A014233) on the [Online Encyclopaedia of Integer Sequences](http://oeis.org). -let pseudoPrimes: [BigUInt] = [ - /* 2 */ 2_047, - /* 3 */ 1_373_653, - /* 5 */ 25_326_001, - /* 7 */ 3_215_031_751, - /* 11 */ 2_152_302_898_747, - /* 13 */ 3_474_749_660_383, - /* 17 */ 341_550_071_728_321, - /* 19 */ 341_550_071_728_321, - /* 23 */ 3_825_123_056_546_413_051, - /* 29 */ 3_825_123_056_546_413_051, - /* 31 */ 3_825_123_056_546_413_051, - /* 37 */ "318665857834031151167461", - /* 41 */ "3317044064679887385961981", -] - -extension BigUInt { - //MARK: Primality Testing - - /// Returns true iff this integer passes the [strong probable prime test][sppt] for the specified base. - /// - /// [sppt]: https://en.wikipedia.org/wiki/Probable_prime - public func isStrongProbablePrime(_ base: BigUInt) -> Bool { - precondition(base > (1 as BigUInt)) - precondition(self > (0 as BigUInt)) - let dec = self - 1 - - let r = dec.trailingZeroBitCount - let d = dec >> r - - var test = base.power(d, modulus: self) - if test == 1 || test == dec { return true } - - if r > 0 { - let shift = self.leadingZeroBitCount - let normalized = self << shift - for _ in 1 ..< r { - test *= test - test.formRemainder(dividingBy: normalized, normalizedBy: shift) - if test == 1 { - return false - } - if test == dec { return true } - } - } - return false - } - - /// Returns true if this integer is probably prime. Returns false if this integer is definitely not prime. - /// - /// This function performs a probabilistic [Miller-Rabin Primality Test][mrpt], consisting of `rounds` iterations, - /// each calculating the strong probable prime test for a random base. The number of rounds is 10 by default, - /// but you may specify your own choice. - /// - /// To speed things up, the function checks if `self` is divisible by the first few prime numbers before - /// diving into (slower) Miller-Rabin testing. - /// - /// Also, when `self` is less than 82 bits wide, `isPrime` does a deterministic test that is guaranteed to - /// return a correct result. - /// - /// [mrpt]: https://en.wikipedia.org/wiki/Miller–Rabin_primality_test - public func isPrime(rounds: Int = 10) -> Bool { - if count <= 1 && self[0] < 2 { return false } - if count == 1 && self[0] < 4 { return true } - - // Even numbers above 2 aren't prime. - if self[0] & 1 == 0 { return false } - - // Quickly check for small primes. - for i in 1 ..< primes.count { - let p = primes[i] - if self.count == 1 && self[0] == p { - return true - } - if self.quotientAndRemainder(dividingByWord: p).remainder == 0 { - return false - } - } - - /// Give an exact answer when we can. - if self < pseudoPrimes.last! { - for i in 0 ..< pseudoPrimes.count { - guard isStrongProbablePrime(BigUInt(primes[i])) else { - break - } - if self < pseudoPrimes[i] { - // `self` is below the lowest pseudoprime corresponding to the prime bases we tested. It's a prime! - return true - } - } - return false - } - - /// Otherwise do as many rounds of random SPPT as required. - for _ in 0 ..< rounds { - let random = BigUInt.randomInteger(lessThan: self - 2) + 2 - guard isStrongProbablePrime(random) else { - return false - } - } - - // Well, it smells primey to me. - return true - } -} - -extension BigInt { - //MARK: Primality Testing - - /// Returns true iff this integer passes the [strong probable prime test][sppt] for the specified base. - /// - /// [sppt]: https://en.wikipedia.org/wiki/Probable_prime - public func isStrongProbablePrime(_ base: BigInt) -> Bool { - precondition(base.sign == .plus) - if self.sign == .minus { return false } - return self.magnitude.isStrongProbablePrime(base.magnitude) - } - - /// Returns true if this integer is probably prime. Returns false if this integer is definitely not prime. - /// - /// This function performs a probabilistic [Miller-Rabin Primality Test][mrpt], consisting of `rounds` iterations, - /// each calculating the strong probable prime test for a random base. The number of rounds is 10 by default, - /// but you may specify your own choice. - /// - /// To speed things up, the function checks if `self` is divisible by the first few prime numbers before - /// diving into (slower) Miller-Rabin testing. - /// - /// Also, when `self` is less than 82 bits wide, `isPrime` does a deterministic test that is guaranteed to - /// return a correct result. - /// - /// [mrpt]: https://en.wikipedia.org/wiki/Miller–Rabin_primality_test - public func isPrime(rounds: Int = 10) -> Bool { - if self.sign == .minus { return false } - return self.magnitude.isPrime(rounds: rounds) - } -} diff --git a/Carthage/Checkouts/BigInt/Sources/Random.swift b/Carthage/Checkouts/BigInt/Sources/Random.swift deleted file mode 100644 index bea98caf0..000000000 --- a/Carthage/Checkouts/BigInt/Sources/Random.swift +++ /dev/null @@ -1,101 +0,0 @@ -// -// Random.swift -// BigInt -// -// Created by Károly Lőrentey on 2016-01-04. -// Copyright © 2016-2017 Károly Lőrentey. -// - -extension BigUInt { - /// Create a big unsigned integer consisting of `width` uniformly distributed random bits. - /// - /// - Parameter width: The maximum number of one bits in the result. - /// - Parameter generator: The source of randomness. - /// - Returns: A big unsigned integer less than `1 << width`. - public static func randomInteger(withMaximumWidth width: Int, using generator: inout RNG) -> BigUInt { - var result = BigUInt.zero - var bitsLeft = width - var i = 0 - let wordsNeeded = (width + Word.bitWidth - 1) / Word.bitWidth - if wordsNeeded > 2 { - result.reserveCapacity(wordsNeeded) - } - while bitsLeft >= Word.bitWidth { - result[i] = generator.next() - i += 1 - bitsLeft -= Word.bitWidth - } - if bitsLeft > 0 { - let mask: Word = (1 << bitsLeft) - 1 - result[i] = (generator.next() as Word) & mask - } - return result - } - - /// Create a big unsigned integer consisting of `width` uniformly distributed random bits. - /// - /// - Note: I use a `SystemRandomGeneratorGenerator` as the source of randomness. - /// - /// - Parameter width: The maximum number of one bits in the result. - /// - Returns: A big unsigned integer less than `1 << width`. - public static func randomInteger(withMaximumWidth width: Int) -> BigUInt { - var rng = SystemRandomNumberGenerator() - return randomInteger(withMaximumWidth: width, using: &rng) - } - - /// Create a big unsigned integer consisting of `width-1` uniformly distributed random bits followed by a one bit. - /// - /// - Note: If `width` is zero, the result is zero. - /// - /// - Parameter width: The number of bits required to represent the answer. - /// - Parameter generator: The source of randomness. - /// - Returns: A random big unsigned integer whose width is `width`. - public static func randomInteger(withExactWidth width: Int, using generator: inout RNG) -> BigUInt { - // width == 0 -> return 0 because there is no room for a one bit. - // width == 1 -> return 1 because there is no room for any random bits. - guard width > 1 else { return BigUInt(width) } - var result = randomInteger(withMaximumWidth: width - 1, using: &generator) - result[(width - 1) / Word.bitWidth] |= 1 << Word((width - 1) % Word.bitWidth) - return result - } - - /// Create a big unsigned integer consisting of `width-1` uniformly distributed random bits followed by a one bit. - /// - /// - Note: If `width` is zero, the result is zero. - /// - Note: I use a `SystemRandomGeneratorGenerator` as the source of randomness. - /// - /// - Returns: A random big unsigned integer whose width is `width`. - public static func randomInteger(withExactWidth width: Int) -> BigUInt { - var rng = SystemRandomNumberGenerator() - return randomInteger(withExactWidth: width, using: &rng) - } - - /// Create a uniformly distributed random unsigned integer that's less than the specified limit. - /// - /// - Precondition: `limit > 0`. - /// - /// - Parameter limit: The upper bound on the result. - /// - Parameter generator: The source of randomness. - /// - Returns: A random big unsigned integer that is less than `limit`. - public static func randomInteger(lessThan limit: BigUInt, using generator: inout RNG) -> BigUInt { - precondition(limit > 0, "\(#function): 0 is not a valid limit") - let width = limit.bitWidth - var random = randomInteger(withMaximumWidth: width, using: &generator) - while random >= limit { - random = randomInteger(withMaximumWidth: width, using: &generator) - } - return random - } - - /// Create a uniformly distributed random unsigned integer that's less than the specified limit. - /// - /// - Precondition: `limit > 0`. - /// - Note: I use a `SystemRandomGeneratorGenerator` as the source of randomness. - /// - /// - Parameter limit: The upper bound on the result. - /// - Returns: A random big unsigned integer that is less than `limit`. - public static func randomInteger(lessThan limit: BigUInt) -> BigUInt { - var rng = SystemRandomNumberGenerator() - return randomInteger(lessThan: limit, using: &rng) - } -} diff --git a/Carthage/Checkouts/BigInt/Sources/Shifts.swift b/Carthage/Checkouts/BigInt/Sources/Shifts.swift deleted file mode 100644 index e676e4143..000000000 --- a/Carthage/Checkouts/BigInt/Sources/Shifts.swift +++ /dev/null @@ -1,211 +0,0 @@ -// -// Shifts.swift -// BigInt -// -// Created by Károly Lőrentey on 2016-01-03. -// Copyright © 2016-2017 Károly Lőrentey. -// - -extension BigUInt { - - //MARK: Shift Operators - - internal func shiftedLeft(by amount: Word) -> BigUInt { - guard amount > 0 else { return self } - - let ext = Int(amount / Word(Word.bitWidth)) // External shift amount (new words) - let up = Word(amount % Word(Word.bitWidth)) // Internal shift amount (subword shift) - let down = Word(Word.bitWidth) - up - - var result = BigUInt() - if up > 0 { - var i = 0 - var lowbits: Word = 0 - while i < self.count || lowbits > 0 { - let word = self[i] - result[i + ext] = word << up | lowbits - lowbits = word >> down - i += 1 - } - } - else { - for i in 0 ..< self.count { - result[i + ext] = self[i] - } - } - return result - } - - internal mutating func shiftLeft(by amount: Word) { - guard amount > 0 else { return } - - let ext = Int(amount / Word(Word.bitWidth)) // External shift amount (new words) - let up = Word(amount % Word(Word.bitWidth)) // Internal shift amount (subword shift) - let down = Word(Word.bitWidth) - up - - if up > 0 { - var i = 0 - var lowbits: Word = 0 - while i < self.count || lowbits > 0 { - let word = self[i] - self[i] = word << up | lowbits - lowbits = word >> down - i += 1 - } - } - if ext > 0 && self.count > 0 { - self.shiftLeft(byWords: ext) - } - } - - internal func shiftedRight(by amount: Word) -> BigUInt { - guard amount > 0 else { return self } - guard amount < self.bitWidth else { return 0 } - - let ext = Int(amount / Word(Word.bitWidth)) // External shift amount (new words) - let down = Word(amount % Word(Word.bitWidth)) // Internal shift amount (subword shift) - let up = Word(Word.bitWidth) - down - - var result = BigUInt() - if down > 0 { - var highbits: Word = 0 - for i in (ext ..< self.count).reversed() { - let word = self[i] - result[i - ext] = highbits | word >> down - highbits = word << up - } - } - else { - for i in (ext ..< self.count).reversed() { - result[i - ext] = self[i] - } - } - return result - } - - internal mutating func shiftRight(by amount: Word) { - guard amount > 0 else { return } - guard amount < self.bitWidth else { self.clear(); return } - - let ext = Int(amount / Word(Word.bitWidth)) // External shift amount (new words) - let down = Word(amount % Word(Word.bitWidth)) // Internal shift amount (subword shift) - let up = Word(Word.bitWidth) - down - - if ext > 0 { - self.shiftRight(byWords: ext) - } - if down > 0 { - var i = self.count - 1 - var highbits: Word = 0 - while i >= 0 { - let word = self[i] - self[i] = highbits | word >> down - highbits = word << up - i -= 1 - } - } - } - - public static func >>=(lhs: inout BigUInt, rhs: Other) { - if rhs < (0 as Other) { - lhs <<= (0 - rhs) - } - else if rhs >= lhs.bitWidth { - lhs.clear() - } - else { - lhs.shiftRight(by: UInt(rhs)) - } - } - - public static func <<=(lhs: inout BigUInt, rhs: Other) { - if rhs < (0 as Other) { - lhs >>= (0 - rhs) - return - } - lhs.shiftLeft(by: Word(exactly: rhs)!) - } - - public static func >>(lhs: BigUInt, rhs: Other) -> BigUInt { - if rhs < (0 as Other) { - return lhs << (0 - rhs) - } - if rhs > Word.max { - return 0 - } - return lhs.shiftedRight(by: UInt(rhs)) - } - - public static func <<(lhs: BigUInt, rhs: Other) -> BigUInt { - if rhs < (0 as Other) { - return lhs >> (0 - rhs) - } - return lhs.shiftedLeft(by: Word(exactly: rhs)!) - } -} - -extension BigInt { - func shiftedLeft(by amount: Word) -> BigInt { - return BigInt(sign: self.sign, magnitude: self.magnitude.shiftedLeft(by: amount)) - } - - mutating func shiftLeft(by amount: Word) { - self.magnitude.shiftLeft(by: amount) - } - - func shiftedRight(by amount: Word) -> BigInt { - let m = self.magnitude.shiftedRight(by: amount) - return BigInt(sign: self.sign, magnitude: self.sign == .minus && m.isZero ? 1 : m) - } - - mutating func shiftRight(by amount: Word) { - magnitude.shiftRight(by: amount) - if sign == .minus, magnitude.isZero { - magnitude.load(1) - } - } - - public static func &<<(left: BigInt, right: BigInt) -> BigInt { - return left.shiftedLeft(by: right.words[0]) - } - - public static func &<<=(left: inout BigInt, right: BigInt) { - left.shiftLeft(by: right.words[0]) - } - - public static func &>>(left: BigInt, right: BigInt) -> BigInt { - return left.shiftedRight(by: right.words[0]) - } - - public static func &>>=(left: inout BigInt, right: BigInt) { - left.shiftRight(by: right.words[0]) - } - - public static func <<(lhs: BigInt, rhs: Other) -> BigInt { - guard rhs >= (0 as Other) else { return lhs >> (0 - rhs) } - return lhs.shiftedLeft(by: Word(rhs)) - } - - public static func <<=(lhs: inout BigInt, rhs: Other) { - if rhs < (0 as Other) { - lhs >>= (0 - rhs) - } - else { - lhs.shiftLeft(by: Word(rhs)) - } - } - - public static func >>(lhs: BigInt, rhs: Other) -> BigInt { - guard rhs >= (0 as Other) else { return lhs << (0 - rhs) } - return lhs.shiftedRight(by: Word(rhs)) - } - - public static func >>=(lhs: inout BigInt, rhs: Other) { - if rhs < (0 as Other) { - lhs <<= (0 - rhs) - } - else { - lhs.shiftRight(by: Word(rhs)) - } - } -} diff --git a/Carthage/Checkouts/BigInt/Sources/Square Root.swift b/Carthage/Checkouts/BigInt/Sources/Square Root.swift deleted file mode 100644 index 68db0691c..000000000 --- a/Carthage/Checkouts/BigInt/Sources/Square Root.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// Square Root.swift -// BigInt -// -// Created by Károly Lőrentey on 2016-01-03. -// Copyright © 2016-2017 Károly Lőrentey. -// - -//MARK: Square Root - -extension BigUInt { - /// Returns the integer square root of a big integer; i.e., the largest integer whose square isn't greater than `value`. - /// - /// - Returns: floor(sqrt(self)) - public func squareRoot() -> BigUInt { - // This implementation uses Newton's method. - guard !self.isZero else { return BigUInt() } - var x = BigUInt(1) << ((self.bitWidth + 1) / 2) - var y: BigUInt = 0 - while true { - y.load(self) - y /= x - y += x - y >>= 1 - if x == y || x == y - 1 { break } - x = y - } - return x - } -} - -extension BigInt { - /// Returns the integer square root of a big integer; i.e., the largest integer whose square isn't greater than `value`. - /// - /// - Requires: self >= 0 - /// - Returns: floor(sqrt(self)) - public func squareRoot() -> BigInt { - precondition(self.sign == .plus) - return BigInt(sign: .plus, magnitude: self.magnitude.squareRoot()) - } -} diff --git a/Carthage/Checkouts/BigInt/Sources/Strideable.swift b/Carthage/Checkouts/BigInt/Sources/Strideable.swift deleted file mode 100644 index 2b79babd1..000000000 --- a/Carthage/Checkouts/BigInt/Sources/Strideable.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// Strideable.swift -// BigInt -// -// Created by Károly Lőrentey on 2017-08-11. -// Copyright © 2016-2017 Károly Lőrentey. -// - -extension BigUInt: Strideable { - /// A type that can represent the distance between two values ofa `BigUInt`. - public typealias Stride = BigInt - - /// Adds `n` to `self` and returns the result. Traps if the result would be less than zero. - public func advanced(by n: BigInt) -> BigUInt { - return n.sign == .minus ? self - n.magnitude : self + n.magnitude - } - - /// Returns the (potentially negative) difference between `self` and `other` as a `BigInt`. Never traps. - public func distance(to other: BigUInt) -> BigInt { - return BigInt(other) - BigInt(self) - } -} - -extension BigInt: Strideable { - public typealias Stride = BigInt - - /// Returns `self + n`. - public func advanced(by n: Stride) -> BigInt { - return self + n - } - - /// Returns `other - self`. - public func distance(to other: BigInt) -> Stride { - return other - self - } -} - - diff --git a/Carthage/Checkouts/BigInt/Sources/String Conversion.swift b/Carthage/Checkouts/BigInt/Sources/String Conversion.swift deleted file mode 100644 index d6f340c93..000000000 --- a/Carthage/Checkouts/BigInt/Sources/String Conversion.swift +++ /dev/null @@ -1,236 +0,0 @@ -// -// String Conversion.swift -// BigInt -// -// Created by Károly Lőrentey on 2016-01-03. -// Copyright © 2016-2017 Károly Lőrentey. -// - -extension BigUInt { - - //MARK: String Conversion - - /// Calculates the number of numerals in a given radix that fit inside a single `Word`. - /// - /// - Returns: (chars, power) where `chars` is highest that satisfy `radix^chars <= 2^Word.bitWidth`. `power` is zero - /// if radix is a power of two; otherwise `power == radix^chars`. - fileprivate static func charsPerWord(forRadix radix: Int) -> (chars: Int, power: Word) { - var power: Word = 1 - var overflow = false - var count = 0 - while !overflow { - let (p, o) = power.multipliedReportingOverflow(by: Word(radix)) - overflow = o - if !o || p == 0 { - count += 1 - power = p - } - } - return (count, power) - } - - /// Initialize a big integer from an ASCII representation in a given radix. Numerals above `9` are represented by - /// letters from the English alphabet. - /// - /// - Requires: `radix > 1 && radix < 36` - /// - Parameter `text`: A string consisting of characters corresponding to numerals in the given radix. (0-9, a-z, A-Z) - /// - Parameter `radix`: The base of the number system to use, or 10 if unspecified. - /// - Returns: The integer represented by `text`, or nil if `text` contains a character that does not represent a numeral in `radix`. - public init?(_ text: S, radix: Int = 10) { - precondition(radix > 1) - let (charsPerWord, power) = BigUInt.charsPerWord(forRadix: radix) - - var words: [Word] = [] - var end = text.endIndex - var start = end - var count = 0 - while start != text.startIndex { - start = text.index(before: start) - count += 1 - if count == charsPerWord { - guard let d = Word.init(text[start ..< end], radix: radix) else { return nil } - words.append(d) - end = start - count = 0 - } - } - if start != end { - guard let d = Word.init(text[start ..< end], radix: radix) else { return nil } - words.append(d) - } - - if power == 0 { - self.init(words: words) - } - else { - self.init() - for d in words.reversed() { - self.multiply(byWord: power) - self.addWord(d) - } - } - } -} - -extension BigInt { - /// Initialize a big integer from an ASCII representation in a given radix. Numerals above `9` are represented by - /// letters from the English alphabet. - /// - /// - Requires: `radix > 1 && radix < 36` - /// - Parameter `text`: A string optionally starting with "-" or "+" followed by characters corresponding to numerals in the given radix. (0-9, a-z, A-Z) - /// - Parameter `radix`: The base of the number system to use, or 10 if unspecified. - /// - Returns: The integer represented by `text`, or nil if `text` contains a character that does not represent a numeral in `radix`. - public init?(_ text: S, radix: Int = 10) { - var magnitude: BigUInt? - var sign: Sign = .plus - if text.first == "-" { - sign = .minus - let text = text.dropFirst() - magnitude = BigUInt(text, radix: radix) - } - else if text.first == "+" { - let text = text.dropFirst() - magnitude = BigUInt(text, radix: radix) - } - else { - magnitude = BigUInt(text, radix: radix) - } - guard let m = magnitude else { return nil } - self.magnitude = m - self.sign = sign - } -} - -extension String { - /// Initialize a new string with the base-10 representation of an unsigned big integer. - /// - /// - Complexity: O(v.count^2) - public init(_ v: BigUInt) { self.init(v, radix: 10, uppercase: false) } - - /// Initialize a new string representing an unsigned big integer in the given radix (base). - /// - /// Numerals greater than 9 are represented as letters from the English alphabet, - /// starting with `a` if `uppercase` is false or `A` otherwise. - /// - /// - Requires: radix > 1 && radix <= 36 - /// - Complexity: O(count) when radix is a power of two; otherwise O(count^2). - public init(_ v: BigUInt, radix: Int, uppercase: Bool = false) { - precondition(radix > 1) - let (charsPerWord, power) = BigUInt.charsPerWord(forRadix: radix) - - guard !v.isZero else { self = "0"; return } - - var parts: [String] - if power == 0 { - parts = v.words.map { String($0, radix: radix, uppercase: uppercase) } - } - else { - parts = [] - var rest = v - while !rest.isZero { - let mod = rest.divide(byWord: power) - parts.append(String(mod, radix: radix, uppercase: uppercase)) - } - } - assert(!parts.isEmpty) - - self = "" - var first = true - for part in parts.reversed() { - let zeroes = charsPerWord - part.count - assert(zeroes >= 0) - if !first && zeroes > 0 { - // Insert leading zeroes for mid-Words - self += String(repeating: "0", count: zeroes) - } - first = false - self += part - } - } - - /// Initialize a new string representing a signed big integer in the given radix (base). - /// - /// Numerals greater than 9 are represented as letters from the English alphabet, - /// starting with `a` if `uppercase` is false or `A` otherwise. - /// - /// - Requires: radix > 1 && radix <= 36 - /// - Complexity: O(count) when radix is a power of two; otherwise O(count^2). - public init(_ value: BigInt, radix: Int = 10, uppercase: Bool = false) { - self = String(value.magnitude, radix: radix, uppercase: uppercase) - if value.sign == .minus { - self = "-" + self - } - } -} - -extension BigUInt: ExpressibleByStringLiteral { - /// Initialize a new big integer from a Unicode scalar. - /// The scalar must represent a decimal digit. - public init(unicodeScalarLiteral value: UnicodeScalar) { - self = BigUInt(String(value), radix: 10)! - } - - /// Initialize a new big integer from an extended grapheme cluster. - /// The cluster must consist of a decimal digit. - public init(extendedGraphemeClusterLiteral value: String) { - self = BigUInt(value, radix: 10)! - } - - /// Initialize a new big integer from a decimal number represented by a string literal of arbitrary length. - /// The string must contain only decimal digits. - public init(stringLiteral value: StringLiteralType) { - self = BigUInt(value, radix: 10)! - } -} - -extension BigInt: ExpressibleByStringLiteral { - /// Initialize a new big integer from a Unicode scalar. - /// The scalar must represent a decimal digit. - public init(unicodeScalarLiteral value: UnicodeScalar) { - self = BigInt(String(value), radix: 10)! - } - - /// Initialize a new big integer from an extended grapheme cluster. - /// The cluster must consist of a decimal digit. - public init(extendedGraphemeClusterLiteral value: String) { - self = BigInt(value, radix: 10)! - } - - /// Initialize a new big integer from a decimal number represented by a string literal of arbitrary length. - /// The string must contain only decimal digits. - public init(stringLiteral value: StringLiteralType) { - self = BigInt(value, radix: 10)! - } -} - -extension BigUInt: CustomStringConvertible { - /// Return the decimal representation of this integer. - public var description: String { - return String(self, radix: 10) - } -} - -extension BigInt: CustomStringConvertible { - /// Return the decimal representation of this integer. - public var description: String { - return String(self, radix: 10) - } -} - -extension BigUInt: CustomPlaygroundDisplayConvertible { - - /// Return the playground quick look representation of this integer. - public var playgroundDescription: Any { - let text = String(self) - return text + " (\(self.bitWidth) bits)" - } -} - -extension BigInt: CustomPlaygroundDisplayConvertible { - - /// Return the playground quick look representation of this integer. - public var playgroundDescription: Any { - let text = String(self) - return text + " (\(self.magnitude.bitWidth) bits)" - } -} diff --git a/Carthage/Checkouts/BigInt/Sources/Subtraction.swift b/Carthage/Checkouts/BigInt/Sources/Subtraction.swift deleted file mode 100644 index 5ac872e65..000000000 --- a/Carthage/Checkouts/BigInt/Sources/Subtraction.swift +++ /dev/null @@ -1,169 +0,0 @@ -// -// Subtraction.swift -// BigInt -// -// Created by Károly Lőrentey on 2016-01-03. -// Copyright © 2016-2017 Károly Lőrentey. -// - -extension BigUInt { - //MARK: Subtraction - - /// Subtract `word` from this integer in place, returning a flag indicating if the operation - /// caused an arithmetic overflow. `word` is shifted `shift` words to the left before being subtracted. - /// - /// - Note: If the result indicates an overflow, then `self` becomes the two's complement of the absolute difference. - /// - Complexity: O(count) - internal mutating func subtractWordReportingOverflow(_ word: Word, shiftedBy shift: Int = 0) -> Bool { - precondition(shift >= 0) - var carry: Word = word - var i = shift - let count = self.count - while carry > 0 && i < count { - let (d, c) = self[i].subtractingReportingOverflow(carry) - self[i] = d - carry = (c ? 1 : 0) - i += 1 - } - return carry > 0 - } - - /// Subtract `word` from this integer, returning the difference and a flag that is true if the operation - /// caused an arithmetic overflow. `word` is shifted `shift` words to the left before being subtracted. - /// - /// - Note: If `overflow` is true, then the returned value is the two's complement of the absolute difference. - /// - Complexity: O(count) - internal func subtractingWordReportingOverflow(_ word: Word, shiftedBy shift: Int = 0) -> (partialValue: BigUInt, overflow: Bool) { - var result = self - let overflow = result.subtractWordReportingOverflow(word, shiftedBy: shift) - return (result, overflow) - } - - /// Subtract a digit `d` from this integer in place. - /// `d` is shifted `shift` digits to the left before being subtracted. - /// - /// - Requires: self >= d * 2^shift - /// - Complexity: O(count) - internal mutating func subtractWord(_ word: Word, shiftedBy shift: Int = 0) { - let overflow = subtractWordReportingOverflow(word, shiftedBy: shift) - precondition(!overflow) - } - - /// Subtract a digit `d` from this integer and return the result. - /// `d` is shifted `shift` digits to the left before being subtracted. - /// - /// - Requires: self >= d * 2^shift - /// - Complexity: O(count) - internal func subtractingWord(_ word: Word, shiftedBy shift: Int = 0) -> BigUInt { - var result = self - result.subtractWord(word, shiftedBy: shift) - return result - } - - /// Subtract `other` from this integer in place, and return a flag indicating if the operation caused an - /// arithmetic overflow. `other` is shifted `shift` digits to the left before being subtracted. - /// - /// - Note: If the result indicates an overflow, then `self` becomes the twos' complement of the absolute difference. - /// - Complexity: O(count) - public mutating func subtractReportingOverflow(_ b: BigUInt, shiftedBy shift: Int = 0) -> Bool { - precondition(shift >= 0) - var carry = false - var bi = 0 - let bc = b.count - let count = self.count - while bi < bc || (shift + bi < count && carry) { - let ai = shift + bi - let (d, c) = self[ai].subtractingReportingOverflow(b[bi]) - if carry { - let (d2, c2) = d.subtractingReportingOverflow(1) - self[ai] = d2 - carry = c || c2 - } - else { - self[ai] = d - carry = c - } - bi += 1 - } - return carry - } - - /// Subtract `other` from this integer, returning the difference and a flag indicating arithmetic overflow. - /// `other` is shifted `shift` digits to the left before being subtracted. - /// - /// - Note: If `overflow` is true, then the result value is the twos' complement of the absolute value of the difference. - /// - Complexity: O(count) - public func subtractingReportingOverflow(_ other: BigUInt, shiftedBy shift: Int) -> (partialValue: BigUInt, overflow: Bool) { - var result = self - let overflow = result.subtractReportingOverflow(other, shiftedBy: shift) - return (result, overflow) - } - - /// Subtracts `other` from `self`, returning the result and a flag indicating arithmetic overflow. - /// - /// - Note: When the operation overflows, then `partialValue` is the twos' complement of the absolute value of the difference. - /// - Complexity: O(count) - public func subtractingReportingOverflow(_ other: BigUInt) -> (partialValue: BigUInt, overflow: Bool) { - return self.subtractingReportingOverflow(other, shiftedBy: 0) - } - - /// Subtract `other` from this integer in place. - /// `other` is shifted `shift` digits to the left before being subtracted. - /// - /// - Requires: self >= other * 2^shift - /// - Complexity: O(count) - public mutating func subtract(_ other: BigUInt, shiftedBy shift: Int = 0) { - let overflow = subtractReportingOverflow(other, shiftedBy: shift) - precondition(!overflow) - } - - /// Subtract `b` from this integer, and return the difference. - /// `b` is shifted `shift` digits to the left before being subtracted. - /// - /// - Requires: self >= b * 2^shift - /// - Complexity: O(count) - public func subtracting(_ other: BigUInt, shiftedBy shift: Int = 0) -> BigUInt { - var result = self - result.subtract(other, shiftedBy: shift) - return result - } - - /// Decrement this integer by one. - /// - /// - Requires: !isZero - /// - Complexity: O(count) - public mutating func decrement(shiftedBy shift: Int = 0) { - self.subtract(1, shiftedBy: shift) - } - - /// Subtract `b` from `a` and return the result. - /// - /// - Requires: a >= b - /// - Complexity: O(a.count) - public static func -(a: BigUInt, b: BigUInt) -> BigUInt { - return a.subtracting(b) - } - - /// Subtract `b` from `a` and store the result in `a`. - /// - /// - Requires: a >= b - /// - Complexity: O(a.count) - public static func -=(a: inout BigUInt, b: BigUInt) { - a.subtract(b) - } -} - -extension BigInt { - public mutating func negate() { - guard !magnitude.isZero else { return } - self.sign = self.sign == .plus ? .minus : .plus - } - - /// Subtract `b` from `a` and return the result. - public static func -(a: BigInt, b: BigInt) -> BigInt { - return a + -b - } - - /// Subtract `b` from `a` in place. - public static func -=(a: inout BigInt, b: BigInt) { a = a - b } -} diff --git a/Carthage/Checkouts/BigInt/Sources/Words and Bits.swift b/Carthage/Checkouts/BigInt/Sources/Words and Bits.swift deleted file mode 100644 index 4543c1bc8..000000000 --- a/Carthage/Checkouts/BigInt/Sources/Words and Bits.swift +++ /dev/null @@ -1,202 +0,0 @@ -// -// Words and Bits.swift -// BigInt -// -// Created by Károly Lőrentey on 2017-08-11. -// Copyright © 2016-2017 Károly Lőrentey. -// - -extension Array where Element == UInt { - mutating func twosComplement() { - var increment = true - for i in 0 ..< self.count { - if increment { - (self[i], increment) = (~self[i]).addingReportingOverflow(1) - } - else { - self[i] = ~self[i] - } - } - } -} - -extension BigUInt { - public subscript(bitAt index: Int) -> Bool { - get { - precondition(index >= 0) - let (i, j) = index.quotientAndRemainder(dividingBy: Word.bitWidth) - return self[i] & (1 << j) != 0 - } - set { - precondition(index >= 0) - let (i, j) = index.quotientAndRemainder(dividingBy: Word.bitWidth) - if newValue { - self[i] |= 1 << j - } - else { - self[i] &= ~(1 << j) - } - } - } -} - -extension BigUInt { - /// The minimum number of bits required to represent this integer in binary. - /// - /// - Returns: floor(log2(2 * self + 1)) - /// - Complexity: O(1) - public var bitWidth: Int { - guard count > 0 else { return 0 } - return count * Word.bitWidth - self[count - 1].leadingZeroBitCount - } - - /// The number of leading zero bits in the binary representation of this integer in base `2^(Word.bitWidth)`. - /// This is useful when you need to normalize a `BigUInt` such that the top bit of its most significant word is 1. - /// - /// - Note: 0 is considered to have zero leading zero bits. - /// - Returns: A value in `0...(Word.bitWidth - 1)`. - /// - SeeAlso: width - /// - Complexity: O(1) - public var leadingZeroBitCount: Int { - guard count > 0 else { return 0 } - return self[count - 1].leadingZeroBitCount - } - - /// The number of trailing zero bits in the binary representation of this integer. - /// - /// - Note: 0 is considered to have zero trailing zero bits. - /// - Returns: A value in `0...width`. - /// - Complexity: O(count) - public var trailingZeroBitCount: Int { - guard count > 0 else { return 0 } - let i = self.words.firstIndex { $0 != 0 }! - return i * Word.bitWidth + self[i].trailingZeroBitCount - } -} - -extension BigInt { - public var bitWidth: Int { - guard !magnitude.isZero else { return 0 } - return magnitude.bitWidth + 1 - } - - public var trailingZeroBitCount: Int { - // Amazingly, this works fine for negative numbers - return magnitude.trailingZeroBitCount - } -} - -extension BigUInt { - public struct Words: RandomAccessCollection { - private let value: BigUInt - - fileprivate init(_ value: BigUInt) { self.value = value } - - public var startIndex: Int { return 0 } - public var endIndex: Int { return value.count } - - public subscript(_ index: Int) -> Word { - return value[index] - } - } - - public var words: Words { return Words(self) } - - public init(words: Words) where Words.Element == Word { - let uc = words.underestimatedCount - if uc > 2 { - self.init(words: Array(words)) - } - else { - var it = words.makeIterator() - guard let w0 = it.next() else { - self.init() - return - } - guard let w1 = it.next() else { - self.init(word: w0) - return - } - if let w2 = it.next() { - var words: [UInt] = [] - words.reserveCapacity(Swift.max(3, uc)) - words.append(w0) - words.append(w1) - words.append(w2) - while let word = it.next() { - words.append(word) - } - self.init(words: words) - } - else { - self.init(low: w0, high: w1) - } - } - } -} - -extension BigInt { - public struct Words: RandomAccessCollection { - public typealias Indices = CountableRange - - private let value: BigInt - private let decrementLimit: Int - - fileprivate init(_ value: BigInt) { - self.value = value - switch value.sign { - case .plus: - self.decrementLimit = 0 - case .minus: - assert(!value.magnitude.isZero) - self.decrementLimit = value.magnitude.words.firstIndex(where: { $0 != 0 })! - } - } - - public var count: Int { - switch value.sign { - case .plus: - if let high = value.magnitude.words.last, high >> (Word.bitWidth - 1) != 0 { - return value.magnitude.count + 1 - } - return value.magnitude.count - case .minus: - let high = value.magnitude.words.last! - if high >> (Word.bitWidth - 1) != 0 { - return value.magnitude.count + 1 - } - return value.magnitude.count - } - } - - public var indices: Indices { return 0 ..< count } - public var startIndex: Int { return 0 } - public var endIndex: Int { return count } - - public subscript(_ index: Int) -> UInt { - // Note that indices above `endIndex` are accepted. - if value.sign == .plus { - return value.magnitude[index] - } - if index <= decrementLimit { - return ~(value.magnitude[index] &- 1) - } - return ~value.magnitude[index] - } - } - - public var words: Words { - return Words(self) - } - - public init(words: S) where S.Element == Word { - var words = Array(words) - if (words.last ?? 0) >> (Word.bitWidth - 1) == 0 { - self.init(sign: .plus, magnitude: BigUInt(words: words)) - } - else { - words.twosComplement() - self.init(sign: .minus, magnitude: BigUInt(words: words)) - } - } -} diff --git a/Carthage/Checkouts/BigInt/Tests/BigIntTests/BigIntTests.swift b/Carthage/Checkouts/BigInt/Tests/BigIntTests/BigIntTests.swift deleted file mode 100644 index 51e46e3aa..000000000 --- a/Carthage/Checkouts/BigInt/Tests/BigIntTests/BigIntTests.swift +++ /dev/null @@ -1,638 +0,0 @@ -// -// BigIntTests.swift -// BigIntTests -// -// Created by Károly Lőrentey on 2015-12-26. -// Copyright © 2016-2017 Károly Lőrentey. -// - -import XCTest -@testable import BigInt - -class BigIntTests: XCTestCase { - typealias Word = BigInt.Word - - func testSigns() { - XCTAssertTrue(BigInt.isSigned) - - XCTAssertEqual(BigInt().signum(), 0) - XCTAssertEqual(BigInt(-2).signum(), -1) - XCTAssertEqual(BigInt(-1).signum(), -1) - XCTAssertEqual(BigInt(0).signum(), 0) - XCTAssertEqual(BigInt(1).signum(), 1) - XCTAssertEqual(BigInt(2).signum(), 1) - - XCTAssertEqual(BigInt(words: [0, Word.max]).signum(), -1) - XCTAssertEqual(BigInt(words: [0, 1]).signum(), 1) - } - - func testInit() { - XCTAssertEqual(BigInt().sign, .plus) - XCTAssertEqual(BigInt().magnitude, 0) - - XCTAssertEqual(BigInt(Int64.min).sign, .minus) - XCTAssertEqual(BigInt(Int64.min).magnitude - 1, BigInt(Int64.max).magnitude) - - let zero = BigInt(0) - XCTAssertTrue(zero.magnitude.isZero) - XCTAssertEqual(zero.sign, .plus) - - let minusOne = BigInt(-1) - XCTAssertEqual(minusOne.magnitude, 1) - XCTAssertEqual(minusOne.sign, .minus) - - let b: BigInt = 42 - XCTAssertEqual(b.magnitude, 42) - XCTAssertEqual(b.sign, .plus) - - XCTAssertEqual(BigInt(UInt64.max).magnitude, BigUInt(UInt64.max)) - - let b2: BigInt = "+300" - XCTAssertEqual(b2.magnitude, 300) - XCTAssertEqual(b2.sign, .plus) - - let b3: BigInt = "-300" - XCTAssertEqual(b3.magnitude, 300) - XCTAssertEqual(b3.sign, .minus) - - // We have to call BigInt.init here because we don't want Literal initialization via coercion (SE-0213) - XCTAssertNil(BigInt.init("Not a number")) - XCTAssertEqual(BigInt(unicodeScalarLiteral: UnicodeScalar(52)), BigInt(4)) - XCTAssertEqual(BigInt(extendedGraphemeClusterLiteral: "4"), BigInt(4)) - - XCTAssertEqual(BigInt(words: []), 0) - XCTAssertEqual(BigInt(words: [1, 1]), BigInt(1) << Word.bitWidth + 1) - XCTAssertEqual(BigInt(words: [1, 2]), BigInt(2) << Word.bitWidth + 1) - XCTAssertEqual(BigInt(words: [0, Word.max]), -(BigInt(1) << Word.bitWidth)) - XCTAssertEqual(BigInt(words: [1, Word.max]), -BigInt(Word.max)) - XCTAssertEqual(BigInt(words: [1, Word.max, Word.max]), -BigInt(Word.max)) - - XCTAssertEqual(BigInt(exactly: 1), BigInt(1)) - XCTAssertEqual(BigInt(exactly: -1), BigInt(-1)) - } - - func testInit_FloatingPoint() { - XCTAssertEqual(BigInt(42.0), 42) - XCTAssertEqual(BigInt(-42.0), -42) - XCTAssertEqual(BigInt(42.5), 42) - XCTAssertEqual(BigInt(-42.5), -42) - XCTAssertEqual(BigInt(exactly: 42.0), 42) - XCTAssertEqual(BigInt(exactly: -42.0), -42) - XCTAssertNil(BigInt(exactly: 42.5)) - XCTAssertNil(BigInt(exactly: -42.5)) - XCTAssertNil(BigInt(exactly: Double.leastNormalMagnitude)) - XCTAssertNil(BigInt(exactly: Double.leastNonzeroMagnitude)) - XCTAssertNil(BigInt(exactly: Double.infinity)) - XCTAssertNil(BigInt(exactly: Double.nan)) - XCTAssertNil(BigInt(exactly: Double.signalingNaN)) - XCTAssertEqual(BigInt(clamping: -42), -42) - XCTAssertEqual(BigInt(clamping: 42), 42) - XCTAssertEqual(BigInt(truncatingIfNeeded: -42), -42) - XCTAssertEqual(BigInt(truncatingIfNeeded: 42), 42) - } - - func testInit_Buffer() { - func test(_ b: BigInt, _ d: Array, file: StaticString = #file, line: UInt = #line) { - d.withUnsafeBytes { buffer in - let initialized = BigInt(buffer) - XCTAssertEqual(initialized, b, file: file, line: line) - } - } - - // Positive integers - test(BigInt(), []) - test(BigInt(1), [0x00, 0x01]) - test(BigInt(2), [0x00, 0x02]) - test(BigInt(0x0102030405060708), [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08]) - test(BigInt(0x01) << 64 + BigInt(0x0203040506070809), [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09]) - - // Negative integers - test(BigInt(), []) - test(BigInt(-1), [0x01, 0x01]) - test(BigInt(-2), [0x01, 0x02]) - test(BigInt(0x0102030405060708) * BigInt(-1), [0x01, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08]) - test((BigInt(0x01) << 64 + BigInt(0x0203040506070809)) * BigInt(-1), [0x01, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09]) - } - - func testConversionToFloatingPoint() { - func test(_ a: BigInt, _ b: F, file: StaticString = #file, line: UInt = #line) - where F.RawExponent: FixedWidthInteger, F.RawSignificand: FixedWidthInteger { - let f = F(a) - XCTAssertEqual(f, b, file: file, line: line) - } - - for i in -100 ..< 100 { - test(BigInt(i), Double(i)) - } - test(BigInt(0x5A5A5A), 0x5A5A5A as Double) - test(BigInt(1) << 64, 0x1p64 as Double) - test(BigInt(0x5A5A5A) << 64, 0x5A5A5Ap64 as Double) - test(BigInt(1) << 1023, 0x1p1023 as Double) - test(BigInt(10) << 1020, 0xAp1020 as Double) - test(BigInt(1) << 1024, Double.infinity) - test(BigInt(words: convertWords([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFFFFFFFFFFFFF800, 0])), - Double.greatestFiniteMagnitude) - - for i in -100 ..< 100 { - test(BigInt(i), Float(i)) - } - test(BigInt(0x5A5A5A), 0x5A5A5A as Float) - test(BigInt(1) << 64, 0x1p64 as Float) - test(BigInt(0x5A5A5A) << 64, 0x5A5A5Ap64 as Float) - test(BigInt(1) << 1023, 0x1p1023 as Float) - test(BigInt(10) << 1020, 0xAp1020 as Float) - test(BigInt(1) << 1024, Float.infinity) - test(BigInt(words: convertWords([0, 0xFFFFFF0000000000, 0])), - Float.greatestFiniteMagnitude) - } - - func testTwosComplement() { - func check(_ a: [Word], _ b: [Word], file: StaticString = #file, line: UInt = #line) { - var a2 = a - a2.twosComplement() - XCTAssertEqual(a2, b, file: file, line: line) - var b2 = b - b2.twosComplement() - XCTAssertEqual(b2, a, file: file, line: line) - } - check([1], [Word.max]) - check([Word.max], [1]) - check([1, 1], [Word.max, Word.max - 1]) - check([(1 as Word) << (Word.bitWidth - 1)], [(1 as Word) << (Word.bitWidth - 1)]) - check([0], [0]) - check([0, 0, 1], [0, 0, Word.max]) - check([0, 0, 1, 0, 1], [0, 0, Word.max, Word.max, Word.max - 1]) - check([0, 0, 1, 1], [0, 0, Word.max, Word.max - 1]) - check([0, 0, 1, 0, 0, 0], [0, 0, Word.max, Word.max, Word.max, Word.max]) - } - - func testSign() { - XCTAssertEqual(BigInt(-1).sign, .minus) - XCTAssertEqual(BigInt(0).sign, .plus) - XCTAssertEqual(BigInt(1).sign, .plus) - } - - func testBitWidth() { - XCTAssertEqual(BigInt(0).bitWidth, 0) - XCTAssertEqual(BigInt(1).bitWidth, 2) - XCTAssertEqual(BigInt(-1).bitWidth, 2) - XCTAssertEqual((BigInt(1) << 64).bitWidth, Word.bitWidth + 2) - XCTAssertEqual(BigInt(Word.max).bitWidth, Word.bitWidth + 1) - XCTAssertEqual(BigInt(Word.max >> 1).bitWidth, Word.bitWidth) - } - - func testTrailingZeroBitCount() { - XCTAssertEqual(BigInt(0).trailingZeroBitCount, 0) - XCTAssertEqual(BigInt(1).trailingZeroBitCount, 0) - XCTAssertEqual(BigInt(-1).trailingZeroBitCount, 0) - XCTAssertEqual(BigInt(2).trailingZeroBitCount, 1) - XCTAssertEqual(BigInt(Word.max).trailingZeroBitCount, 0) - XCTAssertEqual(BigInt(-2).trailingZeroBitCount, 1) - XCTAssertEqual(-BigInt(Word.max).trailingZeroBitCount, 0) - XCTAssertEqual((BigInt(1) << 100).trailingZeroBitCount, 100) - XCTAssertEqual(((-BigInt(1)) << 100).trailingZeroBitCount, 100) - } - - func testWords() { - XCTAssertEqual(Array(BigInt(0).words), []) - XCTAssertEqual(Array(BigInt(1).words), [1]) - XCTAssertEqual(Array(BigInt(-1).words), [Word.max]) - - let highBit = (1 as Word) << (Word.bitWidth - 1) - XCTAssertEqual(Array(BigInt(highBit).words), [highBit, 0]) - XCTAssertEqual(Array((-BigInt(highBit)).words), [highBit, Word.max]) - - XCTAssertEqual(Array(BigInt(sign: .plus, magnitude: BigUInt(words: [Word.max])).words), [Word.max, 0]) - XCTAssertEqual(Array(BigInt(sign: .minus, magnitude: BigUInt(words: [Word.max])).words), [1, Word.max]) - - XCTAssertEqual(Array((BigInt(1) << Word.bitWidth).words), [0, 1]) - XCTAssertEqual(Array((-(BigInt(1) << Word.bitWidth)).words), [0, Word.max]) - - XCTAssertEqual(Array((BigInt(42) << Word.bitWidth).words), [0, 42]) - XCTAssertEqual(Array((-(BigInt(42) << Word.bitWidth)).words), [0, Word.max - 41]) - - let huge = BigUInt(words: [0, 1, 2, 3, 4]) - XCTAssertEqual(Array(BigInt(sign: .plus, magnitude: huge).words), [0, 1, 2, 3, 4]) - XCTAssertEqual(Array(BigInt(sign: .minus, magnitude: huge).words), - [0, Word.max, ~2, ~3, ~4] as [Word]) - - - XCTAssertEqual(BigInt(1).words[100], 0) - XCTAssertEqual(BigInt(-1).words[100], Word.max) - - XCTAssertEqual(BigInt(words: [0, 1, 2, 3, 4]).words.indices, 0 ..< 5) - } - - func testComplement() { - XCTAssertEqual(~BigInt(-3), BigInt(2)) - XCTAssertEqual(~BigInt(-2), BigInt(1)) - XCTAssertEqual(~BigInt(-1), BigInt(0)) - XCTAssertEqual(~BigInt(0), BigInt(-1)) - XCTAssertEqual(~BigInt(1), BigInt(-2)) - XCTAssertEqual(~BigInt(2), BigInt(-3)) - - XCTAssertEqual(~BigInt(words: [1, 2, 3, 4]), - BigInt(words: [Word.max - 1, Word.max - 2, Word.max - 3, Word.max - 4])) - XCTAssertEqual(~BigInt(words: [Word.max - 1, Word.max - 2, Word.max - 3, Word.max - 4]), - BigInt(words: [1, 2, 3, 4])) - } - - func testBinaryAnd() { - XCTAssertEqual(BigInt(1) & BigInt(2), 0) - XCTAssertEqual(BigInt(-1) & BigInt(2), 2) - XCTAssertEqual(BigInt(-1) & BigInt(words: [1, 2, 3, 4]), BigInt(words: [1, 2, 3, 4])) - XCTAssertEqual(BigInt(-1) & -BigInt(words: [1, 2, 3, 4]), -BigInt(words: [1, 2, 3, 4])) - XCTAssertEqual(BigInt(Word.max) & BigInt(words: [1, 2, 3, 4]), BigInt(1)) - XCTAssertEqual(BigInt(Word.max) & BigInt(words: [Word.max, 1, 2]), BigInt(Word.max)) - XCTAssertEqual(BigInt(Word.max) & BigInt(words: [Word.max, Word.max - 1]), BigInt(Word.max)) - } - - func testBinaryOr() { - XCTAssertEqual(BigInt(1) | BigInt(2), 3) - XCTAssertEqual(BigInt(-1) | BigInt(2), -1) - XCTAssertEqual(BigInt(-1) | BigInt(words: [1, 2, 3, 4]), -1) - XCTAssertEqual(BigInt(-1) | -BigInt(words: [1, 2, 3, 4]), -1) - XCTAssertEqual(BigInt(Word.max) | BigInt(words: [1, 2, 3, 4]), - BigInt(words: [Word.max, 2, 3, 4])) - XCTAssertEqual(BigInt(Word.max) | BigInt(words: [1, 2, 3, Word.max]), - BigInt(words: [Word.max, 2, 3, Word.max])) - XCTAssertEqual(BigInt(Word.max) | BigInt(words: [Word.max - 1, Word.max - 1]), - BigInt(words: [Word.max, Word.max - 1])) - } - - func testBinaryXor() { - XCTAssertEqual(BigInt(1) ^ BigInt(2), 3) - XCTAssertEqual(BigInt(-1) ^ BigInt(2), -3) - XCTAssertEqual(BigInt(1) ^ BigInt(-2), -1) - XCTAssertEqual(BigInt(-1) ^ BigInt(-2), 1) - XCTAssertEqual(BigInt(-1) ^ BigInt(words: [1, 2, 3, 4]), - BigInt(words: [~1, ~2, ~3, ~4] as [Word])) - XCTAssertEqual(BigInt(-1) ^ -BigInt(words: [1, 2, 3, 4]), - BigInt(words: [0, 2, 3, 4])) - XCTAssertEqual(BigInt(Word.max) ^ BigInt(words: [1, 2, 3, 4]), - BigInt(words: [~1, 2, 3, 4] as [Word])) - XCTAssertEqual(BigInt(Word.max) ^ BigInt(words: [1, 2, 3, Word.max]), - BigInt(words: [~1, 2, 3, Word.max] as [Word])) - XCTAssertEqual(BigInt(Word.max) ^ BigInt(words: [Word.max - 1, Word.max - 1]), - BigInt(words: [1, Word.max - 1])) - } - - func testConversionToString() { - let b = BigInt(-256) - XCTAssertEqual(b.description, "-256") - XCTAssertEqual(String(b, radix: 16, uppercase: true), "-100") - let pql = b.playgroundDescription as? String - if pql == "-256 (9 bits)" {} - else { - XCTFail("Unexpected Playground Quick Look: \(pql ?? "nil")") - } - } - - func testComparable() { - XCTAssertTrue(BigInt(1) == BigInt(1)) - XCTAssertFalse(BigInt(1) == BigInt(-1)) - - XCTAssertTrue(BigInt(1) < BigInt(42)) - XCTAssertFalse(BigInt(1) < -BigInt(42)) - XCTAssertTrue(BigInt(-1) < BigInt(42)) - XCTAssertTrue(BigInt(-42) < BigInt(-1)) - } - - func testHashable() { - XCTAssertEqual(BigInt(1).hashValue, BigInt(1).hashValue) - XCTAssertNotEqual(BigInt(1).hashValue, BigInt(2).hashValue) - XCTAssertNotEqual(BigInt(42).hashValue, BigInt(-42).hashValue) - XCTAssertNotEqual(BigInt(1).hashValue, BigInt(-1).hashValue) - } - - func testStrideable() { - XCTAssertEqual(BigInt(1).advanced(by: 100), 101) - XCTAssertEqual(BigInt(Word.max).advanced(by: 1 as BigInt.Stride), BigInt(1) << Word.bitWidth) - - XCTAssertEqual(BigInt(Word.max).distance(to: BigInt(words: [0, 1])), BigInt(1)) - XCTAssertEqual(BigInt(words: [0, 1]).distance(to: BigInt(Word.max)), BigInt(-1)) - XCTAssertEqual(BigInt(0).distance(to: BigInt(words: [0, 1])), BigInt(words: [0, 1])) - } - - func compare(_ a: Int, _ b: Int, r: Int, file: StaticString = #file, line: UInt = #line, op: (BigInt, BigInt) -> BigInt) { - XCTAssertEqual(op(BigInt(a), BigInt(b)), BigInt(r), file: file, line: line) - } - - func testAddition() { - compare(0, 0, r: 0, op: +) - compare(1, 2, r: 3, op: +) - compare(1, -2, r: -1, op: +) - compare(-1, 2, r: 1, op: +) - compare(-1, -2, r: -3, op: +) - compare(2, -1, r: 1, op: +) - } - - func testNegation() { - XCTAssertEqual(-BigInt(0), BigInt(0)) - XCTAssertEqual(-BigInt(1), BigInt(-1)) - XCTAssertEqual(-BigInt(-1), BigInt(1)) - } - - func testSubtraction() { - compare(0, 0, r: 0, op: -) - compare(2, 1, r: 1, op: -) - compare(2, -1, r: 3, op: -) - compare(-2, 1, r: -3, op: -) - compare(-2, -1, r: -1, op: -) - } - - func testMultiplication() { - compare(0, 0, r: 0, op: *) - compare(0, 1, r: 0, op: *) - compare(1, 0, r: 0, op: *) - compare(0, -1, r: 0, op: *) - compare(-1, 0, r: 0, op: *) - compare(2, 3, r: 6, op: *) - compare(2, -3, r: -6, op: *) - compare(-2, 3, r: -6, op: *) - compare(-2, -3, r: 6, op: *) - } - - func testQuotientAndRemainder() { - func compare(_ a: BigInt, _ b: BigInt, r: (BigInt, BigInt), file: StaticString = #file, line: UInt = #line) { - let actual = a.quotientAndRemainder(dividingBy: b) - XCTAssertEqual(actual.quotient, r.0, "quotient", file: file, line: line) - XCTAssertEqual(actual.remainder, r.1, "remainder", file: file, line: line) - } - - compare(0, 1, r: (0, 0)) - compare(0, -1, r: (0, 0)) - compare(7, 4, r: (1, 3)) - compare(7, -4, r: (-1, 3)) - compare(-7, 4, r: (-1, -3)) - compare(-7, -4, r: (1, -3)) - } - - func testDivision() { - compare(0, 1, r: 0, op: /) - compare(0, -1, r: 0, op: /) - compare(7, 4, r: 1, op: /) - compare(7, -4, r: -1, op: /) - compare(-7, 4, r: -1, op: /) - compare(-7, -4, r: 1, op: /) - } - - func testRemainder() { - compare(0, 1, r: 0, op: %) - compare(0, -1, r: 0, op: %) - compare(7, 4, r: 3, op: %) - compare(7, -4, r: 3, op: %) - compare(-7, 4, r: -3, op: %) - compare(-7, -4, r:-3, op: %) - } - - func testModulo() { - XCTAssertEqual(BigInt(22).modulus(5), 2) - XCTAssertEqual(BigInt(-22).modulus(5), 3) - XCTAssertEqual(BigInt(22).modulus(-5), 2) - XCTAssertEqual(BigInt(-22).modulus(-5), 3) - } - - func testStrideableRequirements() { - XCTAssertEqual(5, BigInt(3).advanced(by: 2)) - XCTAssertEqual(2, BigInt(3).distance(to: 5)) - } - - func testAbsoluteValuableRequirements() { - XCTAssertEqual(BigInt(5), abs(5 as BigInt)) - XCTAssertEqual(BigInt(0), abs(0 as BigInt)) - XCTAssertEqual(BigInt(5), abs(-5 as BigInt)) - } - - func testIntegerArithmeticRequirements() { - XCTAssertEqual(3 as Int64, Int64(3 as BigInt)) - XCTAssertEqual(-3 as Int64, Int64(-3 as BigInt)) - } - - func testAssignmentOperators() { - var a = BigInt(1) - a += 13 - XCTAssertEqual(a, 14) - - a -= 7 - XCTAssertEqual(a, 7) - - a *= 3 - XCTAssertEqual(a, 21) - - a /= 2 - XCTAssertEqual(a, 10) - - a %= 7 - XCTAssertEqual(a, 3) - } - - func testExponentiation() { - XCTAssertEqual(BigInt(0).power(0), 1) - XCTAssertEqual(BigInt(0).power(1), 0) - XCTAssertEqual(BigInt(0).power(2), 0) - - XCTAssertEqual(BigInt(1).power(-2), 1) - XCTAssertEqual(BigInt(1).power(-1), 1) - XCTAssertEqual(BigInt(1).power(0), 1) - XCTAssertEqual(BigInt(1).power(1), 1) - XCTAssertEqual(BigInt(1).power(2), 1) - - XCTAssertEqual(BigInt(2).power(-4), 0) - XCTAssertEqual(BigInt(2).power(-3), 0) - XCTAssertEqual(BigInt(2).power(-2), 0) - XCTAssertEqual(BigInt(2).power(-1), 0) - XCTAssertEqual(BigInt(2).power(0), 1) - XCTAssertEqual(BigInt(2).power(1), 2) - XCTAssertEqual(BigInt(2).power(2), 4) - XCTAssertEqual(BigInt(2).power(3), 8) - XCTAssertEqual(BigInt(2).power(4), 16) - - XCTAssertEqual(BigInt(-1).power(-4), 1) - XCTAssertEqual(BigInt(-1).power(-3), -1) - XCTAssertEqual(BigInt(-1).power(-2), 1) - XCTAssertEqual(BigInt(-1).power(-1), -1) - XCTAssertEqual(BigInt(-1).power(0), 1) - XCTAssertEqual(BigInt(-1).power(1), -1) - XCTAssertEqual(BigInt(-1).power(2), 1) - XCTAssertEqual(BigInt(-1).power(3), -1) - XCTAssertEqual(BigInt(-1).power(4), 1) - - XCTAssertEqual(BigInt(-2).power(-4), 0) - XCTAssertEqual(BigInt(-2).power(-3), 0) - XCTAssertEqual(BigInt(-2).power(-2), 0) - XCTAssertEqual(BigInt(-2).power(-1), 0) - XCTAssertEqual(BigInt(-2).power(0), 1) - XCTAssertEqual(BigInt(-2).power(1), -2) - XCTAssertEqual(BigInt(-2).power(2), 4) - XCTAssertEqual(BigInt(-2).power(3), -8) - XCTAssertEqual(BigInt(-2).power(4), 16) - } - - func testModularExponentiation() { - for i in -5 ... 5 { - for j in -5 ... 5 { - for m in [-7, -5, -3, -2, -1, 1, 2, 3, 5, 7] { - guard i != 0 || j >= 0 else { continue } - XCTAssertEqual(BigInt(i).power(BigInt(j), modulus: BigInt(m)), - BigInt(i).power(j).modulus(BigInt(m)), - "\(i), \(j), \(m)") - } - } - } - } - - func testSquareRoot() { - XCTAssertEqual(BigInt(0).squareRoot(), 0) - XCTAssertEqual(BigInt(1).squareRoot(), 1) - XCTAssertEqual(BigInt(2).squareRoot(), 1) - XCTAssertEqual(BigInt(3).squareRoot(), 1) - XCTAssertEqual(BigInt(4).squareRoot(), 2) - XCTAssertEqual(BigInt(5).squareRoot(), 2) - XCTAssertEqual(BigInt(9).squareRoot(), 3) - } - - func testGCD() { - XCTAssertEqual(BigInt(12).greatestCommonDivisor(with: 15), 3) - XCTAssertEqual(BigInt(-12).greatestCommonDivisor(with: 15), 3) - XCTAssertEqual(BigInt(12).greatestCommonDivisor(with: -15), 3) - XCTAssertEqual(BigInt(-12).greatestCommonDivisor(with: -15), 3) - } - - func testInverse() { - for base in -100 ... 100 { - for modulus in [2, 3, 4, 5] { - let base = BigInt(base) - let modulus = BigInt(modulus) - if let inverse = base.inverse(modulus) { - XCTAssertEqual((base * inverse).modulus(modulus), 1, "\(base), \(modulus), \(inverse)") - } - else { - XCTAssertGreaterThan(BigInt(base).greatestCommonDivisor(with: modulus), 1, "\(base), \(modulus)") - } - } - } - } - - func testPrimes() { - XCTAssertFalse(BigInt(-7).isPrime()) - XCTAssertTrue(BigInt(103).isPrime()) - - XCTAssertFalse(BigInt(-3_215_031_751).isStrongProbablePrime(7)) - XCTAssertTrue(BigInt(3_215_031_751).isStrongProbablePrime(7)) - XCTAssertFalse(BigInt(3_215_031_751).isPrime()) - } - - func testShifts() { - XCTAssertEqual(BigInt(1) << Word.bitWidth, BigInt(words: [0, 1])) - XCTAssertEqual(BigInt(-1) << Word.bitWidth, BigInt(words: [0, Word.max])) - XCTAssertEqual(BigInt(words: [0, 1]) << -Word.bitWidth, BigInt(1)) - - XCTAssertEqual(BigInt(words: [0, 1]) >> Word.bitWidth, BigInt(1)) - XCTAssertEqual(BigInt(-1) >> Word.bitWidth, BigInt(-1)) - XCTAssertEqual(BigInt(1) >> Word.bitWidth, BigInt(0)) - XCTAssertEqual(BigInt(words: [0, Word.max]) >> Word.bitWidth, BigInt(-1)) - XCTAssertEqual(BigInt(1) >> -Word.bitWidth, BigInt(words: [0, 1])) - - XCTAssertEqual(BigInt(1) &<< BigInt(Word.bitWidth), BigInt(words: [0, 1])) - XCTAssertEqual(BigInt(words: [0, 1]) &>> BigInt(Word.bitWidth), BigInt(1)) - } - - func testShiftAssignments() { - - var a: BigInt = 1 - a <<= Word.bitWidth - XCTAssertEqual(a, BigInt(words: [0, 1])) - - a = -1 - a <<= Word.bitWidth - XCTAssertEqual(a, BigInt(words: [0, Word.max])) - - a = BigInt(words: [0, 1]) - a <<= -Word.bitWidth - XCTAssertEqual(a, 1) - - a = BigInt(words: [0, 1]) - a >>= Word.bitWidth - XCTAssertEqual(a, 1) - - a = -1 - a >>= Word.bitWidth - XCTAssertEqual(a, -1) - - a = 1 - a >>= Word.bitWidth - XCTAssertEqual(a, 0) - - a = BigInt(words: [0, Word.max]) - a >>= Word.bitWidth - XCTAssertEqual(a, BigInt(-1)) - - a = 1 - a >>= -Word.bitWidth - XCTAssertEqual(a, BigInt(words: [0, 1])) - - a = 1 - a &<<= BigInt(Word.bitWidth) - XCTAssertEqual(a, BigInt(words: [0, 1])) - - a = BigInt(words: [0, 1]) - a &>>= BigInt(Word.bitWidth) - XCTAssertEqual(a, BigInt(1)) - - } - - func testCodable() { - func test(_ a: BigInt, file: StaticString = #file, line: UInt = #line) { - do { - let json = try JSONEncoder().encode(a) - print(String(data: json, encoding: .utf8)!) - let b = try JSONDecoder().decode(BigInt.self, from: json) - XCTAssertEqual(a, b, file: file, line: line) - } - catch let error { - XCTFail("Error thrown: \(error.localizedDescription)", file: file, line: line) - } - } - test(0) - test(1) - test(-1) - test(0x0102030405060708) - test(-0x0102030405060708) - test(BigInt(1) << 64) - test(-BigInt(1) << 64) - test(BigInt(words: [1, 2, 3, 4, 5, 6, 7])) - test(-BigInt(words: [1, 2, 3, 4, 5, 6, 7])) - - XCTAssertThrowsError(try JSONDecoder().decode(BigUInt.self, from: "[\"*\", 1]".data(using: .utf8)!)) { error in - guard let error = error as? DecodingError else { XCTFail("Expected a decoding error"); return } - guard case .dataCorrupted(let context) = error else { XCTFail("Expected a dataCorrupted error"); return } - XCTAssertEqual(context.debugDescription, "Invalid big integer sign") - } - } - - func testConversionToData() { - func test(_ b: BigInt, _ d: Array, file: StaticString = #file, line: UInt = #line) { - let expected = Data(d) - let actual = b.serialize() - XCTAssertEqual(actual, expected, file: file, line: line) - XCTAssertEqual(BigInt(actual), b, file: file, line: line) - } - - // Positive integers - test(BigInt(), []) - test(BigInt(1), [0x00, 0x01]) - test(BigInt(2), [0x00, 0x02]) - test(BigInt(0x0102030405060708), [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08]) - test(BigInt(0x01) << 64 + BigInt(0x0203040506070809), [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 09]) - - // Negative integers - test(BigInt(), []) - test(BigInt(-1), [0x01, 0x01]) - test(BigInt(-2), [0x01, 0x02]) - test(BigInt(0x0102030405060708) * BigInt(-1), [0x01, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08]) - test((BigInt(0x01) << 64 + BigInt(0x0203040506070809)) * BigInt(-1), [0x01, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 09]) - - } - -} diff --git a/Carthage/Checkouts/BigInt/Tests/BigIntTests/BigUIntTests.swift b/Carthage/Checkouts/BigInt/Tests/BigIntTests/BigUIntTests.swift deleted file mode 100644 index d11e38075..000000000 --- a/Carthage/Checkouts/BigInt/Tests/BigIntTests/BigUIntTests.swift +++ /dev/null @@ -1,1481 +0,0 @@ -// -// BigUIntTests.swift -// BigInt -// -// Created by Károly Lőrentey on 2015-12-27. -// Copyright © 2016-2017 Károly Lőrentey. -// - -import XCTest -import Foundation -@testable import BigInt - -extension BigUInt.Kind: Equatable { - public static func ==(left: BigUInt.Kind, right: BigUInt.Kind) -> Bool { - switch (left, right) { - case let (.inline(l0, l1), .inline(r0, r1)): return l0 == r0 && l1 == r1 - case let (.slice(from: ls, to: le), .slice(from: rs, to: re)): return ls == rs && le == re - case (.array, .array): return true - default: return false - } - } -} - -class BigUIntTests: XCTestCase { - typealias Word = BigUInt.Word - - func check(_ value: BigUInt, _ kind: BigUInt.Kind?, _ words: [Word], file: StaticString = #file, line: UInt = #line) { - if let kind = kind { - XCTAssertEqual( - value.kind, kind, - "Mismatching kind: \(value.kind) vs. \(kind)", - file: file, line: line) - } - XCTAssertEqual( - Array(value.words), words, - "Mismatching words: \(value.words) vs. \(words)", - file: file, line: line) - XCTAssertEqual( - value.isZero, words.isEmpty, - "Mismatching isZero: \(value.isZero) vs. \(words.isEmpty)", - file: file, line: line) - XCTAssertEqual( - value.count, words.count, - "Mismatching count: \(value.count) vs. \(words.count)", - file: file, line: line) - for i in 0 ..< words.count { - XCTAssertEqual( - value[i], words[i], - "Mismatching word at index \(i): \(value[i]) vs. \(words[i])", - file: file, line: line) - } - for i in words.count ..< words.count + 10 { - XCTAssertEqual( - value[i], 0, - "Expected 0 word at index \(i), got \(value[i])", - file: file, line: line) - } - } - - func check(_ value: BigUInt?, _ kind: BigUInt.Kind?, _ words: [Word], file: StaticString = #file, line: UInt = #line) { - guard let value = value else { - XCTFail("Expected non-nil BigUInt", file: file, line: line) - return - } - check(value, kind, words, file: file, line: line) - } - - func testInit_WordBased() { - check(BigUInt(), .inline(0, 0), []) - - check(BigUInt(word: 0), .inline(0, 0), []) - check(BigUInt(word: 1), .inline(1, 0), [1]) - check(BigUInt(word: Word.max), .inline(Word.max, 0), [Word.max]) - - check(BigUInt(low: 0, high: 0), .inline(0, 0), []) - check(BigUInt(low: 0, high: 1), .inline(0, 1), [0, 1]) - check(BigUInt(low: 1, high: 0), .inline(1, 0), [1]) - check(BigUInt(low: 1, high: 2), .inline(1, 2), [1, 2]) - - check(BigUInt(words: []), .array, []) - check(BigUInt(words: [0, 0, 0, 0]), .array, []) - check(BigUInt(words: [1]), .array, [1]) - check(BigUInt(words: [1, 2, 3, 0, 0]), .array, [1, 2, 3]) - check(BigUInt(words: [0, 1, 2, 3, 4]), .array, [0, 1, 2, 3, 4]) - - check(BigUInt(words: [], from: 0, to: 0), .inline(0, 0), []) - check(BigUInt(words: [1, 2, 3, 4], from: 0, to: 4), .array, [1, 2, 3, 4]) - check(BigUInt(words: [1, 2, 3, 4], from: 0, to: 3), .slice(from: 0, to: 3), [1, 2, 3]) - check(BigUInt(words: [1, 2, 3, 4], from: 1, to: 4), .slice(from: 1, to: 4), [2, 3, 4]) - check(BigUInt(words: [1, 2, 3, 4], from: 0, to: 2), .inline(1, 2), [1, 2]) - check(BigUInt(words: [1, 2, 3, 4], from: 0, to: 1), .inline(1, 0), [1]) - check(BigUInt(words: [1, 2, 3, 4], from: 1, to: 1), .inline(0, 0), []) - check(BigUInt(words: [0, 0, 0, 1, 0, 0, 0, 2], from: 0, to: 4), .slice(from: 0, to: 4), [0, 0, 0, 1]) - check(BigUInt(words: [0, 0, 0, 1, 0, 0, 0, 2], from: 0, to: 3), .inline(0, 0), []) - check(BigUInt(words: [0, 0, 0, 1, 0, 0, 0, 2], from: 2, to: 6), .inline(0, 1), [0, 1]) - - check(BigUInt(words: [].lazy), .inline(0, 0), []) - check(BigUInt(words: [1].lazy), .inline(1, 0), [1]) - check(BigUInt(words: [1, 2].lazy), .inline(1, 2), [1, 2]) - check(BigUInt(words: [1, 2, 3].lazy), .array, [1, 2, 3]) - check(BigUInt(words: [1, 2, 3, 0, 0, 0, 0].lazy), .array, [1, 2, 3]) - - check(BigUInt(words: IteratorSequence([].makeIterator())), .inline(0, 0), []) - check(BigUInt(words: IteratorSequence([1].makeIterator())), .inline(1, 0), [1]) - check(BigUInt(words: IteratorSequence([1, 2].makeIterator())), .inline(1, 2), [1, 2]) - check(BigUInt(words: IteratorSequence([1, 2, 3].makeIterator())), .array, [1, 2, 3]) - check(BigUInt(words: IteratorSequence([1, 2, 3, 0, 0, 0, 0].makeIterator())), .array, [1, 2, 3]) - } - - func testInit_BinaryInteger() { - XCTAssertNil(BigUInt(exactly: -42)) - check(BigUInt(exactly: 0 as Int), .inline(0, 0), []) - check(BigUInt(exactly: 42 as Int), .inline(42, 0), [42]) - check(BigUInt(exactly: 43 as UInt), .inline(43, 0), [43]) - check(BigUInt(exactly: 44 as UInt8), .inline(44, 0), [44]) - check(BigUInt(exactly: BigUInt(words: [])), .inline(0, 0), []) - check(BigUInt(exactly: BigUInt(words: [1])), .inline(1, 0), [1]) - check(BigUInt(exactly: BigUInt(words: [1, 2])), .inline(1, 2), [1, 2]) - check(BigUInt(exactly: BigUInt(words: [1, 2, 3, 4])), .array, [1, 2, 3, 4]) - } - - func testInit_FloatingPoint() { - check(BigUInt(exactly: -0.0 as Float), nil, []) - check(BigUInt(exactly: -0.0 as Double), nil, []) - - XCTAssertNil(BigUInt(exactly: -42.0 as Float)) - XCTAssertNil(BigUInt(exactly: -42.0 as Double)) - - XCTAssertNil(BigUInt(exactly: 42.5 as Float)) - XCTAssertNil(BigUInt(exactly: 42.5 as Double)) - - check(BigUInt(exactly: 100 as Float), nil, [100]) - check(BigUInt(exactly: 100 as Double), nil, [100]) - - check(BigUInt(exactly: Float.greatestFiniteMagnitude), nil, - convertWords([0, 0xFFFFFF0000000000])) - - check(BigUInt(exactly: Double.greatestFiniteMagnitude), nil, - convertWords([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFFFFFFFFFFFFF800])) - - XCTAssertNil(BigUInt(exactly: Float.leastNormalMagnitude)) - XCTAssertNil(BigUInt(exactly: Double.leastNormalMagnitude)) - - XCTAssertNil(BigUInt(exactly: Float.infinity)) - XCTAssertNil(BigUInt(exactly: Double.infinity)) - - XCTAssertNil(BigUInt(exactly: Float.nan)) - XCTAssertNil(BigUInt(exactly: Double.nan)) - - check(BigUInt(0 as Float), nil, []) - check(BigUInt(Float.leastNonzeroMagnitude), nil, []) - check(BigUInt(Float.leastNormalMagnitude), nil, []) - check(BigUInt(0.5 as Float), nil, []) - check(BigUInt(1.5 as Float), nil, [1]) - check(BigUInt(42 as Float), nil, [42]) - check(BigUInt(Double(sign: .plus, exponent: 2 * Word.bitWidth, significand: 1.0)), - nil, [0, 0, 1]) - } - - func testInit_Buffer() { - func test(_ b: BigUInt, _ d: Array, file: StaticString = #file, line: UInt = #line) { - d.withUnsafeBytes { buffer in - let initialized = BigUInt(buffer) - XCTAssertEqual(initialized, b, file: file, line: line) - } - } - - // Positive integers - test(BigUInt(), []) - test(BigUInt(1), [0x01]) - test(BigUInt(2), [0x02]) - test(BigUInt(0x0102030405060708), [0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08]) - test(BigUInt(0x01) << 64 + BigUInt(0x0203040506070809), [0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 09]) - } - - func testConversionToFloatingPoint() { - func test(_ a: BigUInt, _ b: F, file: StaticString = #file, line: UInt = #line) - where F.RawExponent: FixedWidthInteger, F.RawSignificand: FixedWidthInteger { - let f = F(a) - XCTAssertEqual(f, b, file: file, line: line) - } - - for i in 0 ..< 100 { - test(BigUInt(i), Double(i)) - } - test(BigUInt(0x5A5A5A), 0x5A5A5A as Double) - test(BigUInt(1) << 64, 0x1p64 as Double) - test(BigUInt(0x5A5A5A) << 64, 0x5A5A5Ap64 as Double) - test(BigUInt(1) << 1023, 0x1p1023 as Double) - test(BigUInt(10) << 1020, 0xAp1020 as Double) - test(BigUInt(1) << 1024, Double.infinity) - test(BigUInt(words: convertWords([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFFFFFFFFFFFFF800])), - Double.greatestFiniteMagnitude) - test(BigUInt(UInt64.max), 0x1p64 as Double) - - for i in 0 ..< 100 { - test(BigUInt(i), Float(i)) - } - test(BigUInt(0x5A5A5A), 0x5A5A5A as Float) - test(BigUInt(1) << 64, 0x1p64 as Float) - test(BigUInt(0x5A5A5A) << 64, 0x5A5A5Ap64 as Float) - test(BigUInt(1) << 1023, 0x1p1023 as Float) - test(BigUInt(10) << 1020, 0xAp1020 as Float) - test(BigUInt(1) << 1024, Float.infinity) - test(BigUInt(words: convertWords([0, 0xFFFFFF0000000000])), - Float.greatestFiniteMagnitude) - - // Test rounding - test(BigUInt(0xFFFFFF0000000000 as UInt64), 0xFFFFFFp40 as Float) - test(BigUInt(0xFFFFFF7FFFFFFFFF as UInt64), 0xFFFFFFp40 as Float) - test(BigUInt(0xFFFFFF8000000000 as UInt64), 0x1p64 as Float) - test(BigUInt(0xFFFFFFFFFFFFFFFF as UInt64), 0x1p64 as Float) - - test(BigUInt(0xFFFFFE0000000000 as UInt64), 0xFFFFFEp40 as Float) - test(BigUInt(0xFFFFFE7FFFFFFFFF as UInt64), 0xFFFFFEp40 as Float) - test(BigUInt(0xFFFFFE8000000000 as UInt64), 0xFFFFFEp40 as Float) - test(BigUInt(0xFFFFFEFFFFFFFFFF as UInt64), 0xFFFFFEp40 as Float) - - test(BigUInt(0x8000010000000000 as UInt64), 0x800001p40 as Float) - test(BigUInt(0x8000017FFFFFFFFF as UInt64), 0x800001p40 as Float) - test(BigUInt(0x8000018000000000 as UInt64), 0x800002p40 as Float) - test(BigUInt(0x800001FFFFFFFFFF as UInt64), 0x800002p40 as Float) - - test(BigUInt(0x8000020000000000 as UInt64), 0x800002p40 as Float) - test(BigUInt(0x8000027FFFFFFFFF as UInt64), 0x800002p40 as Float) - test(BigUInt(0x8000028000000000 as UInt64), 0x800002p40 as Float) - test(BigUInt(0x800002FFFFFFFFFF as UInt64), 0x800002p40 as Float) - } - - func testInit_Misc() { - check(BigUInt(0), .inline(0, 0), []) - check(BigUInt(42), .inline(42, 0), [42]) - check(BigUInt(BigUInt(words: [1, 2, 3])), .array, [1, 2, 3]) - - check(BigUInt(truncatingIfNeeded: 0 as Int8), .inline(0, 0), []) - check(BigUInt(truncatingIfNeeded: 1 as Int8), .inline(1, 0), [1]) - check(BigUInt(truncatingIfNeeded: -1 as Int8), .inline(Word.max, 0), [Word.max]) - check(BigUInt(truncatingIfNeeded: BigUInt(words: [1, 2, 3])), .array, [1, 2, 3]) - - check(BigUInt(clamping: 0), .inline(0, 0), []) - check(BigUInt(clamping: -100), .inline(0, 0), []) - check(BigUInt(clamping: Word.max), .inline(Word.max, 0), [Word.max]) - } - - func testEnsureArray() { - var a = BigUInt() - a.ensureArray() - check(a, .array, []) - - a = BigUInt(word: 1) - a.ensureArray() - check(a, .array, [1]) - - a = BigUInt(low: 1, high: 2) - a.ensureArray() - check(a, .array, [1, 2]) - - a = BigUInt(words: [1, 2, 3, 4]) - a.ensureArray() - check(a, .array, [1, 2, 3, 4]) - - a = BigUInt(words: [1, 2, 3, 4, 5, 6], from: 1, to: 5) - a.ensureArray() - check(a, .array, [2, 3, 4, 5]) - } - - func testCapacity() { - XCTAssertEqual(BigUInt(low: 1, high: 2).capacity, 0) - XCTAssertEqual(BigUInt(words: 1 ..< 10).extract(2 ..< 5).capacity, 0) - var words: [Word] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - words.reserveCapacity(100) - XCTAssertGreaterThanOrEqual(BigUInt(words: words).capacity, 100) - } - - func testReserveCapacity() { - var a = BigUInt() - a.reserveCapacity(100) - check(a, .array, []) - XCTAssertGreaterThanOrEqual(a.capacity, 100) - - a = BigUInt(word: 1) - a.reserveCapacity(100) - check(a, .array, [1]) - XCTAssertGreaterThanOrEqual(a.capacity, 100) - - a = BigUInt(low: 1, high: 2) - a.reserveCapacity(100) - check(a, .array, [1, 2]) - XCTAssertGreaterThanOrEqual(a.capacity, 100) - - a = BigUInt(words: [1, 2, 3, 4]) - a.reserveCapacity(100) - check(a, .array, [1, 2, 3, 4]) - XCTAssertGreaterThanOrEqual(a.capacity, 100) - - a = BigUInt(words: [1, 2, 3, 4, 5, 6], from: 1, to: 5) - a.reserveCapacity(100) - check(a, .array, [2, 3, 4, 5]) - XCTAssertGreaterThanOrEqual(a.capacity, 100) - } - - func testLoad() { - var a: BigUInt = 0 - a.reserveCapacity(100) - - a.load(BigUInt(low: 1, high: 2)) - check(a, .array, [1, 2]) - XCTAssertGreaterThanOrEqual(a.capacity, 100) - - a.load(BigUInt(words: [1, 2, 3, 4, 5, 6])) - check(a, .array, [1, 2, 3, 4, 5, 6]) - XCTAssertGreaterThanOrEqual(a.capacity, 100) - - a.clear() - check(a, .array, []) - XCTAssertGreaterThanOrEqual(a.capacity, 100) - } - - func testInitFromLiterals() { - check(0, .inline(0, 0), []) - check(42, .inline(42, 0), [42]) - check("42", .inline(42, 0), [42]) - - check("1512366075204170947332355369683137040", - .inline(0xFEDCBA9876543210, 0x0123456789ABCDEF), - [0xFEDCBA9876543210, 0x0123456789ABCDEF]) - - // I have no idea how to exercise these in the wild - check(BigUInt(unicodeScalarLiteral: UnicodeScalar(52)), .inline(4, 0), [4]) - check(BigUInt(extendedGraphemeClusterLiteral: "4"), .inline(4, 0), [4]) - } - - func testSubscriptingGetter() { - let a = BigUInt(words: [1, 2]) - XCTAssertEqual(a[0], 1) - XCTAssertEqual(a[1], 2) - XCTAssertEqual(a[2], 0) - XCTAssertEqual(a[3], 0) - XCTAssertEqual(a[10000], 0) - - let b = BigUInt(low: 1, high: 2) - XCTAssertEqual(b[0], 1) - XCTAssertEqual(b[1], 2) - XCTAssertEqual(b[2], 0) - XCTAssertEqual(b[3], 0) - XCTAssertEqual(b[10000], 0) - } - - func testSubscriptingSetter() { - var a = BigUInt() - - check(a, .inline(0, 0), []) - a[10] = 0 - check(a, .inline(0, 0), []) - a[0] = 42 - check(a, .inline(42, 0), [42]) - a[10] = 23 - check(a, .array, [42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23]) - a[0] = 0 - check(a, .array, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23]) - a[10] = 0 - check(a, .array, []) - - a = BigUInt(words: [0, 1, 2, 3, 4, 5, 6], from: 1, to: 5) - a[2] = 42 - check(a, .array, [1, 2, 42, 4]) - } - - func testSlice() { - let a = BigUInt(words: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) - check(a.extract(3 ..< 6), .slice(from: 3, to: 6), [3, 4, 5]) - check(a.extract(3 ..< 5), .inline(3, 4), [3, 4]) - check(a.extract(3 ..< 4), .inline(3, 0), [3]) - check(a.extract(3 ..< 3), .inline(0, 0), []) - check(a.extract(0 ..< 100), .array, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) - check(a.extract(100 ..< 200), .inline(0, 0), []) - - let b = BigUInt(low: 1, high: 2) - check(b.extract(0 ..< 2), .inline(1, 2), [1, 2]) - check(b.extract(0 ..< 1), .inline(1, 0), [1]) - check(b.extract(1 ..< 2), .inline(2, 0), [2]) - check(b.extract(1 ..< 1), .inline(0, 0), []) - check(b.extract(0 ..< 100), .inline(1, 2), [1, 2]) - check(b.extract(100 ..< 200), .inline(0, 0), []) - - let c = BigUInt(words: [1, 0, 0, 0, 2, 0, 0, 0, 3, 4, 5, 0, 0, 6, 0, 0, 0, 7]) - check(c.extract(0 ..< 4), .inline(1, 0), [1]) - check(c.extract(1 ..< 5), .slice(from: 1, to: 5), [0, 0, 0, 2]) - check(c.extract(1 ..< 8), .slice(from: 1, to: 5), [0, 0, 0, 2]) - check(c.extract(6 ..< 12), .slice(from: 6, to: 11), [0, 0, 3, 4, 5]) - check(c.extract(4 ..< 7), .inline(2, 0), [2]) - - let d = c.extract(3 ..< 14) - // 0 1 2 3 4 5 6 7 8 9 10 - check(d, .slice(from: 3, to: 14), [0, 2, 0, 0, 0, 3, 4, 5, 0, 0, 6]) - check(d.extract(1 ..< 5), .inline(2, 0), [2]) - check(d.extract(0 ..< 3), .inline(0, 2), [0, 2]) - check(d.extract(1 ..< 6), .slice(from: 4, to: 9), [2, 0, 0, 0, 3]) - check(d.extract(7 ..< 1000), .slice(from: 10, to: 14), [5, 0, 0, 6]) - check(d.extract(10 ..< 1000), .inline(6, 0), [6]) - check(d.extract(11 ..< 1000), .inline(0, 0), []) - } - - func testSigns() { - XCTAssertFalse(BigUInt.isSigned) - - XCTAssertEqual(BigUInt().signum(), 0) - XCTAssertEqual(BigUInt(words: []).signum(), 0) - XCTAssertEqual(BigUInt(words: [0, 1, 2]).signum(), 1) - XCTAssertEqual(BigUInt(word: 42).signum(), 1) - } - - func testBits() { - let indices: Set = [0, 13, 59, 64, 79, 130] - var value: BigUInt = 0 - for i in indices { - value[bitAt: i] = true - } - for i in 0 ..< 300 { - XCTAssertEqual(value[bitAt: i], indices.contains(i)) - } - check(value, nil, convertWords([0x0800000000002001, 0x8001, 0x04])) - for i in indices { - value[bitAt: i] = false - } - check(value, nil, []) - } - - func testStrideableRequirements() { - XCTAssertEqual(BigUInt(10), BigUInt(4).advanced(by: BigInt(6))) - XCTAssertEqual(BigUInt(4), BigUInt(10).advanced(by: BigInt(-6))) - XCTAssertEqual(BigInt(6), BigUInt(4).distance(to: 10)) - XCTAssertEqual(BigInt(-6), BigUInt(10).distance(to: 4)) - } - - func testRightShift_ByWord() { - var a = BigUInt() - a.shiftRight(byWords: 1) - check(a, .inline(0, 0), []) - - a = BigUInt(low: 1, high: 2) - a.shiftRight(byWords: 0) - check(a, .inline(1, 2), [1, 2]) - - a = BigUInt(low: 1, high: 2) - a.shiftRight(byWords: 1) - check(a, .inline(2, 0), [2]) - - a = BigUInt(low: 1, high: 2) - a.shiftRight(byWords: 2) - check(a, .inline(0, 0), []) - - a = BigUInt(low: 1, high: 2) - a.shiftRight(byWords: 10) - check(a, .inline(0, 0), []) - - - a = BigUInt(words: [0, 1, 2, 3, 4]) - a.shiftRight(byWords: 1) - check(a, .array, [1, 2, 3, 4]) - - a = BigUInt(words: [0, 1, 2, 3, 4]) - a.shiftRight(byWords: 2) - check(a, .array, [2, 3, 4]) - - a = BigUInt(words: [0, 1, 2, 3, 4]) - a.shiftRight(byWords: 5) - check(a, .array, []) - - a = BigUInt(words: [0, 1, 2, 3, 4]) - a.shiftRight(byWords: 100) - check(a, .array, []) - - - a = BigUInt(words: [0, 1, 2, 3, 4, 5, 6], from: 1, to: 6) - check(a, .slice(from: 1, to: 6), [1, 2, 3, 4, 5]) - a.shiftRight(byWords: 1) - check(a, .slice(from: 2, to: 6), [2, 3, 4, 5]) - - a = BigUInt(words: [0, 1, 2, 3, 4, 5, 6], from: 1, to: 6) - a.shiftRight(byWords: 2) - check(a, .slice(from: 3, to: 6), [3, 4, 5]) - - a = BigUInt(words: [0, 1, 2, 3, 4, 5, 6], from: 1, to: 6) - a.shiftRight(byWords: 3) - check(a, .inline(4, 5), [4, 5]) - - a = BigUInt(words: [0, 1, 2, 3, 4, 5, 6], from: 1, to: 6) - a.shiftRight(byWords: 4) - check(a, .inline(5, 0), [5]) - - a = BigUInt(words: [0, 1, 2, 3, 4, 5, 6], from: 1, to: 6) - a.shiftRight(byWords: 5) - check(a, .inline(0, 0), []) - - a = BigUInt(words: [0, 1, 2, 3, 4, 5, 6], from: 1, to: 6) - a.shiftRight(byWords: 10) - check(a, .inline(0, 0), []) - } - - func testLeftShift_ByWord() { - var a = BigUInt() - a.shiftLeft(byWords: 1) - check(a, .inline(0, 0), []) - - a = BigUInt(word: 1) - a.shiftLeft(byWords: 0) - check(a, .inline(1, 0), [1]) - - a = BigUInt(word: 1) - a.shiftLeft(byWords: 1) - check(a, .inline(0, 1), [0, 1]) - - a = BigUInt(word: 1) - a.shiftLeft(byWords: 2) - check(a, .array, [0, 0, 1]) - - a = BigUInt(low: 1, high: 2) - a.shiftLeft(byWords: 1) - check(a, .array, [0, 1, 2]) - - a = BigUInt(low: 1, high: 2) - a.shiftLeft(byWords: 2) - check(a, .array, [0, 0, 1, 2]) - - a = BigUInt(words: [1, 2, 3, 4, 5, 6]) - a.shiftLeft(byWords: 1) - check(a, .array, [0, 1, 2, 3, 4, 5, 6]) - - a = BigUInt(words: [1, 2, 3, 4, 5, 6]) - a.shiftLeft(byWords: 10) - check(a, .array, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6]) - - a = BigUInt(words: [0, 1, 2, 3, 4, 5, 6], from: 2, to: 6) - a.shiftLeft(byWords: 1) - check(a, .array, [0, 2, 3, 4, 5]) - - a = BigUInt(words: [0, 1, 2, 3, 4, 5, 6], from: 2, to: 6) - a.shiftLeft(byWords: 3) - check(a, .array, [0, 0, 0, 2, 3, 4, 5]) - } - - func testSplit() { - let a = BigUInt(words: [0, 1, 2, 3]) - XCTAssertEqual(a.split.low, BigUInt(words: [0, 1])) - XCTAssertEqual(a.split.high, BigUInt(words: [2, 3])) - } - - func testLowHigh() { - let a = BigUInt(words: [0, 1, 2, 3]) - check(a.low, .inline(0, 1), [0, 1]) - check(a.high, .inline(2, 3), [2, 3]) - check(a.low.low, .inline(0, 0), []) - check(a.low.high, .inline(1, 0), [1]) - check(a.high.low, .inline(2, 0), [2]) - check(a.high.high, .inline(3, 0), [3]) - - let b = BigUInt(words: [0, 1, 2, 3, 4, 5]) - - let bl = b.low - check(bl, .slice(from: 0, to: 3), [0, 1, 2]) - let bh = b.high - check(bh, .slice(from: 3, to: 6), [3, 4, 5]) - - let bll = bl.low - check(bll, .inline(0, 1), [0, 1]) - let blh = bl.high - check(blh, .inline(2, 0), [2]) - let bhl = bh.low - check(bhl, .inline(3, 4), [3, 4]) - let bhh = bh.high - check(bhh, .inline(5, 0), [5]) - - let blhl = bll.low - check(blhl, .inline(0, 0), []) - let blhh = bll.high - check(blhh, .inline(1, 0), [1]) - let bhhl = bhl.low - check(bhhl, .inline(3, 0), [3]) - let bhhh = bhl.high - check(bhhh, .inline(4, 0), [4]) - } - - func testComparison() { - XCTAssertEqual(BigUInt(words: [1, 2, 3]), BigUInt(words: [1, 2, 3])) - XCTAssertNotEqual(BigUInt(words: [1, 2]), BigUInt(words: [1, 2, 3])) - XCTAssertNotEqual(BigUInt(words: [1, 2, 3]), BigUInt(words: [1, 3, 3])) - XCTAssertEqual(BigUInt(words: [1, 2, 3, 4, 5, 6]).low.high, BigUInt(words: [3])) - - XCTAssertTrue(BigUInt(words: [1, 2]) < BigUInt(words: [1, 2, 3])) - XCTAssertTrue(BigUInt(words: [1, 2, 2]) < BigUInt(words: [1, 2, 3])) - XCTAssertFalse(BigUInt(words: [1, 2, 3]) < BigUInt(words: [1, 2, 3])) - XCTAssertTrue(BigUInt(words: [3, 3]) < BigUInt(words: [1, 2, 3, 4, 5, 6]).extract(2 ..< 4)) - XCTAssertTrue(BigUInt(words: [1, 2, 3, 4, 5, 6]).low.high < BigUInt(words: [3, 5])) - } - - func testHashing() { - var hashes: [Int] = [] - hashes.append(BigUInt(words: []).hashValue) - hashes.append(BigUInt(words: [1]).hashValue) - hashes.append(BigUInt(words: [2]).hashValue) - hashes.append(BigUInt(words: [0, 1]).hashValue) - hashes.append(BigUInt(words: [1, 1]).hashValue) - hashes.append(BigUInt(words: [1, 2]).hashValue) - hashes.append(BigUInt(words: [2, 1]).hashValue) - hashes.append(BigUInt(words: [2, 2]).hashValue) - hashes.append(BigUInt(words: [1, 2, 3, 4, 5]).hashValue) - hashes.append(BigUInt(words: [5, 4, 3, 2, 1]).hashValue) - hashes.append(BigUInt(words: [Word.max]).hashValue) - hashes.append(BigUInt(words: [Word.max, Word.max]).hashValue) - hashes.append(BigUInt(words: [Word.max, Word.max, Word.max]).hashValue) - hashes.append(BigUInt(words: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]).hashValue) - XCTAssertEqual(hashes.count, Set(hashes).count) - } - - func checkData(_ bytes: [UInt8], _ value: BigUInt, file: StaticString = #file, line: UInt = #line) { - XCTAssertEqual(BigUInt(Data(bytes)), value, file: file, line: line) - XCTAssertEqual(bytes.withUnsafeBytes { buffer in BigUInt(buffer) }, value, file: file, line: line) - } - - func testConversionFromBytes() { - checkData([], 0) - checkData([0], 0) - checkData([0, 0, 0, 0, 0, 0, 0, 0], 0) - checkData([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 0) - checkData([1], 1) - checkData([2], 2) - checkData([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], 1) - checkData([0x01, 0x02, 0x03, 0x04, 0x05], 0x0102030405) - checkData([0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08], 0x0102030405060708) - checkData([0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A], - BigUInt(0x0102) << 64 + BigUInt(0x030405060708090A)) - checkData([0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], - BigUInt(1) << 80) - checkData([0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10], - BigUInt(0x0102030405060708) << 64 + BigUInt(0x090A0B0C0D0E0F10)) - checkData([0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11], - ((BigUInt(1) << 128) as BigUInt) + BigUInt(0x0203040506070809) << 64 + BigUInt(0x0A0B0C0D0E0F1011)) - } - - func testConversionToData() { - func test(_ b: BigUInt, _ d: Array, file: StaticString = #file, line: UInt = #line) { - let expected = Data(d) - let actual = b.serialize() - XCTAssertEqual(actual, expected, file: file, line: line) - XCTAssertEqual(BigUInt(actual), b, file: file, line: line) - } - - test(BigUInt(), []) - test(BigUInt(1), [0x01]) - test(BigUInt(2), [0x02]) - test(BigUInt(0x0102030405060708), [0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08]) - test(BigUInt(0x01) << 64 + BigUInt(0x0203040506070809), [0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09]) - } - - func testCodable() { - func test(_ a: BigUInt, file: StaticString = #file, line: UInt = #line) { - do { - let json = try JSONEncoder().encode(a) - print(String(data: json, encoding: .utf8)!) - let b = try JSONDecoder().decode(BigUInt.self, from: json) - XCTAssertEqual(a, b, file: file, line: line) - } - catch let error { - XCTFail("Error thrown: \(error.localizedDescription)", file: file, line: line) - } - } - test(0) - test(1) - test(0x0102030405060708) - test(BigUInt(1) << 64) - test(BigUInt(words: [1, 2, 3, 4, 5, 6, 7])) - - XCTAssertThrowsError(try JSONDecoder().decode(BigUInt.self, from: "[\"*\", 1]".data(using: .utf8)!)) { error in - guard let error = error as? DecodingError else { XCTFail("Expected a decoding error"); return } - guard case .dataCorrupted(let context) = error else { XCTFail("Expected a dataCorrupted error"); return } - XCTAssertEqual(context.debugDescription, "Invalid big integer sign") - } - XCTAssertThrowsError(try JSONDecoder().decode(BigUInt.self, from: "[\"-\", 1]".data(using: .utf8)!)) { error in - guard let error = error as? DecodingError else { XCTFail("Expected a decoding error"); return } - guard case .dataCorrupted(let context) = error else { XCTFail("Expected a dataCorrupted error"); return } - XCTAssertEqual(context.debugDescription, "BigUInt cannot hold a negative value") - } - } - - func testAddition() { - XCTAssertEqual(BigUInt(0) + BigUInt(0), BigUInt(0)) - XCTAssertEqual(BigUInt(0) + BigUInt(Word.max), BigUInt(Word.max)) - XCTAssertEqual(BigUInt(Word.max) + BigUInt(1), BigUInt(words: [0, 1])) - - check(BigUInt(3) + BigUInt(42), .inline(45, 0), [45]) - check(BigUInt(3) + BigUInt(42), .inline(45, 0), [45]) - - check(0 + BigUInt(Word.max), .inline(Word.max, 0), [Word.max]) - check(1 + BigUInt(Word.max), .inline(0, 1), [0, 1]) - check(BigUInt(low: 0, high: 1) + BigUInt(low: 3, high: 4), .inline(3, 5), [3, 5]) - check(BigUInt(low: 3, high: 5) + BigUInt(low: 0, high: Word.max), .array, [3, 4, 1]) - check(BigUInt(words: [3, 4, 1]) + BigUInt(low: 0, high: Word.max), .array, [3, 3, 2]) - check(BigUInt(words: [3, 3, 2]) + 2, .array, [5, 3, 2]) - check(BigUInt(words: [Word.max - 5, Word.max, 4, Word.max]).addingWord(6), .array, [0, 0, 5, Word.max]) - - var b = BigUInt(words: [Word.max, 2, Word.max]) - b.increment() - check(b, .array, [0, 3, Word.max]) - } - - func testShiftedAddition() { - var b = BigUInt() - b.add(1, shiftedBy: 1) - check(b, .inline(0, 1), [0, 1]) - - b.add(2, shiftedBy: 3) - check(b, .array, [0, 1, 0, 2]) - - b.add(BigUInt(Word.max), shiftedBy: 1) - check(b, .array, [0, 0, 1, 2]) - } - - func testSubtraction() { - var a1 = BigUInt(words: [1, 2, 3, 4]) - XCTAssertEqual(false, a1.subtractWordReportingOverflow(3, shiftedBy: 1)) - check(a1, .array, [1, Word.max, 2, 4]) - - let (diff, overflow) = BigUInt(words: [1, 2, 3, 4]).subtractingWordReportingOverflow(2) - XCTAssertEqual(false, overflow) - check(diff, .array, [Word.max, 1, 3, 4]) - - var a2 = BigUInt(words: [1, 2, 3, 4]) - XCTAssertEqual(true, a2.subtractWordReportingOverflow(5, shiftedBy: 3)) - check(a2, .array, [1, 2, 3, Word.max]) - - var a3 = BigUInt(words: [1, 2, 3, 4]) - a3.subtractWord(4, shiftedBy: 3) - check(a3, .array, [1, 2, 3]) - - var a4 = BigUInt(words: [1, 2, 3, 4]) - a4.decrement() - check(a4, .array, [0, 2, 3, 4]) - a4.decrement() - check(a4, .array, [Word.max, 1, 3, 4]) - - check(BigUInt(words: [1, 2, 3, 4]).subtractingWord(5), - .array, [Word.max - 3, 1, 3, 4]) - - check(BigUInt(0) - BigUInt(0), .inline(0, 0), []) - - var b = BigUInt(words: [1, 2, 3, 4]) - XCTAssertEqual(false, b.subtractReportingOverflow(BigUInt(words: [0, 1, 1, 1]))) - check(b, .array, [1, 1, 2, 3]) - - let b1 = BigUInt(words: [1, 1, 2, 3]).subtractingReportingOverflow(BigUInt(words: [1, 1, 3, 3])) - XCTAssertEqual(true, b1.overflow) - check(b1.partialValue, .array, [0, 0, Word.max, Word.max]) - - let b2 = BigUInt(words: [0, 0, 1]) - BigUInt(words: [1]) - check(b2, .array, [Word.max, Word.max]) - - var b3 = BigUInt(words: [1, 0, 0, 1]) - b3 -= 2 - check(b3, .array, [Word.max, Word.max, Word.max]) - - check(BigUInt(42) - BigUInt(23), .inline(19, 0), [19]) - } - - func testMultiplyByWord() { - check(BigUInt(words: [1, 2, 3, 4]).multiplied(byWord: 0), .inline(0, 0), []) - check(BigUInt(words: [1, 2, 3, 4]).multiplied(byWord: 2), .array, [2, 4, 6, 8]) - - let full = Word.max - - check(BigUInt(words: [full, 0, full, 0, full]).multiplied(byWord: 2), - .array, [full - 1, 1, full - 1, 1, full - 1, 1]) - - check(BigUInt(words: [full, full, full]).multiplied(byWord: 2), - .array, [full - 1, full, full, 1]) - - check(BigUInt(words: [full, full, full]).multiplied(byWord: full), - .array, [1, full, full, full - 1]) - - check(BigUInt("11111111111111111111111111111111", radix: 16)!.multiplied(byWord: 15), - .array, convertWords([UInt64.max, UInt64.max])) - - check(BigUInt("11111111111111111111111111111112", radix: 16)!.multiplied(byWord: 15), - .array, convertWords([0xE, 0, 0x1])) - - check(BigUInt(low: 1, high: 2).multiplied(byWord: 3), .inline(3, 6), [3, 6]) - } - - func testMultiplication() { - func test() { - check(BigUInt(low: 1, high: 1) * BigUInt(word: 3), .inline(3, 3), [3, 3]) - check(BigUInt(word: 4) * BigUInt(low: 1, high: 2), .inline(4, 8), [4, 8]) - - XCTAssertEqual( - BigUInt(words: [1, 2, 3, 4]) * BigUInt(), - BigUInt()) - XCTAssertEqual( - BigUInt() * BigUInt(words: [1, 2, 3, 4]), - BigUInt()) - XCTAssertEqual( - BigUInt(words: [1, 2, 3, 4]) * BigUInt(words: [2]), - BigUInt(words: [2, 4, 6, 8])) - XCTAssertEqual( - BigUInt(words: [1, 2, 3, 4]).multiplied(by: BigUInt(words: [2])), - BigUInt(words: [2, 4, 6, 8])) - XCTAssertEqual( - BigUInt(words: [2]) * BigUInt(words: [1, 2, 3, 4]), - BigUInt(words: [2, 4, 6, 8])) - XCTAssertEqual( - BigUInt(words: [1, 2, 3, 4]) * BigUInt(words: [0, 1]), - BigUInt(words: [0, 1, 2, 3, 4])) - XCTAssertEqual( - BigUInt(words: [0, 1]) * BigUInt(words: [1, 2, 3, 4]), - BigUInt(words: [0, 1, 2, 3, 4])) - XCTAssertEqual( - BigUInt(words: [4, 3, 2, 1]) * BigUInt(words: [1, 2, 3, 4]), - BigUInt(words: [4, 11, 20, 30, 20, 11, 4])) - // 999 * 99 = 98901 - XCTAssertEqual( - BigUInt(words: [Word.max, Word.max, Word.max]) * BigUInt(words: [Word.max, Word.max]), - BigUInt(words: [1, 0, Word.max, Word.max - 1, Word.max])) - XCTAssertEqual( - BigUInt(words: [1, 2]) * BigUInt(words: [2, 1]), - BigUInt(words: [2, 5, 2])) - - var b = BigUInt("2637AB28", radix: 16)! - b *= BigUInt("164B", radix: 16)! - XCTAssertEqual(b, BigUInt("353FB0494B8", radix: 16)) - - XCTAssertEqual(BigUInt("16B60", radix: 16)! * BigUInt("33E28", radix: 16)!, BigUInt("49A5A0700", radix: 16)!) - } - - test() - // Disable brute force multiplication. - let limit = BigUInt.directMultiplicationLimit - BigUInt.directMultiplicationLimit = 0 - defer { BigUInt.directMultiplicationLimit = limit } - - test() - } - - func testDivision() { - func test(_ a: [Word], _ b: [Word], file: StaticString = #file, line: UInt = #line) { - let x = BigUInt(words: a) - let y = BigUInt(words: b) - let (div, mod) = x.quotientAndRemainder(dividingBy: y) - if mod >= y { - XCTFail("x:\(x) = div:\(div) * y:\(y) + mod:\(mod)", file: file, line: line) - } - if div * y + mod != x { - XCTFail("x:\(x) = div:\(div) * y:\(y) + mod:\(mod)", file: file, line: line) - } - - let shift = y.leadingZeroBitCount - let norm = y << shift - var rem = x - rem.formRemainder(dividingBy: norm, normalizedBy: shift) - XCTAssertEqual(rem, mod, file: file, line: line) - } - - // These cases exercise all code paths in the division when Word is UInt8 or UInt64. - test([], [1]) - test([1], [1]) - test([1], [2]) - test([2], [1]) - test([], [0, 1]) - test([1], [0, 1]) - test([0, 1], [0, 1]) - test([0, 0, 1], [0, 1]) - test([0, 0, 1], [1, 1]) - test([0, 0, 1], [3, 1]) - test([0, 0, 1], [75, 1]) - test([0, 0, 0, 1], [0, 1]) - test([2, 4, 6, 8], [1, 2]) - test([2, 3, 4, 5], [4, 5]) - test([Word.max, Word.max - 1, Word.max], [Word.max, Word.max]) - test([0, Word.max, Word.max - 1], [Word.max, Word.max]) - test([0, 0, 0, 0, 0, Word.max / 2 + 1, Word.max / 2], [1, 0, 0, Word.max / 2 + 1]) - test([0, Word.max - 1, Word.max / 2 + 1], [Word.max, Word.max / 2 + 1]) - test([0, 0, 0x41 << Word(Word.bitWidth - 8)], [Word.max, 1 << Word(Word.bitWidth - 1)]) - - XCTAssertEqual(BigUInt(328) / BigUInt(21), BigUInt(15)) - XCTAssertEqual(BigUInt(328) % BigUInt(21), BigUInt(13)) - - var a = BigUInt(328) - a /= 21 - XCTAssertEqual(a, 15) - a %= 7 - XCTAssertEqual(a, 1) - - #if false - for x0 in (0 ... Int(Word.max)) { - for x1 in (0 ... Int(Word.max)).reverse() { - for y0 in (0 ... Int(Word.max)).reverse() { - for y1 in (1 ... Int(Word.max)).reverse() { - for x2 in (1 ... y1).reverse() { - test( - [Word(x0), Word(x1), Word(x2)], - [Word(y0), Word(y1)]) - } - } - } - } - } - #endif - } - - func testFactorial() { - let power = 10 - var forward = BigUInt(1) - for i in 1 ..< (1 << power) { - forward *= BigUInt(i) - } - print("\(1 << power - 1)! = \(forward) [\(forward.count)]") - var backward = BigUInt(1) - for i in (1 ..< (1 << power)).reversed() { - backward *= BigUInt(i) - } - - func balancedFactorial(level: Int, offset: Int) -> BigUInt { - if level == 0 { - return BigUInt(offset == 0 ? 1 : offset) - } - let a = balancedFactorial(level: level - 1, offset: 2 * offset) - let b = balancedFactorial(level: level - 1, offset: 2 * offset + 1) - return a * b - } - let balanced = balancedFactorial(level: power, offset: 0) - - XCTAssertEqual(backward, forward) - XCTAssertEqual(balanced, forward) - - var remaining = balanced - for i in 1 ..< (1 << power) { - let (div, mod) = remaining.quotientAndRemainder(dividingBy: BigUInt(i)) - XCTAssertEqual(mod, 0) - remaining = div - } - XCTAssertEqual(remaining, 1) - } - - func testExponentiation() { - XCTAssertEqual(BigUInt(0).power(0), BigUInt(1)) - XCTAssertEqual(BigUInt(0).power(1), BigUInt(0)) - - XCTAssertEqual(BigUInt(1).power(0), BigUInt(1)) - XCTAssertEqual(BigUInt(1).power(1), BigUInt(1)) - XCTAssertEqual(BigUInt(1).power(-1), BigUInt(1)) - XCTAssertEqual(BigUInt(1).power(-2), BigUInt(1)) - XCTAssertEqual(BigUInt(1).power(-3), BigUInt(1)) - XCTAssertEqual(BigUInt(1).power(-4), BigUInt(1)) - - XCTAssertEqual(BigUInt(2).power(0), BigUInt(1)) - XCTAssertEqual(BigUInt(2).power(1), BigUInt(2)) - XCTAssertEqual(BigUInt(2).power(2), BigUInt(4)) - XCTAssertEqual(BigUInt(2).power(3), BigUInt(8)) - XCTAssertEqual(BigUInt(2).power(-1), BigUInt(0)) - XCTAssertEqual(BigUInt(2).power(-2), BigUInt(0)) - XCTAssertEqual(BigUInt(2).power(-3), BigUInt(0)) - - XCTAssertEqual(BigUInt(3).power(0), BigUInt(1)) - XCTAssertEqual(BigUInt(3).power(1), BigUInt(3)) - XCTAssertEqual(BigUInt(3).power(2), BigUInt(9)) - XCTAssertEqual(BigUInt(3).power(3), BigUInt(27)) - XCTAssertEqual(BigUInt(3).power(-1), BigUInt(0)) - XCTAssertEqual(BigUInt(3).power(-2), BigUInt(0)) - - XCTAssertEqual((BigUInt(1) << 256).power(0), BigUInt(1)) - XCTAssertEqual((BigUInt(1) << 256).power(1), BigUInt(1) << 256) - XCTAssertEqual((BigUInt(1) << 256).power(2), BigUInt(1) << 512) - - XCTAssertEqual(BigUInt(0).power(577), BigUInt(0)) - XCTAssertEqual(BigUInt(1).power(577), BigUInt(1)) - XCTAssertEqual(BigUInt(2).power(577), BigUInt(1) << 577) - } - - func testModularExponentiation() { - XCTAssertEqual(BigUInt(2).power(11, modulus: 1), 0) - XCTAssertEqual(BigUInt(2).power(11, modulus: 1000), 48) - - func test(a: BigUInt, p: BigUInt, file: StaticString = #file, line: UInt = #line) { - // For all primes p and integers a, a % p == a^p % p. (Fermat's Little Theorem) - let x = a % p - let y = x.power(p, modulus: p) - XCTAssertEqual(x, y, file: file, line: line) - } - - // Here are some primes - - let m61 = (BigUInt(1) << 61) - BigUInt(1) - let m127 = (BigUInt(1) << 127) - BigUInt(1) - let m521 = (BigUInt(1) << 521) - BigUInt(1) - - test(a: 2, p: m127) - test(a: BigUInt(1) << 42, p: m127) - test(a: BigUInt(1) << 42 + BigUInt(1), p: m127) - test(a: m61, p: m127) - test(a: m61 + 1, p: m127) - test(a: m61, p: m521) - test(a: m61 + 1, p: m521) - test(a: m127, p: m521) - } - - func testBitWidth() { - XCTAssertEqual(BigUInt(0).bitWidth, 0) - XCTAssertEqual(BigUInt(1).bitWidth, 1) - XCTAssertEqual(BigUInt(Word.max).bitWidth, Word.bitWidth) - XCTAssertEqual(BigUInt(words: [Word.max, 1]).bitWidth, Word.bitWidth + 1) - XCTAssertEqual(BigUInt(words: [2, 12]).bitWidth, Word.bitWidth + 4) - XCTAssertEqual(BigUInt(words: [1, Word.max]).bitWidth, 2 * Word.bitWidth) - - XCTAssertEqual(BigUInt(0).leadingZeroBitCount, 0) - XCTAssertEqual(BigUInt(1).leadingZeroBitCount, Word.bitWidth - 1) - XCTAssertEqual(BigUInt(Word.max).leadingZeroBitCount, 0) - XCTAssertEqual(BigUInt(words: [Word.max, 1]).leadingZeroBitCount, Word.bitWidth - 1) - XCTAssertEqual(BigUInt(words: [14, Word.max]).leadingZeroBitCount, 0) - - XCTAssertEqual(BigUInt(0).trailingZeroBitCount, 0) - XCTAssertEqual(BigUInt((1 as Word) << (Word.bitWidth - 1)).trailingZeroBitCount, Word.bitWidth - 1) - XCTAssertEqual(BigUInt(Word.max).trailingZeroBitCount, 0) - XCTAssertEqual(BigUInt(words: [0, 1]).trailingZeroBitCount, Word.bitWidth) - XCTAssertEqual(BigUInt(words: [0, 1 << Word(Word.bitWidth - 1)]).trailingZeroBitCount, 2 * Word.bitWidth - 1) - } - - func testBitwise() { - let a = BigUInt("1234567890ABCDEF13579BDF2468ACE", radix: 16)! - let b = BigUInt("ECA8642FDB97531FEDCBA0987654321", radix: 16)! - - // a = 01234567890ABCDEF13579BDF2468ACE - // b = 0ECA8642FDB97531FEDCBA0987654321 - XCTAssertEqual(String(~a, radix: 16), "fedcba9876f543210eca86420db97531") - XCTAssertEqual(String(a | b, radix: 16), "febc767fdbbfdfffffdfbbdf767cbef") - XCTAssertEqual(String(a & b, radix: 16), "2044289083410f014380982440200") - XCTAssertEqual(String(a ^ b, radix: 16), "fe9c32574b3c9ef0fe9c3b47523c9ef") - - let ffff = BigUInt(words: Array(repeating: Word.max, count: 30)) - let not = ~ffff - let zero = BigUInt() - XCTAssertEqual(not, zero) - XCTAssertEqual(Array((~ffff).words), []) - XCTAssertEqual(a | ffff, ffff) - XCTAssertEqual(a | 0, a) - XCTAssertEqual(a & a, a) - XCTAssertEqual(a & 0, 0) - XCTAssertEqual(a & ffff, a) - XCTAssertEqual(~(a | b), (~a & ~b)) - XCTAssertEqual(~(a & b), (~a | ~b).extract(..<(a&b).count)) - XCTAssertEqual(a ^ a, 0) - XCTAssertEqual((a ^ b) ^ b, a) - XCTAssertEqual((a ^ b) ^ a, b) - - var z = a * b - z |= a - z &= b - z ^= ffff - XCTAssertEqual(z, (((a * b) | a) & b) ^ ffff) - } - - func testLeftShifts() { - let sample = BigUInt("123456789ABCDEF01234567891631832727633", radix: 16)! - - var a = sample - - a <<= 0 - XCTAssertEqual(a, sample) - - a = sample - a <<= 1 - XCTAssertEqual(a, 2 * sample) - - a = sample - a <<= Word.bitWidth - XCTAssertEqual(a.count, sample.count + 1) - XCTAssertEqual(a[0], 0) - XCTAssertEqual(a.extract(1 ... sample.count + 1), sample) - - a = sample - a <<= 100 * Word.bitWidth - XCTAssertEqual(a.count, sample.count + 100) - XCTAssertEqual(a.extract(0 ..< 100), 0) - XCTAssertEqual(a.extract(100 ... sample.count + 100), sample) - - a = sample - a <<= 100 * Word.bitWidth + 2 - XCTAssertEqual(a.count, sample.count + 100) - XCTAssertEqual(a.extract(0 ..< 100), 0) - XCTAssertEqual(a.extract(100 ... sample.count + 100), sample << 2) - - a = sample - a <<= Word.bitWidth - 1 - XCTAssertEqual(a.count, sample.count + 1) - XCTAssertEqual(a, BigUInt(words: [0] + sample.words) / 2) - - - a = sample - a <<= -4 - XCTAssertEqual(a, sample / 16) - - XCTAssertEqual(sample << 0, sample) - XCTAssertEqual(sample << 1, 2 * sample) - XCTAssertEqual(sample << 2, 4 * sample) - XCTAssertEqual(sample << 4, 16 * sample) - XCTAssertEqual(sample << Word.bitWidth, BigUInt(words: [0 as Word] + sample.words)) - XCTAssertEqual(sample << (Word.bitWidth - 1), BigUInt(words: [0] + sample.words) / 2) - XCTAssertEqual(sample << (Word.bitWidth + 1), BigUInt(words: [0] + sample.words) * 2) - XCTAssertEqual(sample << (Word.bitWidth + 2), BigUInt(words: [0] + sample.words) * 4) - XCTAssertEqual(sample << (2 * Word.bitWidth), BigUInt(words: [0, 0] + sample.words)) - XCTAssertEqual(sample << (2 * Word.bitWidth + 2), BigUInt(words: [0, 0] + (4 * sample).words)) - - XCTAssertEqual(sample << -1, sample / 2) - XCTAssertEqual(sample << -4, sample / 16) - } - - func testRightShifts() { - let sample = BigUInt("123456789ABCDEF1234567891631832727633", radix: 16)! - - var a = sample - - a >>= BigUInt(0) - XCTAssertEqual(a, sample) - - a >>= 0 - XCTAssertEqual(a, sample) - - a = sample - a >>= 1 - XCTAssertEqual(a, sample / 2) - - a = sample - a >>= Word.bitWidth - XCTAssertEqual(a, sample.extract(1...)) - - a = sample - a >>= Word.bitWidth + 2 - XCTAssertEqual(a, sample.extract(1...) / 4) - - a = sample - a >>= sample.count * Word.bitWidth - XCTAssertEqual(a, 0) - - a = sample - a >>= 1000 - XCTAssertEqual(a, 0) - - a = sample - a >>= 100 * Word.bitWidth - XCTAssertEqual(a, 0) - - a = sample - a >>= 100 * BigUInt(Word.max) - XCTAssertEqual(a, 0) - - a = sample - a >>= -1 - XCTAssertEqual(a, sample * 2) - - a = sample - a >>= -4 - XCTAssertEqual(a, sample * 16) - - XCTAssertEqual(sample >> BigUInt(0), sample) - XCTAssertEqual(sample >> 0, sample) - XCTAssertEqual(sample >> 1, sample / 2) - XCTAssertEqual(sample >> 3, sample / 8) - XCTAssertEqual(sample >> Word.bitWidth, sample.extract(1 ..< sample.count)) - XCTAssertEqual(sample >> (Word.bitWidth + 2), sample.extract(1...) / 4) - XCTAssertEqual(sample >> (Word.bitWidth + 3), sample.extract(1...) / 8) - XCTAssertEqual(sample >> (sample.count * Word.bitWidth), 0) - XCTAssertEqual(sample >> (100 * Word.bitWidth), 0) - XCTAssertEqual(sample >> (100 * BigUInt(Word.max)), 0) - - XCTAssertEqual(sample >> -1, sample * 2) - XCTAssertEqual(sample >> -4, sample * 16) - } - - func testSquareRoot() { - let sample = BigUInt("123456789ABCDEF1234567891631832727633", radix: 16)! - - XCTAssertEqual(BigUInt(0).squareRoot(), 0) - XCTAssertEqual(BigUInt(256).squareRoot(), 16) - - func checkSqrt(_ value: BigUInt, file: StaticString = #file, line: UInt = #line) { - let root = value.squareRoot() - XCTAssertLessThanOrEqual(root * root, value, "\(value)", file: file, line: line) - XCTAssertGreaterThan((root + 1) * (root + 1), value, "\(value)", file: file, line: line) - } - for i in 0 ... 100 { - checkSqrt(BigUInt(i)) - checkSqrt(BigUInt(i) << 100) - } - checkSqrt(sample) - checkSqrt(sample * sample) - checkSqrt(sample * sample - 1) - checkSqrt(sample * sample + 1) - } - - func testGCD() { - XCTAssertEqual(BigUInt(0).greatestCommonDivisor(with: 2982891), 2982891) - XCTAssertEqual(BigUInt(2982891).greatestCommonDivisor(with: 0), 2982891) - XCTAssertEqual(BigUInt(0).greatestCommonDivisor(with: 0), 0) - - XCTAssertEqual(BigUInt(4).greatestCommonDivisor(with: 6), 2) - XCTAssertEqual(BigUInt(15).greatestCommonDivisor(with: 10), 5) - XCTAssertEqual(BigUInt(8 * 3 * 25 * 7).greatestCommonDivisor(with: 2 * 9 * 5 * 49), 2 * 3 * 5 * 7) - - var fibo: [BigUInt] = [0, 1] - for i in 0...10000 { - fibo.append(fibo[i] + fibo[i + 1]) - } - - XCTAssertEqual(BigUInt(fibo[100]).greatestCommonDivisor(with: fibo[101]), 1) - XCTAssertEqual(BigUInt(fibo[1000]).greatestCommonDivisor(with: fibo[1001]), 1) - XCTAssertEqual(BigUInt(fibo[10000]).greatestCommonDivisor(with: fibo[10001]), 1) - - XCTAssertEqual(BigUInt(3 * 5 * 7 * 9).greatestCommonDivisor(with: 5 * 7 * 7), 5 * 7) - XCTAssertEqual(BigUInt(fibo[4]).greatestCommonDivisor(with: fibo[2]), fibo[2]) - XCTAssertEqual(BigUInt(fibo[3 * 5 * 7 * 9]).greatestCommonDivisor(with: fibo[5 * 7 * 7 * 9]), fibo[5 * 7 * 9]) - XCTAssertEqual(BigUInt(fibo[7 * 17 * 83]).greatestCommonDivisor(with: fibo[6 * 17 * 83]), fibo[17 * 83]) - } - - func testInverse() { - XCTAssertNil(BigUInt(4).inverse(2)) - XCTAssertNil(BigUInt(4).inverse(8)) - XCTAssertNil(BigUInt(12).inverse(15)) - XCTAssertEqual(BigUInt(13).inverse(15), 7) - - XCTAssertEqual(BigUInt(251).inverse(1023), 269) - XCTAssertNil(BigUInt(252).inverse(1023)) - XCTAssertEqual(BigUInt(2).inverse(1023), 512) - } - - - func testStrongProbablePrimeTest() { - let primes: [BigUInt.Word] = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 79, 83, 89, 97] - let pseudoPrimes: [BigUInt] = [ - /* 2 */ 2_047, - /* 3 */ 1_373_653, - /* 5 */ 25_326_001, - /* 7 */ 3_215_031_751, - /* 11 */ 2_152_302_898_747, - /* 13 */ 3_474_749_660_383, - /* 17 */ 341_550_071_728_321, - /* 19 */ 341_550_071_728_321, - /* 23 */ 3_825_123_056_546_413_051, - /* 29 */ 3_825_123_056_546_413_051, - /* 31 */ 3_825_123_056_546_413_051, - /* 37 */ "318665857834031151167461", - /* 41 */ "3317044064679887385961981", - ] - for i in 0.. = [2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127, 521] - for exponent in 2..<200 { - let m = BigUInt(1) << exponent - 1 - XCTAssertEqual(m.isPrime(), mp.contains(exponent), "\(exponent)") - } - } - - func testConversionToString() { - let sample = BigUInt("123456789ABCDEFEDCBA98765432123456789ABCDEF", radix: 16)! - // Radix = 10 - XCTAssertEqual(String(BigUInt()), "0") - XCTAssertEqual(String(BigUInt(1)), "1") - XCTAssertEqual(String(BigUInt(100)), "100") - XCTAssertEqual(String(BigUInt(12345)), "12345") - XCTAssertEqual(String(BigUInt(123456789)), "123456789") - XCTAssertEqual(String(sample), "425693205796080237694414176550132631862392541400559") - - // Radix = 16 - XCTAssertEqual(String(BigUInt(0x1001), radix: 16), "1001") - XCTAssertEqual(String(BigUInt(0x0102030405060708), radix: 16), "102030405060708") - XCTAssertEqual(String(sample, radix: 16), "123456789abcdefedcba98765432123456789abcdef") - XCTAssertEqual(String(sample, radix: 16, uppercase: true), "123456789ABCDEFEDCBA98765432123456789ABCDEF") - - // Radix = 2 - XCTAssertEqual(String(BigUInt(12), radix: 2), "1100") - XCTAssertEqual(String(BigUInt(123), radix: 2), "1111011") - XCTAssertEqual(String(BigUInt(1234), radix: 2), "10011010010") - XCTAssertEqual(String(sample, radix: 2), "1001000110100010101100111100010011010101111001101111011111110110111001011101010011000011101100101010000110010000100100011010001010110011110001001101010111100110111101111") - - // Radix = 31 - XCTAssertEqual(String(BigUInt(30), radix: 31), "u") - XCTAssertEqual(String(BigUInt(31), radix: 31), "10") - XCTAssertEqual(String(BigUInt("10000000000000000", radix: 16)!, radix: 31), "nd075ib45k86g") - XCTAssertEqual(String(BigUInt("2908B5129F59DB6A41", radix: 16)!, radix: 31), "100000000000000") - XCTAssertEqual(String(sample, radix: 31), "ptf96helfaqi7ogc3jbonmccrhmnc2b61s") - - let quickLook = BigUInt(513).playgroundDescription as? String - if quickLook == "513 (10 bits)" { - } else { - XCTFail("Unexpected playground QuickLook representation: \(quickLook ?? "nil")") - } - } - - func testConversionFromString() { - let sample = "123456789ABCDEFEDCBA98765432123456789ABCDEF" - - XCTAssertEqual(BigUInt("1"), 1) - XCTAssertEqual(BigUInt("123456789ABCDEF", radix: 16)!, 0x123456789ABCDEF) - XCTAssertEqual(BigUInt("1000000000000000000000"), BigUInt("3635C9ADC5DEA00000", radix: 16)) - XCTAssertEqual(BigUInt("10000000000000000", radix: 16), BigUInt("18446744073709551616")) - XCTAssertEqual(BigUInt(sample, radix: 16)!, BigUInt("425693205796080237694414176550132631862392541400559")) - - // We have to call BigUInt.init here because we don't want Literal initialization via coercion (SE-0213) - XCTAssertNil(BigUInt.init("Not a number")) - XCTAssertNil(BigUInt.init("X")) - XCTAssertNil(BigUInt.init("12349A")) - XCTAssertNil(BigUInt.init("000000000000000000000000A000")) - XCTAssertNil(BigUInt.init("00A0000000000000000000000000")) - XCTAssertNil(BigUInt.init("00 0000000000000000000000000")) - XCTAssertNil(BigUInt.init("\u{4e00}\u{4e03}")) // Chinese numerals "1", "7" - - XCTAssertEqual(BigUInt("u", radix: 31)!, 30) - XCTAssertEqual(BigUInt("10", radix: 31)!, 31) - XCTAssertEqual(BigUInt("100000000000000", radix: 31)!, BigUInt("2908B5129F59DB6A41", radix: 16)!) - XCTAssertEqual(BigUInt("nd075ib45k86g", radix: 31)!, BigUInt("10000000000000000", radix: 16)!) - XCTAssertEqual(BigUInt("ptf96helfaqi7ogc3jbonmccrhmnc2b61s", radix: 31)!, BigUInt(sample, radix: 16)!) - - XCTAssertNotNil(BigUInt(sample.repeated(100), radix: 16)) - } - - func testRandomIntegerWithMaximumWidth() { - XCTAssertEqual(BigUInt.randomInteger(withMaximumWidth: 0), 0) - - let randomByte = BigUInt.randomInteger(withMaximumWidth: 8) - XCTAssertLessThan(randomByte, 256) - - for _ in 0 ..< 100 { - XCTAssertLessThanOrEqual(BigUInt.randomInteger(withMaximumWidth: 1024).bitWidth, 1024) - } - - // Verify that all widths <= maximum are produced (with a tiny maximum) - var widths: Set = [0, 1, 2, 3] - var i = 0 - while !widths.isEmpty { - let random = BigUInt.randomInteger(withMaximumWidth: 3) - XCTAssertLessThanOrEqual(random.bitWidth, 3) - widths.remove(random.bitWidth) - i += 1 - if i > 4096 { - XCTFail("randomIntegerWithMaximumWidth doesn't seem random") - break - } - } - - // Verify that all bits are sometimes zero, sometimes one. - var oneBits = Set(0..<1024) - var zeroBits = Set(0..<1024) - while !oneBits.isEmpty || !zeroBits.isEmpty { - var random = BigUInt.randomInteger(withMaximumWidth: 1024) - for i in 0..<1024 { - if random[0] & 1 == 1 { oneBits.remove(i) } - else { zeroBits.remove(i) } - random >>= 1 - } - } - } - - func testRandomIntegerWithExactWidth() { - XCTAssertEqual(BigUInt.randomInteger(withExactWidth: 0), 0) - XCTAssertEqual(BigUInt.randomInteger(withExactWidth: 1), 1) - - for _ in 0 ..< 1024 { - let randomByte = BigUInt.randomInteger(withExactWidth: 8) - XCTAssertEqual(randomByte.bitWidth, 8) - XCTAssertLessThan(randomByte, 256) - XCTAssertGreaterThanOrEqual(randomByte, 128) - } - - for _ in 0 ..< 100 { - XCTAssertEqual(BigUInt.randomInteger(withExactWidth: 1024).bitWidth, 1024) - } - - // Verify that all bits except the top are sometimes zero, sometimes one. - var oneBits = Set(0..<1023) - var zeroBits = Set(0..<1023) - while !oneBits.isEmpty || !zeroBits.isEmpty { - var random = BigUInt.randomInteger(withExactWidth: 1024) - for i in 0..<1023 { - if random[0] & 1 == 1 { oneBits.remove(i) } - else { zeroBits.remove(i) } - random >>= 1 - } - } - } - - func testRandomIntegerLessThan() { - // Verify that all bits in random integers generated by `randomIntegerLessThan` are sometimes zero, sometimes one. - // - // The limit starts with "11" so that generated random integers may easily begin with all combos. - // Also, 25% of the time the initial random int will be rejected as higher than the - // limit -- this helps stabilize code coverage. - let limit = BigUInt(3) << 1024 - var oneBits = Set(0..(0..>= 1 - } - } - XCTAssertEqual(oneBits, []) - XCTAssertEqual(zeroBits, []) - } - - func testRandomFunctionsUseProvidedGenerator() { - // Here I verify that each of the randomInteger functions uses the provided RNG, and not SystemRandomNumberGenerator. - // This is important because all but BigUInt.randomInteger(withMaximumWidth:using:) are built on that base function, and it is easy to forget to pass along the provided generator and get a default SystemRandomNumberGenerator instead. - - // Since SystemRandomNumberGenerator is seeded randomly, repeated uses should give varying results. - // So here I pass the same deterministic RNG repeatedly and verify that I get the same result each time. - - struct CountingRNG: RandomNumberGenerator { - var i: UInt64 = 12345 - mutating func next() -> UInt64 { - i += 1 - return i - } - } - - func gen(_ body: (inout CountingRNG) -> BigUInt) -> BigUInt { - var rng = CountingRNG() - return body(&rng) - } - - func check(_ body: (inout CountingRNG) -> BigUInt) { - let expected = gen(body) - for _ in 0 ..< 100 { - let actual = gen(body) - XCTAssertEqual(expected, actual) - } - } - - check { BigUInt.randomInteger(withMaximumWidth: 200, using: &$0) } - check { BigUInt.randomInteger(withExactWidth: 200, using: &$0) } - let limit = BigUInt(UInt64.max) * BigUInt(UInt64.max) * BigUInt(UInt64.max) - check { BigUInt.randomInteger(lessThan: limit, using: &$0) } - } - -} diff --git a/Carthage/Checkouts/BigInt/Tests/BigIntTests/Info.plist b/Carthage/Checkouts/BigInt/Tests/BigIntTests/Info.plist deleted file mode 100644 index ba72822e8..000000000 --- a/Carthage/Checkouts/BigInt/Tests/BigIntTests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/Carthage/Checkouts/BigInt/Tests/BigIntTests/ProfileTests.swift b/Carthage/Checkouts/BigInt/Tests/BigIntTests/ProfileTests.swift deleted file mode 100644 index 12aa0aa6d..000000000 --- a/Carthage/Checkouts/BigInt/Tests/BigIntTests/ProfileTests.swift +++ /dev/null @@ -1,228 +0,0 @@ -// -// ProfileTests.swift -// BigInt -// -// Created by Károly Lőrentey on 2015-12-31. -// Copyright © 2016-2017 Károly Lőrentey. -// - -import XCTest -import BigInt - -#if Profile - -func factorial(_ n: Int) -> BigUInt { - var fact = BigUInt(1) - for i in BigUInt.Word(1) ... BigUInt.Word(n) { - fact.multiply(byWord: i) - } - return fact -} - -class ProfileTests: XCTestCase { - typealias Word = BigUInt.Word - - func measure_(autostart: Bool = true, block: @escaping ()->Void) { - var round = 0 - self.measureMetrics(type(of: self).defaultPerformanceMetrics, automaticallyStartMeasuring: autostart) { - print("Round \(round) started") - block() - round += 1 - } - } - - func testFibonacciAddition() { - var n1 = BigUInt(1) - var n2 = BigUInt(1) - self.measure { - n1 = BigUInt(1) - n2 = BigUInt(1) - for i in 0..<200000 { - if i & 1 == 0 { - n1 += n2 - } - else { - n2 += n1 - } - } - } - noop(n1) - noop(n2) - } - - func checkFactorial(fact: BigUInt, n: Int, file: StaticString = #file, line: UInt = #line) { - var remaining = fact - for i in 1...n { - let (div, mod) = remaining.quotientAndRemainder(dividingBy: BigUInt(i)) - XCTAssertEqual(mod, 0, "for divisor = \(i)", file: file, line: line) - remaining = div - } - XCTAssertEqual(remaining, 1, file: file, line: line) - } - - func testDivisionOfFactorial() { - let n = 32767 - let fact = factorial(n) - self.measure { - checkFactorial(fact: fact, n: n) - } - } - - func testPrintingFactorial() { - let n = 32767 - let fact = factorial(n) - var string: String = "" - self.measure { - string = String(fact, radix: 10) - } - XCTAssertEqual(BigUInt(string, radix: 10), fact) - } - - func testReadingFactorial() { - let n = 32767 - let fact = factorial(n) - let string = String(fact, radix: 10) - print(string) - self.measure { - XCTAssertEqual(BigUInt(string, radix: 10), fact) - } - } - - func testFactorial() { - var fact = BigUInt() - let n = 32767 - self.measure { - fact = factorial(n) - } - checkFactorial(fact: fact, n: n) - } - - func testBalancedFactorial() { - func balancedFactorial(level: Int, offset: Int = 0) -> BigUInt { - if level == 0 { - return BigUInt(offset == 0 ? 1 : offset) - } - let a = balancedFactorial(level: level - 1, offset: 2 * offset) - let b = balancedFactorial(level: level - 1, offset: 2 * offset + 1) - return a * b - } - - let power = 15 - - var fact = BigUInt() - self.measure { - fact = balancedFactorial(level: power) - } - checkFactorial(fact: fact, n: ((1 as Int) << power) - 1) - } - - func testDivision() { - var divisors: [BigUInt] = [] - func balancedFactorial(level: Int, offset: Int = 0) -> BigUInt { - if level == 0 { - return BigUInt(offset == 0 ? 1 : offset) - } - let a = balancedFactorial(level: level - 1, offset: 2 * offset) - let b = balancedFactorial(level: level - 1, offset: 2 * offset + 1) - let p = a * b - if level >= 10 { divisors.append(p) } - return p - } - - let power = 14 - - let fact = balancedFactorial(level: power) - print("Performing \(divisors.count) divisions with digit counts (\(fact.words.count) / (\(divisors[0].words.count)...\(divisors[divisors.count - 1].words.count))") - var divs: [BigUInt] = [] - var mods: [BigUInt] = [] - divs.reserveCapacity(divisors.count) - mods.reserveCapacity(divisors.count) - self.measure_(autostart: false) { - divs.removeAll() - mods.removeAll() - self.startMeasuring() - for divisor in divisors { - let (div, mod) = fact.quotientAndRemainder(dividingBy: divisor) - divs.append(div) - mods.append(mod) - } - self.stopMeasuring() - } - for i in 0.. [BigUInt] { - var rnd = PseudoRandomNumbers(seed: seed) - return (0 ..< count).map { _ in BigUInt(words: (0 ..< words).map { _ in rnd.next()! }) } - } - - func testSquareRoot() { - let numbers = randomBigUInts(1000, seed: 42, withMaxWords: 60) - var roots: [BigUInt] = [] - self.measure { - roots.removeAll() - for number in numbers { - let root = number.squareRoot() - roots.append(root) - } - } - - for i in 0.. = [2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127, 521, 607, 1279, 2203, 2281] - for exp in 1...1000 { - let mersenne = BigUInt(1) << exp - 1 - XCTAssertEqual(mersenne.isPrime(), exponents.contains(exp), "\(exp) smells fishy") - } - // Seems legit. You win this round, evil magmaticians - } - } -} -#endif diff --git a/Carthage/Checkouts/BigInt/Tests/BigIntTests/Tools.swift b/Carthage/Checkouts/BigInt/Tests/BigIntTests/Tools.swift deleted file mode 100644 index 3c2484184..000000000 --- a/Carthage/Checkouts/BigInt/Tests/BigIntTests/Tools.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// Tools.swift -// BigInt -// -// Created by Károly Lőrentey on 2017-7-23. -// Copyright © 2017 Károly Lőrentey. All rights reserved. -// - -import BigInt - -@inline(never) -func noop(_ value: T) { - _ = value -} - -// A basic low-quality random number generator. -struct PseudoRandomNumbers: Sequence, IteratorProtocol { - typealias Element = BigUInt.Word - var last: Element - - init(seed: Element) { - self.last = seed - } - - mutating func next() -> Element? { - // Constants are from Knuth's MMIX and Numerical Recipes, respectively - let a: Element = (Element.bitWidth == 8 ? 6364136223846793005 : 1664525) - let c: Element = (Element.bitWidth == 8 ? 1442695040888963407 : 1013904223) - last = a &* last &+ c - return last - } -} - -func convertWords(_ wideWords: S) -> [UInt] where S.Element == UInt64 { - return wideWords.flatMap { $0.words } -} - -extension String { - func repeated(_ count: Int) -> String { - var result = "" - for _ in 0 ..< count { - result += self - } - return result - } -} - - diff --git a/Carthage/Checkouts/BigInt/Tests/BigIntTests/WordTests.swift b/Carthage/Checkouts/BigInt/Tests/BigIntTests/WordTests.swift deleted file mode 100644 index 1fc3576d1..000000000 --- a/Carthage/Checkouts/BigInt/Tests/BigIntTests/WordTests.swift +++ /dev/null @@ -1,138 +0,0 @@ -// -// WordTests.swift -// BigInt -// -// Created by Károly Lőrentey on 2017-7-26. -// Copyright © 2017 Károly Lőrentey. All rights reserved. -// - -import XCTest -@testable import BigInt - -// TODO: Return to `where Word.Magnitude == Word` when SR-13491 is resolved -struct TestDivision { - static func testDivision(_ u: (high: Word, low: Word.Magnitude), _ v: Word) { - let (div, mod) = v.fastDividingFullWidth(u) - var (ph, pl) = div.multipliedFullWidth(by: v) - let (s, o) = pl.addingReportingOverflow((mod as! Word.Magnitude)) - pl = s - if o { ph += Word(1) } - - if mod >= v { - XCTFail("For u = \(u), v = \(v): u mod v = \(mod), which is greater than v") - } - - func message() -> String { - let uhs = String(u.high, radix: 16) - let uls = String(u.low, radix: 16) - let vs = String(v, radix: 16) - let divs = String(div, radix: 16) - let mods = String(mod, radix: 16) - let phs = String(ph, radix: 16) - let pls = String(pl, radix: 16) - return "(\(uhs),\(uls)) / \(vs) = (\(divs), \(mods)), but div * v + mod = (\(phs),\(pls))" - } - XCTAssertEqual(ph, u.high, message()) - XCTAssertEqual(pl, u.low, message()) - } - - static func test() { - testDivision((0, 0), 2) - testDivision((0, 1), 2) - testDivision((1, 0), 2) - testDivision((8, 0), 136) - testDivision((128, 0), 136) - testDivision((2, 0), 35) - testDivision((7, 12), 19) - } -} - -class WordTests: XCTestCase { - func testFullDivide() { - TestDivision.test() - TestDivision.test() - TestDivision.test() - TestDivision.test() - TestDivision.test() - - #if false - typealias Word = UInt8 - for v in 1 ... Word.max { - for u1 in 0 ..< v { - for u0 in 0 ..< Word.max { - TestDivision.testDivision((u1, u0), v) - } - } - } - #endif - } - - func testConversion() { - enum Direction { - case unitsToWords - case wordsToUnits - case both - } - func test - (direction: Direction = .both, - words: [Word], of wtype: Word.Type = Word.self, - units: [Unit], of utype: Unit.Type = Unit.self, - file: StaticString = #file, line: UInt = #line) { - switch direction { - case .wordsToUnits, .both: - let actualUnits = [Unit](Units(of: Unit.self, words)) - XCTAssertEqual(actualUnits, units, "words -> units", file: file, line: line) - default: - break - } - switch direction { - case .unitsToWords, .both: - var it = units.makeIterator() - let actualWords = [Word](count: units.count, generator: { () -> Unit? in it.next() }) - XCTAssertEqual(actualWords, words, "units -> words", file: file, line: line) - default: - break - } - } - - - test(words: [], of: UInt8.self, - units: [], of: UInt8.self) - test(words: [0x01], of: UInt8.self, - units: [0x01], of: UInt8.self) - test(words: [0x01, 0x02], of: UInt8.self, - units: [0x02, 0x01], of: UInt8.self) - - test(words: [], of: UInt8.self, - units: [], of: UInt16.self) - test(direction: .unitsToWords, - words: [0x01, 0x00], of: UInt8.self, - units: [0x0001], of: UInt16.self) - test(direction: .wordsToUnits, - words: [0x01], of: UInt8.self, - units: [0x0001], of: UInt16.self) - test(words: [0x01, 0x02], of: UInt8.self, - units: [0x0201], of: UInt16.self) - test(direction: .wordsToUnits, - words: [0x01, 0x02, 0x03], of: UInt8.self, - units: [0x0003, 0x0201], of: UInt16.self) - test(direction: .unitsToWords, - words: [0x01, 0x02, 0x03, 0x00], of: UInt8.self, - units: [0x0003, 0x0201], of: UInt16.self) - - test(words: [], of: UInt16.self, - units: [], of: UInt8.self) - test(words: [0x1234], of: UInt16.self, - units: [0x12, 0x34], of: UInt8.self) - test(words: [0x5678, 0x1234], of: UInt16.self, - units: [0x12, 0x34, 0x56, 0x78], of: UInt8.self) - test(direction: .unitsToWords, - words: [0x789A, 0x3456, 0x12], of: UInt16.self, - units: [0x12, 0x34, 0x56, 0x78, 0x9A], of: UInt8.self) - test(direction: .wordsToUnits, - words: [0x789A, 0x3456, 0x12], of: UInt16.self, - units: [0x00, 0x12, 0x34, 0x56, 0x78, 0x9A], of: UInt8.self) - } -} - - diff --git a/Carthage/Checkouts/BigInt/docs/Extensions.html b/Carthage/Checkouts/BigInt/docs/Extensions.html deleted file mode 100644 index 7479e3581..000000000 --- a/Carthage/Checkouts/BigInt/docs/Extensions.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - Extensions Reference - - - - - - - - - - - - - - - - -
-

- - BigInt v5.2.1 Docs - - (85% documented) -

- -

-

- -
-

- -

- - - View on GitHub - -

- -

- - - Install in Dash - -

-
- - - -
- -
- -
-
-

Extensions

-

The following extensions are available globally.

- -
-
- -
-
-
-
    -
  • -
    - - - - BinaryFloatingPoint - -
    -
    -
    -
    -
    -
    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    extension BinaryFloatingPoint where RawExponent: FixedWidthInteger, RawSignificand: FixedWidthInteger
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - String - -
    -
    -
    -
    -
    -
    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    extension String
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - - diff --git a/Carthage/Checkouts/BigInt/docs/Extensions/BinaryFloatingPoint.html b/Carthage/Checkouts/BigInt/docs/Extensions/BinaryFloatingPoint.html deleted file mode 100644 index 86bf1c39b..000000000 --- a/Carthage/Checkouts/BigInt/docs/Extensions/BinaryFloatingPoint.html +++ /dev/null @@ -1,194 +0,0 @@ - - - - BinaryFloatingPoint Extension Reference - - - - - - - - - - - - - - - - -
-

- - BigInt v5.2.1 Docs - - (85% documented) -

- -

-

- -
-

- -

- - - View on GitHub - -

- -

- - - Install in Dash - -

-
- - - -
- -
- -
-
-

BinaryFloatingPoint

-
-
- -
extension BinaryFloatingPoint where RawExponent: FixedWidthInteger, RawSignificand: FixedWidthInteger
- -
-
- -
-
- -
-
-
-
- - -
- -

Available where RawExponent: FixedWidthInteger, RawSignificand: FixedWidthInteger

-

-
-
-
    -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ value: BigInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ value: BigUInt)
    - -
    -
    - -
    -
    -
  • -
-
-
-
- -
-
- - - - diff --git a/Carthage/Checkouts/BigInt/docs/Extensions/String.html b/Carthage/Checkouts/BigInt/docs/Extensions/String.html deleted file mode 100644 index 8e347fd34..000000000 --- a/Carthage/Checkouts/BigInt/docs/Extensions/String.html +++ /dev/null @@ -1,244 +0,0 @@ - - - - String Extension Reference - - - - - - - - - - - - - - - - -
-

- - BigInt v5.2.1 Docs - - (85% documented) -

- -

-

- -
-

- -

- - - View on GitHub - -

- -

- - - Install in Dash - -

-
- - - -
- -
- -
-
-

String

-
-
- -
extension String
- -
-
- -
-
- -
-
-
-
    -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Initialize a new string with the base-10 representation of an unsigned big integer.

    -
    -

    Complexity

    - O(v.count^2) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ v: BigUInt)
    - -
    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Initialize a new string representing an unsigned big integer in the given radix (base).

    - -

    Numerals greater than 9 are represented as letters from the English alphabet, -starting with a if uppercase is false or A otherwise.

    -
    -

    Requires

    - radix > 1 && radix <= 36 - -
    -

    Complexity

    - O(count) when radix is a power of two; otherwise O(count^2). - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ v: BigUInt, radix: Int, uppercase: Bool = false)
    - -
    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Initialize a new string representing a signed big integer in the given radix (base).

    - -

    Numerals greater than 9 are represented as letters from the English alphabet, -starting with a if uppercase is false or A otherwise.

    -
    -

    Requires

    - radix > 1 && radix <= 36 - -
    -

    Complexity

    - O(count) when radix is a power of two; otherwise O(count^2). - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ value: BigInt, radix: Int = 10, uppercase: Bool = false)
    - -
    -
    - -
    -
    -
  • -
-
-
-
- -
-
- - - - diff --git a/Carthage/Checkouts/BigInt/docs/Structs.html b/Carthage/Checkouts/BigInt/docs/Structs.html deleted file mode 100644 index 9ae786007..000000000 --- a/Carthage/Checkouts/BigInt/docs/Structs.html +++ /dev/null @@ -1,229 +0,0 @@ - - - - Structures Reference - - - - - - - - - - - - - - - - -
-

- - BigInt v5.2.1 Docs - - (85% documented) -

- -

-

- -
-

- -

- - - View on GitHub - -

- -

- - - Install in Dash - -

-
- - - -
- -
- -
-
-

Structures

-

The following structures are available globally.

- -
-
- -
-
-
-
    -
  • -
    - - - - BigUInt - -
    -
    -
    -
    -
    -
    -

    An arbitary precision unsigned integer type, also known as a “big integer”.

    - -

    Operations on big integers never overflow, but they may take a long time to execute. -The amount of memory (and address space) available is the only constraint to the magnitude of these numbers.

    - -

    This particular big integer type uses base-2^64 digits to represent integers; you can think of it as a wrapper -around Array<UInt64>. (In fact, BigUInt only uses an array if there are more than two digits.)

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct BigUInt : UnsignedInteger
    -
    extension BigUInt: Codable
    -
    extension BigUInt: Comparable
    -
    extension BigUInt: Hashable
    -
    extension BigUInt: ExpressibleByIntegerLiteral
    -
    extension BigUInt: Strideable
    -
    extension BigUInt: ExpressibleByStringLiteral
    -
    extension BigUInt: CustomStringConvertible
    -
    extension BigUInt: CustomPlaygroundDisplayConvertible
    - -
    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

BigInt

-

-
-
-
    -
  • -
    - - - - BigInt - -
    -
    -
    -
    -
    -
    -

    An arbitary precision signed integer type, also known as a “big integer”.

    - -

    Operations on big integers never overflow, but they might take a long time to execute. -The amount of memory (and address space) available is the only constraint to the magnitude of these numbers.

    - -

    This particular big integer type uses base-2^64 digits to represent integers.

    - -

    BigInt is essentially a tiny wrapper that extends BigUInt with a sign bit and provides signed integer -operations. Both the underlying absolute value and the negative/positive flag are available as read-write -properties.

    - -

    Not all algorithms of BigUInt are available for BigInt values; for example, there is no square root or -primality test for signed integers. When you need to call one of these, just extract the absolute value:

    -
    BigInt(255).abs.isPrime()   // Returns false
    -
    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct BigInt : SignedInteger
    -
    extension BigInt: Codable
    -
    extension BigInt: Hashable
    -
    extension BigInt: ExpressibleByIntegerLiteral
    -
    extension BigInt: Strideable
    -
    extension BigInt: ExpressibleByStringLiteral
    -
    extension BigInt: CustomStringConvertible
    -
    extension BigInt: CustomPlaygroundDisplayConvertible
    - -
    -
    - -
    -
    -
  • -
-
-
-
- -
-
- - - - diff --git a/Carthage/Checkouts/BigInt/docs/Structs/BigInt.html b/Carthage/Checkouts/BigInt/docs/Structs/BigInt.html deleted file mode 100644 index ef27d99fb..000000000 --- a/Carthage/Checkouts/BigInt/docs/Structs/BigInt.html +++ /dev/null @@ -1,2546 +0,0 @@ - - - - BigInt Structure Reference - - - - - - - - - - - - - - - - -
-

- - BigInt v5.2.1 Docs - - (85% documented) -

- -

-

- -
-

- -

- - - View on GitHub - -

- -

- - - Install in Dash - -

-
- - - -
- -
- -
-
-

BigInt

-
-
- -
public struct BigInt : SignedInteger
-
extension BigInt: Codable
-
extension BigInt: Hashable
-
extension BigInt: ExpressibleByIntegerLiteral
-
extension BigInt: Strideable
-
extension BigInt: ExpressibleByStringLiteral
-
extension BigInt: CustomStringConvertible
-
extension BigInt: CustomPlaygroundDisplayConvertible
- -
-
-

An arbitary precision signed integer type, also known as a “big integer”.

- -

Operations on big integers never overflow, but they might take a long time to execute. -The amount of memory (and address space) available is the only constraint to the magnitude of these numbers.

- -

This particular big integer type uses base-2^64 digits to represent integers.

- -

BigInt is essentially a tiny wrapper that extends BigUInt with a sign bit and provides signed integer -operations. Both the underlying absolute value and the negative/positive flag are available as read-write -properties.

- -

Not all algorithms of BigUInt are available for BigInt values; for example, there is no square root or -primality test for signed integers. When you need to call one of these, just extract the absolute value:

-
BigInt(255).abs.isPrime()   // Returns false
-
- - -
-
- -
-
-
-
    -
  • -
    - - - - Sign - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum Sign
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - Magnitude - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public typealias Magnitude = BigUInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - Word - -
    -
    -
    -
    -
    -
    -

    The type representing a digit in BigInt‘s underlying number system.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public typealias Word = BigUInt.Word
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - isSigned - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static var isSigned: Bool { get }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - magnitude - -
    -
    -
    -
    -
    -
    -

    The absolute value of this integer.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var magnitude: BigUInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - sign - -
    -
    -
    -
    -
    -
    -

    True iff the value of this integer is negative.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var sign: Sign
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(sign:magnitude:) - -
    -
    -
    -
    -
    -
    -

    Initializes a new big integer with the provided absolute number and sign flag.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(sign: Sign, magnitude: BigUInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - isZero - -
    -
    -
    -
    -
    -
    -

    Return true iff this integer is zero.

    -
    -

    Complexity

    - O(1) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var isZero: Bool { get }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - signum() - -
    -
    -
    -
    -
    -
    -

    Returns -1 if this value is negative and 1 if it’s positive; otherwise, 0.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func signum() -> BigInt
    - -
    -
    -
    -

    Return Value

    -

    The sign of this number, expressed as an integer of the same type.

    -
    - -
    -
    -
  • -
  • -
    - - - - +(_:_:) - -
    -
    -
    -
    -
    -
    -

    Add a to b and return the result.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func + (a: BigInt, b: BigInt) -> BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - +=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Add b to a in place.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func += (a: inout BigInt, b: BigInt)
    - -
    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

Bitwise Operations

-

-
-
-
    -
  • -
    - - - - ~(_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public prefix static func ~ (x: BigInt) -> BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - &(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func & (lhs: inout BigInt, rhs: BigInt) -> BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - |(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func | (lhs: inout BigInt, rhs: BigInt) -> BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - ^(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func ^ (lhs: inout BigInt, rhs: BigInt) -> BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - &=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func &= (lhs: inout BigInt, rhs: BigInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - |=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func |= (lhs: inout BigInt, rhs: BigInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - ^=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func ^= (lhs: inout BigInt, rhs: BigInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to encoder: Encoder) throws
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - ==(_:_:) - -
    -
    -
    -
    -
    -
    -

    Return true iff a is equal to b.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func == (a: BigInt, b: BigInt) -> Bool
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - <(_:_:) - -
    -
    -
    -
    -
    -
    -

    Return true iff a is less than b.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func < (a: BigInt, b: BigInt) -> Bool
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Initialize a BigInt from bytes accessed from an UnsafeRawBufferPointer, -where the first byte indicates sign (0 for positive, 1 for negative)

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ buffer: UnsafeRawBufferPointer)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Initializes an integer from the bits stored inside a piece of Data. -The data is assumed to be in network (big-endian) byte order with a first -byte to represent the sign (0 for positive, 1 for negative)

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ data: Data)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - serialize() - -
    -
    -
    -
    -
    -
    -

    Return a Data value that contains the base-256 representation of this integer, in network (big-endian) byte order and a prepended byte to indicate the sign (0 for positive, 1 for negative)

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func serialize() -> Data
    - -
    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

Full-width multiplication and division

-

-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    Divide this integer by y and return the resulting quotient and remainder.

    -
    -

    Requires

    - y > 0 - -
    -

    Complexity

    - O(count^2) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func quotientAndRemainder(dividingBy y: BigInt) -> (quotient: BigInt, remainder: BigInt)
    - -
    -
    -
    -

    Return Value

    -

    (quotient, remainder) where quotient = floor(self/y), remainder = self - quotient * y

    -
    - -
    -
    -
  • -
  • -
    - - - - /(_:_:) - -
    -
    -
    -
    -
    -
    -

    Divide a by b and return the quotient. Traps if b is zero.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func / (a: BigInt, b: BigInt) -> BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - %(_:_:) - -
    -
    -
    -
    -
    -
    -

    Divide a by b and return the remainder. The result has the same sign as a.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func % (a: BigInt, b: BigInt) -> BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - modulus(_:) - -
    -
    -
    -
    -
    -
    -

    Return the result of a mod b. The result is always a nonnegative integer that is less than the absolute value of b.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func modulus(_ mod: BigInt) -> BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - /=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Divide a by b storing the quotient in a.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func /= (a: inout BigInt, b: BigInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - %=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Divide a by b storing the remainder in a.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func %= (a: inout BigInt, b: BigInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - power(_:) - -
    -
    -
    -
    -
    -
    -

    Returns this integer raised to the power exponent.

    - -

    This function calculates the result by successively squaring the base while halving the exponent.

    -
    -

    Note

    - This function can be unreasonably expensive for large exponents, which is why exponent is - a simple integer value. If you want to calculate big exponents, you’ll probably need to use - the modulo arithmetic variant. - -
    -

    See also

    - BigUInt.power(_:, modulus:) - -
    -

    Complexity

    - O((exponent * self.count)^log2(3)) or somesuch. The result may require a large amount of memory, too. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func power(_ exponent: Int) -> BigInt
    - -
    -
    -
    -

    Return Value

    -

    1 if exponent == 0, otherwise self raised to exponent. (This implies that 0.power(0) == 1.)

    -
    - -
    -
    -
  • -
  • -
    - - - - power(_:modulus:) - -
    -
    -
    -
    -
    -
    -

    Returns the remainder of this integer raised to the power exponent in modulo arithmetic under modulus.

    - -

    Uses the right-to-left binary method.

    -
    -

    Complexity

    - O(exponent.count * modulus.count^log2(3)) or somesuch - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func power(_ exponent: BigInt, modulus: BigInt) -> BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(exactly:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init?<T>(exactly source: T) where T : BinaryFloatingPoint
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init<T>(_ source: T) where T : BinaryFloatingPoint
    - -
    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Returns the greatest common divisor of a and b.

    -
    -

    Complexity

    - O(count^2) where count = max(a.count, b.count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func greatestCommonDivisor(with b: BigInt) -> BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - inverse(_:) - -
    -
    -
    -
    -
    -
    -

    Returns the multiplicative inverse of this integer in modulo modulus arithmetic, -or nil if there is no such number.

    -
    -

    Requires

    - modulus.magnitude > 1 - -
    -

    Complexity

    - O(count^3) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func inverse(_ modulus: BigInt) -> BigInt?
    - -
    -
    -
    -

    Return Value

    -

    If gcd(self, modulus) == 1, the value returned is an integer a < modulus such that (a * self) % modulus == 1. If self and modulus aren’t coprime, the return value is nil.

    -
    - -
    -
    -
  • -
  • -
    - - - - hash(into:) - -
    -
    -
    -
    -
    -
    -

    Append this BigInt to the specified hasher.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func hash(into hasher: inout Hasher)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init() - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init()
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Initializes a new signed big integer with the same value as the specified unsigned big integer.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ integer: BigUInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init<T>(_ source: T) where T : BinaryInteger
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(exactly:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init?<T>(exactly source: T) where T : BinaryInteger
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(clamping:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init<T>(clamping source: T) where T : BinaryInteger
    - -
    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init<T>(truncatingIfNeeded source: T) where T : BinaryInteger
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(integerLiteral:) - -
    -
    -
    -
    -
    -
    -

    Initialize a new big integer from an integer literal.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(integerLiteral value: Int64)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - *(_:_:) - -
    -
    -
    -
    -
    -
    -

    Multiply a with b and return the result.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func * (a: BigInt, b: BigInt) -> BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - *=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Multiply a with b in place.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func *= (a: inout BigInt, b: BigInt)
    - -
    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

Primality Testing

-

-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    Returns true iff this integer passes the strong probable prime test for the specified base.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func isStrongProbablePrime(_ base: BigInt) -> Bool
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - isPrime(rounds:) - -
    -
    -
    -
    -
    -
    -

    Returns true if this integer is probably prime. Returns false if this integer is definitely not prime.

    - -

    This function performs a probabilistic Miller-Rabin Primality Test, consisting of rounds iterations, -each calculating the strong probable prime test for a random base. The number of rounds is 10 by default, -but you may specify your own choice.

    - -

    To speed things up, the function checks if self is divisible by the first few prime numbers before -diving into (slower) Miller-Rabin testing.

    - -

    Also, when self is less than 82 bits wide, isPrime does a deterministic test that is guaranteed to -return a correct result.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func isPrime(rounds: Int = 10) -> Bool
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - &<<(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func &<< (left: BigInt, right: BigInt) -> BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - &<<=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func &<<= (left: inout BigInt, right: BigInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - &>>(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func &>> (left: BigInt, right: BigInt) -> BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - &>>=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func &>>= (left: inout BigInt, right: BigInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - <<(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func << <Other>(lhs: BigInt, rhs: Other) -> BigInt where Other : BinaryInteger
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - <<=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func <<= <Other>(lhs: inout BigInt, rhs: Other) where Other : BinaryInteger
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - >>(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func >> <Other>(lhs: BigInt, rhs: Other) -> BigInt where Other : BinaryInteger
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - >>=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func >>= <Other>(lhs: inout BigInt, rhs: Other) where Other : BinaryInteger
    - -
    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

Square Root

-

-
-
-
    -
  • -
    - - - - squareRoot() - -
    -
    -
    -
    -
    -
    -

    Returns the integer square root of a big integer; i.e., the largest integer whose square isn’t greater than value.

    -
    -

    Requires

    - self >= 0 - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func squareRoot() -> BigInt
    - -
    -
    -
    -

    Return Value

    -

    floor(sqrt(self))

    -
    - -
    -
    -
  • -
  • -
    - - - - Stride - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public typealias Stride = BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - advanced(by:) - -
    -
    -
    -
    -
    -
    -

    Returns self + n.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func advanced(by n: Stride) -> BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - distance(to:) - -
    -
    -
    -
    -
    -
    -

    Returns other - self.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func distance(to other: BigInt) -> Stride
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(_:radix:) - -
    -
    -
    -
    -
    -
    -

    Initialize a big integer from an ASCII representation in a given radix. Numerals above 9 are represented by -letters from the English alphabet.

    -
    -

    Requires

    - radix > 1 && radix < 36 - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init?<S>(_ text: S, radix: Int = 10) where S : StringProtocol
    - -
    -
    -
    -

    Return Value

    -

    The integer represented by text, or nil if text contains a character that does not represent a numeral in radix.

    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Initialize a new big integer from a Unicode scalar. -The scalar must represent a decimal digit.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(unicodeScalarLiteral value: UnicodeScalar)
    - -
    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Initialize a new big integer from an extended grapheme cluster. -The cluster must consist of a decimal digit.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(extendedGraphemeClusterLiteral value: String)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(stringLiteral:) - -
    -
    -
    -
    -
    -
    -

    Initialize a new big integer from a decimal number represented by a string literal of arbitrary length. -The string must contain only decimal digits.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(stringLiteral value: StringLiteralType)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - description - -
    -
    -
    -
    -
    -
    -

    Return the decimal representation of this integer.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var description: String { get }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - playgroundDescription - -
    -
    -
    -
    -
    -
    -

    Return the playground quick look representation of this integer.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var playgroundDescription: Any { get }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - negate() - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func negate()
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - -(_:_:) - -
    -
    -
    -
    -
    -
    -

    Subtract b from a and return the result.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func - (a: BigInt, b: BigInt) -> BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - -=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Subtract b from a in place.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func -= (a: inout BigInt, b: BigInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - bitWidth - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bitWidth: Int { get }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - trailingZeroBitCount - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var trailingZeroBitCount: Int { get }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - Words - -
    -
    -
    -
    -
    -
    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct Words : RandomAccessCollection
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - words - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var words: Words { get }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(words:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init<S>(words: S) where S : Sequence, S.Element == BigInt.Word
    - -
    -
    - -
    -
    -
  • -
-
-
-
- -
-
- - - - diff --git a/Carthage/Checkouts/BigInt/docs/Structs/BigInt/Sign.html b/Carthage/Checkouts/BigInt/docs/Structs/BigInt/Sign.html deleted file mode 100644 index 93984a5b3..000000000 --- a/Carthage/Checkouts/BigInt/docs/Structs/BigInt/Sign.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - Sign Enumeration Reference - - - - - - - - - - - - - - - - -
-

- - BigInt v5.2.1 Docs - - (85% documented) -

- -

-

- -
-

- -

- - - View on GitHub - -

- -

- - - Install in Dash - -

-
- - - -
- -
- -
-
-

Sign

-
-
- -
public enum Sign
- -
-
-

Undocumented

- - -
-
- -
-
-
-
    -
  • -
    - - - - plus - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case plus
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - minus - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case minus
    - -
    -
    - -
    -
    -
  • -
-
-
-
- -
-
- - - - diff --git a/Carthage/Checkouts/BigInt/docs/Structs/BigInt/Words.html b/Carthage/Checkouts/BigInt/docs/Structs/BigInt/Words.html deleted file mode 100644 index d070e5056..000000000 --- a/Carthage/Checkouts/BigInt/docs/Structs/BigInt/Words.html +++ /dev/null @@ -1,302 +0,0 @@ - - - - Words Structure Reference - - - - - - - - - - - - - - - - -
-

- - BigInt v5.2.1 Docs - - (85% documented) -

- -

-

- -
-

- -

- - - View on GitHub - -

- -

- - - Install in Dash - -

-
- - - -
- -
- -
-
-

Words

-
-
- -
public struct Words : RandomAccessCollection
- -
-
- - -
-
- -
-
-
-
    -
  • -
    - - - - Indices - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public typealias Indices = CountableRange<Int>
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - count - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var count: Int { get }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - indices - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var indices: Indices { get }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - startIndex - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var startIndex: Int { get }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - endIndex - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var endIndex: Int { get }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - subscript(_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public subscript(index: Int) -> UInt { get }
    - -
    -
    - -
    -
    -
  • -
-
-
-
- -
-
- - - - diff --git a/Carthage/Checkouts/BigInt/docs/Structs/BigUInt.html b/Carthage/Checkouts/BigInt/docs/Structs/BigUInt.html deleted file mode 100644 index 5d164ca90..000000000 --- a/Carthage/Checkouts/BigInt/docs/Structs/BigUInt.html +++ /dev/null @@ -1,3220 +0,0 @@ - - - - BigUInt Structure Reference - - - - - - - - - - - - - - - - -
-

- - BigInt v5.2.1 Docs - - (85% documented) -

- -

-

- -
-

- -

- - - View on GitHub - -

- -

- - - Install in Dash - -

-
- - - -
- -
- -
-
-

BigUInt

-
-
- -
public struct BigUInt : UnsignedInteger
-
extension BigUInt: Codable
-
extension BigUInt: Comparable
-
extension BigUInt: Hashable
-
extension BigUInt: ExpressibleByIntegerLiteral
-
extension BigUInt: Strideable
-
extension BigUInt: ExpressibleByStringLiteral
-
extension BigUInt: CustomStringConvertible
-
extension BigUInt: CustomPlaygroundDisplayConvertible
- -
-
-

An arbitary precision unsigned integer type, also known as a “big integer”.

- -

Operations on big integers never overflow, but they may take a long time to execute. -The amount of memory (and address space) available is the only constraint to the magnitude of these numbers.

- -

This particular big integer type uses base-2^64 digits to represent integers; you can think of it as a wrapper -around Array<UInt64>. (In fact, BigUInt only uses an array if there are more than two digits.)

- - -
-
- -
-
-
-
    -
  • -
    - - - - Word - -
    -
    -
    -
    -
    -
    -

    The type representing a digit in BigUInt‘s underlying number system.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public typealias Word = UInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init() - -
    -
    -
    -
    -
    -
    -

    Initializes a new BigUInt with value 0.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init()
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(words:) - -
    -
    -
    -
    -
    -
    -

    Initializes a new BigUInt with the specified digits. The digits are ordered from least to most significant.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(words: [Word])
    - -
    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

Addition

-

-
-
-
    -
  • -
    - - - - +(_:_:) - -
    -
    -
    -
    -
    -
    -

    Add a and b together and return the result.

    -
    -

    Complexity

    - O(max(a.count, b.count)) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func + (a: BigUInt, b: BigUInt) -> BigUInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - +=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Add a and b together, and store the sum in a.

    -
    -

    Complexity

    - O(max(a.count, b.count)) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func += (a: inout BigUInt, b: BigUInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - isSigned - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static var isSigned: Bool { get }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - signum() - -
    -
    -
    -
    -
    -
    -

    Returns 1 if this value is, positive; otherwise, 0.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func signum() -> BigUInt
    - -
    -
    -
    -

    Return Value

    -

    The sign of this number, expressed as an integer of the same type.

    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

Bitwise Operations

-

-
-
-
    -
  • -
    - - - - ~(_:) - -
    -
    -
    -
    -
    -
    -

    Return the ones’ complement of a.

    -
    -

    Complexity

    - O(a.count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public prefix static func ~ (a: BigUInt) -> BigUInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - |=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Calculate the bitwise OR of a and b, and store the result in a.

    -
    -

    Complexity

    - O(max(a.count, b.count)) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func |= (a: inout BigUInt, b: BigUInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - &=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Calculate the bitwise AND of a and b and return the result.

    -
    -

    Complexity

    - O(max(a.count, b.count)) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func &= (a: inout BigUInt, b: BigUInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - ^=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Calculate the bitwise XOR of a and b and return the result.

    -
    -

    Complexity

    - O(max(a.count, b.count)) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func ^= (a: inout BigUInt, b: BigUInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to encoder: Encoder) throws
    - -
    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

Comparison

-

-
-
-
    -
  • -
    - - - - compare(_:_:) - -
    -
    -
    -
    -
    -
    -

    Compare a to b and return an NSComparisonResult indicating their order.

    -
    -

    Complexity

    - O(count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func compare(_ a: BigUInt, _ b: BigUInt) -> ComparisonResult
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - ==(_:_:) - -
    -
    -
    -
    -
    -
    -

    Return true iff a is equal to b.

    -
    -

    Complexity

    - O(count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func == (a: BigUInt, b: BigUInt) -> Bool
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - <(_:_:) - -
    -
    -
    -
    -
    -
    -

    Return true iff a is less than b.

    -
    -

    Complexity

    - O(count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func < (a: BigUInt, b: BigUInt) -> Bool
    - -
    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

NSData Conversion

-

-
-
-
    -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Initialize a BigInt from bytes accessed from an UnsafeRawBufferPointer

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ buffer: UnsafeRawBufferPointer)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Initializes an integer from the bits stored inside a piece of Data. -The data is assumed to be in network (big-endian) byte order.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ data: Data)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - serialize() - -
    -
    -
    -
    -
    -
    -

    Return a Data value that contains the base-256 representation of this integer, in network (big-endian) byte order.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func serialize() -> Data
    - -
    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

Division

-

-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    Divide this integer by y and return the resulting quotient and remainder.

    -
    -

    Requires

    - y > 0 - -
    -

    Complexity

    - O(count^2) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func quotientAndRemainder(dividingBy y: BigUInt) -> (quotient: BigUInt, remainder: BigUInt)
    - -
    -
    -
    -

    Return Value

    -

    (quotient, remainder) where quotient = floor(self/y), remainder = self - quotient * y

    -
    - -
    -
    -
  • -
  • -
    - - - - /(_:_:) - -
    -
    -
    -
    -
    -
    -

    Divide x by y and return the quotient.

    -
    -

    Note

    - Use divided(by:) if you also need the remainder. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func / (x: BigUInt, y: BigUInt) -> BigUInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - %(_:_:) - -
    -
    -
    -
    -
    -
    -

    Divide x by y and return the remainder.

    -
    -

    Note

    - Use divided(by:) if you also need the remainder. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func % (x: BigUInt, y: BigUInt) -> BigUInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - /=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Divide x by y and store the quotient in x.

    -
    -

    Note

    - Use divided(by:) if you also need the remainder. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func /= (x: inout BigUInt, y: BigUInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - %=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Divide x by y and store the remainder in x.

    -
    -

    Note

    - Use divided(by:) if you also need the remainder. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func %= (x: inout BigUInt, y: BigUInt)
    - -
    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

Exponentiation

-

-
-
-
    -
  • -
    - - - - power(_:) - -
    -
    -
    -
    -
    -
    -

    Returns this integer raised to the power exponent.

    - -

    This function calculates the result by successively squaring the base while halving the exponent.

    -
    -

    Note

    - This function can be unreasonably expensive for large exponents, which is why exponent is - a simple integer value. If you want to calculate big exponents, you’ll probably need to use - the modulo arithmetic variant. - -
    -

    See also

    - BigUInt.power(_:, modulus:) - -
    -

    Complexity

    - O((exponent * self.count)^log2(3)) or somesuch. The result may require a large amount of memory, too. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func power(_ exponent: Int) -> BigUInt
    - -
    -
    -
    -

    Return Value

    -

    1 if exponent == 0, otherwise self raised to exponent. (This implies that 0.power(0) == 1.)

    -
    - -
    -
    -
  • -
  • -
    - - - - power(_:modulus:) - -
    -
    -
    -
    -
    -
    -

    Returns the remainder of this integer raised to the power exponent in modulo arithmetic under modulus.

    - -

    Uses the right-to-left binary method.

    -
    -

    Complexity

    - O(exponent.count * modulus.count^log2(3)) or somesuch - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func power(_ exponent: BigUInt, modulus: BigUInt) -> BigUInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(exactly:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init?<T>(exactly source: T) where T : BinaryFloatingPoint
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init<T>(_ source: T) where T : BinaryFloatingPoint
    - -
    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

Greatest Common Divisor

-

-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    Returns the greatest common divisor of self and b.

    -
    -

    Complexity

    - O(count^2) where count = max(self.count, b.count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func greatestCommonDivisor(with b: BigUInt) -> BigUInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - inverse(_:) - -
    -
    -
    -
    -
    -
    -

    Returns the multiplicative inverse of this integer in modulo modulus arithmetic, -or nil if there is no such number.

    -
    -

    Requires

    - modulus > 1 - -
    -

    Complexity

    - O(count^3) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func inverse(_ modulus: BigUInt) -> BigUInt?
    - -
    -
    -
    -

    Return Value

    -

    If gcd(self, modulus) == 1, the value returned is an integer a < modulus such that (a * self) % modulus == 1. If self and modulus aren’t coprime, the return value is nil.

    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

Hashing

-

-
-
-
    -
  • -
    - - - - hash(into:) - -
    -
    -
    -
    -
    -
    -

    Append this BigUInt to the specified hasher.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func hash(into hasher: inout Hasher)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(exactly:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init?<T>(exactly source: T) where T : BinaryInteger
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init<T>(_ source: T) where T : BinaryInteger
    - -
    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init<T>(truncatingIfNeeded source: T) where T : BinaryInteger
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(clamping:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init<T>(clamping source: T) where T : BinaryInteger
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(integerLiteral:) - -
    -
    -
    -
    -
    -
    -

    Initialize a new big integer from an integer literal.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(integerLiteral value: UInt64)
    - -
    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

Multiplication

-

-
-
-
    -
  • -
    - - - - multiply(byWord:) - -
    -
    -
    -
    -
    -
    -

    Multiply this big integer by a single word, and store the result in place of the original big integer.

    -
    -

    Complexity

    - O(count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func multiply(byWord y: Word)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - multiplied(byWord:) - -
    -
    -
    -
    -
    -
    -

    Multiply this big integer by a single Word, and return the result.

    -
    -

    Complexity

    - O(count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func multiplied(byWord y: Word) -> BigUInt
    - -
    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Multiply x by y, and add the result to this integer, optionally shifted shift words to the left.

    -
    -

    Note

    - This is the fused multiply/shift/add operation; it is more efficient than doing the components -individually. (The fused operation doesn’t need to allocate space for temporary big integers.) - -
    -

    Complexity

    - O(count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func multiplyAndAdd(_ x: BigUInt, _ y: Word, shiftedBy shift: Int = 0)
    - -
    -
    -
    -

    Return Value

    -

    self is set to self + (x * y) << (shift * 2^Word.bitWidth)

    -
    - -
    -
    -
  • -
  • -
    - - - - multiplied(by:) - -
    -
    -
    -
    -
    -
    -

    Multiply this integer by y and return the result.

    -
    -

    Note

    - This uses the naive O(n^2) multiplication algorithm unless both arguments have more than -BigUInt.directMultiplicationLimit words. - -
    -

    Complexity

    - O(n^log2(3)) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func multiplied(by y: BigUInt) -> BigUInt
    - -
    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Multiplication switches to an asymptotically better recursive algorithm when arguments have more words than this limit.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static var directMultiplicationLimit: Int
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - *(_:_:) - -
    -
    -
    -
    -
    -
    -

    Multiply a by b and return the result.

    -
    -

    Note

    - This uses the naive O(n^2) multiplication algorithm unless both arguments have more than -BigUInt.directMultiplicationLimit words. - -
    -

    Complexity

    - O(n^log2(3)) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func * (x: BigUInt, y: BigUInt) -> BigUInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - *=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Multiply a by b and store the result in a.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func *= (a: inout BigUInt, b: BigUInt)
    - -
    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

Primality Testing

-

-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    Returns true iff this integer passes the strong probable prime test for the specified base.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func isStrongProbablePrime(_ base: BigUInt) -> Bool
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - isPrime(rounds:) - -
    -
    -
    -
    -
    -
    -

    Returns true if this integer is probably prime. Returns false if this integer is definitely not prime.

    - -

    This function performs a probabilistic Miller-Rabin Primality Test, consisting of rounds iterations, -each calculating the strong probable prime test for a random base. The number of rounds is 10 by default, -but you may specify your own choice.

    - -

    To speed things up, the function checks if self is divisible by the first few prime numbers before -diving into (slower) Miller-Rabin testing.

    - -

    Also, when self is less than 82 bits wide, isPrime does a deterministic test that is guaranteed to -return a correct result.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func isPrime(rounds: Int = 10) -> Bool
    - -
    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Create a big unsigned integer consisting of width uniformly distributed random bits.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func randomInteger<RNG>(withMaximumWidth width: Int, using generator: inout RNG) -> BigUInt where RNG : RandomNumberGenerator
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - width - - -
    -

    The maximum number of one bits in the result.

    -
    -
    - - generator - - -
    -

    The source of randomness.

    -
    -
    -
    -
    -

    Return Value

    -

    A big unsigned integer less than 1 << width.

    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Create a big unsigned integer consisting of width uniformly distributed random bits.

    -
    -

    Note

    -

    I use a SystemRandomGeneratorGenerator as the source of randomness.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func randomInteger(withMaximumWidth width: Int) -> BigUInt
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - width - - -
    -

    The maximum number of one bits in the result.

    -
    -
    -
    -
    -

    Return Value

    -

    A big unsigned integer less than 1 << width.

    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Create a big unsigned integer consisting of width-1 uniformly distributed random bits followed by a one bit.

    -
    -

    Note

    -

    If width is zero, the result is zero.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func randomInteger<RNG>(withExactWidth width: Int, using generator: inout RNG) -> BigUInt where RNG : RandomNumberGenerator
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - width - - -
    -

    The number of bits required to represent the answer.

    -
    -
    - - generator - - -
    -

    The source of randomness.

    -
    -
    -
    -
    -

    Return Value

    -

    A random big unsigned integer whose width is width.

    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Create a big unsigned integer consisting of width-1 uniformly distributed random bits followed by a one bit.

    -
    -

    Note

    - If width is zero, the result is zero. - -
    -

    Note

    -

    I use a SystemRandomGeneratorGenerator as the source of randomness.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func randomInteger(withExactWidth width: Int) -> BigUInt
    - -
    -
    -
    -

    Return Value

    -

    A random big unsigned integer whose width is width.

    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Create a uniformly distributed random unsigned integer that’s less than the specified limit.

    -
    -

    Precondition

    -

    limit > 0.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func randomInteger<RNG>(lessThan limit: BigUInt, using generator: inout RNG) -> BigUInt where RNG : RandomNumberGenerator
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - limit - - -
    -

    The upper bound on the result.

    -
    -
    - - generator - - -
    -

    The source of randomness.

    -
    -
    -
    -
    -

    Return Value

    -

    A random big unsigned integer that is less than limit.

    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Create a uniformly distributed random unsigned integer that’s less than the specified limit.

    -
    -

    Precondition

    - limit > 0. - -
    -

    Note

    -

    I use a SystemRandomGeneratorGenerator as the source of randomness.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func randomInteger(lessThan limit: BigUInt) -> BigUInt
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - limit - - -
    -

    The upper bound on the result.

    -
    -
    -
    -
    -

    Return Value

    -

    A random big unsigned integer that is less than limit.

    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

Shift Operators

-

-
-
-
    -
  • -
    - - - - >>=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func >>= <Other>(lhs: inout BigUInt, rhs: Other) where Other : BinaryInteger
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - <<=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func <<= <Other>(lhs: inout BigUInt, rhs: Other) where Other : BinaryInteger
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - >>(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func >> <Other>(lhs: BigUInt, rhs: Other) -> BigUInt where Other : BinaryInteger
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - <<(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func << <Other>(lhs: BigUInt, rhs: Other) -> BigUInt where Other : BinaryInteger
    - -
    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

Square Root

-

-
-
-
    -
  • -
    - - - - squareRoot() - -
    -
    -
    -
    -
    -
    -

    Returns the integer square root of a big integer; i.e., the largest integer whose square isn’t greater than value.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func squareRoot() -> BigUInt
    - -
    -
    -
    -

    Return Value

    -

    floor(sqrt(self))

    -
    - -
    -
    -
  • -
  • -
    - - - - Stride - -
    -
    -
    -
    -
    -
    -

    A type that can represent the distance between two values ofa BigUInt.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public typealias Stride = BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - advanced(by:) - -
    -
    -
    -
    -
    -
    -

    Adds n to self and returns the result. Traps if the result would be less than zero.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func advanced(by n: BigInt) -> BigUInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - distance(to:) - -
    -
    -
    -
    -
    -
    -

    Returns the (potentially negative) difference between self and other as a BigInt. Never traps.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func distance(to other: BigUInt) -> BigInt
    - -
    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

String Conversion

-

-
-
-
    -
  • -
    - - - - init(_:radix:) - -
    -
    -
    -
    -
    -
    -

    Initialize a big integer from an ASCII representation in a given radix. Numerals above 9 are represented by -letters from the English alphabet.

    -
    -

    Requires

    - radix > 1 && radix < 36 - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init?<S>(_ text: S, radix: Int = 10) where S : StringProtocol
    - -
    -
    -
    -

    Return Value

    -

    The integer represented by text, or nil if text contains a character that does not represent a numeral in radix.

    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Initialize a new big integer from a Unicode scalar. -The scalar must represent a decimal digit.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(unicodeScalarLiteral value: UnicodeScalar)
    - -
    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Initialize a new big integer from an extended grapheme cluster. -The cluster must consist of a decimal digit.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(extendedGraphemeClusterLiteral value: String)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(stringLiteral:) - -
    -
    -
    -
    -
    -
    -

    Initialize a new big integer from a decimal number represented by a string literal of arbitrary length. -The string must contain only decimal digits.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(stringLiteral value: StringLiteralType)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - description - -
    -
    -
    -
    -
    -
    -

    Return the decimal representation of this integer.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var description: String { get }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - playgroundDescription - -
    -
    -
    -
    -
    -
    -

    Return the playground quick look representation of this integer.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var playgroundDescription: Any { get }
    - -
    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

Subtraction

-

-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    Subtract other from this integer in place, and return a flag indicating if the operation caused an -arithmetic overflow. other is shifted shift digits to the left before being subtracted.

    -
    -

    Note

    - If the result indicates an overflow, then self becomes the twos’ complement of the absolute difference. - -
    -

    Complexity

    - O(count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func subtractReportingOverflow(_ b: BigUInt, shiftedBy shift: Int = 0) -> Bool
    - -
    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Subtract other from this integer, returning the difference and a flag indicating arithmetic overflow. -other is shifted shift digits to the left before being subtracted.

    -
    -

    Note

    - If overflow is true, then the result value is the twos’ complement of the absolute value of the difference. - -
    -

    Complexity

    - O(count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func subtractingReportingOverflow(_ other: BigUInt, shiftedBy shift: Int) -> (partialValue: BigUInt, overflow: Bool)
    - -
    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Subtracts other from self, returning the result and a flag indicating arithmetic overflow.

    -
    -

    Note

    - When the operation overflows, then partialValue is the twos’ complement of the absolute value of the difference. - -
    -

    Complexity

    - O(count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func subtractingReportingOverflow(_ other: BigUInt) -> (partialValue: BigUInt, overflow: Bool)
    - -
    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Subtract other from this integer in place. -other is shifted shift digits to the left before being subtracted.

    -
    -

    Requires

    - self >= other * 2^shift - -
    -

    Complexity

    - O(count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func subtract(_ other: BigUInt, shiftedBy shift: Int = 0)
    - -
    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Subtract b from this integer, and return the difference. -b is shifted shift digits to the left before being subtracted.

    -
    -

    Requires

    - self >= b * 2^shift - -
    -

    Complexity

    - O(count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func subtracting(_ other: BigUInt, shiftedBy shift: Int = 0) -> BigUInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - decrement(shiftedBy:) - -
    -
    -
    -
    -
    -
    -

    Decrement this integer by one.

    -
    -

    Requires

    - !isZero - -
    -

    Complexity

    - O(count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func decrement(shiftedBy shift: Int = 0)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - -(_:_:) - -
    -
    -
    -
    -
    -
    -

    Subtract b from a and return the result.

    -
    -

    Requires

    - a >= b - -
    -

    Complexity

    - O(a.count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func - (a: BigUInt, b: BigUInt) -> BigUInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - -=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Subtract b from a and store the result in a.

    -
    -

    Requires

    - a >= b - -
    -

    Complexity

    - O(a.count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func -= (a: inout BigUInt, b: BigUInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - subscript(bitAt:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public subscript(bitAt index: Int) -> Bool { get set }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - bitWidth - -
    -
    -
    -
    -
    -
    -

    The minimum number of bits required to represent this integer in binary.

    -
    -

    Complexity

    - O(1) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bitWidth: Int { get }
    - -
    -
    -
    -

    Return Value

    -

    floor(log2(2 * self + 1))

    -
    - -
    -
    -
  • -
  • -
    - - - - leadingZeroBitCount - -
    -
    -
    -
    -
    -
    -

    The number of leading zero bits in the binary representation of this integer in base 2^(Word.bitWidth). -This is useful when you need to normalize a BigUInt such that the top bit of its most significant word is 1.

    -
    -

    Note

    - 0 is considered to have zero leading zero bits. - -
    -

    See also

    - width - -
    -

    Complexity

    - O(1) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var leadingZeroBitCount: Int { get }
    - -
    -
    -
    -

    Return Value

    -

    A value in 0...(Word.bitWidth - 1).

    -
    - -
    -
    -
  • -
  • -
    - - - - trailingZeroBitCount - -
    -
    -
    -
    -
    -
    -

    The number of trailing zero bits in the binary representation of this integer.

    -
    -

    Note

    - 0 is considered to have zero trailing zero bits. - -
    -

    Complexity

    - O(count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var trailingZeroBitCount: Int { get }
    - -
    -
    -
    -

    Return Value

    -

    A value in 0...width.

    -
    - -
    -
    -
  • -
  • -
    - - - - Words - -
    -
    -
    -
    -
    -
    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct Words : RandomAccessCollection
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - words - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var words: Words { get }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(words:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init<Words>(words: Words) where Words : Sequence, Words.Element == BigUInt.Word
    - -
    -
    - -
    -
    -
  • -
-
-
-
- -
-
- - - - diff --git a/Carthage/Checkouts/BigInt/docs/Structs/BigUInt/Words.html b/Carthage/Checkouts/BigInt/docs/Structs/BigUInt/Words.html deleted file mode 100644 index 0c13a2f7a..000000000 --- a/Carthage/Checkouts/BigInt/docs/Structs/BigUInt/Words.html +++ /dev/null @@ -1,215 +0,0 @@ - - - - Words Structure Reference - - - - - - - - - - - - - - - - -
-

- - BigInt v5.2.1 Docs - - (85% documented) -

- -

-

- -
-

- -

- - - View on GitHub - -

- -

- - - Install in Dash - -

-
- - - -
- -
- -
-
-

Words

-
-
- -
public struct Words : RandomAccessCollection
- -
-
- - -
-
- -
-
-
-
    -
  • -
    - - - - startIndex - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var startIndex: Int { get }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - endIndex - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var endIndex: Int { get }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - subscript(_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public subscript(index: Int) -> Word { get }
    - -
    -
    - -
    -
    -
  • -
-
-
-
- -
-
- - - - diff --git a/Carthage/Checkouts/BigInt/docs/badge.svg b/Carthage/Checkouts/BigInt/docs/badge.svg deleted file mode 100644 index 09c230060..000000000 --- a/Carthage/Checkouts/BigInt/docs/badge.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - documentation - - - documentation - - - 85% - - - 85% - - - diff --git a/Carthage/Checkouts/BigInt/docs/css/highlight.css b/Carthage/Checkouts/BigInt/docs/css/highlight.css deleted file mode 100644 index d0db0e13b..000000000 --- a/Carthage/Checkouts/BigInt/docs/css/highlight.css +++ /dev/null @@ -1,200 +0,0 @@ -/* Credit to https://gist.github.com/wataru420/2048287 */ -.highlight { - /* Comment */ - /* Error */ - /* Keyword */ - /* Operator */ - /* Comment.Multiline */ - /* Comment.Preproc */ - /* Comment.Single */ - /* Comment.Special */ - /* Generic.Deleted */ - /* Generic.Deleted.Specific */ - /* Generic.Emph */ - /* Generic.Error */ - /* Generic.Heading */ - /* Generic.Inserted */ - /* Generic.Inserted.Specific */ - /* Generic.Output */ - /* Generic.Prompt */ - /* Generic.Strong */ - /* Generic.Subheading */ - /* Generic.Traceback */ - /* Keyword.Constant */ - /* Keyword.Declaration */ - /* Keyword.Pseudo */ - /* Keyword.Reserved */ - /* Keyword.Type */ - /* Literal.Number */ - /* Literal.String */ - /* Name.Attribute */ - /* Name.Builtin */ - /* Name.Class */ - /* Name.Constant */ - /* Name.Entity */ - /* Name.Exception */ - /* Name.Function */ - /* Name.Namespace */ - /* Name.Tag */ - /* Name.Variable */ - /* Operator.Word */ - /* Text.Whitespace */ - /* Literal.Number.Float */ - /* Literal.Number.Hex */ - /* Literal.Number.Integer */ - /* Literal.Number.Oct */ - /* Literal.String.Backtick */ - /* Literal.String.Char */ - /* Literal.String.Doc */ - /* Literal.String.Double */ - /* Literal.String.Escape */ - /* Literal.String.Heredoc */ - /* Literal.String.Interpol */ - /* Literal.String.Other */ - /* Literal.String.Regex */ - /* Literal.String.Single */ - /* Literal.String.Symbol */ - /* Name.Builtin.Pseudo */ - /* Name.Variable.Class */ - /* Name.Variable.Global */ - /* Name.Variable.Instance */ - /* Literal.Number.Integer.Long */ } - .highlight .c { - color: #999988; - font-style: italic; } - .highlight .err { - color: #a61717; - background-color: #e3d2d2; } - .highlight .k { - color: #000000; - font-weight: bold; } - .highlight .o { - color: #000000; - font-weight: bold; } - .highlight .cm { - color: #999988; - font-style: italic; } - .highlight .cp { - color: #999999; - font-weight: bold; } - .highlight .c1 { - color: #999988; - font-style: italic; } - .highlight .cs { - color: #999999; - font-weight: bold; - font-style: italic; } - .highlight .gd { - color: #000000; - background-color: #ffdddd; } - .highlight .gd .x { - color: #000000; - background-color: #ffaaaa; } - .highlight .ge { - color: #000000; - font-style: italic; } - .highlight .gr { - color: #aa0000; } - .highlight .gh { - color: #999999; } - .highlight .gi { - color: #000000; - background-color: #ddffdd; } - .highlight .gi .x { - color: #000000; - background-color: #aaffaa; } - .highlight .go { - color: #888888; } - .highlight .gp { - color: #555555; } - .highlight .gs { - font-weight: bold; } - .highlight .gu { - color: #aaaaaa; } - .highlight .gt { - color: #aa0000; } - .highlight .kc { - color: #000000; - font-weight: bold; } - .highlight .kd { - color: #000000; - font-weight: bold; } - .highlight .kp { - color: #000000; - font-weight: bold; } - .highlight .kr { - color: #000000; - font-weight: bold; } - .highlight .kt { - color: #445588; } - .highlight .m { - color: #009999; } - .highlight .s { - color: #d14; } - .highlight .na { - color: #008080; } - .highlight .nb { - color: #0086B3; } - .highlight .nc { - color: #445588; - font-weight: bold; } - .highlight .no { - color: #008080; } - .highlight .ni { - color: #800080; } - .highlight .ne { - color: #990000; - font-weight: bold; } - .highlight .nf { - color: #990000; } - .highlight .nn { - color: #555555; } - .highlight .nt { - color: #000080; } - .highlight .nv { - color: #008080; } - .highlight .ow { - color: #000000; - font-weight: bold; } - .highlight .w { - color: #bbbbbb; } - .highlight .mf { - color: #009999; } - .highlight .mh { - color: #009999; } - .highlight .mi { - color: #009999; } - .highlight .mo { - color: #009999; } - .highlight .sb { - color: #d14; } - .highlight .sc { - color: #d14; } - .highlight .sd { - color: #d14; } - .highlight .s2 { - color: #d14; } - .highlight .se { - color: #d14; } - .highlight .sh { - color: #d14; } - .highlight .si { - color: #d14; } - .highlight .sx { - color: #d14; } - .highlight .sr { - color: #009926; } - .highlight .s1 { - color: #d14; } - .highlight .ss { - color: #990073; } - .highlight .bp { - color: #999999; } - .highlight .vc { - color: #008080; } - .highlight .vg { - color: #008080; } - .highlight .vi { - color: #008080; } - .highlight .il { - color: #009999; } diff --git a/Carthage/Checkouts/BigInt/docs/css/jazzy.css b/Carthage/Checkouts/BigInt/docs/css/jazzy.css deleted file mode 100644 index ff59f5f86..000000000 --- a/Carthage/Checkouts/BigInt/docs/css/jazzy.css +++ /dev/null @@ -1,395 +0,0 @@ -*, *:before, *:after { - box-sizing: inherit; } - -body { - margin: 0; - background: #fff; - color: #333; - font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif; - letter-spacing: .2px; - -webkit-font-smoothing: antialiased; - box-sizing: border-box; } - -h1 { - font-size: 2rem; - font-weight: 700; - margin: 1.275em 0 0.6em; } - -h2 { - font-size: 1.75rem; - font-weight: 700; - margin: 1.275em 0 0.3em; } - -h3 { - font-size: 1.5rem; - font-weight: 700; - margin: 1em 0 0.3em; } - -h4 { - font-size: 1.25rem; - font-weight: 700; - margin: 1.275em 0 0.85em; } - -h5 { - font-size: 1rem; - font-weight: 700; - margin: 1.275em 0 0.85em; } - -h6 { - font-size: 1rem; - font-weight: 700; - margin: 1.275em 0 0.85em; - color: #777; } - -p { - margin: 0 0 1em; } - -ul, ol { - padding: 0 0 0 2em; - margin: 0 0 0.85em; } - -blockquote { - margin: 0 0 0.85em; - padding: 0 15px; - color: #858585; - border-left: 4px solid #e5e5e5; } - -img { - max-width: 100%; } - -a { - color: #4183c4; - text-decoration: none; } - a:hover, a:focus { - outline: 0; - text-decoration: underline; } - a.discouraged { - text-decoration: line-through; } - a.discouraged:hover, a.discouraged:focus { - text-decoration: underline line-through; } - -table { - background: #fff; - width: 100%; - border-collapse: collapse; - border-spacing: 0; - overflow: auto; - margin: 0 0 0.85em; } - -tr:nth-child(2n) { - background-color: #fbfbfb; } - -th, td { - padding: 6px 13px; - border: 1px solid #ddd; } - -pre { - margin: 0 0 1.275em; - padding: .85em 1em; - overflow: auto; - background: #f7f7f7; - font-size: .85em; - font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; } - -code { - font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; } - -.item-container p > code, .item-container li > code, .top-matter p > code, .top-matter li > code { - background: #f7f7f7; - padding: .2em; } - .item-container p > code:before, .item-container p > code:after, .item-container li > code:before, .item-container li > code:after, .top-matter p > code:before, .top-matter p > code:after, .top-matter li > code:before, .top-matter li > code:after { - letter-spacing: -.2em; - content: "\00a0"; } - -pre code { - padding: 0; - white-space: pre; } - -.content-wrapper { - display: flex; - flex-direction: column; } - @media (min-width: 768px) { - .content-wrapper { - flex-direction: row; } } -.header { - display: flex; - padding: 8px; - font-size: 0.875em; - background: #444; - color: #999; } - -.header-col { - margin: 0; - padding: 0 8px; } - -.header-col--primary { - flex: 1; } - -.header-link { - color: #fff; } - -.header-icon { - padding-right: 6px; - vertical-align: -4px; - height: 16px; } - -.breadcrumbs { - font-size: 0.875em; - padding: 8px 16px; - margin: 0; - background: #fbfbfb; - border-bottom: 1px solid #ddd; } - -.carat { - height: 10px; - margin: 0 5px; } - -.navigation { - order: 2; } - @media (min-width: 768px) { - .navigation { - order: 1; - width: 25%; - max-width: 300px; - padding-bottom: 64px; - overflow: hidden; - word-wrap: normal; - background: #fbfbfb; - border-right: 1px solid #ddd; } } -.nav-groups { - list-style-type: none; - padding-left: 0; } - -.nav-group-name { - border-bottom: 1px solid #ddd; - padding: 8px 0 8px 16px; } - -.nav-group-name-link { - color: #333; } - -.nav-group-tasks { - margin: 8px 0; - padding: 0 0 0 8px; } - -.nav-group-task { - font-size: 1em; - list-style-type: none; - white-space: nowrap; } - -.nav-group-task-link { - color: #808080; } - -.main-content { - order: 1; } - @media (min-width: 768px) { - .main-content { - order: 2; - flex: 1; - padding-bottom: 60px; } } -.section { - padding: 0 32px; - border-bottom: 1px solid #ddd; } - -.section-content { - max-width: 834px; - margin: 0 auto; - padding: 16px 0; } - -.section-name { - color: #666; - display: block; } - .section-name p { - margin-bottom: inherit; } - -.declaration .highlight { - overflow-x: initial; - padding: 8px 0; - margin: 0; - background-color: transparent; - border: none; } - -.task-group-section { - border-top: 1px solid #ddd; } - -.task-group { - padding-top: 0px; } - -.task-name-container a[name]:before { - content: ""; - display: block; } - -.section-name-container { - position: relative; } - .section-name-container .section-name-link { - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - margin-bottom: 0; } - .section-name-container .section-name { - position: relative; - pointer-events: none; - z-index: 1; } - .section-name-container .section-name a { - pointer-events: auto; } - -.item-container { - padding: 0; } - -.item { - padding-top: 8px; - width: 100%; - list-style-type: none; } - .item a[name]:before { - content: ""; - display: block; } - .item .token, .item .direct-link { - display: inline-block; - text-indent: -20px; - padding-left: 3px; - margin-left: 20px; - font-size: 1rem; } - .item .declaration-note { - font-size: .85em; - color: #808080; - font-style: italic; } - -.pointer-container { - border-bottom: 1px solid #ddd; - left: -23px; - padding-bottom: 13px; - position: relative; - width: 110%; } - -.pointer { - left: 21px; - top: 7px; - display: block; - position: absolute; - width: 12px; - height: 12px; - border-left: 1px solid #ddd; - border-top: 1px solid #ddd; - background: #fff; - transform: rotate(45deg); } - -.height-container { - display: none; - position: relative; - width: 100%; - overflow: hidden; } - .height-container .section { - background: #fff; - border: 1px solid #ddd; - border-top-width: 0; - padding-top: 10px; - padding-bottom: 5px; - padding: 8px 16px; } - -.aside, .language { - padding: 6px 12px; - margin: 12px 0; - border-left: 5px solid #dddddd; - overflow-y: hidden; } - .aside .aside-title, .language .aside-title { - font-size: 9px; - letter-spacing: 2px; - text-transform: uppercase; - padding-bottom: 0; - margin: 0; - color: #aaa; - -webkit-user-select: none; } - .aside p:last-child, .language p:last-child { - margin-bottom: 0; } - -.language { - border-left: 5px solid #cde9f4; } - .language .aside-title { - color: #4183c4; } - -.aside-warning, .aside-deprecated, .aside-unavailable { - border-left: 5px solid #ff6666; } - .aside-warning .aside-title, .aside-deprecated .aside-title, .aside-unavailable .aside-title { - color: #ff0000; } - -.graybox { - border-collapse: collapse; - width: 100%; } - .graybox p { - margin: 0; - word-break: break-word; - min-width: 50px; } - .graybox td { - border: 1px solid #ddd; - padding: 5px 25px 5px 10px; - vertical-align: middle; } - .graybox tr td:first-of-type { - text-align: right; - padding: 7px; - vertical-align: top; - word-break: normal; - width: 40px; } - -.slightly-smaller { - font-size: 0.9em; } - -.footer { - padding: 8px 16px; - background: #444; - color: #ddd; - font-size: 0.8em; } - .footer p { - margin: 8px 0; } - .footer a { - color: #fff; } - -html.dash .header, html.dash .breadcrumbs, html.dash .navigation { - display: none; } - -html.dash .height-container { - display: block; } - -form[role=search] input { - font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 14px; - line-height: 24px; - padding: 0 10px; - margin: 0; - border: none; - border-radius: 1em; } - .loading form[role=search] input { - background: white url(../img/spinner.gif) center right 4px no-repeat; } - -form[role=search] .tt-menu { - margin: 0; - min-width: 300px; - background: #fbfbfb; - color: #333; - border: 1px solid #ddd; } - -form[role=search] .tt-highlight { - font-weight: bold; } - -form[role=search] .tt-suggestion { - font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif; - padding: 0 8px; } - form[role=search] .tt-suggestion span { - display: table-cell; - white-space: nowrap; } - form[role=search] .tt-suggestion .doc-parent-name { - width: 100%; - text-align: right; - font-weight: normal; - font-size: 0.9em; - padding-left: 16px; } - -form[role=search] .tt-suggestion:hover, -form[role=search] .tt-suggestion.tt-cursor { - cursor: pointer; - background-color: #4183c4; - color: #fff; } - -form[role=search] .tt-suggestion:hover .doc-parent-name, -form[role=search] .tt-suggestion.tt-cursor .doc-parent-name { - color: #fff; } diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Info.plist b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Info.plist deleted file mode 100644 index 220c951b0..000000000 --- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleIdentifier - com.jazzy.bigint - CFBundleName - BigInt - DocSetPlatformFamily - bigint - isDashDocset - - dashIndexFilePath - index.html - isJavaScriptEnabled - - DashDocSetFamily - dashtoc - DashDocSetFallbackURL - https://attaswift.github.io/BigInt/reference/ - - diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Extensions.html b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Extensions.html deleted file mode 100644 index 7479e3581..000000000 --- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Extensions.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - Extensions Reference - - - - - - - - - - - - - - - - -
-

- - BigInt v5.2.1 Docs - - (85% documented) -

- -

-

- -
-

- -

- - - View on GitHub - -

- -

- - - Install in Dash - -

-
- - - -
- -
- -
-
-

Extensions

-

The following extensions are available globally.

- -
-
- -
-
-
-
    -
  • -
    - - - - BinaryFloatingPoint - -
    -
    -
    -
    -
    -
    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    extension BinaryFloatingPoint where RawExponent: FixedWidthInteger, RawSignificand: FixedWidthInteger
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - String - -
    -
    -
    -
    -
    -
    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    extension String
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - - diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Extensions/BinaryFloatingPoint.html b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Extensions/BinaryFloatingPoint.html deleted file mode 100644 index 86bf1c39b..000000000 --- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Extensions/BinaryFloatingPoint.html +++ /dev/null @@ -1,194 +0,0 @@ - - - - BinaryFloatingPoint Extension Reference - - - - - - - - - - - - - - - - -
-

- - BigInt v5.2.1 Docs - - (85% documented) -

- -

-

- -
-

- -

- - - View on GitHub - -

- -

- - - Install in Dash - -

-
- - - -
- -
- -
-
-

BinaryFloatingPoint

-
-
- -
extension BinaryFloatingPoint where RawExponent: FixedWidthInteger, RawSignificand: FixedWidthInteger
- -
-
- -
-
- -
-
-
-
- - -
- -

Available where RawExponent: FixedWidthInteger, RawSignificand: FixedWidthInteger

-

-
-
-
    -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ value: BigInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ value: BigUInt)
    - -
    -
    - -
    -
    -
  • -
-
-
-
- -
-
- - - - diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Extensions/String.html b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Extensions/String.html deleted file mode 100644 index 8e347fd34..000000000 --- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Extensions/String.html +++ /dev/null @@ -1,244 +0,0 @@ - - - - String Extension Reference - - - - - - - - - - - - - - - - -
-

- - BigInt v5.2.1 Docs - - (85% documented) -

- -

-

- -
-

- -

- - - View on GitHub - -

- -

- - - Install in Dash - -

-
- - - -
- -
- -
-
-

String

-
-
- -
extension String
- -
-
- -
-
- -
-
-
-
    -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Initialize a new string with the base-10 representation of an unsigned big integer.

    -
    -

    Complexity

    - O(v.count^2) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ v: BigUInt)
    - -
    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Initialize a new string representing an unsigned big integer in the given radix (base).

    - -

    Numerals greater than 9 are represented as letters from the English alphabet, -starting with a if uppercase is false or A otherwise.

    -
    -

    Requires

    - radix > 1 && radix <= 36 - -
    -

    Complexity

    - O(count) when radix is a power of two; otherwise O(count^2). - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ v: BigUInt, radix: Int, uppercase: Bool = false)
    - -
    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Initialize a new string representing a signed big integer in the given radix (base).

    - -

    Numerals greater than 9 are represented as letters from the English alphabet, -starting with a if uppercase is false or A otherwise.

    -
    -

    Requires

    - radix > 1 && radix <= 36 - -
    -

    Complexity

    - O(count) when radix is a power of two; otherwise O(count^2). - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ value: BigInt, radix: Int = 10, uppercase: Bool = false)
    - -
    -
    - -
    -
    -
  • -
-
-
-
- -
-
- - - - diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs.html b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs.html deleted file mode 100644 index 9ae786007..000000000 --- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs.html +++ /dev/null @@ -1,229 +0,0 @@ - - - - Structures Reference - - - - - - - - - - - - - - - - -
-

- - BigInt v5.2.1 Docs - - (85% documented) -

- -

-

- -
-

- -

- - - View on GitHub - -

- -

- - - Install in Dash - -

-
- - - -
- -
- -
-
-

Structures

-

The following structures are available globally.

- -
-
- -
-
-
-
    -
  • -
    - - - - BigUInt - -
    -
    -
    -
    -
    -
    -

    An arbitary precision unsigned integer type, also known as a “big integer”.

    - -

    Operations on big integers never overflow, but they may take a long time to execute. -The amount of memory (and address space) available is the only constraint to the magnitude of these numbers.

    - -

    This particular big integer type uses base-2^64 digits to represent integers; you can think of it as a wrapper -around Array<UInt64>. (In fact, BigUInt only uses an array if there are more than two digits.)

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct BigUInt : UnsignedInteger
    -
    extension BigUInt: Codable
    -
    extension BigUInt: Comparable
    -
    extension BigUInt: Hashable
    -
    extension BigUInt: ExpressibleByIntegerLiteral
    -
    extension BigUInt: Strideable
    -
    extension BigUInt: ExpressibleByStringLiteral
    -
    extension BigUInt: CustomStringConvertible
    -
    extension BigUInt: CustomPlaygroundDisplayConvertible
    - -
    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

BigInt

-

-
-
-
    -
  • -
    - - - - BigInt - -
    -
    -
    -
    -
    -
    -

    An arbitary precision signed integer type, also known as a “big integer”.

    - -

    Operations on big integers never overflow, but they might take a long time to execute. -The amount of memory (and address space) available is the only constraint to the magnitude of these numbers.

    - -

    This particular big integer type uses base-2^64 digits to represent integers.

    - -

    BigInt is essentially a tiny wrapper that extends BigUInt with a sign bit and provides signed integer -operations. Both the underlying absolute value and the negative/positive flag are available as read-write -properties.

    - -

    Not all algorithms of BigUInt are available for BigInt values; for example, there is no square root or -primality test for signed integers. When you need to call one of these, just extract the absolute value:

    -
    BigInt(255).abs.isPrime()   // Returns false
    -
    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct BigInt : SignedInteger
    -
    extension BigInt: Codable
    -
    extension BigInt: Hashable
    -
    extension BigInt: ExpressibleByIntegerLiteral
    -
    extension BigInt: Strideable
    -
    extension BigInt: ExpressibleByStringLiteral
    -
    extension BigInt: CustomStringConvertible
    -
    extension BigInt: CustomPlaygroundDisplayConvertible
    - -
    -
    - -
    -
    -
  • -
-
-
-
- -
-
- - - - diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs/BigInt.html b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs/BigInt.html deleted file mode 100644 index ef27d99fb..000000000 --- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs/BigInt.html +++ /dev/null @@ -1,2546 +0,0 @@ - - - - BigInt Structure Reference - - - - - - - - - - - - - - - - -
-

- - BigInt v5.2.1 Docs - - (85% documented) -

- -

-

- -
-

- -

- - - View on GitHub - -

- -

- - - Install in Dash - -

-
- - - -
- -
- -
-
-

BigInt

-
-
- -
public struct BigInt : SignedInteger
-
extension BigInt: Codable
-
extension BigInt: Hashable
-
extension BigInt: ExpressibleByIntegerLiteral
-
extension BigInt: Strideable
-
extension BigInt: ExpressibleByStringLiteral
-
extension BigInt: CustomStringConvertible
-
extension BigInt: CustomPlaygroundDisplayConvertible
- -
-
-

An arbitary precision signed integer type, also known as a “big integer”.

- -

Operations on big integers never overflow, but they might take a long time to execute. -The amount of memory (and address space) available is the only constraint to the magnitude of these numbers.

- -

This particular big integer type uses base-2^64 digits to represent integers.

- -

BigInt is essentially a tiny wrapper that extends BigUInt with a sign bit and provides signed integer -operations. Both the underlying absolute value and the negative/positive flag are available as read-write -properties.

- -

Not all algorithms of BigUInt are available for BigInt values; for example, there is no square root or -primality test for signed integers. When you need to call one of these, just extract the absolute value:

-
BigInt(255).abs.isPrime()   // Returns false
-
- - -
-
- -
-
-
-
    -
  • -
    - - - - Sign - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum Sign
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - Magnitude - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public typealias Magnitude = BigUInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - Word - -
    -
    -
    -
    -
    -
    -

    The type representing a digit in BigInt‘s underlying number system.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public typealias Word = BigUInt.Word
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - isSigned - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static var isSigned: Bool { get }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - magnitude - -
    -
    -
    -
    -
    -
    -

    The absolute value of this integer.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var magnitude: BigUInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - sign - -
    -
    -
    -
    -
    -
    -

    True iff the value of this integer is negative.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var sign: Sign
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(sign:magnitude:) - -
    -
    -
    -
    -
    -
    -

    Initializes a new big integer with the provided absolute number and sign flag.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(sign: Sign, magnitude: BigUInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - isZero - -
    -
    -
    -
    -
    -
    -

    Return true iff this integer is zero.

    -
    -

    Complexity

    - O(1) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var isZero: Bool { get }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - signum() - -
    -
    -
    -
    -
    -
    -

    Returns -1 if this value is negative and 1 if it’s positive; otherwise, 0.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func signum() -> BigInt
    - -
    -
    -
    -

    Return Value

    -

    The sign of this number, expressed as an integer of the same type.

    -
    - -
    -
    -
  • -
  • -
    - - - - +(_:_:) - -
    -
    -
    -
    -
    -
    -

    Add a to b and return the result.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func + (a: BigInt, b: BigInt) -> BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - +=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Add b to a in place.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func += (a: inout BigInt, b: BigInt)
    - -
    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

Bitwise Operations

-

-
-
-
    -
  • -
    - - - - ~(_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public prefix static func ~ (x: BigInt) -> BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - &(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func & (lhs: inout BigInt, rhs: BigInt) -> BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - |(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func | (lhs: inout BigInt, rhs: BigInt) -> BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - ^(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func ^ (lhs: inout BigInt, rhs: BigInt) -> BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - &=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func &= (lhs: inout BigInt, rhs: BigInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - |=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func |= (lhs: inout BigInt, rhs: BigInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - ^=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func ^= (lhs: inout BigInt, rhs: BigInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to encoder: Encoder) throws
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - ==(_:_:) - -
    -
    -
    -
    -
    -
    -

    Return true iff a is equal to b.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func == (a: BigInt, b: BigInt) -> Bool
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - <(_:_:) - -
    -
    -
    -
    -
    -
    -

    Return true iff a is less than b.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func < (a: BigInt, b: BigInt) -> Bool
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Initialize a BigInt from bytes accessed from an UnsafeRawBufferPointer, -where the first byte indicates sign (0 for positive, 1 for negative)

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ buffer: UnsafeRawBufferPointer)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Initializes an integer from the bits stored inside a piece of Data. -The data is assumed to be in network (big-endian) byte order with a first -byte to represent the sign (0 for positive, 1 for negative)

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ data: Data)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - serialize() - -
    -
    -
    -
    -
    -
    -

    Return a Data value that contains the base-256 representation of this integer, in network (big-endian) byte order and a prepended byte to indicate the sign (0 for positive, 1 for negative)

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func serialize() -> Data
    - -
    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

Full-width multiplication and division

-

-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    Divide this integer by y and return the resulting quotient and remainder.

    -
    -

    Requires

    - y > 0 - -
    -

    Complexity

    - O(count^2) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func quotientAndRemainder(dividingBy y: BigInt) -> (quotient: BigInt, remainder: BigInt)
    - -
    -
    -
    -

    Return Value

    -

    (quotient, remainder) where quotient = floor(self/y), remainder = self - quotient * y

    -
    - -
    -
    -
  • -
  • -
    - - - - /(_:_:) - -
    -
    -
    -
    -
    -
    -

    Divide a by b and return the quotient. Traps if b is zero.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func / (a: BigInt, b: BigInt) -> BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - %(_:_:) - -
    -
    -
    -
    -
    -
    -

    Divide a by b and return the remainder. The result has the same sign as a.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func % (a: BigInt, b: BigInt) -> BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - modulus(_:) - -
    -
    -
    -
    -
    -
    -

    Return the result of a mod b. The result is always a nonnegative integer that is less than the absolute value of b.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func modulus(_ mod: BigInt) -> BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - /=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Divide a by b storing the quotient in a.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func /= (a: inout BigInt, b: BigInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - %=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Divide a by b storing the remainder in a.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func %= (a: inout BigInt, b: BigInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - power(_:) - -
    -
    -
    -
    -
    -
    -

    Returns this integer raised to the power exponent.

    - -

    This function calculates the result by successively squaring the base while halving the exponent.

    -
    -

    Note

    - This function can be unreasonably expensive for large exponents, which is why exponent is - a simple integer value. If you want to calculate big exponents, you’ll probably need to use - the modulo arithmetic variant. - -
    -

    See also

    - BigUInt.power(_:, modulus:) - -
    -

    Complexity

    - O((exponent * self.count)^log2(3)) or somesuch. The result may require a large amount of memory, too. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func power(_ exponent: Int) -> BigInt
    - -
    -
    -
    -

    Return Value

    -

    1 if exponent == 0, otherwise self raised to exponent. (This implies that 0.power(0) == 1.)

    -
    - -
    -
    -
  • -
  • -
    - - - - power(_:modulus:) - -
    -
    -
    -
    -
    -
    -

    Returns the remainder of this integer raised to the power exponent in modulo arithmetic under modulus.

    - -

    Uses the right-to-left binary method.

    -
    -

    Complexity

    - O(exponent.count * modulus.count^log2(3)) or somesuch - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func power(_ exponent: BigInt, modulus: BigInt) -> BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(exactly:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init?<T>(exactly source: T) where T : BinaryFloatingPoint
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init<T>(_ source: T) where T : BinaryFloatingPoint
    - -
    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Returns the greatest common divisor of a and b.

    -
    -

    Complexity

    - O(count^2) where count = max(a.count, b.count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func greatestCommonDivisor(with b: BigInt) -> BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - inverse(_:) - -
    -
    -
    -
    -
    -
    -

    Returns the multiplicative inverse of this integer in modulo modulus arithmetic, -or nil if there is no such number.

    -
    -

    Requires

    - modulus.magnitude > 1 - -
    -

    Complexity

    - O(count^3) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func inverse(_ modulus: BigInt) -> BigInt?
    - -
    -
    -
    -

    Return Value

    -

    If gcd(self, modulus) == 1, the value returned is an integer a < modulus such that (a * self) % modulus == 1. If self and modulus aren’t coprime, the return value is nil.

    -
    - -
    -
    -
  • -
  • -
    - - - - hash(into:) - -
    -
    -
    -
    -
    -
    -

    Append this BigInt to the specified hasher.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func hash(into hasher: inout Hasher)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init() - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init()
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Initializes a new signed big integer with the same value as the specified unsigned big integer.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ integer: BigUInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init<T>(_ source: T) where T : BinaryInteger
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(exactly:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init?<T>(exactly source: T) where T : BinaryInteger
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(clamping:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init<T>(clamping source: T) where T : BinaryInteger
    - -
    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init<T>(truncatingIfNeeded source: T) where T : BinaryInteger
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(integerLiteral:) - -
    -
    -
    -
    -
    -
    -

    Initialize a new big integer from an integer literal.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(integerLiteral value: Int64)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - *(_:_:) - -
    -
    -
    -
    -
    -
    -

    Multiply a with b and return the result.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func * (a: BigInt, b: BigInt) -> BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - *=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Multiply a with b in place.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func *= (a: inout BigInt, b: BigInt)
    - -
    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

Primality Testing

-

-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    Returns true iff this integer passes the strong probable prime test for the specified base.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func isStrongProbablePrime(_ base: BigInt) -> Bool
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - isPrime(rounds:) - -
    -
    -
    -
    -
    -
    -

    Returns true if this integer is probably prime. Returns false if this integer is definitely not prime.

    - -

    This function performs a probabilistic Miller-Rabin Primality Test, consisting of rounds iterations, -each calculating the strong probable prime test for a random base. The number of rounds is 10 by default, -but you may specify your own choice.

    - -

    To speed things up, the function checks if self is divisible by the first few prime numbers before -diving into (slower) Miller-Rabin testing.

    - -

    Also, when self is less than 82 bits wide, isPrime does a deterministic test that is guaranteed to -return a correct result.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func isPrime(rounds: Int = 10) -> Bool
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - &<<(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func &<< (left: BigInt, right: BigInt) -> BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - &<<=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func &<<= (left: inout BigInt, right: BigInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - &>>(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func &>> (left: BigInt, right: BigInt) -> BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - &>>=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func &>>= (left: inout BigInt, right: BigInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - <<(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func << <Other>(lhs: BigInt, rhs: Other) -> BigInt where Other : BinaryInteger
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - <<=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func <<= <Other>(lhs: inout BigInt, rhs: Other) where Other : BinaryInteger
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - >>(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func >> <Other>(lhs: BigInt, rhs: Other) -> BigInt where Other : BinaryInteger
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - >>=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func >>= <Other>(lhs: inout BigInt, rhs: Other) where Other : BinaryInteger
    - -
    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

Square Root

-

-
-
-
    -
  • -
    - - - - squareRoot() - -
    -
    -
    -
    -
    -
    -

    Returns the integer square root of a big integer; i.e., the largest integer whose square isn’t greater than value.

    -
    -

    Requires

    - self >= 0 - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func squareRoot() -> BigInt
    - -
    -
    -
    -

    Return Value

    -

    floor(sqrt(self))

    -
    - -
    -
    -
  • -
  • -
    - - - - Stride - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public typealias Stride = BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - advanced(by:) - -
    -
    -
    -
    -
    -
    -

    Returns self + n.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func advanced(by n: Stride) -> BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - distance(to:) - -
    -
    -
    -
    -
    -
    -

    Returns other - self.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func distance(to other: BigInt) -> Stride
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(_:radix:) - -
    -
    -
    -
    -
    -
    -

    Initialize a big integer from an ASCII representation in a given radix. Numerals above 9 are represented by -letters from the English alphabet.

    -
    -

    Requires

    - radix > 1 && radix < 36 - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init?<S>(_ text: S, radix: Int = 10) where S : StringProtocol
    - -
    -
    -
    -

    Return Value

    -

    The integer represented by text, or nil if text contains a character that does not represent a numeral in radix.

    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Initialize a new big integer from a Unicode scalar. -The scalar must represent a decimal digit.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(unicodeScalarLiteral value: UnicodeScalar)
    - -
    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Initialize a new big integer from an extended grapheme cluster. -The cluster must consist of a decimal digit.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(extendedGraphemeClusterLiteral value: String)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(stringLiteral:) - -
    -
    -
    -
    -
    -
    -

    Initialize a new big integer from a decimal number represented by a string literal of arbitrary length. -The string must contain only decimal digits.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(stringLiteral value: StringLiteralType)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - description - -
    -
    -
    -
    -
    -
    -

    Return the decimal representation of this integer.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var description: String { get }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - playgroundDescription - -
    -
    -
    -
    -
    -
    -

    Return the playground quick look representation of this integer.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var playgroundDescription: Any { get }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - negate() - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func negate()
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - -(_:_:) - -
    -
    -
    -
    -
    -
    -

    Subtract b from a and return the result.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func - (a: BigInt, b: BigInt) -> BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - -=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Subtract b from a in place.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func -= (a: inout BigInt, b: BigInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - bitWidth - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bitWidth: Int { get }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - trailingZeroBitCount - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var trailingZeroBitCount: Int { get }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - Words - -
    -
    -
    -
    -
    -
    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct Words : RandomAccessCollection
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - words - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var words: Words { get }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(words:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init<S>(words: S) where S : Sequence, S.Element == BigInt.Word
    - -
    -
    - -
    -
    -
  • -
-
-
-
- -
-
- - - - diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs/BigInt/Sign.html b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs/BigInt/Sign.html deleted file mode 100644 index 93984a5b3..000000000 --- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs/BigInt/Sign.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - Sign Enumeration Reference - - - - - - - - - - - - - - - - -
-

- - BigInt v5.2.1 Docs - - (85% documented) -

- -

-

- -
-

- -

- - - View on GitHub - -

- -

- - - Install in Dash - -

-
- - - -
- -
- -
-
-

Sign

-
-
- -
public enum Sign
- -
-
-

Undocumented

- - -
-
- -
-
-
-
    -
  • -
    - - - - plus - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case plus
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - minus - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case minus
    - -
    -
    - -
    -
    -
  • -
-
-
-
- -
-
- - - - diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs/BigInt/Words.html b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs/BigInt/Words.html deleted file mode 100644 index d070e5056..000000000 --- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs/BigInt/Words.html +++ /dev/null @@ -1,302 +0,0 @@ - - - - Words Structure Reference - - - - - - - - - - - - - - - - -
-

- - BigInt v5.2.1 Docs - - (85% documented) -

- -

-

- -
-

- -

- - - View on GitHub - -

- -

- - - Install in Dash - -

-
- - - -
- -
- -
-
-

Words

-
-
- -
public struct Words : RandomAccessCollection
- -
-
- - -
-
- -
-
-
-
    -
  • -
    - - - - Indices - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public typealias Indices = CountableRange<Int>
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - count - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var count: Int { get }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - indices - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var indices: Indices { get }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - startIndex - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var startIndex: Int { get }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - endIndex - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var endIndex: Int { get }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - subscript(_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public subscript(index: Int) -> UInt { get }
    - -
    -
    - -
    -
    -
  • -
-
-
-
- -
-
- - - - diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs/BigUInt.html b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs/BigUInt.html deleted file mode 100644 index 5d164ca90..000000000 --- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs/BigUInt.html +++ /dev/null @@ -1,3220 +0,0 @@ - - - - BigUInt Structure Reference - - - - - - - - - - - - - - - - -
-

- - BigInt v5.2.1 Docs - - (85% documented) -

- -

-

- -
-

- -

- - - View on GitHub - -

- -

- - - Install in Dash - -

-
- - - -
- -
- -
-
-

BigUInt

-
-
- -
public struct BigUInt : UnsignedInteger
-
extension BigUInt: Codable
-
extension BigUInt: Comparable
-
extension BigUInt: Hashable
-
extension BigUInt: ExpressibleByIntegerLiteral
-
extension BigUInt: Strideable
-
extension BigUInt: ExpressibleByStringLiteral
-
extension BigUInt: CustomStringConvertible
-
extension BigUInt: CustomPlaygroundDisplayConvertible
- -
-
-

An arbitary precision unsigned integer type, also known as a “big integer”.

- -

Operations on big integers never overflow, but they may take a long time to execute. -The amount of memory (and address space) available is the only constraint to the magnitude of these numbers.

- -

This particular big integer type uses base-2^64 digits to represent integers; you can think of it as a wrapper -around Array<UInt64>. (In fact, BigUInt only uses an array if there are more than two digits.)

- - -
-
- -
-
-
-
    -
  • -
    - - - - Word - -
    -
    -
    -
    -
    -
    -

    The type representing a digit in BigUInt‘s underlying number system.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public typealias Word = UInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init() - -
    -
    -
    -
    -
    -
    -

    Initializes a new BigUInt with value 0.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init()
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(words:) - -
    -
    -
    -
    -
    -
    -

    Initializes a new BigUInt with the specified digits. The digits are ordered from least to most significant.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(words: [Word])
    - -
    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

Addition

-

-
-
-
    -
  • -
    - - - - +(_:_:) - -
    -
    -
    -
    -
    -
    -

    Add a and b together and return the result.

    -
    -

    Complexity

    - O(max(a.count, b.count)) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func + (a: BigUInt, b: BigUInt) -> BigUInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - +=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Add a and b together, and store the sum in a.

    -
    -

    Complexity

    - O(max(a.count, b.count)) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func += (a: inout BigUInt, b: BigUInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - isSigned - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static var isSigned: Bool { get }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - signum() - -
    -
    -
    -
    -
    -
    -

    Returns 1 if this value is, positive; otherwise, 0.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func signum() -> BigUInt
    - -
    -
    -
    -

    Return Value

    -

    The sign of this number, expressed as an integer of the same type.

    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

Bitwise Operations

-

-
-
-
    -
  • -
    - - - - ~(_:) - -
    -
    -
    -
    -
    -
    -

    Return the ones’ complement of a.

    -
    -

    Complexity

    - O(a.count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public prefix static func ~ (a: BigUInt) -> BigUInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - |=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Calculate the bitwise OR of a and b, and store the result in a.

    -
    -

    Complexity

    - O(max(a.count, b.count)) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func |= (a: inout BigUInt, b: BigUInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - &=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Calculate the bitwise AND of a and b and return the result.

    -
    -

    Complexity

    - O(max(a.count, b.count)) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func &= (a: inout BigUInt, b: BigUInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - ^=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Calculate the bitwise XOR of a and b and return the result.

    -
    -

    Complexity

    - O(max(a.count, b.count)) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func ^= (a: inout BigUInt, b: BigUInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to encoder: Encoder) throws
    - -
    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

Comparison

-

-
-
-
    -
  • -
    - - - - compare(_:_:) - -
    -
    -
    -
    -
    -
    -

    Compare a to b and return an NSComparisonResult indicating their order.

    -
    -

    Complexity

    - O(count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func compare(_ a: BigUInt, _ b: BigUInt) -> ComparisonResult
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - ==(_:_:) - -
    -
    -
    -
    -
    -
    -

    Return true iff a is equal to b.

    -
    -

    Complexity

    - O(count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func == (a: BigUInt, b: BigUInt) -> Bool
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - <(_:_:) - -
    -
    -
    -
    -
    -
    -

    Return true iff a is less than b.

    -
    -

    Complexity

    - O(count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func < (a: BigUInt, b: BigUInt) -> Bool
    - -
    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

NSData Conversion

-

-
-
-
    -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Initialize a BigInt from bytes accessed from an UnsafeRawBufferPointer

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ buffer: UnsafeRawBufferPointer)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Initializes an integer from the bits stored inside a piece of Data. -The data is assumed to be in network (big-endian) byte order.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ data: Data)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - serialize() - -
    -
    -
    -
    -
    -
    -

    Return a Data value that contains the base-256 representation of this integer, in network (big-endian) byte order.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func serialize() -> Data
    - -
    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

Division

-

-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    Divide this integer by y and return the resulting quotient and remainder.

    -
    -

    Requires

    - y > 0 - -
    -

    Complexity

    - O(count^2) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func quotientAndRemainder(dividingBy y: BigUInt) -> (quotient: BigUInt, remainder: BigUInt)
    - -
    -
    -
    -

    Return Value

    -

    (quotient, remainder) where quotient = floor(self/y), remainder = self - quotient * y

    -
    - -
    -
    -
  • -
  • -
    - - - - /(_:_:) - -
    -
    -
    -
    -
    -
    -

    Divide x by y and return the quotient.

    -
    -

    Note

    - Use divided(by:) if you also need the remainder. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func / (x: BigUInt, y: BigUInt) -> BigUInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - %(_:_:) - -
    -
    -
    -
    -
    -
    -

    Divide x by y and return the remainder.

    -
    -

    Note

    - Use divided(by:) if you also need the remainder. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func % (x: BigUInt, y: BigUInt) -> BigUInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - /=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Divide x by y and store the quotient in x.

    -
    -

    Note

    - Use divided(by:) if you also need the remainder. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func /= (x: inout BigUInt, y: BigUInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - %=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Divide x by y and store the remainder in x.

    -
    -

    Note

    - Use divided(by:) if you also need the remainder. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func %= (x: inout BigUInt, y: BigUInt)
    - -
    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

Exponentiation

-

-
-
-
    -
  • -
    - - - - power(_:) - -
    -
    -
    -
    -
    -
    -

    Returns this integer raised to the power exponent.

    - -

    This function calculates the result by successively squaring the base while halving the exponent.

    -
    -

    Note

    - This function can be unreasonably expensive for large exponents, which is why exponent is - a simple integer value. If you want to calculate big exponents, you’ll probably need to use - the modulo arithmetic variant. - -
    -

    See also

    - BigUInt.power(_:, modulus:) - -
    -

    Complexity

    - O((exponent * self.count)^log2(3)) or somesuch. The result may require a large amount of memory, too. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func power(_ exponent: Int) -> BigUInt
    - -
    -
    -
    -

    Return Value

    -

    1 if exponent == 0, otherwise self raised to exponent. (This implies that 0.power(0) == 1.)

    -
    - -
    -
    -
  • -
  • -
    - - - - power(_:modulus:) - -
    -
    -
    -
    -
    -
    -

    Returns the remainder of this integer raised to the power exponent in modulo arithmetic under modulus.

    - -

    Uses the right-to-left binary method.

    -
    -

    Complexity

    - O(exponent.count * modulus.count^log2(3)) or somesuch - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func power(_ exponent: BigUInt, modulus: BigUInt) -> BigUInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(exactly:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init?<T>(exactly source: T) where T : BinaryFloatingPoint
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init<T>(_ source: T) where T : BinaryFloatingPoint
    - -
    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

Greatest Common Divisor

-

-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    Returns the greatest common divisor of self and b.

    -
    -

    Complexity

    - O(count^2) where count = max(self.count, b.count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func greatestCommonDivisor(with b: BigUInt) -> BigUInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - inverse(_:) - -
    -
    -
    -
    -
    -
    -

    Returns the multiplicative inverse of this integer in modulo modulus arithmetic, -or nil if there is no such number.

    -
    -

    Requires

    - modulus > 1 - -
    -

    Complexity

    - O(count^3) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func inverse(_ modulus: BigUInt) -> BigUInt?
    - -
    -
    -
    -

    Return Value

    -

    If gcd(self, modulus) == 1, the value returned is an integer a < modulus such that (a * self) % modulus == 1. If self and modulus aren’t coprime, the return value is nil.

    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

Hashing

-

-
-
-
    -
  • -
    - - - - hash(into:) - -
    -
    -
    -
    -
    -
    -

    Append this BigUInt to the specified hasher.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func hash(into hasher: inout Hasher)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(exactly:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init?<T>(exactly source: T) where T : BinaryInteger
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init<T>(_ source: T) where T : BinaryInteger
    - -
    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init<T>(truncatingIfNeeded source: T) where T : BinaryInteger
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(clamping:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init<T>(clamping source: T) where T : BinaryInteger
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(integerLiteral:) - -
    -
    -
    -
    -
    -
    -

    Initialize a new big integer from an integer literal.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(integerLiteral value: UInt64)
    - -
    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

Multiplication

-

-
-
-
    -
  • -
    - - - - multiply(byWord:) - -
    -
    -
    -
    -
    -
    -

    Multiply this big integer by a single word, and store the result in place of the original big integer.

    -
    -

    Complexity

    - O(count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func multiply(byWord y: Word)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - multiplied(byWord:) - -
    -
    -
    -
    -
    -
    -

    Multiply this big integer by a single Word, and return the result.

    -
    -

    Complexity

    - O(count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func multiplied(byWord y: Word) -> BigUInt
    - -
    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Multiply x by y, and add the result to this integer, optionally shifted shift words to the left.

    -
    -

    Note

    - This is the fused multiply/shift/add operation; it is more efficient than doing the components -individually. (The fused operation doesn’t need to allocate space for temporary big integers.) - -
    -

    Complexity

    - O(count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func multiplyAndAdd(_ x: BigUInt, _ y: Word, shiftedBy shift: Int = 0)
    - -
    -
    -
    -

    Return Value

    -

    self is set to self + (x * y) << (shift * 2^Word.bitWidth)

    -
    - -
    -
    -
  • -
  • -
    - - - - multiplied(by:) - -
    -
    -
    -
    -
    -
    -

    Multiply this integer by y and return the result.

    -
    -

    Note

    - This uses the naive O(n^2) multiplication algorithm unless both arguments have more than -BigUInt.directMultiplicationLimit words. - -
    -

    Complexity

    - O(n^log2(3)) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func multiplied(by y: BigUInt) -> BigUInt
    - -
    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Multiplication switches to an asymptotically better recursive algorithm when arguments have more words than this limit.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static var directMultiplicationLimit: Int
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - *(_:_:) - -
    -
    -
    -
    -
    -
    -

    Multiply a by b and return the result.

    -
    -

    Note

    - This uses the naive O(n^2) multiplication algorithm unless both arguments have more than -BigUInt.directMultiplicationLimit words. - -
    -

    Complexity

    - O(n^log2(3)) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func * (x: BigUInt, y: BigUInt) -> BigUInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - *=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Multiply a by b and store the result in a.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func *= (a: inout BigUInt, b: BigUInt)
    - -
    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

Primality Testing

-

-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    Returns true iff this integer passes the strong probable prime test for the specified base.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func isStrongProbablePrime(_ base: BigUInt) -> Bool
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - isPrime(rounds:) - -
    -
    -
    -
    -
    -
    -

    Returns true if this integer is probably prime. Returns false if this integer is definitely not prime.

    - -

    This function performs a probabilistic Miller-Rabin Primality Test, consisting of rounds iterations, -each calculating the strong probable prime test for a random base. The number of rounds is 10 by default, -but you may specify your own choice.

    - -

    To speed things up, the function checks if self is divisible by the first few prime numbers before -diving into (slower) Miller-Rabin testing.

    - -

    Also, when self is less than 82 bits wide, isPrime does a deterministic test that is guaranteed to -return a correct result.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func isPrime(rounds: Int = 10) -> Bool
    - -
    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Create a big unsigned integer consisting of width uniformly distributed random bits.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func randomInteger<RNG>(withMaximumWidth width: Int, using generator: inout RNG) -> BigUInt where RNG : RandomNumberGenerator
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - width - - -
    -

    The maximum number of one bits in the result.

    -
    -
    - - generator - - -
    -

    The source of randomness.

    -
    -
    -
    -
    -

    Return Value

    -

    A big unsigned integer less than 1 << width.

    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Create a big unsigned integer consisting of width uniformly distributed random bits.

    -
    -

    Note

    -

    I use a SystemRandomGeneratorGenerator as the source of randomness.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func randomInteger(withMaximumWidth width: Int) -> BigUInt
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - width - - -
    -

    The maximum number of one bits in the result.

    -
    -
    -
    -
    -

    Return Value

    -

    A big unsigned integer less than 1 << width.

    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Create a big unsigned integer consisting of width-1 uniformly distributed random bits followed by a one bit.

    -
    -

    Note

    -

    If width is zero, the result is zero.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func randomInteger<RNG>(withExactWidth width: Int, using generator: inout RNG) -> BigUInt where RNG : RandomNumberGenerator
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - width - - -
    -

    The number of bits required to represent the answer.

    -
    -
    - - generator - - -
    -

    The source of randomness.

    -
    -
    -
    -
    -

    Return Value

    -

    A random big unsigned integer whose width is width.

    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Create a big unsigned integer consisting of width-1 uniformly distributed random bits followed by a one bit.

    -
    -

    Note

    - If width is zero, the result is zero. - -
    -

    Note

    -

    I use a SystemRandomGeneratorGenerator as the source of randomness.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func randomInteger(withExactWidth width: Int) -> BigUInt
    - -
    -
    -
    -

    Return Value

    -

    A random big unsigned integer whose width is width.

    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Create a uniformly distributed random unsigned integer that’s less than the specified limit.

    -
    -

    Precondition

    -

    limit > 0.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func randomInteger<RNG>(lessThan limit: BigUInt, using generator: inout RNG) -> BigUInt where RNG : RandomNumberGenerator
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - limit - - -
    -

    The upper bound on the result.

    -
    -
    - - generator - - -
    -

    The source of randomness.

    -
    -
    -
    -
    -

    Return Value

    -

    A random big unsigned integer that is less than limit.

    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Create a uniformly distributed random unsigned integer that’s less than the specified limit.

    -
    -

    Precondition

    - limit > 0. - -
    -

    Note

    -

    I use a SystemRandomGeneratorGenerator as the source of randomness.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func randomInteger(lessThan limit: BigUInt) -> BigUInt
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - limit - - -
    -

    The upper bound on the result.

    -
    -
    -
    -
    -

    Return Value

    -

    A random big unsigned integer that is less than limit.

    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

Shift Operators

-

-
-
-
    -
  • -
    - - - - >>=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func >>= <Other>(lhs: inout BigUInt, rhs: Other) where Other : BinaryInteger
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - <<=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func <<= <Other>(lhs: inout BigUInt, rhs: Other) where Other : BinaryInteger
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - >>(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func >> <Other>(lhs: BigUInt, rhs: Other) -> BigUInt where Other : BinaryInteger
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - <<(_:_:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func << <Other>(lhs: BigUInt, rhs: Other) -> BigUInt where Other : BinaryInteger
    - -
    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

Square Root

-

-
-
-
    -
  • -
    - - - - squareRoot() - -
    -
    -
    -
    -
    -
    -

    Returns the integer square root of a big integer; i.e., the largest integer whose square isn’t greater than value.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func squareRoot() -> BigUInt
    - -
    -
    -
    -

    Return Value

    -

    floor(sqrt(self))

    -
    - -
    -
    -
  • -
  • -
    - - - - Stride - -
    -
    -
    -
    -
    -
    -

    A type that can represent the distance between two values ofa BigUInt.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public typealias Stride = BigInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - advanced(by:) - -
    -
    -
    -
    -
    -
    -

    Adds n to self and returns the result. Traps if the result would be less than zero.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func advanced(by n: BigInt) -> BigUInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - distance(to:) - -
    -
    -
    -
    -
    -
    -

    Returns the (potentially negative) difference between self and other as a BigInt. Never traps.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func distance(to other: BigUInt) -> BigInt
    - -
    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

String Conversion

-

-
-
-
    -
  • -
    - - - - init(_:radix:) - -
    -
    -
    -
    -
    -
    -

    Initialize a big integer from an ASCII representation in a given radix. Numerals above 9 are represented by -letters from the English alphabet.

    -
    -

    Requires

    - radix > 1 && radix < 36 - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init?<S>(_ text: S, radix: Int = 10) where S : StringProtocol
    - -
    -
    -
    -

    Return Value

    -

    The integer represented by text, or nil if text contains a character that does not represent a numeral in radix.

    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Initialize a new big integer from a Unicode scalar. -The scalar must represent a decimal digit.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(unicodeScalarLiteral value: UnicodeScalar)
    - -
    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Initialize a new big integer from an extended grapheme cluster. -The cluster must consist of a decimal digit.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(extendedGraphemeClusterLiteral value: String)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(stringLiteral:) - -
    -
    -
    -
    -
    -
    -

    Initialize a new big integer from a decimal number represented by a string literal of arbitrary length. -The string must contain only decimal digits.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(stringLiteral value: StringLiteralType)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - description - -
    -
    -
    -
    -
    -
    -

    Return the decimal representation of this integer.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var description: String { get }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - playgroundDescription - -
    -
    -
    -
    -
    -
    -

    Return the playground quick look representation of this integer.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var playgroundDescription: Any { get }
    - -
    -
    - -
    -
    -
  • -
-
-
-
- - -
- -

Subtraction

-

-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    Subtract other from this integer in place, and return a flag indicating if the operation caused an -arithmetic overflow. other is shifted shift digits to the left before being subtracted.

    -
    -

    Note

    - If the result indicates an overflow, then self becomes the twos’ complement of the absolute difference. - -
    -

    Complexity

    - O(count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func subtractReportingOverflow(_ b: BigUInt, shiftedBy shift: Int = 0) -> Bool
    - -
    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Subtract other from this integer, returning the difference and a flag indicating arithmetic overflow. -other is shifted shift digits to the left before being subtracted.

    -
    -

    Note

    - If overflow is true, then the result value is the twos’ complement of the absolute value of the difference. - -
    -

    Complexity

    - O(count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func subtractingReportingOverflow(_ other: BigUInt, shiftedBy shift: Int) -> (partialValue: BigUInt, overflow: Bool)
    - -
    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Subtracts other from self, returning the result and a flag indicating arithmetic overflow.

    -
    -

    Note

    - When the operation overflows, then partialValue is the twos’ complement of the absolute value of the difference. - -
    -

    Complexity

    - O(count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func subtractingReportingOverflow(_ other: BigUInt) -> (partialValue: BigUInt, overflow: Bool)
    - -
    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Subtract other from this integer in place. -other is shifted shift digits to the left before being subtracted.

    -
    -

    Requires

    - self >= other * 2^shift - -
    -

    Complexity

    - O(count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func subtract(_ other: BigUInt, shiftedBy shift: Int = 0)
    - -
    -
    - -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Subtract b from this integer, and return the difference. -b is shifted shift digits to the left before being subtracted.

    -
    -

    Requires

    - self >= b * 2^shift - -
    -

    Complexity

    - O(count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func subtracting(_ other: BigUInt, shiftedBy shift: Int = 0) -> BigUInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - decrement(shiftedBy:) - -
    -
    -
    -
    -
    -
    -

    Decrement this integer by one.

    -
    -

    Requires

    - !isZero - -
    -

    Complexity

    - O(count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func decrement(shiftedBy shift: Int = 0)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - -(_:_:) - -
    -
    -
    -
    -
    -
    -

    Subtract b from a and return the result.

    -
    -

    Requires

    - a >= b - -
    -

    Complexity

    - O(a.count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func - (a: BigUInt, b: BigUInt) -> BigUInt
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - -=(_:_:) - -
    -
    -
    -
    -
    -
    -

    Subtract b from a and store the result in a.

    -
    -

    Requires

    - a >= b - -
    -

    Complexity

    - O(a.count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func -= (a: inout BigUInt, b: BigUInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - subscript(bitAt:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public subscript(bitAt index: Int) -> Bool { get set }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - bitWidth - -
    -
    -
    -
    -
    -
    -

    The minimum number of bits required to represent this integer in binary.

    -
    -

    Complexity

    - O(1) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bitWidth: Int { get }
    - -
    -
    -
    -

    Return Value

    -

    floor(log2(2 * self + 1))

    -
    - -
    -
    -
  • -
  • -
    - - - - leadingZeroBitCount - -
    -
    -
    -
    -
    -
    -

    The number of leading zero bits in the binary representation of this integer in base 2^(Word.bitWidth). -This is useful when you need to normalize a BigUInt such that the top bit of its most significant word is 1.

    -
    -

    Note

    - 0 is considered to have zero leading zero bits. - -
    -

    See also

    - width - -
    -

    Complexity

    - O(1) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var leadingZeroBitCount: Int { get }
    - -
    -
    -
    -

    Return Value

    -

    A value in 0...(Word.bitWidth - 1).

    -
    - -
    -
    -
  • -
  • -
    - - - - trailingZeroBitCount - -
    -
    -
    -
    -
    -
    -

    The number of trailing zero bits in the binary representation of this integer.

    -
    -

    Note

    - 0 is considered to have zero trailing zero bits. - -
    -

    Complexity

    - O(count) - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var trailingZeroBitCount: Int { get }
    - -
    -
    -
    -

    Return Value

    -

    A value in 0...width.

    -
    - -
    -
    -
  • -
  • -
    - - - - Words - -
    -
    -
    -
    -
    -
    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct Words : RandomAccessCollection
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - words - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var words: Words { get }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(words:) - -
    -
    -
    -
    -
    -
    -

    Undocumented

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init<Words>(words: Words) where Words : Sequence, Words.Element == BigUInt.Word
    - -
    -
    - -
    -
    -
  • -
-
-
-
- -
-
- - - - diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs/BigUInt/Words.html b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs/BigUInt/Words.html deleted file mode 100644 index 0c13a2f7a..000000000 --- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs/BigUInt/Words.html +++ /dev/null @@ -1,215 +0,0 @@ - - - - Words Structure Reference - - - - - - - - - - - - - - - - -
-

- - BigInt v5.2.1 Docs - - (85% documented) -

- -

-

- -
-

- -

- - - View on GitHub - -

- -

- - - Install in Dash - -

-
- - - -
- -
- -
-
-

Words

-
-
- -
public struct Words : RandomAccessCollection
- -
-
- - -
-
- -
-
-
-
    -
  • -
    - - - - startIndex - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var startIndex: Int { get }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - endIndex - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var endIndex: Int { get }
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - subscript(_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public subscript(index: Int) -> Word { get }
    - -
    -
    - -
    -
    -
  • -
-
-
-
- -
-
- - - - diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/css/highlight.css b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/css/highlight.css deleted file mode 100644 index d0db0e13b..000000000 --- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/css/highlight.css +++ /dev/null @@ -1,200 +0,0 @@ -/* Credit to https://gist.github.com/wataru420/2048287 */ -.highlight { - /* Comment */ - /* Error */ - /* Keyword */ - /* Operator */ - /* Comment.Multiline */ - /* Comment.Preproc */ - /* Comment.Single */ - /* Comment.Special */ - /* Generic.Deleted */ - /* Generic.Deleted.Specific */ - /* Generic.Emph */ - /* Generic.Error */ - /* Generic.Heading */ - /* Generic.Inserted */ - /* Generic.Inserted.Specific */ - /* Generic.Output */ - /* Generic.Prompt */ - /* Generic.Strong */ - /* Generic.Subheading */ - /* Generic.Traceback */ - /* Keyword.Constant */ - /* Keyword.Declaration */ - /* Keyword.Pseudo */ - /* Keyword.Reserved */ - /* Keyword.Type */ - /* Literal.Number */ - /* Literal.String */ - /* Name.Attribute */ - /* Name.Builtin */ - /* Name.Class */ - /* Name.Constant */ - /* Name.Entity */ - /* Name.Exception */ - /* Name.Function */ - /* Name.Namespace */ - /* Name.Tag */ - /* Name.Variable */ - /* Operator.Word */ - /* Text.Whitespace */ - /* Literal.Number.Float */ - /* Literal.Number.Hex */ - /* Literal.Number.Integer */ - /* Literal.Number.Oct */ - /* Literal.String.Backtick */ - /* Literal.String.Char */ - /* Literal.String.Doc */ - /* Literal.String.Double */ - /* Literal.String.Escape */ - /* Literal.String.Heredoc */ - /* Literal.String.Interpol */ - /* Literal.String.Other */ - /* Literal.String.Regex */ - /* Literal.String.Single */ - /* Literal.String.Symbol */ - /* Name.Builtin.Pseudo */ - /* Name.Variable.Class */ - /* Name.Variable.Global */ - /* Name.Variable.Instance */ - /* Literal.Number.Integer.Long */ } - .highlight .c { - color: #999988; - font-style: italic; } - .highlight .err { - color: #a61717; - background-color: #e3d2d2; } - .highlight .k { - color: #000000; - font-weight: bold; } - .highlight .o { - color: #000000; - font-weight: bold; } - .highlight .cm { - color: #999988; - font-style: italic; } - .highlight .cp { - color: #999999; - font-weight: bold; } - .highlight .c1 { - color: #999988; - font-style: italic; } - .highlight .cs { - color: #999999; - font-weight: bold; - font-style: italic; } - .highlight .gd { - color: #000000; - background-color: #ffdddd; } - .highlight .gd .x { - color: #000000; - background-color: #ffaaaa; } - .highlight .ge { - color: #000000; - font-style: italic; } - .highlight .gr { - color: #aa0000; } - .highlight .gh { - color: #999999; } - .highlight .gi { - color: #000000; - background-color: #ddffdd; } - .highlight .gi .x { - color: #000000; - background-color: #aaffaa; } - .highlight .go { - color: #888888; } - .highlight .gp { - color: #555555; } - .highlight .gs { - font-weight: bold; } - .highlight .gu { - color: #aaaaaa; } - .highlight .gt { - color: #aa0000; } - .highlight .kc { - color: #000000; - font-weight: bold; } - .highlight .kd { - color: #000000; - font-weight: bold; } - .highlight .kp { - color: #000000; - font-weight: bold; } - .highlight .kr { - color: #000000; - font-weight: bold; } - .highlight .kt { - color: #445588; } - .highlight .m { - color: #009999; } - .highlight .s { - color: #d14; } - .highlight .na { - color: #008080; } - .highlight .nb { - color: #0086B3; } - .highlight .nc { - color: #445588; - font-weight: bold; } - .highlight .no { - color: #008080; } - .highlight .ni { - color: #800080; } - .highlight .ne { - color: #990000; - font-weight: bold; } - .highlight .nf { - color: #990000; } - .highlight .nn { - color: #555555; } - .highlight .nt { - color: #000080; } - .highlight .nv { - color: #008080; } - .highlight .ow { - color: #000000; - font-weight: bold; } - .highlight .w { - color: #bbbbbb; } - .highlight .mf { - color: #009999; } - .highlight .mh { - color: #009999; } - .highlight .mi { - color: #009999; } - .highlight .mo { - color: #009999; } - .highlight .sb { - color: #d14; } - .highlight .sc { - color: #d14; } - .highlight .sd { - color: #d14; } - .highlight .s2 { - color: #d14; } - .highlight .se { - color: #d14; } - .highlight .sh { - color: #d14; } - .highlight .si { - color: #d14; } - .highlight .sx { - color: #d14; } - .highlight .sr { - color: #009926; } - .highlight .s1 { - color: #d14; } - .highlight .ss { - color: #990073; } - .highlight .bp { - color: #999999; } - .highlight .vc { - color: #008080; } - .highlight .vg { - color: #008080; } - .highlight .vi { - color: #008080; } - .highlight .il { - color: #009999; } diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/css/jazzy.css b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/css/jazzy.css deleted file mode 100644 index ff59f5f86..000000000 --- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/css/jazzy.css +++ /dev/null @@ -1,395 +0,0 @@ -*, *:before, *:after { - box-sizing: inherit; } - -body { - margin: 0; - background: #fff; - color: #333; - font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif; - letter-spacing: .2px; - -webkit-font-smoothing: antialiased; - box-sizing: border-box; } - -h1 { - font-size: 2rem; - font-weight: 700; - margin: 1.275em 0 0.6em; } - -h2 { - font-size: 1.75rem; - font-weight: 700; - margin: 1.275em 0 0.3em; } - -h3 { - font-size: 1.5rem; - font-weight: 700; - margin: 1em 0 0.3em; } - -h4 { - font-size: 1.25rem; - font-weight: 700; - margin: 1.275em 0 0.85em; } - -h5 { - font-size: 1rem; - font-weight: 700; - margin: 1.275em 0 0.85em; } - -h6 { - font-size: 1rem; - font-weight: 700; - margin: 1.275em 0 0.85em; - color: #777; } - -p { - margin: 0 0 1em; } - -ul, ol { - padding: 0 0 0 2em; - margin: 0 0 0.85em; } - -blockquote { - margin: 0 0 0.85em; - padding: 0 15px; - color: #858585; - border-left: 4px solid #e5e5e5; } - -img { - max-width: 100%; } - -a { - color: #4183c4; - text-decoration: none; } - a:hover, a:focus { - outline: 0; - text-decoration: underline; } - a.discouraged { - text-decoration: line-through; } - a.discouraged:hover, a.discouraged:focus { - text-decoration: underline line-through; } - -table { - background: #fff; - width: 100%; - border-collapse: collapse; - border-spacing: 0; - overflow: auto; - margin: 0 0 0.85em; } - -tr:nth-child(2n) { - background-color: #fbfbfb; } - -th, td { - padding: 6px 13px; - border: 1px solid #ddd; } - -pre { - margin: 0 0 1.275em; - padding: .85em 1em; - overflow: auto; - background: #f7f7f7; - font-size: .85em; - font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; } - -code { - font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; } - -.item-container p > code, .item-container li > code, .top-matter p > code, .top-matter li > code { - background: #f7f7f7; - padding: .2em; } - .item-container p > code:before, .item-container p > code:after, .item-container li > code:before, .item-container li > code:after, .top-matter p > code:before, .top-matter p > code:after, .top-matter li > code:before, .top-matter li > code:after { - letter-spacing: -.2em; - content: "\00a0"; } - -pre code { - padding: 0; - white-space: pre; } - -.content-wrapper { - display: flex; - flex-direction: column; } - @media (min-width: 768px) { - .content-wrapper { - flex-direction: row; } } -.header { - display: flex; - padding: 8px; - font-size: 0.875em; - background: #444; - color: #999; } - -.header-col { - margin: 0; - padding: 0 8px; } - -.header-col--primary { - flex: 1; } - -.header-link { - color: #fff; } - -.header-icon { - padding-right: 6px; - vertical-align: -4px; - height: 16px; } - -.breadcrumbs { - font-size: 0.875em; - padding: 8px 16px; - margin: 0; - background: #fbfbfb; - border-bottom: 1px solid #ddd; } - -.carat { - height: 10px; - margin: 0 5px; } - -.navigation { - order: 2; } - @media (min-width: 768px) { - .navigation { - order: 1; - width: 25%; - max-width: 300px; - padding-bottom: 64px; - overflow: hidden; - word-wrap: normal; - background: #fbfbfb; - border-right: 1px solid #ddd; } } -.nav-groups { - list-style-type: none; - padding-left: 0; } - -.nav-group-name { - border-bottom: 1px solid #ddd; - padding: 8px 0 8px 16px; } - -.nav-group-name-link { - color: #333; } - -.nav-group-tasks { - margin: 8px 0; - padding: 0 0 0 8px; } - -.nav-group-task { - font-size: 1em; - list-style-type: none; - white-space: nowrap; } - -.nav-group-task-link { - color: #808080; } - -.main-content { - order: 1; } - @media (min-width: 768px) { - .main-content { - order: 2; - flex: 1; - padding-bottom: 60px; } } -.section { - padding: 0 32px; - border-bottom: 1px solid #ddd; } - -.section-content { - max-width: 834px; - margin: 0 auto; - padding: 16px 0; } - -.section-name { - color: #666; - display: block; } - .section-name p { - margin-bottom: inherit; } - -.declaration .highlight { - overflow-x: initial; - padding: 8px 0; - margin: 0; - background-color: transparent; - border: none; } - -.task-group-section { - border-top: 1px solid #ddd; } - -.task-group { - padding-top: 0px; } - -.task-name-container a[name]:before { - content: ""; - display: block; } - -.section-name-container { - position: relative; } - .section-name-container .section-name-link { - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - margin-bottom: 0; } - .section-name-container .section-name { - position: relative; - pointer-events: none; - z-index: 1; } - .section-name-container .section-name a { - pointer-events: auto; } - -.item-container { - padding: 0; } - -.item { - padding-top: 8px; - width: 100%; - list-style-type: none; } - .item a[name]:before { - content: ""; - display: block; } - .item .token, .item .direct-link { - display: inline-block; - text-indent: -20px; - padding-left: 3px; - margin-left: 20px; - font-size: 1rem; } - .item .declaration-note { - font-size: .85em; - color: #808080; - font-style: italic; } - -.pointer-container { - border-bottom: 1px solid #ddd; - left: -23px; - padding-bottom: 13px; - position: relative; - width: 110%; } - -.pointer { - left: 21px; - top: 7px; - display: block; - position: absolute; - width: 12px; - height: 12px; - border-left: 1px solid #ddd; - border-top: 1px solid #ddd; - background: #fff; - transform: rotate(45deg); } - -.height-container { - display: none; - position: relative; - width: 100%; - overflow: hidden; } - .height-container .section { - background: #fff; - border: 1px solid #ddd; - border-top-width: 0; - padding-top: 10px; - padding-bottom: 5px; - padding: 8px 16px; } - -.aside, .language { - padding: 6px 12px; - margin: 12px 0; - border-left: 5px solid #dddddd; - overflow-y: hidden; } - .aside .aside-title, .language .aside-title { - font-size: 9px; - letter-spacing: 2px; - text-transform: uppercase; - padding-bottom: 0; - margin: 0; - color: #aaa; - -webkit-user-select: none; } - .aside p:last-child, .language p:last-child { - margin-bottom: 0; } - -.language { - border-left: 5px solid #cde9f4; } - .language .aside-title { - color: #4183c4; } - -.aside-warning, .aside-deprecated, .aside-unavailable { - border-left: 5px solid #ff6666; } - .aside-warning .aside-title, .aside-deprecated .aside-title, .aside-unavailable .aside-title { - color: #ff0000; } - -.graybox { - border-collapse: collapse; - width: 100%; } - .graybox p { - margin: 0; - word-break: break-word; - min-width: 50px; } - .graybox td { - border: 1px solid #ddd; - padding: 5px 25px 5px 10px; - vertical-align: middle; } - .graybox tr td:first-of-type { - text-align: right; - padding: 7px; - vertical-align: top; - word-break: normal; - width: 40px; } - -.slightly-smaller { - font-size: 0.9em; } - -.footer { - padding: 8px 16px; - background: #444; - color: #ddd; - font-size: 0.8em; } - .footer p { - margin: 8px 0; } - .footer a { - color: #fff; } - -html.dash .header, html.dash .breadcrumbs, html.dash .navigation { - display: none; } - -html.dash .height-container { - display: block; } - -form[role=search] input { - font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 14px; - line-height: 24px; - padding: 0 10px; - margin: 0; - border: none; - border-radius: 1em; } - .loading form[role=search] input { - background: white url(../img/spinner.gif) center right 4px no-repeat; } - -form[role=search] .tt-menu { - margin: 0; - min-width: 300px; - background: #fbfbfb; - color: #333; - border: 1px solid #ddd; } - -form[role=search] .tt-highlight { - font-weight: bold; } - -form[role=search] .tt-suggestion { - font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif; - padding: 0 8px; } - form[role=search] .tt-suggestion span { - display: table-cell; - white-space: nowrap; } - form[role=search] .tt-suggestion .doc-parent-name { - width: 100%; - text-align: right; - font-weight: normal; - font-size: 0.9em; - padding-left: 16px; } - -form[role=search] .tt-suggestion:hover, -form[role=search] .tt-suggestion.tt-cursor { - cursor: pointer; - background-color: #4183c4; - color: #fff; } - -form[role=search] .tt-suggestion:hover .doc-parent-name, -form[role=search] .tt-suggestion.tt-cursor .doc-parent-name { - color: #fff; } diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/img/carat.png b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/img/carat.png deleted file mode 100755 index 29d2f7fd4..000000000 Binary files a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/img/carat.png and /dev/null differ diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/img/dash.png b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/img/dash.png deleted file mode 100755 index 6f694c7a0..000000000 Binary files a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/img/dash.png and /dev/null differ diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/img/gh.png b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/img/gh.png deleted file mode 100755 index 628da97c7..000000000 Binary files a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/img/gh.png and /dev/null differ diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/img/spinner.gif b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/img/spinner.gif deleted file mode 100644 index e3038d0a4..000000000 Binary files a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/img/spinner.gif and /dev/null differ diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/index.html b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/index.html deleted file mode 100644 index cb588bb2b..000000000 --- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/index.html +++ /dev/null @@ -1,493 +0,0 @@ - - - - BigInt Reference - - - - - - - - - - - - - - - -
-

- - BigInt v5.2.1 Docs - - (85% documented) -

- -

-

- -
-

- -

- - - View on GitHub - -

- -

- - - Install in Dash - -

-
- - - -
- -
- -
-
- -

BigInt

- - - -

Swift 5 -License -Platform

- -

Build Status -Code Coverage -jazzy -Carthage compatible -Version

-

Overview

- -

This repository provides integer types of arbitrary width implemented -in 100% pure Swift. The underlying representation is in base 2^64, using Array<UInt64>.

- -

This module is handy when you need an integer type that’s wider than UIntMax, but -you don’t want to add The GNU Multiple Precision Arithmetic Library -as a dependency.

- -

Two big integer types are included: BigUInt and BigInt, -the latter being the signed variant. -Both of these are Swift structs with copy-on-write value semantics, and they can be used much -like any other integer type.

- -

The library provides implementations for some of the most frequently useful functions on -big integers, including

- - - -

The implementations are intended to be reasonably efficient, but they are unlikely to be -competitive with GMP at all, even when I happened to implement an algorithm with same asymptotic -behavior as GMP. (I haven’t performed a comparison benchmark, though.)

- -

The library has 100% unit test coverage. Sadly this does not imply that there are no bugs -in it.

-

API Documentation

- -

Generated API docs are available at https://attaswift.github.io/BigInt/.

-

License

- -

BigInt can be used, distributed and modified under the MIT license.

-

Requirements and Integration

- -

BigInt 4.0.0 requires Swift 4.2 (The last version with support for Swift 3.x was BigInt 2.1.0. -The last version with support for Swift 2 was BigInt 1.3.0.)

- - - - - - - - - - - - - - - - - - - - - - - -
Swift Versionlast BigInt Version
3.x2.1.0
4.03.1.0
4.24.0.0
5.x5.2.1
- -

BigInt deploys to macOS 10.10, iOS 9, watchOS 2 and tvOS 9. -It has been tested on the latest OS releases only—however, as the module uses very few platform-provided APIs, -there should be very few issues with earlier versions.

- -

BigInt uses no APIs specific to Apple platforms, so -it should be easy to port it to other operating systems.

- -

Setup instructions:

- -
    -
  • Swift Package Manager: -Although the Package Manager is still in its infancy, BigInt provides experimental support for it. -Add this to the dependency section of your Package.swift manifest:

    -
    .package(url: "https://github.com/attaswift/BigInt.git", from: "5.2.1")
    -
  • -
  • CocoaPods: Put this in your Podfile:

    -
    pod 'BigInt', '~> 5.2'
    -
  • -
  • Carthage: Put this in your Cartfile:

    -
    github "attaswift/BigInt" ~> 5.2
    -
  • -
-

Implementation notes

- -

BigUInt is a MutableCollectionType of its 64-bit digits, with the least significant -digit at index 0. As a convenience, BigUInt allows you to subscript it with indexes at -or above its count. The subscript operator returns 0 for out-of-bound gets and -automatically extends the array on out-of-bound sets. This makes memory management simpler.

- -

BigInt is just a tiny wrapper around a BigUInt absolute value and a -sign bit, both of which are accessible as public read-write properties.

-

Why is there no generic BigInt<Digit> type?

- -

The types provided by BigInt are not parametric—this is very much intentional, as -Swift generics cost us dearly at runtime in this use case. In every approach I tried, -making arbitrary-precision arithmetic operations work with a generic Digit type parameter -resulted in code that was literally ten times slower. If you can make the algorithms generic -without such a huge performance hit, please enlighten me!

- -

This is an area that I plan to investigate more, as it would be useful to have generic -implementations for arbitrary-width arithmetic operations. (Polynomial division and decimal bases -are two examples.) The library already implements double-digit multiplication and division as -extension methods on a protocol with an associated type requirement; this has not measurably affected -performance. Unfortunately, the same is not true for BigUInt‘s methods.

- -

Of course, as a last resort, we could just duplicate the code to create a separate -generic variant that was slower but more flexible.

-

Calculation Samples

-

Obligatory Factorial Demo

- -

It is easy to use BigInt to calculate the factorial function for any integer:

-
import BigInt
-
-func factorial(_ n: Int) -> BigInt {
-    return (1 ... n).map { BigInt($0) }.reduce(BigInt(1), *)
-}
-
-print(factorial(10))
-==> 362880
-
-print(factorial(100))
-==> 93326215443944152681699238856266700490715968264381621468592963895217599993229915
-    6089414639761565182862536979208272237582511852109168640000000000000000000000
-
-print(factorial(1000))
-==> 40238726007709377354370243392300398571937486421071463254379991042993851239862902
-    05920442084869694048004799886101971960586316668729948085589013238296699445909974
-    24504087073759918823627727188732519779505950995276120874975462497043601418278094
-    64649629105639388743788648733711918104582578364784997701247663288983595573543251
-    31853239584630755574091142624174743493475534286465766116677973966688202912073791
-    43853719588249808126867838374559731746136085379534524221586593201928090878297308
-    43139284440328123155861103697680135730421616874760967587134831202547858932076716
-    91324484262361314125087802080002616831510273418279777047846358681701643650241536
-    91398281264810213092761244896359928705114964975419909342221566832572080821333186
-    11681155361583654698404670897560290095053761647584772842188967964624494516076535
-    34081989013854424879849599533191017233555566021394503997362807501378376153071277
-    61926849034352625200015888535147331611702103968175921510907788019393178114194545
-    25722386554146106289218796022383897147608850627686296714667469756291123408243920
-    81601537808898939645182632436716167621791689097799119037540312746222899880051954
-    44414282012187361745992642956581746628302955570299024324153181617210465832036786
-    90611726015878352075151628422554026517048330422614397428693306169089796848259012
-    54583271682264580665267699586526822728070757813918581788896522081643483448259932
-    66043367660176999612831860788386150279465955131156552036093988180612138558600301
-    43569452722420634463179746059468257310379008402443243846565724501440282188525247
-    09351906209290231364932734975655139587205596542287497740114133469627154228458623
-    77387538230483865688976461927383814900140767310446640259899490222221765904339901
-    88601856652648506179970235619389701786004081188972991831102117122984590164192106
-    88843871218556461249607987229085192968193723886426148396573822911231250241866493
-    53143970137428531926649875337218940694281434118520158014123344828015051399694290
-    15348307764456909907315243327828826986460278986432113908350621709500259738986355
-    42771967428222487575867657523442202075736305694988250879689281627538488633969099
-    59826280956121450994871701244516461260379029309120889086942028510640182154399457
-    15680594187274899809425474217358240106367740459574178516082923013535808184009699
-    63725242305608559037006242712434169090041536901059339838357779394109700277534720
-    00000000000000000000000000000000000000000000000000000000000000000000000000000000
-    00000000000000000000000000000000000000000000000000000000000000000000000000000000
-    00000000000000000000000000000000000000000000000000000000000000000000000000000000
-    00000
-
- -

Well, I guess that’s all right, but it’s not very interesting. Let’s try something more useful.

-

RSA Cryptography

- -

The BigInt module provides all necessary parts to implement an (overly) -simple RSA cryptography system.

- -

Let’s start with a simple function that generates a random n-bit prime. The module -includes a function to generate random integers of a specific size, and also an -isPrime method that performs the Miller–Rabin primality test. These are all we need:

-
func generatePrime(_ width: Int) -> BigUInt {
-    while true {
-        var random = BigUInt.randomInteger(withExactWidth: width)
-        random |= BigUInt(1)
-        if random.isPrime() {
-            return random
-        }
-    }
-}
-
-let p = generatePrime(1024)
-==> 13308187650642192396256419911012544845370493728424936791561478318443071617242872
-    81980956747087187419914435169914161116601678883358611076800743580556055714173922
-    08406194264346635072293912609713085260354070700055888678514690878149253177960273
-    775659537560220378850112471985434373425534121373466492101182463962031
-
-let q = generatePrime(1024)
-==> 17072954422657145489547308812333368925007949054501204983863958355897172093173783
-    10108226596943999553784252564650624766276133157586733504784616138305701168410157
-    80784336308507083874651158029602582993233111593356512531869546706885170044355115
-    669728424124141763799008880327106952436883614887277350838425336156327
-
- -

Cool! Now that we have two large primes, we can produce an RSA public/private keypair -out of them.

-
typealias Key = (modulus: BigUInt, exponent: BigUInt)
-
-let n = p * q
-==> 22721008120758282530010953362926306641542233757318103044313144976976529789946696
-    15454966720907712515917481418981591379647635391260569349099666410127279690367978
-    81184375533755888994370640857883754985364288413796100527262763202679037134021810
-    57933883525572232242690805678883227791774442041516929419640051653934584376704034
-    63953169772816907280591934423237977258358097846511079947337857778137177570668391
-    57455417707100275487770399281417352829897118140972240757708561027087217205975220
-    02207275447810167397968435583004676293892340103729490987263776871467057582629588
-    916498579594964478080508868267360515953225283461208420137
-
-let e: BigUInt = 65537
-let phi = (p - 1) * (q - 1)
-let d = e.inverse(phi)!     // d * e % phi == 1
-==> 13964664343869014759736350480776837992604500903989703383202366291905558996277719
-    77822086142456362972689566985925179681282432115598451765899180050962461295573831
-    37069237934291884106584820998146965085531433195106686745474222222620986858696591
-    69836532468835154412554521152103642453158895363417640676611704542784576974374954
-    45789456921660619938185093118762690200980720312508614337759620606992462563490422
-    76669559556568917533268479190948959560397579572761529852891246283539604545691244
-    89999692877158676643042118662613875863504016129837099223040687512684532694527109
-    80742873307409704484365002175294665608486688146261327793
-
-let publicKey: Key = (n, e)
-let privateKey: Key = (n, d)
-
- -

In RSA, modular exponentiation is used to encrypt (and decrypt) messages.

-
func encrypt(_ message: BigUInt, key: Key) -> BigUInt {
-    return message.power(key.exponent, modulus: key.modulus)
-}
-
- -

Let’s try out our new keypair by converting a string into UTF-8, interpreting -the resulting binary representation as a big integer, and encrypting it with the -public key. BigUInt has an initializer that takes an NSData, so this is pretty -easy to do:

-
let secret: BigUInt = BigUInt("Arbitrary precision arithmetic is fun!".dataUsingEncoding(NSUTF8StringEncoding)!)
-==> 83323446846105976078466731524728681905293067701804838925389198929123912971229457
-    68818568737
-
-let cyphertext = encrypt(secret, key: publicKey)
-==> 95186982543485985200666516508066093880038842892337880561554910904277290917831453
-    54854954722744805432145474047391353716305176389470779020645959135298322520888633
-    61674945129099575943384767330342554525120384485469428048962027149169876127890306
-    77028183904699491962050888974524603226290836984166164759586952419343589385279641
-    47999991283152843977988979846238236160274201261075188190509539751990119132013021
-    74866638595734222867005089157198503204192264814750832072844208520394603054901706
-    06024394731371973402595826456435944968439153664617188570808940022471990638468783
-    49208193955207336172861151720299024935127021719852700882
-
- -

Well, it looks encrypted all right, but can we get the original message back? -In theory, encrypting the cyphertext with the private key returns the original message. -Let’s see:

-
let plaintext = encrypt(cyphertext, key: privateKey)
-==> 83323446846105976078466731524728681905293067701804838925389198929123912971229457
-    68818568737
-
-let received = String(data: plaintext.serialize(), encoding: NSUTF8StringEncoding)
-==> "Arbitrary precision arithmetic is fun!"
-
- -

Yay! This is truly terrific, but please don’t use this example code in an actual -cryptography system. RSA has lots of subtle (and some not so subtle) complications -that we ignored to keep this example short.

-

Calculating the Digits of π

- -

Another fun activity to try with BigInts is to generate the digits of π. -Let’s try implementing Jeremy Gibbon’s spigot algorithm. -This is a rather slow algorithm as π-generators go, but it makes up for it with its grooviness -factor: it’s remarkably short, it only uses (big) integer arithmetic, and every iteration -produces a single new digit in the base-10 representation of π. This naturally leads to an -implementation as an infinite GeneratorType:

-
func digitsOfPi() -> AnyGenerator<Int> {
-    var q: BigUInt = 1
-    var r: BigUInt = 180
-    var t: BigUInt = 60
-    var i: UInt64 = 2 // Does not overflow until digit #826_566_842
-    return AnyIterator {
-        let u: UInt64 = 3 * (3 * i + 1) * (3 * i + 2)
-        let y = (q.multiplied(byDigit: 27 * i - 12) + 5 * r) / (5 * t)
-        (q, r, t) = (
-            10 * q.multiplied(byDigit: i * (2 * i - 1)),
-            10 * (q.multiplied(byDigit: 5 * i - 2) + r - y * t).multiplied(byDigit: u),
-            t.multiplied(byDigit: u))
-        i += 1
-        return Int(y[0])
-    }
-}
-
- -

Well, that was surprisingly easy. But does it work? Of course it does!

-
var digits = "π ≈ "
-var count = 0
-for digit in digitsOfPi() {
-    assert(digit < 10)
-    digits += String(digit)
-    count += 1
-    if count == 1 { digits += "." }
-    if count == 1000 { break }
-}
-
-digits
-==> π ≈ 3.14159265358979323846264338327950288419716939937510582097494459230781640628
-    62089986280348253421170679821480865132823066470938446095505822317253594081284811
-    17450284102701938521105559644622948954930381964428810975665933446128475648233786
-    78316527120190914564856692346034861045432664821339360726024914127372458700660631
-    55881748815209209628292540917153643678925903600113305305488204665213841469519415
-    11609433057270365759591953092186117381932611793105118548074462379962749567351885
-    75272489122793818301194912983367336244065664308602139494639522473719070217986094
-    37027705392171762931767523846748184676694051320005681271452635608277857713427577
-    89609173637178721468440901224953430146549585371050792279689258923542019956112129
-    02196086403441815981362977477130996051870721134999999837297804995105973173281609
-    63185950244594553469083026425223082533446850352619311881710100031378387528865875
-    33208381420617177669147303598253490428755468731159562863882353787593751957781857
-    780532171226806613001927876611195909216420198
-
- -

Now go and have some fun with big integers on your own!

- -
-
- - -
-
- - - - diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/js/jazzy.js b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/js/jazzy.js deleted file mode 100755 index 1e55d6ef0..000000000 --- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/js/jazzy.js +++ /dev/null @@ -1,70 +0,0 @@ -window.jazzy = {'docset': false} -if (typeof window.dash != 'undefined') { - document.documentElement.className += ' dash' - window.jazzy.docset = true -} -if (navigator.userAgent.match(/xcode/i)) { - document.documentElement.className += ' xcode' - window.jazzy.docset = true -} - -function toggleItem($link, $content) { - var animationDuration = 300; - $link.toggleClass('token-open'); - $content.slideToggle(animationDuration); -} - -function itemLinkToContent($link) { - return $link.parent().parent().next(); -} - -// On doc load + hash-change, open any targetted item -function openCurrentItemIfClosed() { - if (window.jazzy.docset) { - return; - } - var $link = $(`a[name="${location.hash.substring(1)}"]`).nextAll('.token'); - $content = itemLinkToContent($link); - if ($content.is(':hidden')) { - toggleItem($link, $content); - } -} - -$(openCurrentItemIfClosed); -$(window).on('hashchange', openCurrentItemIfClosed); - -// On item link ('token') click, toggle its discussion -$('.token').on('click', function(event) { - if (window.jazzy.docset) { - return; - } - var $link = $(this); - toggleItem($link, itemLinkToContent($link)); - - // Keeps the document from jumping to the hash. - var href = $link.attr('href'); - if (history.pushState) { - history.pushState({}, '', href); - } else { - location.hash = href; - } - event.preventDefault(); -}); - -// Clicks on links to the current, closed, item need to open the item -$("a:not('.token')").on('click', function() { - if (location == this.href) { - openCurrentItemIfClosed(); - } -}); - -// KaTeX rendering -if ("katex" in window) { - $($('.math').each( (_, element) => { - katex.render(element.textContent, element, { - displayMode: $(element).hasClass('m-block'), - throwOnError: false, - trust: true - }); - })) -} diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/js/jazzy.search.js b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/js/jazzy.search.js deleted file mode 100644 index e3d1ab905..000000000 --- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/js/jazzy.search.js +++ /dev/null @@ -1,70 +0,0 @@ -$(function(){ - var $typeahead = $('[data-typeahead]'); - var $form = $typeahead.parents('form'); - var searchURL = $form.attr('action'); - - function displayTemplate(result) { - return result.name; - } - - function suggestionTemplate(result) { - var t = '
'; - t += '' + result.name + ''; - if (result.parent_name) { - t += '' + result.parent_name + ''; - } - t += '
'; - return t; - } - - $typeahead.one('focus', function() { - $form.addClass('loading'); - - $.getJSON(searchURL).then(function(searchData) { - const searchIndex = lunr(function() { - this.ref('url'); - this.field('name'); - this.field('abstract'); - for (const [url, doc] of Object.entries(searchData)) { - this.add({url: url, name: doc.name, abstract: doc.abstract}); - } - }); - - $typeahead.typeahead( - { - highlight: true, - minLength: 3, - autoselect: true - }, - { - limit: 10, - display: displayTemplate, - templates: { suggestion: suggestionTemplate }, - source: function(query, sync) { - const lcSearch = query.toLowerCase(); - const results = searchIndex.query(function(q) { - q.term(lcSearch, { boost: 100 }); - q.term(lcSearch, { - boost: 10, - wildcard: lunr.Query.wildcard.TRAILING - }); - }).map(function(result) { - var doc = searchData[result.ref]; - doc.url = result.ref; - return doc; - }); - sync(results); - } - } - ); - $form.removeClass('loading'); - $typeahead.trigger('focus'); - }); - }); - - var baseURL = searchURL.slice(0, -"search.json".length); - - $typeahead.on('typeahead:select', function(e, result) { - window.location = baseURL + result.url; - }); -}); diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/js/jquery.min.js b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/js/jquery.min.js deleted file mode 100644 index b0614034a..000000000 --- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/js/jquery.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 00){var c=e.utils.clone(r)||{};c.position=[a,l],c.index=s.length,s.push(new e.Token(i.slice(a,o),c))}a=o+1}}return s},e.tokenizer.separator=/[\s\-]+/,e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,r){r in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+r),t.label=r,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var r=t.label&&t.label in this.registeredFunctions;r||e.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},e.Pipeline.load=function(t){var r=new e.Pipeline;return t.forEach(function(t){var i=e.Pipeline.registeredFunctions[t];if(!i)throw new Error("Cannot load unregistered function: "+t);r.add(i)}),r},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(t){e.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},e.Pipeline.prototype.after=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,r)},e.Pipeline.prototype.before=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");this._stack.splice(i,0,r)},e.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);t!=-1&&this._stack.splice(t,1)},e.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r1&&(se&&(r=n),s!=e);)i=r-t,n=t+Math.floor(i/2),s=this.elements[2*n];return s==e?2*n:s>e?2*n:sa?l+=2:o==a&&(t+=r[u+1]*i[l+1],u+=2,l+=2);return t},e.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},e.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t0){var o,a=s.str.charAt(0);a in s.node.edges?o=s.node.edges[a]:(o=new e.TokenSet,s.node.edges[a]=o),1==s.str.length&&(o["final"]=!0),n.push({node:o,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(0!=s.editsRemaining){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new e.TokenSet;s.node.edges["*"]=u}if(0==s.str.length&&(u["final"]=!0),n.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&n.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),1==s.str.length&&(s.node["final"]=!0),s.str.length>=1){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new e.TokenSet;s.node.edges["*"]=l}1==s.str.length&&(l["final"]=!0),n.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var c,h=s.str.charAt(0),d=s.str.charAt(1);d in s.node.edges?c=s.node.edges[d]:(c=new e.TokenSet,s.node.edges[d]=c),1==s.str.length&&(c["final"]=!0),n.push({node:c,editsRemaining:s.editsRemaining-1,str:h+s.str.slice(2)})}}}return i},e.TokenSet.fromString=function(t){for(var r=new e.TokenSet,i=r,n=0,s=t.length;n=e;t--){var r=this.uncheckedNodes[t],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r["char"]]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}},e.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},e.Index.prototype.search=function(t){return this.query(function(r){var i=new e.QueryParser(t,r);i.parse()})},e.Index.prototype.query=function(t){for(var r=new e.Query(this.fields),i=Object.create(null),n=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),u=0;u1?this._b=1:this._b=e},e.Builder.prototype.k1=function(e){this._k1=e},e.Builder.prototype.add=function(t,r){var i=t[this._ref],n=Object.keys(this._fields);this._documents[i]=r||{},this.documentCount+=1;for(var s=0;s=this.length)return e.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},e.QueryLexer.prototype.width=function(){return this.pos-this.start},e.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},e.QueryLexer.prototype.backup=function(){this.pos-=1},e.QueryLexer.prototype.acceptDigitRun=function(){var t,r;do t=this.next(),r=t.charCodeAt(0);while(r>47&&r<58);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.pos1&&(t.backup(),t.emit(e.QueryLexer.TERM)),t.ignore(),t.more())return e.QueryLexer.lexText},e.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.EDIT_DISTANCE),e.QueryLexer.lexText},e.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.BOOST),e.QueryLexer.lexText},e.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(e.QueryLexer.TERM)},e.QueryLexer.termSeparator=e.tokenizer.separator,e.QueryLexer.lexText=function(t){for(;;){var r=t.next();if(r==e.QueryLexer.EOS)return e.QueryLexer.lexEOS;if(92!=r.charCodeAt(0)){if(":"==r)return e.QueryLexer.lexField;if("~"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexEditDistance;if("^"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexBoost;if("+"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if("-"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if(r.match(e.QueryLexer.termSeparator))return e.QueryLexer.lexTerm}else t.escapeCharacter()}},e.QueryParser=function(t,r){this.lexer=new e.QueryLexer(t),this.query=r,this.currentClause={},this.lexemeIdx=0},e.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=e.QueryParser.parseClause;t;)t=t(this);return this.query},e.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},e.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},e.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},e.QueryParser.parseClause=function(t){var r=t.peekLexeme();if(void 0!=r)switch(r.type){case e.QueryLexer.PRESENCE:return e.QueryParser.parsePresence;case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expected either a field or a term, found "+r.type;throw r.str.length>=1&&(i+=" with value '"+r.str+"'"),new e.QueryParseError(i,r.start,r.end)}},e.QueryParser.parsePresence=function(t){var r=t.consumeLexeme();if(void 0!=r){switch(r.str){case"-":t.currentClause.presence=e.Query.presence.PROHIBITED;break;case"+":t.currentClause.presence=e.Query.presence.REQUIRED;break;default:var i="unrecognised presence operator'"+r.str+"'";throw new e.QueryParseError(i,r.start,r.end)}var n=t.peekLexeme();if(void 0==n){var i="expecting term or field, found nothing";throw new e.QueryParseError(i,r.start,r.end)}switch(n.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expecting term or field, found '"+n.type+"'";throw new e.QueryParseError(i,n.start,n.end)}}},e.QueryParser.parseField=function(t){var r=t.consumeLexeme();if(void 0!=r){if(t.query.allFields.indexOf(r.str)==-1){var i=t.query.allFields.map(function(e){return"'"+e+"'"}).join(", "),n="unrecognised field '"+r.str+"', possible fields: "+i;throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.fields=[r.str];var s=t.peekLexeme();if(void 0==s){var n="expecting term, found nothing";throw new e.QueryParseError(n,r.start,r.end)}switch(s.type){case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var n="expecting term, found '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseTerm=function(t){var r=t.consumeLexeme();if(void 0!=r){t.currentClause.term=r.str.toLowerCase(),r.str.indexOf("*")!=-1&&(t.currentClause.usePipeline=!1);var i=t.peekLexeme();if(void 0==i)return void t.nextClause();switch(i.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+i.type+"'";throw new e.QueryParseError(n,i.start,i.end)}}},e.QueryParser.parseEditDistance=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="edit distance must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.editDistance=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseBoost=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="boost must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.boost=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.lunr=t()}(this,function(){return e})}(); diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/js/typeahead.jquery.js b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/js/typeahead.jquery.js deleted file mode 100644 index 3a2d2ab03..000000000 --- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/js/typeahead.jquery.js +++ /dev/null @@ -1,1694 +0,0 @@ -/*! - * typeahead.js 1.3.1 - * https://github.com/corejavascript/typeahead.js - * Copyright 2013-2020 Twitter, Inc. and other contributors; Licensed MIT - */ - - -(function(root, factory) { - if (typeof define === "function" && define.amd) { - define([ "jquery" ], function(a0) { - return factory(a0); - }); - } else if (typeof module === "object" && module.exports) { - module.exports = factory(require("jquery")); - } else { - factory(root["jQuery"]); - } -})(this, function($) { - var _ = function() { - "use strict"; - return { - isMsie: function() { - return /(msie|trident)/i.test(navigator.userAgent) ? navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2] : false; - }, - isBlankString: function(str) { - return !str || /^\s*$/.test(str); - }, - escapeRegExChars: function(str) { - return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); - }, - isString: function(obj) { - return typeof obj === "string"; - }, - isNumber: function(obj) { - return typeof obj === "number"; - }, - isArray: $.isArray, - isFunction: $.isFunction, - isObject: $.isPlainObject, - isUndefined: function(obj) { - return typeof obj === "undefined"; - }, - isElement: function(obj) { - return !!(obj && obj.nodeType === 1); - }, - isJQuery: function(obj) { - return obj instanceof $; - }, - toStr: function toStr(s) { - return _.isUndefined(s) || s === null ? "" : s + ""; - }, - bind: $.proxy, - each: function(collection, cb) { - $.each(collection, reverseArgs); - function reverseArgs(index, value) { - return cb(value, index); - } - }, - map: $.map, - filter: $.grep, - every: function(obj, test) { - var result = true; - if (!obj) { - return result; - } - $.each(obj, function(key, val) { - if (!(result = test.call(null, val, key, obj))) { - return false; - } - }); - return !!result; - }, - some: function(obj, test) { - var result = false; - if (!obj) { - return result; - } - $.each(obj, function(key, val) { - if (result = test.call(null, val, key, obj)) { - return false; - } - }); - return !!result; - }, - mixin: $.extend, - identity: function(x) { - return x; - }, - clone: function(obj) { - return $.extend(true, {}, obj); - }, - getIdGenerator: function() { - var counter = 0; - return function() { - return counter++; - }; - }, - templatify: function templatify(obj) { - return $.isFunction(obj) ? obj : template; - function template() { - return String(obj); - } - }, - defer: function(fn) { - setTimeout(fn, 0); - }, - debounce: function(func, wait, immediate) { - var timeout, result; - return function() { - var context = this, args = arguments, later, callNow; - later = function() { - timeout = null; - if (!immediate) { - result = func.apply(context, args); - } - }; - callNow = immediate && !timeout; - clearTimeout(timeout); - timeout = setTimeout(later, wait); - if (callNow) { - result = func.apply(context, args); - } - return result; - }; - }, - throttle: function(func, wait) { - var context, args, timeout, result, previous, later; - previous = 0; - later = function() { - previous = new Date(); - timeout = null; - result = func.apply(context, args); - }; - return function() { - var now = new Date(), remaining = wait - (now - previous); - context = this; - args = arguments; - if (remaining <= 0) { - clearTimeout(timeout); - timeout = null; - previous = now; - result = func.apply(context, args); - } else if (!timeout) { - timeout = setTimeout(later, remaining); - } - return result; - }; - }, - stringify: function(val) { - return _.isString(val) ? val : JSON.stringify(val); - }, - guid: function() { - function _p8(s) { - var p = (Math.random().toString(16) + "000000000").substr(2, 8); - return s ? "-" + p.substr(0, 4) + "-" + p.substr(4, 4) : p; - } - return "tt-" + _p8() + _p8(true) + _p8(true) + _p8(); - }, - noop: function() {} - }; - }(); - var WWW = function() { - "use strict"; - var defaultClassNames = { - wrapper: "twitter-typeahead", - input: "tt-input", - hint: "tt-hint", - menu: "tt-menu", - dataset: "tt-dataset", - suggestion: "tt-suggestion", - selectable: "tt-selectable", - empty: "tt-empty", - open: "tt-open", - cursor: "tt-cursor", - highlight: "tt-highlight" - }; - return build; - function build(o) { - var www, classes; - classes = _.mixin({}, defaultClassNames, o); - www = { - css: buildCss(), - classes: classes, - html: buildHtml(classes), - selectors: buildSelectors(classes) - }; - return { - css: www.css, - html: www.html, - classes: www.classes, - selectors: www.selectors, - mixin: function(o) { - _.mixin(o, www); - } - }; - } - function buildHtml(c) { - return { - wrapper: '', - menu: '
' - }; - } - function buildSelectors(classes) { - var selectors = {}; - _.each(classes, function(v, k) { - selectors[k] = "." + v; - }); - return selectors; - } - function buildCss() { - var css = { - wrapper: { - position: "relative", - display: "inline-block" - }, - hint: { - position: "absolute", - top: "0", - left: "0", - borderColor: "transparent", - boxShadow: "none", - opacity: "1" - }, - input: { - position: "relative", - verticalAlign: "top", - backgroundColor: "transparent" - }, - inputWithNoHint: { - position: "relative", - verticalAlign: "top" - }, - menu: { - position: "absolute", - top: "100%", - left: "0", - zIndex: "100", - display: "none" - }, - ltr: { - left: "0", - right: "auto" - }, - rtl: { - left: "auto", - right: " 0" - } - }; - if (_.isMsie()) { - _.mixin(css.input, { - backgroundImage: "url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)" - }); - } - return css; - } - }(); - var EventBus = function() { - "use strict"; - var namespace, deprecationMap; - namespace = "typeahead:"; - deprecationMap = { - render: "rendered", - cursorchange: "cursorchanged", - select: "selected", - autocomplete: "autocompleted" - }; - function EventBus(o) { - if (!o || !o.el) { - $.error("EventBus initialized without el"); - } - this.$el = $(o.el); - } - _.mixin(EventBus.prototype, { - _trigger: function(type, args) { - var $e = $.Event(namespace + type); - this.$el.trigger.call(this.$el, $e, args || []); - return $e; - }, - before: function(type) { - var args, $e; - args = [].slice.call(arguments, 1); - $e = this._trigger("before" + type, args); - return $e.isDefaultPrevented(); - }, - trigger: function(type) { - var deprecatedType; - this._trigger(type, [].slice.call(arguments, 1)); - if (deprecatedType = deprecationMap[type]) { - this._trigger(deprecatedType, [].slice.call(arguments, 1)); - } - } - }); - return EventBus; - }(); - var EventEmitter = function() { - "use strict"; - var splitter = /\s+/, nextTick = getNextTick(); - return { - onSync: onSync, - onAsync: onAsync, - off: off, - trigger: trigger - }; - function on(method, types, cb, context) { - var type; - if (!cb) { - return this; - } - types = types.split(splitter); - cb = context ? bindContext(cb, context) : cb; - this._callbacks = this._callbacks || {}; - while (type = types.shift()) { - this._callbacks[type] = this._callbacks[type] || { - sync: [], - async: [] - }; - this._callbacks[type][method].push(cb); - } - return this; - } - function onAsync(types, cb, context) { - return on.call(this, "async", types, cb, context); - } - function onSync(types, cb, context) { - return on.call(this, "sync", types, cb, context); - } - function off(types) { - var type; - if (!this._callbacks) { - return this; - } - types = types.split(splitter); - while (type = types.shift()) { - delete this._callbacks[type]; - } - return this; - } - function trigger(types) { - var type, callbacks, args, syncFlush, asyncFlush; - if (!this._callbacks) { - return this; - } - types = types.split(splitter); - args = [].slice.call(arguments, 1); - while ((type = types.shift()) && (callbacks = this._callbacks[type])) { - syncFlush = getFlush(callbacks.sync, this, [ type ].concat(args)); - asyncFlush = getFlush(callbacks.async, this, [ type ].concat(args)); - syncFlush() && nextTick(asyncFlush); - } - return this; - } - function getFlush(callbacks, context, args) { - return flush; - function flush() { - var cancelled; - for (var i = 0, len = callbacks.length; !cancelled && i < len; i += 1) { - cancelled = callbacks[i].apply(context, args) === false; - } - return !cancelled; - } - } - function getNextTick() { - var nextTickFn; - if (window.setImmediate) { - nextTickFn = function nextTickSetImmediate(fn) { - setImmediate(function() { - fn(); - }); - }; - } else { - nextTickFn = function nextTickSetTimeout(fn) { - setTimeout(function() { - fn(); - }, 0); - }; - } - return nextTickFn; - } - function bindContext(fn, context) { - return fn.bind ? fn.bind(context) : function() { - fn.apply(context, [].slice.call(arguments, 0)); - }; - } - }(); - var highlight = function(doc) { - "use strict"; - var defaults = { - node: null, - pattern: null, - tagName: "strong", - className: null, - wordsOnly: false, - caseSensitive: false, - diacriticInsensitive: false - }; - var accented = { - A: "[AaªÀ-Åà-åĀ-ąǍǎȀ-ȃȦȧᴬᵃḀḁẚẠ-ảₐ℀℁℻⒜Ⓐⓐ㍱-㍴㎀-㎄㎈㎉㎩-㎯㏂㏊㏟㏿Aa]", - B: "[BbᴮᵇḂ-ḇℬ⒝Ⓑⓑ㍴㎅-㎇㏃㏈㏔㏝Bb]", - C: "[CcÇçĆ-čᶜ℀ℂ℃℅℆ℭⅭⅽ⒞Ⓒⓒ㍶㎈㎉㎝㎠㎤㏄-㏇Cc]", - D: "[DdĎďDŽ-džDZ-dzᴰᵈḊ-ḓⅅⅆⅮⅾ⒟Ⓓⓓ㋏㍲㍷-㍹㎗㎭-㎯㏅㏈Dd]", - E: "[EeÈ-Ëè-ëĒ-ěȄ-ȇȨȩᴱᵉḘ-ḛẸ-ẽₑ℡ℯℰⅇ⒠Ⓔⓔ㉐㋍㋎Ee]", - F: "[FfᶠḞḟ℉ℱ℻⒡Ⓕⓕ㎊-㎌㎙ff-fflFf]", - G: "[GgĜ-ģǦǧǴǵᴳᵍḠḡℊ⒢Ⓖⓖ㋌㋍㎇㎍-㎏㎓㎬㏆㏉㏒㏿Gg]", - H: "[HhĤĥȞȟʰᴴḢ-ḫẖℋ-ℎ⒣Ⓗⓗ㋌㍱㎐-㎔㏊㏋㏗Hh]", - I: "[IiÌ-Ïì-ïĨ-İIJijǏǐȈ-ȋᴵᵢḬḭỈ-ịⁱℐℑℹⅈⅠ-ⅣⅥ-ⅨⅪⅫⅰ-ⅳⅵ-ⅸⅺⅻ⒤Ⓘⓘ㍺㏌㏕fiffiIi]", - J: "[JjIJ-ĵLJ-njǰʲᴶⅉ⒥ⒿⓙⱼJj]", - K: "[KkĶķǨǩᴷᵏḰ-ḵK⒦Ⓚⓚ㎄㎅㎉㎏㎑㎘㎞㎢㎦㎪㎸㎾㏀㏆㏍-㏏Kk]", - L: "[LlĹ-ŀLJ-ljˡᴸḶḷḺ-ḽℒℓ℡Ⅼⅼ⒧Ⓛⓛ㋏㎈㎉㏐-㏓㏕㏖㏿flfflLl]", - M: "[MmᴹᵐḾ-ṃ℠™ℳⅯⅿ⒨Ⓜⓜ㍷-㍹㎃㎆㎎㎒㎖㎙-㎨㎫㎳㎷㎹㎽㎿㏁㏂㏎㏐㏔-㏖㏘㏙㏞㏟Mm]", - N: "[NnÑñŃ-ʼnNJ-njǸǹᴺṄ-ṋⁿℕ№⒩Ⓝⓝ㎁㎋㎚㎱㎵㎻㏌㏑Nn]", - O: "[OoºÒ-Öò-öŌ-őƠơǑǒǪǫȌ-ȏȮȯᴼᵒỌ-ỏₒ℅№ℴ⒪Ⓞⓞ㍵㏇㏒㏖Oo]", - P: "[PpᴾᵖṔ-ṗℙ⒫Ⓟⓟ㉐㍱㍶㎀㎊㎩-㎬㎰㎴㎺㏋㏗-㏚Pp]", - Q: "[Qqℚ⒬Ⓠⓠ㏃Qq]", - R: "[RrŔ-řȐ-ȓʳᴿᵣṘ-ṛṞṟ₨ℛ-ℝ⒭Ⓡⓡ㋍㍴㎭-㎯㏚㏛Rr]", - S: "[SsŚ-šſȘșˢṠ-ṣ₨℁℠⒮Ⓢⓢ㎧㎨㎮-㎳㏛㏜stSs]", - T: "[TtŢ-ťȚțᵀᵗṪ-ṱẗ℡™⒯Ⓣⓣ㉐㋏㎔㏏ſtstTt]", - U: "[UuÙ-Üù-üŨ-ųƯưǓǔȔ-ȗᵁᵘᵤṲ-ṷỤ-ủ℆⒰Ⓤⓤ㍳㍺Uu]", - V: "[VvᵛᵥṼ-ṿⅣ-Ⅷⅳ-ⅷ⒱Ⓥⓥⱽ㋎㍵㎴-㎹㏜㏞Vv]", - W: "[WwŴŵʷᵂẀ-ẉẘ⒲Ⓦⓦ㎺-㎿㏝Ww]", - X: "[XxˣẊ-ẍₓ℻Ⅸ-Ⅻⅸ-ⅻ⒳Ⓧⓧ㏓Xx]", - Y: "[YyÝýÿŶ-ŸȲȳʸẎẏẙỲ-ỹ⒴Ⓨⓨ㏉Yy]", - Z: "[ZzŹ-žDZ-dzᶻẐ-ẕℤℨ⒵Ⓩⓩ㎐-㎔Zz]" - }; - return function hightlight(o) { - var regex; - o = _.mixin({}, defaults, o); - if (!o.node || !o.pattern) { - return; - } - o.pattern = _.isArray(o.pattern) ? o.pattern : [ o.pattern ]; - regex = getRegex(o.pattern, o.caseSensitive, o.wordsOnly, o.diacriticInsensitive); - traverse(o.node, hightlightTextNode); - function hightlightTextNode(textNode) { - var match, patternNode, wrapperNode; - if (match = regex.exec(textNode.data)) { - wrapperNode = doc.createElement(o.tagName); - o.className && (wrapperNode.className = o.className); - patternNode = textNode.splitText(match.index); - patternNode.splitText(match[0].length); - wrapperNode.appendChild(patternNode.cloneNode(true)); - textNode.parentNode.replaceChild(wrapperNode, patternNode); - } - return !!match; - } - function traverse(el, hightlightTextNode) { - var childNode, TEXT_NODE_TYPE = 3; - for (var i = 0; i < el.childNodes.length; i++) { - childNode = el.childNodes[i]; - if (childNode.nodeType === TEXT_NODE_TYPE) { - i += hightlightTextNode(childNode) ? 1 : 0; - } else { - traverse(childNode, hightlightTextNode); - } - } - } - }; - function accent_replacer(chr) { - return accented[chr.toUpperCase()] || chr; - } - function getRegex(patterns, caseSensitive, wordsOnly, diacriticInsensitive) { - var escapedPatterns = [], regexStr; - for (var i = 0, len = patterns.length; i < len; i++) { - var escapedWord = _.escapeRegExChars(patterns[i]); - if (diacriticInsensitive) { - escapedWord = escapedWord.replace(/\S/g, accent_replacer); - } - escapedPatterns.push(escapedWord); - } - regexStr = wordsOnly ? "\\b(" + escapedPatterns.join("|") + ")\\b" : "(" + escapedPatterns.join("|") + ")"; - return caseSensitive ? new RegExp(regexStr) : new RegExp(regexStr, "i"); - } - }(window.document); - var Input = function() { - "use strict"; - var specialKeyCodeMap; - specialKeyCodeMap = { - 9: "tab", - 27: "esc", - 37: "left", - 39: "right", - 13: "enter", - 38: "up", - 40: "down" - }; - function Input(o, www) { - var id; - o = o || {}; - if (!o.input) { - $.error("input is missing"); - } - www.mixin(this); - this.$hint = $(o.hint); - this.$input = $(o.input); - this.$menu = $(o.menu); - id = this.$input.attr("id") || _.guid(); - this.$menu.attr("id", id + "_listbox"); - this.$hint.attr({ - "aria-hidden": true - }); - this.$input.attr({ - "aria-owns": id + "_listbox", - role: "combobox", - "aria-autocomplete": "list", - "aria-expanded": false - }); - this.query = this.$input.val(); - this.queryWhenFocused = this.hasFocus() ? this.query : null; - this.$overflowHelper = buildOverflowHelper(this.$input); - this._checkLanguageDirection(); - if (this.$hint.length === 0) { - this.setHint = this.getHint = this.clearHint = this.clearHintIfInvalid = _.noop; - } - this.onSync("cursorchange", this._updateDescendent); - } - Input.normalizeQuery = function(str) { - return _.toStr(str).replace(/^\s*/g, "").replace(/\s{2,}/g, " "); - }; - _.mixin(Input.prototype, EventEmitter, { - _onBlur: function onBlur() { - this.resetInputValue(); - this.trigger("blurred"); - }, - _onFocus: function onFocus() { - this.queryWhenFocused = this.query; - this.trigger("focused"); - }, - _onKeydown: function onKeydown($e) { - var keyName = specialKeyCodeMap[$e.which || $e.keyCode]; - this._managePreventDefault(keyName, $e); - if (keyName && this._shouldTrigger(keyName, $e)) { - this.trigger(keyName + "Keyed", $e); - } - }, - _onInput: function onInput() { - this._setQuery(this.getInputValue()); - this.clearHintIfInvalid(); - this._checkLanguageDirection(); - }, - _managePreventDefault: function managePreventDefault(keyName, $e) { - var preventDefault; - switch (keyName) { - case "up": - case "down": - preventDefault = !withModifier($e); - break; - - default: - preventDefault = false; - } - preventDefault && $e.preventDefault(); - }, - _shouldTrigger: function shouldTrigger(keyName, $e) { - var trigger; - switch (keyName) { - case "tab": - trigger = !withModifier($e); - break; - - default: - trigger = true; - } - return trigger; - }, - _checkLanguageDirection: function checkLanguageDirection() { - var dir = (this.$input.css("direction") || "ltr").toLowerCase(); - if (this.dir !== dir) { - this.dir = dir; - this.$hint.attr("dir", dir); - this.trigger("langDirChanged", dir); - } - }, - _setQuery: function setQuery(val, silent) { - var areEquivalent, hasDifferentWhitespace; - areEquivalent = areQueriesEquivalent(val, this.query); - hasDifferentWhitespace = areEquivalent ? this.query.length !== val.length : false; - this.query = val; - if (!silent && !areEquivalent) { - this.trigger("queryChanged", this.query); - } else if (!silent && hasDifferentWhitespace) { - this.trigger("whitespaceChanged", this.query); - } - }, - _updateDescendent: function updateDescendent(event, id) { - this.$input.attr("aria-activedescendant", id); - }, - bind: function() { - var that = this, onBlur, onFocus, onKeydown, onInput; - onBlur = _.bind(this._onBlur, this); - onFocus = _.bind(this._onFocus, this); - onKeydown = _.bind(this._onKeydown, this); - onInput = _.bind(this._onInput, this); - this.$input.on("blur.tt", onBlur).on("focus.tt", onFocus).on("keydown.tt", onKeydown); - if (!_.isMsie() || _.isMsie() > 9) { - this.$input.on("input.tt", onInput); - } else { - this.$input.on("keydown.tt keypress.tt cut.tt paste.tt", function($e) { - if (specialKeyCodeMap[$e.which || $e.keyCode]) { - return; - } - _.defer(_.bind(that._onInput, that, $e)); - }); - } - return this; - }, - focus: function focus() { - this.$input.focus(); - }, - blur: function blur() { - this.$input.blur(); - }, - getLangDir: function getLangDir() { - return this.dir; - }, - getQuery: function getQuery() { - return this.query || ""; - }, - setQuery: function setQuery(val, silent) { - this.setInputValue(val); - this._setQuery(val, silent); - }, - hasQueryChangedSinceLastFocus: function hasQueryChangedSinceLastFocus() { - return this.query !== this.queryWhenFocused; - }, - getInputValue: function getInputValue() { - return this.$input.val(); - }, - setInputValue: function setInputValue(value) { - this.$input.val(value); - this.clearHintIfInvalid(); - this._checkLanguageDirection(); - }, - resetInputValue: function resetInputValue() { - this.setInputValue(this.query); - }, - getHint: function getHint() { - return this.$hint.val(); - }, - setHint: function setHint(value) { - this.$hint.val(value); - }, - clearHint: function clearHint() { - this.setHint(""); - }, - clearHintIfInvalid: function clearHintIfInvalid() { - var val, hint, valIsPrefixOfHint, isValid; - val = this.getInputValue(); - hint = this.getHint(); - valIsPrefixOfHint = val !== hint && hint.indexOf(val) === 0; - isValid = val !== "" && valIsPrefixOfHint && !this.hasOverflow(); - !isValid && this.clearHint(); - }, - hasFocus: function hasFocus() { - return this.$input.is(":focus"); - }, - hasOverflow: function hasOverflow() { - var constraint = this.$input.width() - 2; - this.$overflowHelper.text(this.getInputValue()); - return this.$overflowHelper.width() >= constraint; - }, - isCursorAtEnd: function() { - var valueLength, selectionStart, range; - valueLength = this.$input.val().length; - selectionStart = this.$input[0].selectionStart; - if (_.isNumber(selectionStart)) { - return selectionStart === valueLength; - } else if (document.selection) { - range = document.selection.createRange(); - range.moveStart("character", -valueLength); - return valueLength === range.text.length; - } - return true; - }, - destroy: function destroy() { - this.$hint.off(".tt"); - this.$input.off(".tt"); - this.$overflowHelper.remove(); - this.$hint = this.$input = this.$overflowHelper = $("
"); - }, - setAriaExpanded: function setAriaExpanded(value) { - this.$input.attr("aria-expanded", value); - } - }); - return Input; - function buildOverflowHelper($input) { - return $('').css({ - position: "absolute", - visibility: "hidden", - whiteSpace: "pre", - fontFamily: $input.css("font-family"), - fontSize: $input.css("font-size"), - fontStyle: $input.css("font-style"), - fontVariant: $input.css("font-variant"), - fontWeight: $input.css("font-weight"), - wordSpacing: $input.css("word-spacing"), - letterSpacing: $input.css("letter-spacing"), - textIndent: $input.css("text-indent"), - textRendering: $input.css("text-rendering"), - textTransform: $input.css("text-transform") - }).insertAfter($input); - } - function areQueriesEquivalent(a, b) { - return Input.normalizeQuery(a) === Input.normalizeQuery(b); - } - function withModifier($e) { - return $e.altKey || $e.ctrlKey || $e.metaKey || $e.shiftKey; - } - }(); - var Dataset = function() { - "use strict"; - var keys, nameGenerator; - keys = { - dataset: "tt-selectable-dataset", - val: "tt-selectable-display", - obj: "tt-selectable-object" - }; - nameGenerator = _.getIdGenerator(); - function Dataset(o, www) { - o = o || {}; - o.templates = o.templates || {}; - o.templates.notFound = o.templates.notFound || o.templates.empty; - if (!o.source) { - $.error("missing source"); - } - if (!o.node) { - $.error("missing node"); - } - if (o.name && !isValidName(o.name)) { - $.error("invalid dataset name: " + o.name); - } - www.mixin(this); - this.highlight = !!o.highlight; - this.name = _.toStr(o.name || nameGenerator()); - this.limit = o.limit || 5; - this.displayFn = getDisplayFn(o.display || o.displayKey); - this.templates = getTemplates(o.templates, this.displayFn); - this.source = o.source.__ttAdapter ? o.source.__ttAdapter() : o.source; - this.async = _.isUndefined(o.async) ? this.source.length > 2 : !!o.async; - this._resetLastSuggestion(); - this.$el = $(o.node).attr("role", "presentation").addClass(this.classes.dataset).addClass(this.classes.dataset + "-" + this.name); - } - Dataset.extractData = function extractData(el) { - var $el = $(el); - if ($el.data(keys.obj)) { - return { - dataset: $el.data(keys.dataset) || "", - val: $el.data(keys.val) || "", - obj: $el.data(keys.obj) || null - }; - } - return null; - }; - _.mixin(Dataset.prototype, EventEmitter, { - _overwrite: function overwrite(query, suggestions) { - suggestions = suggestions || []; - if (suggestions.length) { - this._renderSuggestions(query, suggestions); - } else if (this.async && this.templates.pending) { - this._renderPending(query); - } else if (!this.async && this.templates.notFound) { - this._renderNotFound(query); - } else { - this._empty(); - } - this.trigger("rendered", suggestions, false, this.name); - }, - _append: function append(query, suggestions) { - suggestions = suggestions || []; - if (suggestions.length && this.$lastSuggestion.length) { - this._appendSuggestions(query, suggestions); - } else if (suggestions.length) { - this._renderSuggestions(query, suggestions); - } else if (!this.$lastSuggestion.length && this.templates.notFound) { - this._renderNotFound(query); - } - this.trigger("rendered", suggestions, true, this.name); - }, - _renderSuggestions: function renderSuggestions(query, suggestions) { - var $fragment; - $fragment = this._getSuggestionsFragment(query, suggestions); - this.$lastSuggestion = $fragment.children().last(); - this.$el.html($fragment).prepend(this._getHeader(query, suggestions)).append(this._getFooter(query, suggestions)); - }, - _appendSuggestions: function appendSuggestions(query, suggestions) { - var $fragment, $lastSuggestion; - $fragment = this._getSuggestionsFragment(query, suggestions); - $lastSuggestion = $fragment.children().last(); - this.$lastSuggestion.after($fragment); - this.$lastSuggestion = $lastSuggestion; - }, - _renderPending: function renderPending(query) { - var template = this.templates.pending; - this._resetLastSuggestion(); - template && this.$el.html(template({ - query: query, - dataset: this.name - })); - }, - _renderNotFound: function renderNotFound(query) { - var template = this.templates.notFound; - this._resetLastSuggestion(); - template && this.$el.html(template({ - query: query, - dataset: this.name - })); - }, - _empty: function empty() { - this.$el.empty(); - this._resetLastSuggestion(); - }, - _getSuggestionsFragment: function getSuggestionsFragment(query, suggestions) { - var that = this, fragment; - fragment = document.createDocumentFragment(); - _.each(suggestions, function getSuggestionNode(suggestion) { - var $el, context; - context = that._injectQuery(query, suggestion); - $el = $(that.templates.suggestion(context)).data(keys.dataset, that.name).data(keys.obj, suggestion).data(keys.val, that.displayFn(suggestion)).addClass(that.classes.suggestion + " " + that.classes.selectable); - fragment.appendChild($el[0]); - }); - this.highlight && highlight({ - className: this.classes.highlight, - node: fragment, - pattern: query - }); - return $(fragment); - }, - _getFooter: function getFooter(query, suggestions) { - return this.templates.footer ? this.templates.footer({ - query: query, - suggestions: suggestions, - dataset: this.name - }) : null; - }, - _getHeader: function getHeader(query, suggestions) { - return this.templates.header ? this.templates.header({ - query: query, - suggestions: suggestions, - dataset: this.name - }) : null; - }, - _resetLastSuggestion: function resetLastSuggestion() { - this.$lastSuggestion = $(); - }, - _injectQuery: function injectQuery(query, obj) { - return _.isObject(obj) ? _.mixin({ - _query: query - }, obj) : obj; - }, - update: function update(query) { - var that = this, canceled = false, syncCalled = false, rendered = 0; - this.cancel(); - this.cancel = function cancel() { - canceled = true; - that.cancel = $.noop; - that.async && that.trigger("asyncCanceled", query, that.name); - }; - this.source(query, sync, async); - !syncCalled && sync([]); - function sync(suggestions) { - if (syncCalled) { - return; - } - syncCalled = true; - suggestions = (suggestions || []).slice(0, that.limit); - rendered = suggestions.length; - that._overwrite(query, suggestions); - if (rendered < that.limit && that.async) { - that.trigger("asyncRequested", query, that.name); - } - } - function async(suggestions) { - suggestions = suggestions || []; - if (!canceled && rendered < that.limit) { - that.cancel = $.noop; - var idx = Math.abs(rendered - that.limit); - rendered += idx; - that._append(query, suggestions.slice(0, idx)); - that.async && that.trigger("asyncReceived", query, that.name); - } - } - }, - cancel: $.noop, - clear: function clear() { - this._empty(); - this.cancel(); - this.trigger("cleared"); - }, - isEmpty: function isEmpty() { - return this.$el.is(":empty"); - }, - destroy: function destroy() { - this.$el = $("
"); - } - }); - return Dataset; - function getDisplayFn(display) { - display = display || _.stringify; - return _.isFunction(display) ? display : displayFn; - function displayFn(obj) { - return obj[display]; - } - } - function getTemplates(templates, displayFn) { - return { - notFound: templates.notFound && _.templatify(templates.notFound), - pending: templates.pending && _.templatify(templates.pending), - header: templates.header && _.templatify(templates.header), - footer: templates.footer && _.templatify(templates.footer), - suggestion: templates.suggestion ? userSuggestionTemplate : suggestionTemplate - }; - function userSuggestionTemplate(context) { - var template = templates.suggestion; - return $(template(context)).attr("id", _.guid()); - } - function suggestionTemplate(context) { - return $('
').attr("id", _.guid()).text(displayFn(context)); - } - } - function isValidName(str) { - return /^[_a-zA-Z0-9-]+$/.test(str); - } - }(); - var Menu = function() { - "use strict"; - function Menu(o, www) { - var that = this; - o = o || {}; - if (!o.node) { - $.error("node is required"); - } - www.mixin(this); - this.$node = $(o.node); - this.query = null; - this.datasets = _.map(o.datasets, initializeDataset); - function initializeDataset(oDataset) { - var node = that.$node.find(oDataset.node).first(); - oDataset.node = node.length ? node : $("
").appendTo(that.$node); - return new Dataset(oDataset, www); - } - } - _.mixin(Menu.prototype, EventEmitter, { - _onSelectableClick: function onSelectableClick($e) { - this.trigger("selectableClicked", $($e.currentTarget)); - }, - _onRendered: function onRendered(type, dataset, suggestions, async) { - this.$node.toggleClass(this.classes.empty, this._allDatasetsEmpty()); - this.trigger("datasetRendered", dataset, suggestions, async); - }, - _onCleared: function onCleared() { - this.$node.toggleClass(this.classes.empty, this._allDatasetsEmpty()); - this.trigger("datasetCleared"); - }, - _propagate: function propagate() { - this.trigger.apply(this, arguments); - }, - _allDatasetsEmpty: function allDatasetsEmpty() { - return _.every(this.datasets, _.bind(function isDatasetEmpty(dataset) { - var isEmpty = dataset.isEmpty(); - this.$node.attr("aria-expanded", !isEmpty); - return isEmpty; - }, this)); - }, - _getSelectables: function getSelectables() { - return this.$node.find(this.selectors.selectable); - }, - _removeCursor: function _removeCursor() { - var $selectable = this.getActiveSelectable(); - $selectable && $selectable.removeClass(this.classes.cursor); - }, - _ensureVisible: function ensureVisible($el) { - var elTop, elBottom, nodeScrollTop, nodeHeight; - elTop = $el.position().top; - elBottom = elTop + $el.outerHeight(true); - nodeScrollTop = this.$node.scrollTop(); - nodeHeight = this.$node.height() + parseInt(this.$node.css("paddingTop"), 10) + parseInt(this.$node.css("paddingBottom"), 10); - if (elTop < 0) { - this.$node.scrollTop(nodeScrollTop + elTop); - } else if (nodeHeight < elBottom) { - this.$node.scrollTop(nodeScrollTop + (elBottom - nodeHeight)); - } - }, - bind: function() { - var that = this, onSelectableClick; - onSelectableClick = _.bind(this._onSelectableClick, this); - this.$node.on("click.tt", this.selectors.selectable, onSelectableClick); - this.$node.on("mouseover", this.selectors.selectable, function() { - that.setCursor($(this)); - }); - this.$node.on("mouseleave", function() { - that._removeCursor(); - }); - _.each(this.datasets, function(dataset) { - dataset.onSync("asyncRequested", that._propagate, that).onSync("asyncCanceled", that._propagate, that).onSync("asyncReceived", that._propagate, that).onSync("rendered", that._onRendered, that).onSync("cleared", that._onCleared, that); - }); - return this; - }, - isOpen: function isOpen() { - return this.$node.hasClass(this.classes.open); - }, - open: function open() { - this.$node.scrollTop(0); - this.$node.addClass(this.classes.open); - }, - close: function close() { - this.$node.attr("aria-expanded", false); - this.$node.removeClass(this.classes.open); - this._removeCursor(); - }, - setLanguageDirection: function setLanguageDirection(dir) { - this.$node.attr("dir", dir); - }, - selectableRelativeToCursor: function selectableRelativeToCursor(delta) { - var $selectables, $oldCursor, oldIndex, newIndex; - $oldCursor = this.getActiveSelectable(); - $selectables = this._getSelectables(); - oldIndex = $oldCursor ? $selectables.index($oldCursor) : -1; - newIndex = oldIndex + delta; - newIndex = (newIndex + 1) % ($selectables.length + 1) - 1; - newIndex = newIndex < -1 ? $selectables.length - 1 : newIndex; - return newIndex === -1 ? null : $selectables.eq(newIndex); - }, - setCursor: function setCursor($selectable) { - this._removeCursor(); - if ($selectable = $selectable && $selectable.first()) { - $selectable.addClass(this.classes.cursor); - this._ensureVisible($selectable); - } - }, - getSelectableData: function getSelectableData($el) { - return $el && $el.length ? Dataset.extractData($el) : null; - }, - getActiveSelectable: function getActiveSelectable() { - var $selectable = this._getSelectables().filter(this.selectors.cursor).first(); - return $selectable.length ? $selectable : null; - }, - getTopSelectable: function getTopSelectable() { - var $selectable = this._getSelectables().first(); - return $selectable.length ? $selectable : null; - }, - update: function update(query) { - var isValidUpdate = query !== this.query; - if (isValidUpdate) { - this.query = query; - _.each(this.datasets, updateDataset); - } - return isValidUpdate; - function updateDataset(dataset) { - dataset.update(query); - } - }, - empty: function empty() { - _.each(this.datasets, clearDataset); - this.query = null; - this.$node.addClass(this.classes.empty); - function clearDataset(dataset) { - dataset.clear(); - } - }, - destroy: function destroy() { - this.$node.off(".tt"); - this.$node = $("
"); - _.each(this.datasets, destroyDataset); - function destroyDataset(dataset) { - dataset.destroy(); - } - } - }); - return Menu; - }(); - var Status = function() { - "use strict"; - function Status(options) { - this.$el = $("", { - role: "status", - "aria-live": "polite" - }).css({ - position: "absolute", - padding: "0", - border: "0", - height: "1px", - width: "1px", - "margin-bottom": "-1px", - "margin-right": "-1px", - overflow: "hidden", - clip: "rect(0 0 0 0)", - "white-space": "nowrap" - }); - options.$input.after(this.$el); - _.each(options.menu.datasets, _.bind(function(dataset) { - if (dataset.onSync) { - dataset.onSync("rendered", _.bind(this.update, this)); - dataset.onSync("cleared", _.bind(this.cleared, this)); - } - }, this)); - } - _.mixin(Status.prototype, { - update: function update(event, suggestions) { - var length = suggestions.length; - var words; - if (length === 1) { - words = { - result: "result", - is: "is" - }; - } else { - words = { - result: "results", - is: "are" - }; - } - this.$el.text(length + " " + words.result + " " + words.is + " available, use up and down arrow keys to navigate."); - }, - cleared: function() { - this.$el.text(""); - } - }); - return Status; - }(); - var DefaultMenu = function() { - "use strict"; - var s = Menu.prototype; - function DefaultMenu() { - Menu.apply(this, [].slice.call(arguments, 0)); - } - _.mixin(DefaultMenu.prototype, Menu.prototype, { - open: function open() { - !this._allDatasetsEmpty() && this._show(); - return s.open.apply(this, [].slice.call(arguments, 0)); - }, - close: function close() { - this._hide(); - return s.close.apply(this, [].slice.call(arguments, 0)); - }, - _onRendered: function onRendered() { - if (this._allDatasetsEmpty()) { - this._hide(); - } else { - this.isOpen() && this._show(); - } - return s._onRendered.apply(this, [].slice.call(arguments, 0)); - }, - _onCleared: function onCleared() { - if (this._allDatasetsEmpty()) { - this._hide(); - } else { - this.isOpen() && this._show(); - } - return s._onCleared.apply(this, [].slice.call(arguments, 0)); - }, - setLanguageDirection: function setLanguageDirection(dir) { - this.$node.css(dir === "ltr" ? this.css.ltr : this.css.rtl); - return s.setLanguageDirection.apply(this, [].slice.call(arguments, 0)); - }, - _hide: function hide() { - this.$node.hide(); - }, - _show: function show() { - this.$node.css("display", "block"); - } - }); - return DefaultMenu; - }(); - var Typeahead = function() { - "use strict"; - function Typeahead(o, www) { - var onFocused, onBlurred, onEnterKeyed, onTabKeyed, onEscKeyed, onUpKeyed, onDownKeyed, onLeftKeyed, onRightKeyed, onQueryChanged, onWhitespaceChanged; - o = o || {}; - if (!o.input) { - $.error("missing input"); - } - if (!o.menu) { - $.error("missing menu"); - } - if (!o.eventBus) { - $.error("missing event bus"); - } - www.mixin(this); - this.eventBus = o.eventBus; - this.minLength = _.isNumber(o.minLength) ? o.minLength : 1; - this.input = o.input; - this.menu = o.menu; - this.enabled = true; - this.autoselect = !!o.autoselect; - this.active = false; - this.input.hasFocus() && this.activate(); - this.dir = this.input.getLangDir(); - this._hacks(); - this.menu.bind().onSync("selectableClicked", this._onSelectableClicked, this).onSync("asyncRequested", this._onAsyncRequested, this).onSync("asyncCanceled", this._onAsyncCanceled, this).onSync("asyncReceived", this._onAsyncReceived, this).onSync("datasetRendered", this._onDatasetRendered, this).onSync("datasetCleared", this._onDatasetCleared, this); - onFocused = c(this, "activate", "open", "_onFocused"); - onBlurred = c(this, "deactivate", "_onBlurred"); - onEnterKeyed = c(this, "isActive", "isOpen", "_onEnterKeyed"); - onTabKeyed = c(this, "isActive", "isOpen", "_onTabKeyed"); - onEscKeyed = c(this, "isActive", "_onEscKeyed"); - onUpKeyed = c(this, "isActive", "open", "_onUpKeyed"); - onDownKeyed = c(this, "isActive", "open", "_onDownKeyed"); - onLeftKeyed = c(this, "isActive", "isOpen", "_onLeftKeyed"); - onRightKeyed = c(this, "isActive", "isOpen", "_onRightKeyed"); - onQueryChanged = c(this, "_openIfActive", "_onQueryChanged"); - onWhitespaceChanged = c(this, "_openIfActive", "_onWhitespaceChanged"); - this.input.bind().onSync("focused", onFocused, this).onSync("blurred", onBlurred, this).onSync("enterKeyed", onEnterKeyed, this).onSync("tabKeyed", onTabKeyed, this).onSync("escKeyed", onEscKeyed, this).onSync("upKeyed", onUpKeyed, this).onSync("downKeyed", onDownKeyed, this).onSync("leftKeyed", onLeftKeyed, this).onSync("rightKeyed", onRightKeyed, this).onSync("queryChanged", onQueryChanged, this).onSync("whitespaceChanged", onWhitespaceChanged, this).onSync("langDirChanged", this._onLangDirChanged, this); - } - _.mixin(Typeahead.prototype, { - _hacks: function hacks() { - var $input, $menu; - $input = this.input.$input || $("
"); - $menu = this.menu.$node || $("
"); - $input.on("blur.tt", function($e) { - var active, isActive, hasActive; - active = document.activeElement; - isActive = $menu.is(active); - hasActive = $menu.has(active).length > 0; - if (_.isMsie() && (isActive || hasActive)) { - $e.preventDefault(); - $e.stopImmediatePropagation(); - _.defer(function() { - $input.focus(); - }); - } - }); - $menu.on("mousedown.tt", function($e) { - $e.preventDefault(); - }); - }, - _onSelectableClicked: function onSelectableClicked(type, $el) { - this.select($el); - }, - _onDatasetCleared: function onDatasetCleared() { - this._updateHint(); - }, - _onDatasetRendered: function onDatasetRendered(type, suggestions, async, dataset) { - this._updateHint(); - if (this.autoselect) { - var cursorClass = this.selectors.cursor.substr(1); - this.menu.$node.find(this.selectors.suggestion).first().addClass(cursorClass); - } - this.eventBus.trigger("render", suggestions, async, dataset); - }, - _onAsyncRequested: function onAsyncRequested(type, dataset, query) { - this.eventBus.trigger("asyncrequest", query, dataset); - }, - _onAsyncCanceled: function onAsyncCanceled(type, dataset, query) { - this.eventBus.trigger("asynccancel", query, dataset); - }, - _onAsyncReceived: function onAsyncReceived(type, dataset, query) { - this.eventBus.trigger("asyncreceive", query, dataset); - }, - _onFocused: function onFocused() { - this._minLengthMet() && this.menu.update(this.input.getQuery()); - }, - _onBlurred: function onBlurred() { - if (this.input.hasQueryChangedSinceLastFocus()) { - this.eventBus.trigger("change", this.input.getQuery()); - } - }, - _onEnterKeyed: function onEnterKeyed(type, $e) { - var $selectable; - if ($selectable = this.menu.getActiveSelectable()) { - if (this.select($selectable)) { - $e.preventDefault(); - $e.stopPropagation(); - } - } else if (this.autoselect) { - if (this.select(this.menu.getTopSelectable())) { - $e.preventDefault(); - $e.stopPropagation(); - } - } - }, - _onTabKeyed: function onTabKeyed(type, $e) { - var $selectable; - if ($selectable = this.menu.getActiveSelectable()) { - this.select($selectable) && $e.preventDefault(); - } else if (this.autoselect) { - if ($selectable = this.menu.getTopSelectable()) { - this.autocomplete($selectable) && $e.preventDefault(); - } - } - }, - _onEscKeyed: function onEscKeyed() { - this.close(); - }, - _onUpKeyed: function onUpKeyed() { - this.moveCursor(-1); - }, - _onDownKeyed: function onDownKeyed() { - this.moveCursor(+1); - }, - _onLeftKeyed: function onLeftKeyed() { - if (this.dir === "rtl" && this.input.isCursorAtEnd()) { - this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable()); - } - }, - _onRightKeyed: function onRightKeyed() { - if (this.dir === "ltr" && this.input.isCursorAtEnd()) { - this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable()); - } - }, - _onQueryChanged: function onQueryChanged(e, query) { - this._minLengthMet(query) ? this.menu.update(query) : this.menu.empty(); - }, - _onWhitespaceChanged: function onWhitespaceChanged() { - this._updateHint(); - }, - _onLangDirChanged: function onLangDirChanged(e, dir) { - if (this.dir !== dir) { - this.dir = dir; - this.menu.setLanguageDirection(dir); - } - }, - _openIfActive: function openIfActive() { - this.isActive() && this.open(); - }, - _minLengthMet: function minLengthMet(query) { - query = _.isString(query) ? query : this.input.getQuery() || ""; - return query.length >= this.minLength; - }, - _updateHint: function updateHint() { - var $selectable, data, val, query, escapedQuery, frontMatchRegEx, match; - $selectable = this.menu.getTopSelectable(); - data = this.menu.getSelectableData($selectable); - val = this.input.getInputValue(); - if (data && !_.isBlankString(val) && !this.input.hasOverflow()) { - query = Input.normalizeQuery(val); - escapedQuery = _.escapeRegExChars(query); - frontMatchRegEx = new RegExp("^(?:" + escapedQuery + ")(.+$)", "i"); - match = frontMatchRegEx.exec(data.val); - match && this.input.setHint(val + match[1]); - } else { - this.input.clearHint(); - } - }, - isEnabled: function isEnabled() { - return this.enabled; - }, - enable: function enable() { - this.enabled = true; - }, - disable: function disable() { - this.enabled = false; - }, - isActive: function isActive() { - return this.active; - }, - activate: function activate() { - if (this.isActive()) { - return true; - } else if (!this.isEnabled() || this.eventBus.before("active")) { - return false; - } else { - this.active = true; - this.eventBus.trigger("active"); - return true; - } - }, - deactivate: function deactivate() { - if (!this.isActive()) { - return true; - } else if (this.eventBus.before("idle")) { - return false; - } else { - this.active = false; - this.close(); - this.eventBus.trigger("idle"); - return true; - } - }, - isOpen: function isOpen() { - return this.menu.isOpen(); - }, - open: function open() { - if (!this.isOpen() && !this.eventBus.before("open")) { - this.input.setAriaExpanded(true); - this.menu.open(); - this._updateHint(); - this.eventBus.trigger("open"); - } - return this.isOpen(); - }, - close: function close() { - if (this.isOpen() && !this.eventBus.before("close")) { - this.input.setAriaExpanded(false); - this.menu.close(); - this.input.clearHint(); - this.input.resetInputValue(); - this.eventBus.trigger("close"); - } - return !this.isOpen(); - }, - setVal: function setVal(val) { - this.input.setQuery(_.toStr(val)); - }, - getVal: function getVal() { - return this.input.getQuery(); - }, - select: function select($selectable) { - var data = this.menu.getSelectableData($selectable); - if (data && !this.eventBus.before("select", data.obj, data.dataset)) { - this.input.setQuery(data.val, true); - this.eventBus.trigger("select", data.obj, data.dataset); - this.close(); - return true; - } - return false; - }, - autocomplete: function autocomplete($selectable) { - var query, data, isValid; - query = this.input.getQuery(); - data = this.menu.getSelectableData($selectable); - isValid = data && query !== data.val; - if (isValid && !this.eventBus.before("autocomplete", data.obj, data.dataset)) { - this.input.setQuery(data.val); - this.eventBus.trigger("autocomplete", data.obj, data.dataset); - return true; - } - return false; - }, - moveCursor: function moveCursor(delta) { - var query, $candidate, data, suggestion, datasetName, cancelMove, id; - query = this.input.getQuery(); - $candidate = this.menu.selectableRelativeToCursor(delta); - data = this.menu.getSelectableData($candidate); - suggestion = data ? data.obj : null; - datasetName = data ? data.dataset : null; - id = $candidate ? $candidate.attr("id") : null; - this.input.trigger("cursorchange", id); - cancelMove = this._minLengthMet() && this.menu.update(query); - if (!cancelMove && !this.eventBus.before("cursorchange", suggestion, datasetName)) { - this.menu.setCursor($candidate); - if (data) { - if (typeof data.val === "string") { - this.input.setInputValue(data.val); - } - } else { - this.input.resetInputValue(); - this._updateHint(); - } - this.eventBus.trigger("cursorchange", suggestion, datasetName); - return true; - } - return false; - }, - destroy: function destroy() { - this.input.destroy(); - this.menu.destroy(); - } - }); - return Typeahead; - function c(ctx) { - var methods = [].slice.call(arguments, 1); - return function() { - var args = [].slice.call(arguments); - _.each(methods, function(method) { - return ctx[method].apply(ctx, args); - }); - }; - } - }(); - (function() { - "use strict"; - var old, keys, methods; - old = $.fn.typeahead; - keys = { - www: "tt-www", - attrs: "tt-attrs", - typeahead: "tt-typeahead" - }; - methods = { - initialize: function initialize(o, datasets) { - var www; - datasets = _.isArray(datasets) ? datasets : [].slice.call(arguments, 1); - o = o || {}; - www = WWW(o.classNames); - return this.each(attach); - function attach() { - var $input, $wrapper, $hint, $menu, defaultHint, defaultMenu, eventBus, input, menu, status, typeahead, MenuConstructor; - _.each(datasets, function(d) { - d.highlight = !!o.highlight; - }); - $input = $(this); - $wrapper = $(www.html.wrapper); - $hint = $elOrNull(o.hint); - $menu = $elOrNull(o.menu); - defaultHint = o.hint !== false && !$hint; - defaultMenu = o.menu !== false && !$menu; - defaultHint && ($hint = buildHintFromInput($input, www)); - defaultMenu && ($menu = $(www.html.menu).css(www.css.menu)); - $hint && $hint.val(""); - $input = prepInput($input, www); - if (defaultHint || defaultMenu) { - $wrapper.css(www.css.wrapper); - $input.css(defaultHint ? www.css.input : www.css.inputWithNoHint); - $input.wrap($wrapper).parent().prepend(defaultHint ? $hint : null).append(defaultMenu ? $menu : null); - } - MenuConstructor = defaultMenu ? DefaultMenu : Menu; - eventBus = new EventBus({ - el: $input - }); - input = new Input({ - hint: $hint, - input: $input, - menu: $menu - }, www); - menu = new MenuConstructor({ - node: $menu, - datasets: datasets - }, www); - status = new Status({ - $input: $input, - menu: menu - }); - typeahead = new Typeahead({ - input: input, - menu: menu, - eventBus: eventBus, - minLength: o.minLength, - autoselect: o.autoselect - }, www); - $input.data(keys.www, www); - $input.data(keys.typeahead, typeahead); - } - }, - isEnabled: function isEnabled() { - var enabled; - ttEach(this.first(), function(t) { - enabled = t.isEnabled(); - }); - return enabled; - }, - enable: function enable() { - ttEach(this, function(t) { - t.enable(); - }); - return this; - }, - disable: function disable() { - ttEach(this, function(t) { - t.disable(); - }); - return this; - }, - isActive: function isActive() { - var active; - ttEach(this.first(), function(t) { - active = t.isActive(); - }); - return active; - }, - activate: function activate() { - ttEach(this, function(t) { - t.activate(); - }); - return this; - }, - deactivate: function deactivate() { - ttEach(this, function(t) { - t.deactivate(); - }); - return this; - }, - isOpen: function isOpen() { - var open; - ttEach(this.first(), function(t) { - open = t.isOpen(); - }); - return open; - }, - open: function open() { - ttEach(this, function(t) { - t.open(); - }); - return this; - }, - close: function close() { - ttEach(this, function(t) { - t.close(); - }); - return this; - }, - select: function select(el) { - var success = false, $el = $(el); - ttEach(this.first(), function(t) { - success = t.select($el); - }); - return success; - }, - autocomplete: function autocomplete(el) { - var success = false, $el = $(el); - ttEach(this.first(), function(t) { - success = t.autocomplete($el); - }); - return success; - }, - moveCursor: function moveCursoe(delta) { - var success = false; - ttEach(this.first(), function(t) { - success = t.moveCursor(delta); - }); - return success; - }, - val: function val(newVal) { - var query; - if (!arguments.length) { - ttEach(this.first(), function(t) { - query = t.getVal(); - }); - return query; - } else { - ttEach(this, function(t) { - t.setVal(_.toStr(newVal)); - }); - return this; - } - }, - destroy: function destroy() { - ttEach(this, function(typeahead, $input) { - revert($input); - typeahead.destroy(); - }); - return this; - } - }; - $.fn.typeahead = function(method) { - if (methods[method]) { - return methods[method].apply(this, [].slice.call(arguments, 1)); - } else { - return methods.initialize.apply(this, arguments); - } - }; - $.fn.typeahead.noConflict = function noConflict() { - $.fn.typeahead = old; - return this; - }; - function ttEach($els, fn) { - $els.each(function() { - var $input = $(this), typeahead; - (typeahead = $input.data(keys.typeahead)) && fn(typeahead, $input); - }); - } - function buildHintFromInput($input, www) { - return $input.clone().addClass(www.classes.hint).removeData().css(www.css.hint).css(getBackgroundStyles($input)).prop({ - readonly: true, - required: false - }).removeAttr("id name placeholder").removeClass("required").attr({ - spellcheck: "false", - tabindex: -1 - }); - } - function prepInput($input, www) { - $input.data(keys.attrs, { - dir: $input.attr("dir"), - autocomplete: $input.attr("autocomplete"), - spellcheck: $input.attr("spellcheck"), - style: $input.attr("style") - }); - $input.addClass(www.classes.input).attr({ - spellcheck: false - }); - try { - !$input.attr("dir") && $input.attr("dir", "auto"); - } catch (e) {} - return $input; - } - function getBackgroundStyles($el) { - return { - backgroundAttachment: $el.css("background-attachment"), - backgroundClip: $el.css("background-clip"), - backgroundColor: $el.css("background-color"), - backgroundImage: $el.css("background-image"), - backgroundOrigin: $el.css("background-origin"), - backgroundPosition: $el.css("background-position"), - backgroundRepeat: $el.css("background-repeat"), - backgroundSize: $el.css("background-size") - }; - } - function revert($input) { - var www, $wrapper; - www = $input.data(keys.www); - $wrapper = $input.parent().filter(www.selectors.wrapper); - _.each($input.data(keys.attrs), function(val, key) { - _.isUndefined(val) ? $input.removeAttr(key) : $input.attr(key, val); - }); - $input.removeData(keys.typeahead).removeData(keys.www).removeData(keys.attr).removeClass(www.classes.input); - if ($wrapper.length) { - $input.detach().insertAfter($wrapper); - $wrapper.remove(); - } - } - function $elOrNull(obj) { - var isValid, $el; - isValid = _.isJQuery(obj) || _.isElement(obj); - $el = isValid ? $(obj).first() : []; - return $el.length ? $el : null; - } - })(); -}); \ No newline at end of file diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/search.json b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/search.json deleted file mode 100644 index 6f79c6be5..000000000 --- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/search.json +++ /dev/null @@ -1 +0,0 @@ -{"Structs/BigInt/Words.html#/s:Sl7IndicesQa":{"name":"Indices","parent_name":"Words"},"Structs/BigInt/Words.html#/s:Sl5countSivp":{"name":"count","parent_name":"Words"},"Structs/BigInt/Words.html#/s:Sk7indices7IndicesQzvp":{"name":"indices","parent_name":"Words"},"Structs/BigInt/Words.html#/s:Sl10startIndex0B0Qzvp":{"name":"startIndex","parent_name":"Words"},"Structs/BigInt/Words.html#/s:Sl8endIndex0B0Qzvp":{"name":"endIndex","parent_name":"Words"},"Structs/BigInt/Words.html#/s:Sly7ElementQz5IndexQzcip":{"name":"subscript(_:)","parent_name":"Words"},"Structs/BigInt/Sign.html#/s:6BigIntAAV4SignO4plusyA2DmF":{"name":"plus","abstract":"

Undocumented

","parent_name":"Sign"},"Structs/BigInt/Sign.html#/s:6BigIntAAV4SignO5minusyA2DmF":{"name":"minus","abstract":"

Undocumented

","parent_name":"Sign"},"Structs/BigInt/Sign.html":{"name":"Sign","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:Sj9MagnitudeQa":{"name":"Magnitude","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV4Worda":{"name":"Word","abstract":"

The type representing a digit in BigInt‘s underlying number system.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:Sz8isSignedSbvpZ":{"name":"isSigned","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV9magnitudeAA0A4UIntVvp":{"name":"magnitude","abstract":"

The absolute value of this integer.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV4signAB4SignOvp":{"name":"sign","abstract":"

True iff the value of this integer is negative.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV4sign9magnitudeA2B4SignO_AA0A4UIntVtcfc":{"name":"init(sign:magnitude:)","abstract":"

Initializes a new big integer with the provided absolute number and sign flag.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV6isZeroSbvp":{"name":"isZero","abstract":"

Return true iff this integer is zero.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV6signumAByF":{"name":"signum()","abstract":"

Returns -1 if this value is negative and 1 if it’s positive; otherwise, 0.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1poiyA2B_ABtFZ":{"name":"+(_:_:)","abstract":"

Add a to b and return the result.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2peoiyyABz_ABtFZ":{"name":"+=(_:_:)","abstract":"

Add b to a in place.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1topyA2BFZ":{"name":"~(_:)","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1aoiyA2Bz_ABtFZ":{"name":"&(_:_:)","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1ooiyA2Bz_ABtFZ":{"name":"|(_:_:)","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1xoiyA2Bz_ABtFZ":{"name":"^(_:_:)","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2aeoiyyABz_ABtFZ":{"name":"&=(_:_:)","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2oeoiyyABz_ABtFZ":{"name":"|=(_:_:)","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2xeoiyyABz_ABtFZ":{"name":"^=(_:_:)","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"BigInt"},"Structs/BigInt.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2eeoiySbAB_ABtFZ":{"name":"==(_:_:)","abstract":"

Return true iff a is equal to b.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1loiySbAB_ABtFZ":{"name":"<(_:_:)","abstract":"

Return true iff a is less than b.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAVyABSWcfc":{"name":"init(_:)","abstract":"

Initialize a BigInt from bytes accessed from an UnsafeRawBufferPointer,","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAVyAB10Foundation4DataVcfc":{"name":"init(_:)","abstract":"

Initializes an integer from the bits stored inside a piece of Data.","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV9serialize10Foundation4DataVyF":{"name":"serialize()","abstract":"

Return a Data value that contains the base-256 representation of this integer, in network (big-endian) byte order and a prepended byte to indicate the sign (0 for positive, 1 for negative)

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV20quotientAndRemainder10dividingByAB0C0_AB9remaindertAB_tF":{"name":"quotientAndRemainder(dividingBy:)","abstract":"

Divide this integer by y and return the resulting quotient and remainder.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1doiyA2B_ABtFZ":{"name":"/(_:_:)","abstract":"

Divide a by b and return the quotient. Traps if b is zero.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1roiyA2B_ABtFZ":{"name":"%(_:_:)","abstract":"

Divide a by b and return the remainder. The result has the same sign as a.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV7modulusyA2BF":{"name":"modulus(_:)","abstract":"

Return the result of a mod b. The result is always a nonnegative integer that is less than the absolute value of b.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2deoiyyABz_ABtFZ":{"name":"/=(_:_:)","abstract":"

Divide a by b storing the quotient in a.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2reoiyyABz_ABtFZ":{"name":"%=(_:_:)","abstract":"

Divide a by b storing the remainder in a.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV5poweryABSiF":{"name":"power(_:)","abstract":"

Returns this integer raised to the power exponent.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV5power_7modulusA2B_ABtF":{"name":"power(_:modulus:)","abstract":"

Returns the remainder of this integer raised to the power exponent in modulo arithmetic under modulus.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:Sz7exactlyxSgqd___tcSBRd__lufc":{"name":"init(exactly:)","parent_name":"BigInt"},"Structs/BigInt.html#/s:Szyxqd__cSBRd__lufc":{"name":"init(_:)","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV21greatestCommonDivisor4withA2B_tF":{"name":"greatestCommonDivisor(with:)","abstract":"

Returns the greatest common divisor of a and b.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV7inverseyABSgABF":{"name":"inverse(_:)","abstract":"

Returns the multiplicative inverse of this integer in modulo modulus arithmetic,","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV4hash4intoys6HasherVz_tF":{"name":"hash(into:)","abstract":"

Append this BigInt to the specified hasher.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAVABycfc":{"name":"init()","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAVyAbA0A4UIntVcfc":{"name":"init(_:)","abstract":"

Initializes a new signed big integer with the same value as the specified unsigned big integer.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:Szyxqd__cSzRd__lufc":{"name":"init(_:)","parent_name":"BigInt"},"Structs/BigInt.html#/s:Sj7exactlyxSgqd___tcSzRd__lufc":{"name":"init(exactly:)","parent_name":"BigInt"},"Structs/BigInt.html#/s:Sz8clampingxqd___tcSzRd__lufc":{"name":"init(clamping:)","parent_name":"BigInt"},"Structs/BigInt.html#/s:Sz18truncatingIfNeededxqd___tcSzRd__lufc":{"name":"init(truncatingIfNeeded:)","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV14integerLiteralABs5Int64V_tcfc":{"name":"init(integerLiteral:)","abstract":"

Initialize a new big integer from an integer literal.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1moiyA2B_ABtFZ":{"name":"*(_:_:)","abstract":"

Multiply a with b and return the result.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2meoiyyABz_ABtFZ":{"name":"*=(_:_:)","abstract":"

Multiply a with b in place.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV21isStrongProbablePrimeySbABF":{"name":"isStrongProbablePrime(_:)","abstract":"

Returns true iff this integer passes the strong probable prime test for the specified base.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV7isPrime6roundsSbSi_tF":{"name":"isPrime(rounds:)","abstract":"

Returns true if this integer is probably prime. Returns false if this integer is definitely not prime.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV3alloiyA2B_ABtFZ":{"name":"&<<(_:_:)","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV4alleoiyyABz_ABtFZ":{"name":"&<<=(_:_:)","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV3aggoiyA2B_ABtFZ":{"name":"&>>(_:_:)","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV4aggeoiyyABz_ABtFZ":{"name":"&>>=(_:_:)","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2lloiyA2B_xtSzRzlFZ":{"name":"<<(_:_:)","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV3lleoiyyABz_xtSzRzlFZ":{"name":"<<=(_:_:)","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2ggoiyA2B_xtSzRzlFZ":{"name":">>(_:_:)","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV3ggeoiyyABz_xtSzRzlFZ":{"name":">>=(_:_:)","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV10squareRootAByF":{"name":"squareRoot()","abstract":"

Returns the integer square root of a big integer; i.e., the largest integer whose square isn’t greater than value.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:Sx6StrideQa":{"name":"Stride","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV8advanced2byA2B_tF":{"name":"advanced(by:)","abstract":"

Returns self + n.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV8distance2toA2B_tF":{"name":"distance(to:)","abstract":"

Returns other - self.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV_5radixABSgx_SitcSyRzlufc":{"name":"init(_:radix:)","abstract":"

Initialize a big integer from an ASCII representation in a given radix. Numerals above 9 are represented by","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV20unicodeScalarLiteralABs7UnicodeO0D0V_tcfc":{"name":"init(unicodeScalarLiteral:)","abstract":"

Initialize a new big integer from a Unicode scalar.","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV30extendedGraphemeClusterLiteralABSS_tcfc":{"name":"init(extendedGraphemeClusterLiteral:)","abstract":"

Initialize a new big integer from an extended grapheme cluster.","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV13stringLiteralABSS_tcfc":{"name":"init(stringLiteral:)","abstract":"

Initialize a new big integer from a decimal number represented by a string literal of arbitrary length.","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV11descriptionSSvp":{"name":"description","abstract":"

Return the decimal representation of this integer.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV21playgroundDescriptionypvp":{"name":"playgroundDescription","abstract":"

Return the playground quick look representation of this integer.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV6negateyyF":{"name":"negate()","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1soiyA2B_ABtFZ":{"name":"-(_:_:)","abstract":"

Subtract b from a and return the result.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2seoiyyABz_ABtFZ":{"name":"-=(_:_:)","abstract":"

Subtract b from a in place.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV8bitWidthSivp":{"name":"bitWidth","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV20trailingZeroBitCountSivp":{"name":"trailingZeroBitCount","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt/Words.html":{"name":"Words","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV5wordsAB5WordsVvp":{"name":"words","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV5wordsABx_tcSTRzSu7ElementRtzlufc":{"name":"init(words:)","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigUInt/Words.html#/s:Sl10startIndex0B0Qzvp":{"name":"startIndex","parent_name":"Words"},"Structs/BigUInt/Words.html#/s:Sl8endIndex0B0Qzvp":{"name":"endIndex","parent_name":"Words"},"Structs/BigUInt/Words.html#/s:Sly7ElementQz5IndexQzcip":{"name":"subscript(_:)","parent_name":"Words"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV4Worda":{"name":"Word","abstract":"

The type representing a digit in BigUInt‘s underlying number system.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntVACycfc":{"name":"init()","abstract":"

Initializes a new BigUInt with value 0.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV5wordsACSaySuG_tcfc":{"name":"init(words:)","abstract":"

Initializes a new BigUInt with the specified digits. The digits are ordered from least to most significant.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV1poiyA2C_ACtFZ":{"name":"+(_:_:)","abstract":"

Add a and b together and return the result.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2peoiyyACz_ACtFZ":{"name":"+=(_:_:)","abstract":"

Add a and b together, and store the sum in a.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Sz8isSignedSbvpZ":{"name":"isSigned","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV6signumACyF":{"name":"signum()","abstract":"

Returns 1 if this value is, positive; otherwise, 0.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV1topyA2CFZ":{"name":"~(_:)","abstract":"

Return the ones’ complement of a.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2oeoiyyACz_ACtFZ":{"name":"|=(_:_:)","abstract":"

Calculate the bitwise OR of a and b, and store the result in a.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2aeoiyyACz_ACtFZ":{"name":"&=(_:_:)","abstract":"

Calculate the bitwise AND of a and b and return the result.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2xeoiyyACz_ACtFZ":{"name":"^=(_:_:)","abstract":"

Calculate the bitwise XOR of a and b and return the result.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV7compareySo18NSComparisonResultVAC_ACtFZ":{"name":"compare(_:_:)","abstract":"

Compare a to b and return an NSComparisonResult indicating their order.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2eeoiySbAC_ACtFZ":{"name":"==(_:_:)","abstract":"

Return true iff a is equal to b.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV1loiySbAC_ACtFZ":{"name":"<(_:_:)","abstract":"

Return true iff a is less than b.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntVyACSWcfc":{"name":"init(_:)","abstract":"

Initialize a BigInt from bytes accessed from an UnsafeRawBufferPointer

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntVyAC10Foundation4DataVcfc":{"name":"init(_:)","abstract":"

Initializes an integer from the bits stored inside a piece of Data.","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV9serialize10Foundation4DataVyF":{"name":"serialize()","abstract":"

Return a Data value that contains the base-256 representation of this integer, in network (big-endian) byte order.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV20quotientAndRemainder10dividingByAC0D0_AC9remaindertAC_tF":{"name":"quotientAndRemainder(dividingBy:)","abstract":"

Divide this integer by y and return the resulting quotient and remainder.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV1doiyA2C_ACtFZ":{"name":"/(_:_:)","abstract":"

Divide x by y and return the quotient.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV1roiyA2C_ACtFZ":{"name":"%(_:_:)","abstract":"

Divide x by y and return the remainder.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2deoiyyACz_ACtFZ":{"name":"/=(_:_:)","abstract":"

Divide x by y and store the quotient in x.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2reoiyyACz_ACtFZ":{"name":"%=(_:_:)","abstract":"

Divide x by y and store the remainder in x.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV5poweryACSiF":{"name":"power(_:)","abstract":"

Returns this integer raised to the power exponent.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV5power_7modulusA2C_ACtF":{"name":"power(_:modulus:)","abstract":"

Returns the remainder of this integer raised to the power exponent in modulo arithmetic under modulus.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Sz7exactlyxSgqd___tcSBRd__lufc":{"name":"init(exactly:)","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Szyxqd__cSBRd__lufc":{"name":"init(_:)","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV21greatestCommonDivisor4withA2C_tF":{"name":"greatestCommonDivisor(with:)","abstract":"

Returns the greatest common divisor of self and b.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV7inverseyACSgACF":{"name":"inverse(_:)","abstract":"

Returns the multiplicative inverse of this integer in modulo modulus arithmetic,","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV4hash4intoys6HasherVz_tF":{"name":"hash(into:)","abstract":"

Append this BigUInt to the specified hasher.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Sj7exactlyxSgqd___tcSzRd__lufc":{"name":"init(exactly:)","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Szyxqd__cSzRd__lufc":{"name":"init(_:)","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Sz18truncatingIfNeededxqd___tcSzRd__lufc":{"name":"init(truncatingIfNeeded:)","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Sz8clampingxqd___tcSzRd__lufc":{"name":"init(clamping:)","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV14integerLiteralACs6UInt64V_tcfc":{"name":"init(integerLiteral:)","abstract":"

Initialize a new big integer from an integer literal.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV8multiply6byWordySu_tF":{"name":"multiply(byWord:)","abstract":"

Multiply this big integer by a single word, and store the result in place of the original big integer.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV10multiplied6byWordACSu_tF":{"name":"multiplied(byWord:)","abstract":"

Multiply this big integer by a single Word, and return the result.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV14multiplyAndAdd__9shiftedByyAC_SuSitF":{"name":"multiplyAndAdd(_:_:shiftedBy:)","abstract":"

Multiply x by y, and add the result to this integer, optionally shifted shift words to the left.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV10multiplied2byA2C_tF":{"name":"multiplied(by:)","abstract":"

Multiply this integer by y and return the result.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV25directMultiplicationLimitSivpZ":{"name":"directMultiplicationLimit","abstract":"

Multiplication switches to an asymptotically better recursive algorithm when arguments have more words than this limit.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV1moiyA2C_ACtFZ":{"name":"*(_:_:)","abstract":"

Multiply a by b and return the result.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2meoiyyACz_ACtFZ":{"name":"*=(_:_:)","abstract":"

Multiply a by b and store the result in a.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV21isStrongProbablePrimeySbACF":{"name":"isStrongProbablePrime(_:)","abstract":"

Returns true iff this integer passes the strong probable prime test for the specified base.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV7isPrime6roundsSbSi_tF":{"name":"isPrime(rounds:)","abstract":"

Returns true if this integer is probably prime. Returns false if this integer is definitely not prime.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV13randomInteger16withMaximumWidth5usingACSi_xztSGRzlFZ":{"name":"randomInteger(withMaximumWidth:using:)","abstract":"

Create a big unsigned integer consisting of width uniformly distributed random bits.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV13randomInteger16withMaximumWidthACSi_tFZ":{"name":"randomInteger(withMaximumWidth:)","abstract":"

Create a big unsigned integer consisting of width uniformly distributed random bits.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV13randomInteger14withExactWidth5usingACSi_xztSGRzlFZ":{"name":"randomInteger(withExactWidth:using:)","abstract":"

Create a big unsigned integer consisting of width-1 uniformly distributed random bits followed by a one bit.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV13randomInteger14withExactWidthACSi_tFZ":{"name":"randomInteger(withExactWidth:)","abstract":"

Create a big unsigned integer consisting of width-1 uniformly distributed random bits followed by a one bit.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV13randomInteger8lessThan5usingA2C_xztSGRzlFZ":{"name":"randomInteger(lessThan:using:)","abstract":"

Create a uniformly distributed random unsigned integer that’s less than the specified limit.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV13randomInteger8lessThanA2C_tFZ":{"name":"randomInteger(lessThan:)","abstract":"

Create a uniformly distributed random unsigned integer that’s less than the specified limit.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV3ggeoiyyACz_xtSzRzlFZ":{"name":">>=(_:_:)","abstract":"

Undocumented

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV3lleoiyyACz_xtSzRzlFZ":{"name":"<<=(_:_:)","abstract":"

Undocumented

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2ggoiyA2C_xtSzRzlFZ":{"name":">>(_:_:)","abstract":"

Undocumented

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2lloiyA2C_xtSzRzlFZ":{"name":"<<(_:_:)","abstract":"

Undocumented

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV10squareRootACyF":{"name":"squareRoot()","abstract":"

Returns the integer square root of a big integer; i.e., the largest integer whose square isn’t greater than value.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV6Stridea":{"name":"Stride","abstract":"

A type that can represent the distance between two values ofa BigUInt.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV8advanced2byAc2AV_tF":{"name":"advanced(by:)","abstract":"

Adds n to self and returns the result. Traps if the result would be less than zero.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV8distance2toA2AVAC_tF":{"name":"distance(to:)","abstract":"

Returns the (potentially negative) difference between self and other as a BigInt. Never traps.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV_5radixACSgx_SitcSyRzlufc":{"name":"init(_:radix:)","abstract":"

Initialize a big integer from an ASCII representation in a given radix. Numerals above 9 are represented by","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV20unicodeScalarLiteralACs7UnicodeO0E0V_tcfc":{"name":"init(unicodeScalarLiteral:)","abstract":"

Initialize a new big integer from a Unicode scalar.","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV30extendedGraphemeClusterLiteralACSS_tcfc":{"name":"init(extendedGraphemeClusterLiteral:)","abstract":"

Initialize a new big integer from an extended grapheme cluster.","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV13stringLiteralACSS_tcfc":{"name":"init(stringLiteral:)","abstract":"

Initialize a new big integer from a decimal number represented by a string literal of arbitrary length.","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV11descriptionSSvp":{"name":"description","abstract":"

Return the decimal representation of this integer.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV21playgroundDescriptionypvp":{"name":"playgroundDescription","abstract":"

Return the playground quick look representation of this integer.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV25subtractReportingOverflow_9shiftedBySbAC_SitF":{"name":"subtractReportingOverflow(_:shiftedBy:)","abstract":"

Subtract other from this integer in place, and return a flag indicating if the operation caused an","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV28subtractingReportingOverflow_9shiftedByAC12partialValue_Sb8overflowtAC_SitF":{"name":"subtractingReportingOverflow(_:shiftedBy:)","abstract":"

Subtract other from this integer, returning the difference and a flag indicating arithmetic overflow.","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV28subtractingReportingOverflowyAC12partialValue_Sb8overflowtACF":{"name":"subtractingReportingOverflow(_:)","abstract":"

Subtracts other from self, returning the result and a flag indicating arithmetic overflow.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV8subtract_9shiftedByyAC_SitF":{"name":"subtract(_:shiftedBy:)","abstract":"

Subtract other from this integer in place.","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV11subtracting_9shiftedByA2C_SitF":{"name":"subtracting(_:shiftedBy:)","abstract":"

Subtract b from this integer, and return the difference.","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV9decrement9shiftedByySi_tF":{"name":"decrement(shiftedBy:)","abstract":"

Decrement this integer by one.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV1soiyA2C_ACtFZ":{"name":"-(_:_:)","abstract":"

Subtract b from a and return the result.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2seoiyyACz_ACtFZ":{"name":"-=(_:_:)","abstract":"

Subtract b from a and store the result in a.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV5bitAtSbSi_tcip":{"name":"subscript(bitAt:)","abstract":"

Undocumented

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV8bitWidthSivp":{"name":"bitWidth","abstract":"

The minimum number of bits required to represent this integer in binary.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV19leadingZeroBitCountSivp":{"name":"leadingZeroBitCount","abstract":"

The number of leading zero bits in the binary representation of this integer in base 2^(Word.bitWidth).","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV20trailingZeroBitCountSivp":{"name":"trailingZeroBitCount","abstract":"

The number of trailing zero bits in the binary representation of this integer.

","parent_name":"BigUInt"},"Structs/BigUInt/Words.html":{"name":"Words","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Sz5words5WordsQzvp":{"name":"words","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV5wordsACx_tcSTRzSu7ElementRtzlufc":{"name":"init(words:)","abstract":"

Undocumented

","parent_name":"BigUInt"},"Structs/BigUInt.html":{"name":"BigUInt","abstract":"

An arbitary precision unsigned integer type, also known as a “big integer”.

"},"Structs/BigInt.html":{"name":"BigInt","abstract":"

An arbitary precision signed integer type, also known as a “big integer”.

"},"Extensions/String.html#/s:SS6BigIntEySSAA0A4UIntVcfc":{"name":"init(_:)","abstract":"

Initialize a new string with the base-10 representation of an unsigned big integer.

","parent_name":"String"},"Extensions/String.html#/s:SS6BigIntE_5radix9uppercaseSSAA0A4UIntV_SiSbtcfc":{"name":"init(_:radix:uppercase:)","abstract":"

Initialize a new string representing an unsigned big integer in the given radix (base).

","parent_name":"String"},"Extensions/String.html#/s:SS6BigIntE_5radix9uppercaseSSA2AV_SiSbtcfc":{"name":"init(_:radix:uppercase:)","abstract":"

Initialize a new string representing a signed big integer in the given radix (base).

","parent_name":"String"},"Extensions/BinaryFloatingPoint.html#/s:SB6BigInts17FixedWidthInteger11RawExponentRpzsAB0F11SignificandRpzrlEyxA2AVcfc":{"name":"init(_:)","abstract":"

Undocumented

","parent_name":"BinaryFloatingPoint"},"Extensions/BinaryFloatingPoint.html#/s:SB6BigInts17FixedWidthInteger11RawExponentRpzsAB0F11SignificandRpzrlEyxAA0A4UIntVcfc":{"name":"init(_:)","abstract":"

Undocumented

","parent_name":"BinaryFloatingPoint"},"Extensions/BinaryFloatingPoint.html":{"name":"BinaryFloatingPoint"},"Extensions/String.html":{"name":"String"},"Extensions.html":{"name":"Extensions","abstract":"

The following extensions are available globally.

"},"Structs.html":{"name":"Structures","abstract":"

The following structures are available globally.

"}} \ No newline at end of file diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/docSet.dsidx b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/docSet.dsidx deleted file mode 100644 index 8378812bb..000000000 Binary files a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/docSet.dsidx and /dev/null differ diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.tgz b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.tgz deleted file mode 100644 index cb79a7c0a..000000000 Binary files a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.tgz and /dev/null differ diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.xml b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.xml deleted file mode 100644 index 21509e218..000000000 --- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.xml +++ /dev/null @@ -1 +0,0 @@ -v5.2.1https://attaswift.github.io/BigInt/reference/docsets/BigInt.tgz diff --git a/Carthage/Checkouts/BigInt/docs/img/carat.png b/Carthage/Checkouts/BigInt/docs/img/carat.png deleted file mode 100755 index 29d2f7fd4..000000000 Binary files a/Carthage/Checkouts/BigInt/docs/img/carat.png and /dev/null differ diff --git a/Carthage/Checkouts/BigInt/docs/img/dash.png b/Carthage/Checkouts/BigInt/docs/img/dash.png deleted file mode 100755 index 6f694c7a0..000000000 Binary files a/Carthage/Checkouts/BigInt/docs/img/dash.png and /dev/null differ diff --git a/Carthage/Checkouts/BigInt/docs/img/gh.png b/Carthage/Checkouts/BigInt/docs/img/gh.png deleted file mode 100755 index 628da97c7..000000000 Binary files a/Carthage/Checkouts/BigInt/docs/img/gh.png and /dev/null differ diff --git a/Carthage/Checkouts/BigInt/docs/img/spinner.gif b/Carthage/Checkouts/BigInt/docs/img/spinner.gif deleted file mode 100644 index e3038d0a4..000000000 Binary files a/Carthage/Checkouts/BigInt/docs/img/spinner.gif and /dev/null differ diff --git a/Carthage/Checkouts/BigInt/docs/index.html b/Carthage/Checkouts/BigInt/docs/index.html deleted file mode 100644 index cb588bb2b..000000000 --- a/Carthage/Checkouts/BigInt/docs/index.html +++ /dev/null @@ -1,493 +0,0 @@ - - - - BigInt Reference - - - - - - - - - - - - - - - -
-

- - BigInt v5.2.1 Docs - - (85% documented) -

- -

-

- -
-

- -

- - - View on GitHub - -

- -

- - - Install in Dash - -

-
- - - -
- -
- -
-
- -

BigInt

- - - -

Swift 5 -License -Platform

- -

Build Status -Code Coverage -jazzy -Carthage compatible -Version

-

Overview

- -

This repository provides integer types of arbitrary width implemented -in 100% pure Swift. The underlying representation is in base 2^64, using Array<UInt64>.

- -

This module is handy when you need an integer type that’s wider than UIntMax, but -you don’t want to add The GNU Multiple Precision Arithmetic Library -as a dependency.

- -

Two big integer types are included: BigUInt and BigInt, -the latter being the signed variant. -Both of these are Swift structs with copy-on-write value semantics, and they can be used much -like any other integer type.

- -

The library provides implementations for some of the most frequently useful functions on -big integers, including

- - - -

The implementations are intended to be reasonably efficient, but they are unlikely to be -competitive with GMP at all, even when I happened to implement an algorithm with same asymptotic -behavior as GMP. (I haven’t performed a comparison benchmark, though.)

- -

The library has 100% unit test coverage. Sadly this does not imply that there are no bugs -in it.

-

API Documentation

- -

Generated API docs are available at https://attaswift.github.io/BigInt/.

-

License

- -

BigInt can be used, distributed and modified under the MIT license.

-

Requirements and Integration

- -

BigInt 4.0.0 requires Swift 4.2 (The last version with support for Swift 3.x was BigInt 2.1.0. -The last version with support for Swift 2 was BigInt 1.3.0.)

- - - - - - - - - - - - - - - - - - - - - - - -
Swift Versionlast BigInt Version
3.x2.1.0
4.03.1.0
4.24.0.0
5.x5.2.1
- -

BigInt deploys to macOS 10.10, iOS 9, watchOS 2 and tvOS 9. -It has been tested on the latest OS releases only—however, as the module uses very few platform-provided APIs, -there should be very few issues with earlier versions.

- -

BigInt uses no APIs specific to Apple platforms, so -it should be easy to port it to other operating systems.

- -

Setup instructions:

- -
    -
  • Swift Package Manager: -Although the Package Manager is still in its infancy, BigInt provides experimental support for it. -Add this to the dependency section of your Package.swift manifest:

    -
    .package(url: "https://github.com/attaswift/BigInt.git", from: "5.2.1")
    -
  • -
  • CocoaPods: Put this in your Podfile:

    -
    pod 'BigInt', '~> 5.2'
    -
  • -
  • Carthage: Put this in your Cartfile:

    -
    github "attaswift/BigInt" ~> 5.2
    -
  • -
-

Implementation notes

- -

BigUInt is a MutableCollectionType of its 64-bit digits, with the least significant -digit at index 0. As a convenience, BigUInt allows you to subscript it with indexes at -or above its count. The subscript operator returns 0 for out-of-bound gets and -automatically extends the array on out-of-bound sets. This makes memory management simpler.

- -

BigInt is just a tiny wrapper around a BigUInt absolute value and a -sign bit, both of which are accessible as public read-write properties.

-

Why is there no generic BigInt<Digit> type?

- -

The types provided by BigInt are not parametric—this is very much intentional, as -Swift generics cost us dearly at runtime in this use case. In every approach I tried, -making arbitrary-precision arithmetic operations work with a generic Digit type parameter -resulted in code that was literally ten times slower. If you can make the algorithms generic -without such a huge performance hit, please enlighten me!

- -

This is an area that I plan to investigate more, as it would be useful to have generic -implementations for arbitrary-width arithmetic operations. (Polynomial division and decimal bases -are two examples.) The library already implements double-digit multiplication and division as -extension methods on a protocol with an associated type requirement; this has not measurably affected -performance. Unfortunately, the same is not true for BigUInt‘s methods.

- -

Of course, as a last resort, we could just duplicate the code to create a separate -generic variant that was slower but more flexible.

-

Calculation Samples

-

Obligatory Factorial Demo

- -

It is easy to use BigInt to calculate the factorial function for any integer:

-
import BigInt
-
-func factorial(_ n: Int) -> BigInt {
-    return (1 ... n).map { BigInt($0) }.reduce(BigInt(1), *)
-}
-
-print(factorial(10))
-==> 362880
-
-print(factorial(100))
-==> 93326215443944152681699238856266700490715968264381621468592963895217599993229915
-    6089414639761565182862536979208272237582511852109168640000000000000000000000
-
-print(factorial(1000))
-==> 40238726007709377354370243392300398571937486421071463254379991042993851239862902
-    05920442084869694048004799886101971960586316668729948085589013238296699445909974
-    24504087073759918823627727188732519779505950995276120874975462497043601418278094
-    64649629105639388743788648733711918104582578364784997701247663288983595573543251
-    31853239584630755574091142624174743493475534286465766116677973966688202912073791
-    43853719588249808126867838374559731746136085379534524221586593201928090878297308
-    43139284440328123155861103697680135730421616874760967587134831202547858932076716
-    91324484262361314125087802080002616831510273418279777047846358681701643650241536
-    91398281264810213092761244896359928705114964975419909342221566832572080821333186
-    11681155361583654698404670897560290095053761647584772842188967964624494516076535
-    34081989013854424879849599533191017233555566021394503997362807501378376153071277
-    61926849034352625200015888535147331611702103968175921510907788019393178114194545
-    25722386554146106289218796022383897147608850627686296714667469756291123408243920
-    81601537808898939645182632436716167621791689097799119037540312746222899880051954
-    44414282012187361745992642956581746628302955570299024324153181617210465832036786
-    90611726015878352075151628422554026517048330422614397428693306169089796848259012
-    54583271682264580665267699586526822728070757813918581788896522081643483448259932
-    66043367660176999612831860788386150279465955131156552036093988180612138558600301
-    43569452722420634463179746059468257310379008402443243846565724501440282188525247
-    09351906209290231364932734975655139587205596542287497740114133469627154228458623
-    77387538230483865688976461927383814900140767310446640259899490222221765904339901
-    88601856652648506179970235619389701786004081188972991831102117122984590164192106
-    88843871218556461249607987229085192968193723886426148396573822911231250241866493
-    53143970137428531926649875337218940694281434118520158014123344828015051399694290
-    15348307764456909907315243327828826986460278986432113908350621709500259738986355
-    42771967428222487575867657523442202075736305694988250879689281627538488633969099
-    59826280956121450994871701244516461260379029309120889086942028510640182154399457
-    15680594187274899809425474217358240106367740459574178516082923013535808184009699
-    63725242305608559037006242712434169090041536901059339838357779394109700277534720
-    00000000000000000000000000000000000000000000000000000000000000000000000000000000
-    00000000000000000000000000000000000000000000000000000000000000000000000000000000
-    00000000000000000000000000000000000000000000000000000000000000000000000000000000
-    00000
-
- -

Well, I guess that’s all right, but it’s not very interesting. Let’s try something more useful.

-

RSA Cryptography

- -

The BigInt module provides all necessary parts to implement an (overly) -simple RSA cryptography system.

- -

Let’s start with a simple function that generates a random n-bit prime. The module -includes a function to generate random integers of a specific size, and also an -isPrime method that performs the Miller–Rabin primality test. These are all we need:

-
func generatePrime(_ width: Int) -> BigUInt {
-    while true {
-        var random = BigUInt.randomInteger(withExactWidth: width)
-        random |= BigUInt(1)
-        if random.isPrime() {
-            return random
-        }
-    }
-}
-
-let p = generatePrime(1024)
-==> 13308187650642192396256419911012544845370493728424936791561478318443071617242872
-    81980956747087187419914435169914161116601678883358611076800743580556055714173922
-    08406194264346635072293912609713085260354070700055888678514690878149253177960273
-    775659537560220378850112471985434373425534121373466492101182463962031
-
-let q = generatePrime(1024)
-==> 17072954422657145489547308812333368925007949054501204983863958355897172093173783
-    10108226596943999553784252564650624766276133157586733504784616138305701168410157
-    80784336308507083874651158029602582993233111593356512531869546706885170044355115
-    669728424124141763799008880327106952436883614887277350838425336156327
-
- -

Cool! Now that we have two large primes, we can produce an RSA public/private keypair -out of them.

-
typealias Key = (modulus: BigUInt, exponent: BigUInt)
-
-let n = p * q
-==> 22721008120758282530010953362926306641542233757318103044313144976976529789946696
-    15454966720907712515917481418981591379647635391260569349099666410127279690367978
-    81184375533755888994370640857883754985364288413796100527262763202679037134021810
-    57933883525572232242690805678883227791774442041516929419640051653934584376704034
-    63953169772816907280591934423237977258358097846511079947337857778137177570668391
-    57455417707100275487770399281417352829897118140972240757708561027087217205975220
-    02207275447810167397968435583004676293892340103729490987263776871467057582629588
-    916498579594964478080508868267360515953225283461208420137
-
-let e: BigUInt = 65537
-let phi = (p - 1) * (q - 1)
-let d = e.inverse(phi)!     // d * e % phi == 1
-==> 13964664343869014759736350480776837992604500903989703383202366291905558996277719
-    77822086142456362972689566985925179681282432115598451765899180050962461295573831
-    37069237934291884106584820998146965085531433195106686745474222222620986858696591
-    69836532468835154412554521152103642453158895363417640676611704542784576974374954
-    45789456921660619938185093118762690200980720312508614337759620606992462563490422
-    76669559556568917533268479190948959560397579572761529852891246283539604545691244
-    89999692877158676643042118662613875863504016129837099223040687512684532694527109
-    80742873307409704484365002175294665608486688146261327793
-
-let publicKey: Key = (n, e)
-let privateKey: Key = (n, d)
-
- -

In RSA, modular exponentiation is used to encrypt (and decrypt) messages.

-
func encrypt(_ message: BigUInt, key: Key) -> BigUInt {
-    return message.power(key.exponent, modulus: key.modulus)
-}
-
- -

Let’s try out our new keypair by converting a string into UTF-8, interpreting -the resulting binary representation as a big integer, and encrypting it with the -public key. BigUInt has an initializer that takes an NSData, so this is pretty -easy to do:

-
let secret: BigUInt = BigUInt("Arbitrary precision arithmetic is fun!".dataUsingEncoding(NSUTF8StringEncoding)!)
-==> 83323446846105976078466731524728681905293067701804838925389198929123912971229457
-    68818568737
-
-let cyphertext = encrypt(secret, key: publicKey)
-==> 95186982543485985200666516508066093880038842892337880561554910904277290917831453
-    54854954722744805432145474047391353716305176389470779020645959135298322520888633
-    61674945129099575943384767330342554525120384485469428048962027149169876127890306
-    77028183904699491962050888974524603226290836984166164759586952419343589385279641
-    47999991283152843977988979846238236160274201261075188190509539751990119132013021
-    74866638595734222867005089157198503204192264814750832072844208520394603054901706
-    06024394731371973402595826456435944968439153664617188570808940022471990638468783
-    49208193955207336172861151720299024935127021719852700882
-
- -

Well, it looks encrypted all right, but can we get the original message back? -In theory, encrypting the cyphertext with the private key returns the original message. -Let’s see:

-
let plaintext = encrypt(cyphertext, key: privateKey)
-==> 83323446846105976078466731524728681905293067701804838925389198929123912971229457
-    68818568737
-
-let received = String(data: plaintext.serialize(), encoding: NSUTF8StringEncoding)
-==> "Arbitrary precision arithmetic is fun!"
-
- -

Yay! This is truly terrific, but please don’t use this example code in an actual -cryptography system. RSA has lots of subtle (and some not so subtle) complications -that we ignored to keep this example short.

-

Calculating the Digits of π

- -

Another fun activity to try with BigInts is to generate the digits of π. -Let’s try implementing Jeremy Gibbon’s spigot algorithm. -This is a rather slow algorithm as π-generators go, but it makes up for it with its grooviness -factor: it’s remarkably short, it only uses (big) integer arithmetic, and every iteration -produces a single new digit in the base-10 representation of π. This naturally leads to an -implementation as an infinite GeneratorType:

-
func digitsOfPi() -> AnyGenerator<Int> {
-    var q: BigUInt = 1
-    var r: BigUInt = 180
-    var t: BigUInt = 60
-    var i: UInt64 = 2 // Does not overflow until digit #826_566_842
-    return AnyIterator {
-        let u: UInt64 = 3 * (3 * i + 1) * (3 * i + 2)
-        let y = (q.multiplied(byDigit: 27 * i - 12) + 5 * r) / (5 * t)
-        (q, r, t) = (
-            10 * q.multiplied(byDigit: i * (2 * i - 1)),
-            10 * (q.multiplied(byDigit: 5 * i - 2) + r - y * t).multiplied(byDigit: u),
-            t.multiplied(byDigit: u))
-        i += 1
-        return Int(y[0])
-    }
-}
-
- -

Well, that was surprisingly easy. But does it work? Of course it does!

-
var digits = "π ≈ "
-var count = 0
-for digit in digitsOfPi() {
-    assert(digit < 10)
-    digits += String(digit)
-    count += 1
-    if count == 1 { digits += "." }
-    if count == 1000 { break }
-}
-
-digits
-==> π ≈ 3.14159265358979323846264338327950288419716939937510582097494459230781640628
-    62089986280348253421170679821480865132823066470938446095505822317253594081284811
-    17450284102701938521105559644622948954930381964428810975665933446128475648233786
-    78316527120190914564856692346034861045432664821339360726024914127372458700660631
-    55881748815209209628292540917153643678925903600113305305488204665213841469519415
-    11609433057270365759591953092186117381932611793105118548074462379962749567351885
-    75272489122793818301194912983367336244065664308602139494639522473719070217986094
-    37027705392171762931767523846748184676694051320005681271452635608277857713427577
-    89609173637178721468440901224953430146549585371050792279689258923542019956112129
-    02196086403441815981362977477130996051870721134999999837297804995105973173281609
-    63185950244594553469083026425223082533446850352619311881710100031378387528865875
-    33208381420617177669147303598253490428755468731159562863882353787593751957781857
-    780532171226806613001927876611195909216420198
-
- -

Now go and have some fun with big integers on your own!

- -
-
- - -
-
- - -
- diff --git a/Carthage/Checkouts/BigInt/docs/js/jazzy.js b/Carthage/Checkouts/BigInt/docs/js/jazzy.js deleted file mode 100755 index 1e55d6ef0..000000000 --- a/Carthage/Checkouts/BigInt/docs/js/jazzy.js +++ /dev/null @@ -1,70 +0,0 @@ -window.jazzy = {'docset': false} -if (typeof window.dash != 'undefined') { - document.documentElement.className += ' dash' - window.jazzy.docset = true -} -if (navigator.userAgent.match(/xcode/i)) { - document.documentElement.className += ' xcode' - window.jazzy.docset = true -} - -function toggleItem($link, $content) { - var animationDuration = 300; - $link.toggleClass('token-open'); - $content.slideToggle(animationDuration); -} - -function itemLinkToContent($link) { - return $link.parent().parent().next(); -} - -// On doc load + hash-change, open any targetted item -function openCurrentItemIfClosed() { - if (window.jazzy.docset) { - return; - } - var $link = $(`a[name="${location.hash.substring(1)}"]`).nextAll('.token'); - $content = itemLinkToContent($link); - if ($content.is(':hidden')) { - toggleItem($link, $content); - } -} - -$(openCurrentItemIfClosed); -$(window).on('hashchange', openCurrentItemIfClosed); - -// On item link ('token') click, toggle its discussion -$('.token').on('click', function(event) { - if (window.jazzy.docset) { - return; - } - var $link = $(this); - toggleItem($link, itemLinkToContent($link)); - - // Keeps the document from jumping to the hash. - var href = $link.attr('href'); - if (history.pushState) { - history.pushState({}, '', href); - } else { - location.hash = href; - } - event.preventDefault(); -}); - -// Clicks on links to the current, closed, item need to open the item -$("a:not('.token')").on('click', function() { - if (location == this.href) { - openCurrentItemIfClosed(); - } -}); - -// KaTeX rendering -if ("katex" in window) { - $($('.math').each( (_, element) => { - katex.render(element.textContent, element, { - displayMode: $(element).hasClass('m-block'), - throwOnError: false, - trust: true - }); - })) -} diff --git a/Carthage/Checkouts/BigInt/docs/js/jazzy.search.js b/Carthage/Checkouts/BigInt/docs/js/jazzy.search.js deleted file mode 100644 index e3d1ab905..000000000 --- a/Carthage/Checkouts/BigInt/docs/js/jazzy.search.js +++ /dev/null @@ -1,70 +0,0 @@ -$(function(){ - var $typeahead = $('[data-typeahead]'); - var $form = $typeahead.parents('form'); - var searchURL = $form.attr('action'); - - function displayTemplate(result) { - return result.name; - } - - function suggestionTemplate(result) { - var t = '
'; - t += '' + result.name + ''; - if (result.parent_name) { - t += '' + result.parent_name + ''; - } - t += '
'; - return t; - } - - $typeahead.one('focus', function() { - $form.addClass('loading'); - - $.getJSON(searchURL).then(function(searchData) { - const searchIndex = lunr(function() { - this.ref('url'); - this.field('name'); - this.field('abstract'); - for (const [url, doc] of Object.entries(searchData)) { - this.add({url: url, name: doc.name, abstract: doc.abstract}); - } - }); - - $typeahead.typeahead( - { - highlight: true, - minLength: 3, - autoselect: true - }, - { - limit: 10, - display: displayTemplate, - templates: { suggestion: suggestionTemplate }, - source: function(query, sync) { - const lcSearch = query.toLowerCase(); - const results = searchIndex.query(function(q) { - q.term(lcSearch, { boost: 100 }); - q.term(lcSearch, { - boost: 10, - wildcard: lunr.Query.wildcard.TRAILING - }); - }).map(function(result) { - var doc = searchData[result.ref]; - doc.url = result.ref; - return doc; - }); - sync(results); - } - } - ); - $form.removeClass('loading'); - $typeahead.trigger('focus'); - }); - }); - - var baseURL = searchURL.slice(0, -"search.json".length); - - $typeahead.on('typeahead:select', function(e, result) { - window.location = baseURL + result.url; - }); -}); diff --git a/Carthage/Checkouts/BigInt/docs/js/jquery.min.js b/Carthage/Checkouts/BigInt/docs/js/jquery.min.js deleted file mode 100644 index b0614034a..000000000 --- a/Carthage/Checkouts/BigInt/docs/js/jquery.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 00){var c=e.utils.clone(r)||{};c.position=[a,l],c.index=s.length,s.push(new e.Token(i.slice(a,o),c))}a=o+1}}return s},e.tokenizer.separator=/[\s\-]+/,e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,r){r in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+r),t.label=r,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var r=t.label&&t.label in this.registeredFunctions;r||e.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},e.Pipeline.load=function(t){var r=new e.Pipeline;return t.forEach(function(t){var i=e.Pipeline.registeredFunctions[t];if(!i)throw new Error("Cannot load unregistered function: "+t);r.add(i)}),r},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(t){e.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},e.Pipeline.prototype.after=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,r)},e.Pipeline.prototype.before=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");this._stack.splice(i,0,r)},e.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);t!=-1&&this._stack.splice(t,1)},e.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r1&&(se&&(r=n),s!=e);)i=r-t,n=t+Math.floor(i/2),s=this.elements[2*n];return s==e?2*n:s>e?2*n:sa?l+=2:o==a&&(t+=r[u+1]*i[l+1],u+=2,l+=2);return t},e.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},e.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t0){var o,a=s.str.charAt(0);a in s.node.edges?o=s.node.edges[a]:(o=new e.TokenSet,s.node.edges[a]=o),1==s.str.length&&(o["final"]=!0),n.push({node:o,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(0!=s.editsRemaining){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new e.TokenSet;s.node.edges["*"]=u}if(0==s.str.length&&(u["final"]=!0),n.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&n.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),1==s.str.length&&(s.node["final"]=!0),s.str.length>=1){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new e.TokenSet;s.node.edges["*"]=l}1==s.str.length&&(l["final"]=!0),n.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var c,h=s.str.charAt(0),d=s.str.charAt(1);d in s.node.edges?c=s.node.edges[d]:(c=new e.TokenSet,s.node.edges[d]=c),1==s.str.length&&(c["final"]=!0),n.push({node:c,editsRemaining:s.editsRemaining-1,str:h+s.str.slice(2)})}}}return i},e.TokenSet.fromString=function(t){for(var r=new e.TokenSet,i=r,n=0,s=t.length;n=e;t--){var r=this.uncheckedNodes[t],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r["char"]]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}},e.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},e.Index.prototype.search=function(t){return this.query(function(r){var i=new e.QueryParser(t,r);i.parse()})},e.Index.prototype.query=function(t){for(var r=new e.Query(this.fields),i=Object.create(null),n=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),u=0;u1?this._b=1:this._b=e},e.Builder.prototype.k1=function(e){this._k1=e},e.Builder.prototype.add=function(t,r){var i=t[this._ref],n=Object.keys(this._fields);this._documents[i]=r||{},this.documentCount+=1;for(var s=0;s=this.length)return e.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},e.QueryLexer.prototype.width=function(){return this.pos-this.start},e.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},e.QueryLexer.prototype.backup=function(){this.pos-=1},e.QueryLexer.prototype.acceptDigitRun=function(){var t,r;do t=this.next(),r=t.charCodeAt(0);while(r>47&&r<58);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.pos1&&(t.backup(),t.emit(e.QueryLexer.TERM)),t.ignore(),t.more())return e.QueryLexer.lexText},e.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.EDIT_DISTANCE),e.QueryLexer.lexText},e.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.BOOST),e.QueryLexer.lexText},e.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(e.QueryLexer.TERM)},e.QueryLexer.termSeparator=e.tokenizer.separator,e.QueryLexer.lexText=function(t){for(;;){var r=t.next();if(r==e.QueryLexer.EOS)return e.QueryLexer.lexEOS;if(92!=r.charCodeAt(0)){if(":"==r)return e.QueryLexer.lexField;if("~"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexEditDistance;if("^"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexBoost;if("+"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if("-"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if(r.match(e.QueryLexer.termSeparator))return e.QueryLexer.lexTerm}else t.escapeCharacter()}},e.QueryParser=function(t,r){this.lexer=new e.QueryLexer(t),this.query=r,this.currentClause={},this.lexemeIdx=0},e.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=e.QueryParser.parseClause;t;)t=t(this);return this.query},e.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},e.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},e.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},e.QueryParser.parseClause=function(t){var r=t.peekLexeme();if(void 0!=r)switch(r.type){case e.QueryLexer.PRESENCE:return e.QueryParser.parsePresence;case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expected either a field or a term, found "+r.type;throw r.str.length>=1&&(i+=" with value '"+r.str+"'"),new e.QueryParseError(i,r.start,r.end)}},e.QueryParser.parsePresence=function(t){var r=t.consumeLexeme();if(void 0!=r){switch(r.str){case"-":t.currentClause.presence=e.Query.presence.PROHIBITED;break;case"+":t.currentClause.presence=e.Query.presence.REQUIRED;break;default:var i="unrecognised presence operator'"+r.str+"'";throw new e.QueryParseError(i,r.start,r.end)}var n=t.peekLexeme();if(void 0==n){var i="expecting term or field, found nothing";throw new e.QueryParseError(i,r.start,r.end)}switch(n.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expecting term or field, found '"+n.type+"'";throw new e.QueryParseError(i,n.start,n.end)}}},e.QueryParser.parseField=function(t){var r=t.consumeLexeme();if(void 0!=r){if(t.query.allFields.indexOf(r.str)==-1){var i=t.query.allFields.map(function(e){return"'"+e+"'"}).join(", "),n="unrecognised field '"+r.str+"', possible fields: "+i;throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.fields=[r.str];var s=t.peekLexeme();if(void 0==s){var n="expecting term, found nothing";throw new e.QueryParseError(n,r.start,r.end)}switch(s.type){case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var n="expecting term, found '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseTerm=function(t){var r=t.consumeLexeme();if(void 0!=r){t.currentClause.term=r.str.toLowerCase(),r.str.indexOf("*")!=-1&&(t.currentClause.usePipeline=!1);var i=t.peekLexeme();if(void 0==i)return void t.nextClause();switch(i.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+i.type+"'";throw new e.QueryParseError(n,i.start,i.end)}}},e.QueryParser.parseEditDistance=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="edit distance must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.editDistance=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseBoost=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="boost must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.boost=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.lunr=t()}(this,function(){return e})}(); diff --git a/Carthage/Checkouts/BigInt/docs/js/typeahead.jquery.js b/Carthage/Checkouts/BigInt/docs/js/typeahead.jquery.js deleted file mode 100644 index 3a2d2ab03..000000000 --- a/Carthage/Checkouts/BigInt/docs/js/typeahead.jquery.js +++ /dev/null @@ -1,1694 +0,0 @@ -/*! - * typeahead.js 1.3.1 - * https://github.com/corejavascript/typeahead.js - * Copyright 2013-2020 Twitter, Inc. and other contributors; Licensed MIT - */ - - -(function(root, factory) { - if (typeof define === "function" && define.amd) { - define([ "jquery" ], function(a0) { - return factory(a0); - }); - } else if (typeof module === "object" && module.exports) { - module.exports = factory(require("jquery")); - } else { - factory(root["jQuery"]); - } -})(this, function($) { - var _ = function() { - "use strict"; - return { - isMsie: function() { - return /(msie|trident)/i.test(navigator.userAgent) ? navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2] : false; - }, - isBlankString: function(str) { - return !str || /^\s*$/.test(str); - }, - escapeRegExChars: function(str) { - return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); - }, - isString: function(obj) { - return typeof obj === "string"; - }, - isNumber: function(obj) { - return typeof obj === "number"; - }, - isArray: $.isArray, - isFunction: $.isFunction, - isObject: $.isPlainObject, - isUndefined: function(obj) { - return typeof obj === "undefined"; - }, - isElement: function(obj) { - return !!(obj && obj.nodeType === 1); - }, - isJQuery: function(obj) { - return obj instanceof $; - }, - toStr: function toStr(s) { - return _.isUndefined(s) || s === null ? "" : s + ""; - }, - bind: $.proxy, - each: function(collection, cb) { - $.each(collection, reverseArgs); - function reverseArgs(index, value) { - return cb(value, index); - } - }, - map: $.map, - filter: $.grep, - every: function(obj, test) { - var result = true; - if (!obj) { - return result; - } - $.each(obj, function(key, val) { - if (!(result = test.call(null, val, key, obj))) { - return false; - } - }); - return !!result; - }, - some: function(obj, test) { - var result = false; - if (!obj) { - return result; - } - $.each(obj, function(key, val) { - if (result = test.call(null, val, key, obj)) { - return false; - } - }); - return !!result; - }, - mixin: $.extend, - identity: function(x) { - return x; - }, - clone: function(obj) { - return $.extend(true, {}, obj); - }, - getIdGenerator: function() { - var counter = 0; - return function() { - return counter++; - }; - }, - templatify: function templatify(obj) { - return $.isFunction(obj) ? obj : template; - function template() { - return String(obj); - } - }, - defer: function(fn) { - setTimeout(fn, 0); - }, - debounce: function(func, wait, immediate) { - var timeout, result; - return function() { - var context = this, args = arguments, later, callNow; - later = function() { - timeout = null; - if (!immediate) { - result = func.apply(context, args); - } - }; - callNow = immediate && !timeout; - clearTimeout(timeout); - timeout = setTimeout(later, wait); - if (callNow) { - result = func.apply(context, args); - } - return result; - }; - }, - throttle: function(func, wait) { - var context, args, timeout, result, previous, later; - previous = 0; - later = function() { - previous = new Date(); - timeout = null; - result = func.apply(context, args); - }; - return function() { - var now = new Date(), remaining = wait - (now - previous); - context = this; - args = arguments; - if (remaining <= 0) { - clearTimeout(timeout); - timeout = null; - previous = now; - result = func.apply(context, args); - } else if (!timeout) { - timeout = setTimeout(later, remaining); - } - return result; - }; - }, - stringify: function(val) { - return _.isString(val) ? val : JSON.stringify(val); - }, - guid: function() { - function _p8(s) { - var p = (Math.random().toString(16) + "000000000").substr(2, 8); - return s ? "-" + p.substr(0, 4) + "-" + p.substr(4, 4) : p; - } - return "tt-" + _p8() + _p8(true) + _p8(true) + _p8(); - }, - noop: function() {} - }; - }(); - var WWW = function() { - "use strict"; - var defaultClassNames = { - wrapper: "twitter-typeahead", - input: "tt-input", - hint: "tt-hint", - menu: "tt-menu", - dataset: "tt-dataset", - suggestion: "tt-suggestion", - selectable: "tt-selectable", - empty: "tt-empty", - open: "tt-open", - cursor: "tt-cursor", - highlight: "tt-highlight" - }; - return build; - function build(o) { - var www, classes; - classes = _.mixin({}, defaultClassNames, o); - www = { - css: buildCss(), - classes: classes, - html: buildHtml(classes), - selectors: buildSelectors(classes) - }; - return { - css: www.css, - html: www.html, - classes: www.classes, - selectors: www.selectors, - mixin: function(o) { - _.mixin(o, www); - } - }; - } - function buildHtml(c) { - return { - wrapper: '', - menu: '
' - }; - } - function buildSelectors(classes) { - var selectors = {}; - _.each(classes, function(v, k) { - selectors[k] = "." + v; - }); - return selectors; - } - function buildCss() { - var css = { - wrapper: { - position: "relative", - display: "inline-block" - }, - hint: { - position: "absolute", - top: "0", - left: "0", - borderColor: "transparent", - boxShadow: "none", - opacity: "1" - }, - input: { - position: "relative", - verticalAlign: "top", - backgroundColor: "transparent" - }, - inputWithNoHint: { - position: "relative", - verticalAlign: "top" - }, - menu: { - position: "absolute", - top: "100%", - left: "0", - zIndex: "100", - display: "none" - }, - ltr: { - left: "0", - right: "auto" - }, - rtl: { - left: "auto", - right: " 0" - } - }; - if (_.isMsie()) { - _.mixin(css.input, { - backgroundImage: "url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)" - }); - } - return css; - } - }(); - var EventBus = function() { - "use strict"; - var namespace, deprecationMap; - namespace = "typeahead:"; - deprecationMap = { - render: "rendered", - cursorchange: "cursorchanged", - select: "selected", - autocomplete: "autocompleted" - }; - function EventBus(o) { - if (!o || !o.el) { - $.error("EventBus initialized without el"); - } - this.$el = $(o.el); - } - _.mixin(EventBus.prototype, { - _trigger: function(type, args) { - var $e = $.Event(namespace + type); - this.$el.trigger.call(this.$el, $e, args || []); - return $e; - }, - before: function(type) { - var args, $e; - args = [].slice.call(arguments, 1); - $e = this._trigger("before" + type, args); - return $e.isDefaultPrevented(); - }, - trigger: function(type) { - var deprecatedType; - this._trigger(type, [].slice.call(arguments, 1)); - if (deprecatedType = deprecationMap[type]) { - this._trigger(deprecatedType, [].slice.call(arguments, 1)); - } - } - }); - return EventBus; - }(); - var EventEmitter = function() { - "use strict"; - var splitter = /\s+/, nextTick = getNextTick(); - return { - onSync: onSync, - onAsync: onAsync, - off: off, - trigger: trigger - }; - function on(method, types, cb, context) { - var type; - if (!cb) { - return this; - } - types = types.split(splitter); - cb = context ? bindContext(cb, context) : cb; - this._callbacks = this._callbacks || {}; - while (type = types.shift()) { - this._callbacks[type] = this._callbacks[type] || { - sync: [], - async: [] - }; - this._callbacks[type][method].push(cb); - } - return this; - } - function onAsync(types, cb, context) { - return on.call(this, "async", types, cb, context); - } - function onSync(types, cb, context) { - return on.call(this, "sync", types, cb, context); - } - function off(types) { - var type; - if (!this._callbacks) { - return this; - } - types = types.split(splitter); - while (type = types.shift()) { - delete this._callbacks[type]; - } - return this; - } - function trigger(types) { - var type, callbacks, args, syncFlush, asyncFlush; - if (!this._callbacks) { - return this; - } - types = types.split(splitter); - args = [].slice.call(arguments, 1); - while ((type = types.shift()) && (callbacks = this._callbacks[type])) { - syncFlush = getFlush(callbacks.sync, this, [ type ].concat(args)); - asyncFlush = getFlush(callbacks.async, this, [ type ].concat(args)); - syncFlush() && nextTick(asyncFlush); - } - return this; - } - function getFlush(callbacks, context, args) { - return flush; - function flush() { - var cancelled; - for (var i = 0, len = callbacks.length; !cancelled && i < len; i += 1) { - cancelled = callbacks[i].apply(context, args) === false; - } - return !cancelled; - } - } - function getNextTick() { - var nextTickFn; - if (window.setImmediate) { - nextTickFn = function nextTickSetImmediate(fn) { - setImmediate(function() { - fn(); - }); - }; - } else { - nextTickFn = function nextTickSetTimeout(fn) { - setTimeout(function() { - fn(); - }, 0); - }; - } - return nextTickFn; - } - function bindContext(fn, context) { - return fn.bind ? fn.bind(context) : function() { - fn.apply(context, [].slice.call(arguments, 0)); - }; - } - }(); - var highlight = function(doc) { - "use strict"; - var defaults = { - node: null, - pattern: null, - tagName: "strong", - className: null, - wordsOnly: false, - caseSensitive: false, - diacriticInsensitive: false - }; - var accented = { - A: "[AaªÀ-Åà-åĀ-ąǍǎȀ-ȃȦȧᴬᵃḀḁẚẠ-ảₐ℀℁℻⒜Ⓐⓐ㍱-㍴㎀-㎄㎈㎉㎩-㎯㏂㏊㏟㏿Aa]", - B: "[BbᴮᵇḂ-ḇℬ⒝Ⓑⓑ㍴㎅-㎇㏃㏈㏔㏝Bb]", - C: "[CcÇçĆ-čᶜ℀ℂ℃℅℆ℭⅭⅽ⒞Ⓒⓒ㍶㎈㎉㎝㎠㎤㏄-㏇Cc]", - D: "[DdĎďDŽ-džDZ-dzᴰᵈḊ-ḓⅅⅆⅮⅾ⒟Ⓓⓓ㋏㍲㍷-㍹㎗㎭-㎯㏅㏈Dd]", - E: "[EeÈ-Ëè-ëĒ-ěȄ-ȇȨȩᴱᵉḘ-ḛẸ-ẽₑ℡ℯℰⅇ⒠Ⓔⓔ㉐㋍㋎Ee]", - F: "[FfᶠḞḟ℉ℱ℻⒡Ⓕⓕ㎊-㎌㎙ff-fflFf]", - G: "[GgĜ-ģǦǧǴǵᴳᵍḠḡℊ⒢Ⓖⓖ㋌㋍㎇㎍-㎏㎓㎬㏆㏉㏒㏿Gg]", - H: "[HhĤĥȞȟʰᴴḢ-ḫẖℋ-ℎ⒣Ⓗⓗ㋌㍱㎐-㎔㏊㏋㏗Hh]", - I: "[IiÌ-Ïì-ïĨ-İIJijǏǐȈ-ȋᴵᵢḬḭỈ-ịⁱℐℑℹⅈⅠ-ⅣⅥ-ⅨⅪⅫⅰ-ⅳⅵ-ⅸⅺⅻ⒤Ⓘⓘ㍺㏌㏕fiffiIi]", - J: "[JjIJ-ĵLJ-njǰʲᴶⅉ⒥ⒿⓙⱼJj]", - K: "[KkĶķǨǩᴷᵏḰ-ḵK⒦Ⓚⓚ㎄㎅㎉㎏㎑㎘㎞㎢㎦㎪㎸㎾㏀㏆㏍-㏏Kk]", - L: "[LlĹ-ŀLJ-ljˡᴸḶḷḺ-ḽℒℓ℡Ⅼⅼ⒧Ⓛⓛ㋏㎈㎉㏐-㏓㏕㏖㏿flfflLl]", - M: "[MmᴹᵐḾ-ṃ℠™ℳⅯⅿ⒨Ⓜⓜ㍷-㍹㎃㎆㎎㎒㎖㎙-㎨㎫㎳㎷㎹㎽㎿㏁㏂㏎㏐㏔-㏖㏘㏙㏞㏟Mm]", - N: "[NnÑñŃ-ʼnNJ-njǸǹᴺṄ-ṋⁿℕ№⒩Ⓝⓝ㎁㎋㎚㎱㎵㎻㏌㏑Nn]", - O: "[OoºÒ-Öò-öŌ-őƠơǑǒǪǫȌ-ȏȮȯᴼᵒỌ-ỏₒ℅№ℴ⒪Ⓞⓞ㍵㏇㏒㏖Oo]", - P: "[PpᴾᵖṔ-ṗℙ⒫Ⓟⓟ㉐㍱㍶㎀㎊㎩-㎬㎰㎴㎺㏋㏗-㏚Pp]", - Q: "[Qqℚ⒬Ⓠⓠ㏃Qq]", - R: "[RrŔ-řȐ-ȓʳᴿᵣṘ-ṛṞṟ₨ℛ-ℝ⒭Ⓡⓡ㋍㍴㎭-㎯㏚㏛Rr]", - S: "[SsŚ-šſȘșˢṠ-ṣ₨℁℠⒮Ⓢⓢ㎧㎨㎮-㎳㏛㏜stSs]", - T: "[TtŢ-ťȚțᵀᵗṪ-ṱẗ℡™⒯Ⓣⓣ㉐㋏㎔㏏ſtstTt]", - U: "[UuÙ-Üù-üŨ-ųƯưǓǔȔ-ȗᵁᵘᵤṲ-ṷỤ-ủ℆⒰Ⓤⓤ㍳㍺Uu]", - V: "[VvᵛᵥṼ-ṿⅣ-Ⅷⅳ-ⅷ⒱Ⓥⓥⱽ㋎㍵㎴-㎹㏜㏞Vv]", - W: "[WwŴŵʷᵂẀ-ẉẘ⒲Ⓦⓦ㎺-㎿㏝Ww]", - X: "[XxˣẊ-ẍₓ℻Ⅸ-Ⅻⅸ-ⅻ⒳Ⓧⓧ㏓Xx]", - Y: "[YyÝýÿŶ-ŸȲȳʸẎẏẙỲ-ỹ⒴Ⓨⓨ㏉Yy]", - Z: "[ZzŹ-žDZ-dzᶻẐ-ẕℤℨ⒵Ⓩⓩ㎐-㎔Zz]" - }; - return function hightlight(o) { - var regex; - o = _.mixin({}, defaults, o); - if (!o.node || !o.pattern) { - return; - } - o.pattern = _.isArray(o.pattern) ? o.pattern : [ o.pattern ]; - regex = getRegex(o.pattern, o.caseSensitive, o.wordsOnly, o.diacriticInsensitive); - traverse(o.node, hightlightTextNode); - function hightlightTextNode(textNode) { - var match, patternNode, wrapperNode; - if (match = regex.exec(textNode.data)) { - wrapperNode = doc.createElement(o.tagName); - o.className && (wrapperNode.className = o.className); - patternNode = textNode.splitText(match.index); - patternNode.splitText(match[0].length); - wrapperNode.appendChild(patternNode.cloneNode(true)); - textNode.parentNode.replaceChild(wrapperNode, patternNode); - } - return !!match; - } - function traverse(el, hightlightTextNode) { - var childNode, TEXT_NODE_TYPE = 3; - for (var i = 0; i < el.childNodes.length; i++) { - childNode = el.childNodes[i]; - if (childNode.nodeType === TEXT_NODE_TYPE) { - i += hightlightTextNode(childNode) ? 1 : 0; - } else { - traverse(childNode, hightlightTextNode); - } - } - } - }; - function accent_replacer(chr) { - return accented[chr.toUpperCase()] || chr; - } - function getRegex(patterns, caseSensitive, wordsOnly, diacriticInsensitive) { - var escapedPatterns = [], regexStr; - for (var i = 0, len = patterns.length; i < len; i++) { - var escapedWord = _.escapeRegExChars(patterns[i]); - if (diacriticInsensitive) { - escapedWord = escapedWord.replace(/\S/g, accent_replacer); - } - escapedPatterns.push(escapedWord); - } - regexStr = wordsOnly ? "\\b(" + escapedPatterns.join("|") + ")\\b" : "(" + escapedPatterns.join("|") + ")"; - return caseSensitive ? new RegExp(regexStr) : new RegExp(regexStr, "i"); - } - }(window.document); - var Input = function() { - "use strict"; - var specialKeyCodeMap; - specialKeyCodeMap = { - 9: "tab", - 27: "esc", - 37: "left", - 39: "right", - 13: "enter", - 38: "up", - 40: "down" - }; - function Input(o, www) { - var id; - o = o || {}; - if (!o.input) { - $.error("input is missing"); - } - www.mixin(this); - this.$hint = $(o.hint); - this.$input = $(o.input); - this.$menu = $(o.menu); - id = this.$input.attr("id") || _.guid(); - this.$menu.attr("id", id + "_listbox"); - this.$hint.attr({ - "aria-hidden": true - }); - this.$input.attr({ - "aria-owns": id + "_listbox", - role: "combobox", - "aria-autocomplete": "list", - "aria-expanded": false - }); - this.query = this.$input.val(); - this.queryWhenFocused = this.hasFocus() ? this.query : null; - this.$overflowHelper = buildOverflowHelper(this.$input); - this._checkLanguageDirection(); - if (this.$hint.length === 0) { - this.setHint = this.getHint = this.clearHint = this.clearHintIfInvalid = _.noop; - } - this.onSync("cursorchange", this._updateDescendent); - } - Input.normalizeQuery = function(str) { - return _.toStr(str).replace(/^\s*/g, "").replace(/\s{2,}/g, " "); - }; - _.mixin(Input.prototype, EventEmitter, { - _onBlur: function onBlur() { - this.resetInputValue(); - this.trigger("blurred"); - }, - _onFocus: function onFocus() { - this.queryWhenFocused = this.query; - this.trigger("focused"); - }, - _onKeydown: function onKeydown($e) { - var keyName = specialKeyCodeMap[$e.which || $e.keyCode]; - this._managePreventDefault(keyName, $e); - if (keyName && this._shouldTrigger(keyName, $e)) { - this.trigger(keyName + "Keyed", $e); - } - }, - _onInput: function onInput() { - this._setQuery(this.getInputValue()); - this.clearHintIfInvalid(); - this._checkLanguageDirection(); - }, - _managePreventDefault: function managePreventDefault(keyName, $e) { - var preventDefault; - switch (keyName) { - case "up": - case "down": - preventDefault = !withModifier($e); - break; - - default: - preventDefault = false; - } - preventDefault && $e.preventDefault(); - }, - _shouldTrigger: function shouldTrigger(keyName, $e) { - var trigger; - switch (keyName) { - case "tab": - trigger = !withModifier($e); - break; - - default: - trigger = true; - } - return trigger; - }, - _checkLanguageDirection: function checkLanguageDirection() { - var dir = (this.$input.css("direction") || "ltr").toLowerCase(); - if (this.dir !== dir) { - this.dir = dir; - this.$hint.attr("dir", dir); - this.trigger("langDirChanged", dir); - } - }, - _setQuery: function setQuery(val, silent) { - var areEquivalent, hasDifferentWhitespace; - areEquivalent = areQueriesEquivalent(val, this.query); - hasDifferentWhitespace = areEquivalent ? this.query.length !== val.length : false; - this.query = val; - if (!silent && !areEquivalent) { - this.trigger("queryChanged", this.query); - } else if (!silent && hasDifferentWhitespace) { - this.trigger("whitespaceChanged", this.query); - } - }, - _updateDescendent: function updateDescendent(event, id) { - this.$input.attr("aria-activedescendant", id); - }, - bind: function() { - var that = this, onBlur, onFocus, onKeydown, onInput; - onBlur = _.bind(this._onBlur, this); - onFocus = _.bind(this._onFocus, this); - onKeydown = _.bind(this._onKeydown, this); - onInput = _.bind(this._onInput, this); - this.$input.on("blur.tt", onBlur).on("focus.tt", onFocus).on("keydown.tt", onKeydown); - if (!_.isMsie() || _.isMsie() > 9) { - this.$input.on("input.tt", onInput); - } else { - this.$input.on("keydown.tt keypress.tt cut.tt paste.tt", function($e) { - if (specialKeyCodeMap[$e.which || $e.keyCode]) { - return; - } - _.defer(_.bind(that._onInput, that, $e)); - }); - } - return this; - }, - focus: function focus() { - this.$input.focus(); - }, - blur: function blur() { - this.$input.blur(); - }, - getLangDir: function getLangDir() { - return this.dir; - }, - getQuery: function getQuery() { - return this.query || ""; - }, - setQuery: function setQuery(val, silent) { - this.setInputValue(val); - this._setQuery(val, silent); - }, - hasQueryChangedSinceLastFocus: function hasQueryChangedSinceLastFocus() { - return this.query !== this.queryWhenFocused; - }, - getInputValue: function getInputValue() { - return this.$input.val(); - }, - setInputValue: function setInputValue(value) { - this.$input.val(value); - this.clearHintIfInvalid(); - this._checkLanguageDirection(); - }, - resetInputValue: function resetInputValue() { - this.setInputValue(this.query); - }, - getHint: function getHint() { - return this.$hint.val(); - }, - setHint: function setHint(value) { - this.$hint.val(value); - }, - clearHint: function clearHint() { - this.setHint(""); - }, - clearHintIfInvalid: function clearHintIfInvalid() { - var val, hint, valIsPrefixOfHint, isValid; - val = this.getInputValue(); - hint = this.getHint(); - valIsPrefixOfHint = val !== hint && hint.indexOf(val) === 0; - isValid = val !== "" && valIsPrefixOfHint && !this.hasOverflow(); - !isValid && this.clearHint(); - }, - hasFocus: function hasFocus() { - return this.$input.is(":focus"); - }, - hasOverflow: function hasOverflow() { - var constraint = this.$input.width() - 2; - this.$overflowHelper.text(this.getInputValue()); - return this.$overflowHelper.width() >= constraint; - }, - isCursorAtEnd: function() { - var valueLength, selectionStart, range; - valueLength = this.$input.val().length; - selectionStart = this.$input[0].selectionStart; - if (_.isNumber(selectionStart)) { - return selectionStart === valueLength; - } else if (document.selection) { - range = document.selection.createRange(); - range.moveStart("character", -valueLength); - return valueLength === range.text.length; - } - return true; - }, - destroy: function destroy() { - this.$hint.off(".tt"); - this.$input.off(".tt"); - this.$overflowHelper.remove(); - this.$hint = this.$input = this.$overflowHelper = $("
"); - }, - setAriaExpanded: function setAriaExpanded(value) { - this.$input.attr("aria-expanded", value); - } - }); - return Input; - function buildOverflowHelper($input) { - return $('').css({ - position: "absolute", - visibility: "hidden", - whiteSpace: "pre", - fontFamily: $input.css("font-family"), - fontSize: $input.css("font-size"), - fontStyle: $input.css("font-style"), - fontVariant: $input.css("font-variant"), - fontWeight: $input.css("font-weight"), - wordSpacing: $input.css("word-spacing"), - letterSpacing: $input.css("letter-spacing"), - textIndent: $input.css("text-indent"), - textRendering: $input.css("text-rendering"), - textTransform: $input.css("text-transform") - }).insertAfter($input); - } - function areQueriesEquivalent(a, b) { - return Input.normalizeQuery(a) === Input.normalizeQuery(b); - } - function withModifier($e) { - return $e.altKey || $e.ctrlKey || $e.metaKey || $e.shiftKey; - } - }(); - var Dataset = function() { - "use strict"; - var keys, nameGenerator; - keys = { - dataset: "tt-selectable-dataset", - val: "tt-selectable-display", - obj: "tt-selectable-object" - }; - nameGenerator = _.getIdGenerator(); - function Dataset(o, www) { - o = o || {}; - o.templates = o.templates || {}; - o.templates.notFound = o.templates.notFound || o.templates.empty; - if (!o.source) { - $.error("missing source"); - } - if (!o.node) { - $.error("missing node"); - } - if (o.name && !isValidName(o.name)) { - $.error("invalid dataset name: " + o.name); - } - www.mixin(this); - this.highlight = !!o.highlight; - this.name = _.toStr(o.name || nameGenerator()); - this.limit = o.limit || 5; - this.displayFn = getDisplayFn(o.display || o.displayKey); - this.templates = getTemplates(o.templates, this.displayFn); - this.source = o.source.__ttAdapter ? o.source.__ttAdapter() : o.source; - this.async = _.isUndefined(o.async) ? this.source.length > 2 : !!o.async; - this._resetLastSuggestion(); - this.$el = $(o.node).attr("role", "presentation").addClass(this.classes.dataset).addClass(this.classes.dataset + "-" + this.name); - } - Dataset.extractData = function extractData(el) { - var $el = $(el); - if ($el.data(keys.obj)) { - return { - dataset: $el.data(keys.dataset) || "", - val: $el.data(keys.val) || "", - obj: $el.data(keys.obj) || null - }; - } - return null; - }; - _.mixin(Dataset.prototype, EventEmitter, { - _overwrite: function overwrite(query, suggestions) { - suggestions = suggestions || []; - if (suggestions.length) { - this._renderSuggestions(query, suggestions); - } else if (this.async && this.templates.pending) { - this._renderPending(query); - } else if (!this.async && this.templates.notFound) { - this._renderNotFound(query); - } else { - this._empty(); - } - this.trigger("rendered", suggestions, false, this.name); - }, - _append: function append(query, suggestions) { - suggestions = suggestions || []; - if (suggestions.length && this.$lastSuggestion.length) { - this._appendSuggestions(query, suggestions); - } else if (suggestions.length) { - this._renderSuggestions(query, suggestions); - } else if (!this.$lastSuggestion.length && this.templates.notFound) { - this._renderNotFound(query); - } - this.trigger("rendered", suggestions, true, this.name); - }, - _renderSuggestions: function renderSuggestions(query, suggestions) { - var $fragment; - $fragment = this._getSuggestionsFragment(query, suggestions); - this.$lastSuggestion = $fragment.children().last(); - this.$el.html($fragment).prepend(this._getHeader(query, suggestions)).append(this._getFooter(query, suggestions)); - }, - _appendSuggestions: function appendSuggestions(query, suggestions) { - var $fragment, $lastSuggestion; - $fragment = this._getSuggestionsFragment(query, suggestions); - $lastSuggestion = $fragment.children().last(); - this.$lastSuggestion.after($fragment); - this.$lastSuggestion = $lastSuggestion; - }, - _renderPending: function renderPending(query) { - var template = this.templates.pending; - this._resetLastSuggestion(); - template && this.$el.html(template({ - query: query, - dataset: this.name - })); - }, - _renderNotFound: function renderNotFound(query) { - var template = this.templates.notFound; - this._resetLastSuggestion(); - template && this.$el.html(template({ - query: query, - dataset: this.name - })); - }, - _empty: function empty() { - this.$el.empty(); - this._resetLastSuggestion(); - }, - _getSuggestionsFragment: function getSuggestionsFragment(query, suggestions) { - var that = this, fragment; - fragment = document.createDocumentFragment(); - _.each(suggestions, function getSuggestionNode(suggestion) { - var $el, context; - context = that._injectQuery(query, suggestion); - $el = $(that.templates.suggestion(context)).data(keys.dataset, that.name).data(keys.obj, suggestion).data(keys.val, that.displayFn(suggestion)).addClass(that.classes.suggestion + " " + that.classes.selectable); - fragment.appendChild($el[0]); - }); - this.highlight && highlight({ - className: this.classes.highlight, - node: fragment, - pattern: query - }); - return $(fragment); - }, - _getFooter: function getFooter(query, suggestions) { - return this.templates.footer ? this.templates.footer({ - query: query, - suggestions: suggestions, - dataset: this.name - }) : null; - }, - _getHeader: function getHeader(query, suggestions) { - return this.templates.header ? this.templates.header({ - query: query, - suggestions: suggestions, - dataset: this.name - }) : null; - }, - _resetLastSuggestion: function resetLastSuggestion() { - this.$lastSuggestion = $(); - }, - _injectQuery: function injectQuery(query, obj) { - return _.isObject(obj) ? _.mixin({ - _query: query - }, obj) : obj; - }, - update: function update(query) { - var that = this, canceled = false, syncCalled = false, rendered = 0; - this.cancel(); - this.cancel = function cancel() { - canceled = true; - that.cancel = $.noop; - that.async && that.trigger("asyncCanceled", query, that.name); - }; - this.source(query, sync, async); - !syncCalled && sync([]); - function sync(suggestions) { - if (syncCalled) { - return; - } - syncCalled = true; - suggestions = (suggestions || []).slice(0, that.limit); - rendered = suggestions.length; - that._overwrite(query, suggestions); - if (rendered < that.limit && that.async) { - that.trigger("asyncRequested", query, that.name); - } - } - function async(suggestions) { - suggestions = suggestions || []; - if (!canceled && rendered < that.limit) { - that.cancel = $.noop; - var idx = Math.abs(rendered - that.limit); - rendered += idx; - that._append(query, suggestions.slice(0, idx)); - that.async && that.trigger("asyncReceived", query, that.name); - } - } - }, - cancel: $.noop, - clear: function clear() { - this._empty(); - this.cancel(); - this.trigger("cleared"); - }, - isEmpty: function isEmpty() { - return this.$el.is(":empty"); - }, - destroy: function destroy() { - this.$el = $("
"); - } - }); - return Dataset; - function getDisplayFn(display) { - display = display || _.stringify; - return _.isFunction(display) ? display : displayFn; - function displayFn(obj) { - return obj[display]; - } - } - function getTemplates(templates, displayFn) { - return { - notFound: templates.notFound && _.templatify(templates.notFound), - pending: templates.pending && _.templatify(templates.pending), - header: templates.header && _.templatify(templates.header), - footer: templates.footer && _.templatify(templates.footer), - suggestion: templates.suggestion ? userSuggestionTemplate : suggestionTemplate - }; - function userSuggestionTemplate(context) { - var template = templates.suggestion; - return $(template(context)).attr("id", _.guid()); - } - function suggestionTemplate(context) { - return $('
').attr("id", _.guid()).text(displayFn(context)); - } - } - function isValidName(str) { - return /^[_a-zA-Z0-9-]+$/.test(str); - } - }(); - var Menu = function() { - "use strict"; - function Menu(o, www) { - var that = this; - o = o || {}; - if (!o.node) { - $.error("node is required"); - } - www.mixin(this); - this.$node = $(o.node); - this.query = null; - this.datasets = _.map(o.datasets, initializeDataset); - function initializeDataset(oDataset) { - var node = that.$node.find(oDataset.node).first(); - oDataset.node = node.length ? node : $("
").appendTo(that.$node); - return new Dataset(oDataset, www); - } - } - _.mixin(Menu.prototype, EventEmitter, { - _onSelectableClick: function onSelectableClick($e) { - this.trigger("selectableClicked", $($e.currentTarget)); - }, - _onRendered: function onRendered(type, dataset, suggestions, async) { - this.$node.toggleClass(this.classes.empty, this._allDatasetsEmpty()); - this.trigger("datasetRendered", dataset, suggestions, async); - }, - _onCleared: function onCleared() { - this.$node.toggleClass(this.classes.empty, this._allDatasetsEmpty()); - this.trigger("datasetCleared"); - }, - _propagate: function propagate() { - this.trigger.apply(this, arguments); - }, - _allDatasetsEmpty: function allDatasetsEmpty() { - return _.every(this.datasets, _.bind(function isDatasetEmpty(dataset) { - var isEmpty = dataset.isEmpty(); - this.$node.attr("aria-expanded", !isEmpty); - return isEmpty; - }, this)); - }, - _getSelectables: function getSelectables() { - return this.$node.find(this.selectors.selectable); - }, - _removeCursor: function _removeCursor() { - var $selectable = this.getActiveSelectable(); - $selectable && $selectable.removeClass(this.classes.cursor); - }, - _ensureVisible: function ensureVisible($el) { - var elTop, elBottom, nodeScrollTop, nodeHeight; - elTop = $el.position().top; - elBottom = elTop + $el.outerHeight(true); - nodeScrollTop = this.$node.scrollTop(); - nodeHeight = this.$node.height() + parseInt(this.$node.css("paddingTop"), 10) + parseInt(this.$node.css("paddingBottom"), 10); - if (elTop < 0) { - this.$node.scrollTop(nodeScrollTop + elTop); - } else if (nodeHeight < elBottom) { - this.$node.scrollTop(nodeScrollTop + (elBottom - nodeHeight)); - } - }, - bind: function() { - var that = this, onSelectableClick; - onSelectableClick = _.bind(this._onSelectableClick, this); - this.$node.on("click.tt", this.selectors.selectable, onSelectableClick); - this.$node.on("mouseover", this.selectors.selectable, function() { - that.setCursor($(this)); - }); - this.$node.on("mouseleave", function() { - that._removeCursor(); - }); - _.each(this.datasets, function(dataset) { - dataset.onSync("asyncRequested", that._propagate, that).onSync("asyncCanceled", that._propagate, that).onSync("asyncReceived", that._propagate, that).onSync("rendered", that._onRendered, that).onSync("cleared", that._onCleared, that); - }); - return this; - }, - isOpen: function isOpen() { - return this.$node.hasClass(this.classes.open); - }, - open: function open() { - this.$node.scrollTop(0); - this.$node.addClass(this.classes.open); - }, - close: function close() { - this.$node.attr("aria-expanded", false); - this.$node.removeClass(this.classes.open); - this._removeCursor(); - }, - setLanguageDirection: function setLanguageDirection(dir) { - this.$node.attr("dir", dir); - }, - selectableRelativeToCursor: function selectableRelativeToCursor(delta) { - var $selectables, $oldCursor, oldIndex, newIndex; - $oldCursor = this.getActiveSelectable(); - $selectables = this._getSelectables(); - oldIndex = $oldCursor ? $selectables.index($oldCursor) : -1; - newIndex = oldIndex + delta; - newIndex = (newIndex + 1) % ($selectables.length + 1) - 1; - newIndex = newIndex < -1 ? $selectables.length - 1 : newIndex; - return newIndex === -1 ? null : $selectables.eq(newIndex); - }, - setCursor: function setCursor($selectable) { - this._removeCursor(); - if ($selectable = $selectable && $selectable.first()) { - $selectable.addClass(this.classes.cursor); - this._ensureVisible($selectable); - } - }, - getSelectableData: function getSelectableData($el) { - return $el && $el.length ? Dataset.extractData($el) : null; - }, - getActiveSelectable: function getActiveSelectable() { - var $selectable = this._getSelectables().filter(this.selectors.cursor).first(); - return $selectable.length ? $selectable : null; - }, - getTopSelectable: function getTopSelectable() { - var $selectable = this._getSelectables().first(); - return $selectable.length ? $selectable : null; - }, - update: function update(query) { - var isValidUpdate = query !== this.query; - if (isValidUpdate) { - this.query = query; - _.each(this.datasets, updateDataset); - } - return isValidUpdate; - function updateDataset(dataset) { - dataset.update(query); - } - }, - empty: function empty() { - _.each(this.datasets, clearDataset); - this.query = null; - this.$node.addClass(this.classes.empty); - function clearDataset(dataset) { - dataset.clear(); - } - }, - destroy: function destroy() { - this.$node.off(".tt"); - this.$node = $("
"); - _.each(this.datasets, destroyDataset); - function destroyDataset(dataset) { - dataset.destroy(); - } - } - }); - return Menu; - }(); - var Status = function() { - "use strict"; - function Status(options) { - this.$el = $("", { - role: "status", - "aria-live": "polite" - }).css({ - position: "absolute", - padding: "0", - border: "0", - height: "1px", - width: "1px", - "margin-bottom": "-1px", - "margin-right": "-1px", - overflow: "hidden", - clip: "rect(0 0 0 0)", - "white-space": "nowrap" - }); - options.$input.after(this.$el); - _.each(options.menu.datasets, _.bind(function(dataset) { - if (dataset.onSync) { - dataset.onSync("rendered", _.bind(this.update, this)); - dataset.onSync("cleared", _.bind(this.cleared, this)); - } - }, this)); - } - _.mixin(Status.prototype, { - update: function update(event, suggestions) { - var length = suggestions.length; - var words; - if (length === 1) { - words = { - result: "result", - is: "is" - }; - } else { - words = { - result: "results", - is: "are" - }; - } - this.$el.text(length + " " + words.result + " " + words.is + " available, use up and down arrow keys to navigate."); - }, - cleared: function() { - this.$el.text(""); - } - }); - return Status; - }(); - var DefaultMenu = function() { - "use strict"; - var s = Menu.prototype; - function DefaultMenu() { - Menu.apply(this, [].slice.call(arguments, 0)); - } - _.mixin(DefaultMenu.prototype, Menu.prototype, { - open: function open() { - !this._allDatasetsEmpty() && this._show(); - return s.open.apply(this, [].slice.call(arguments, 0)); - }, - close: function close() { - this._hide(); - return s.close.apply(this, [].slice.call(arguments, 0)); - }, - _onRendered: function onRendered() { - if (this._allDatasetsEmpty()) { - this._hide(); - } else { - this.isOpen() && this._show(); - } - return s._onRendered.apply(this, [].slice.call(arguments, 0)); - }, - _onCleared: function onCleared() { - if (this._allDatasetsEmpty()) { - this._hide(); - } else { - this.isOpen() && this._show(); - } - return s._onCleared.apply(this, [].slice.call(arguments, 0)); - }, - setLanguageDirection: function setLanguageDirection(dir) { - this.$node.css(dir === "ltr" ? this.css.ltr : this.css.rtl); - return s.setLanguageDirection.apply(this, [].slice.call(arguments, 0)); - }, - _hide: function hide() { - this.$node.hide(); - }, - _show: function show() { - this.$node.css("display", "block"); - } - }); - return DefaultMenu; - }(); - var Typeahead = function() { - "use strict"; - function Typeahead(o, www) { - var onFocused, onBlurred, onEnterKeyed, onTabKeyed, onEscKeyed, onUpKeyed, onDownKeyed, onLeftKeyed, onRightKeyed, onQueryChanged, onWhitespaceChanged; - o = o || {}; - if (!o.input) { - $.error("missing input"); - } - if (!o.menu) { - $.error("missing menu"); - } - if (!o.eventBus) { - $.error("missing event bus"); - } - www.mixin(this); - this.eventBus = o.eventBus; - this.minLength = _.isNumber(o.minLength) ? o.minLength : 1; - this.input = o.input; - this.menu = o.menu; - this.enabled = true; - this.autoselect = !!o.autoselect; - this.active = false; - this.input.hasFocus() && this.activate(); - this.dir = this.input.getLangDir(); - this._hacks(); - this.menu.bind().onSync("selectableClicked", this._onSelectableClicked, this).onSync("asyncRequested", this._onAsyncRequested, this).onSync("asyncCanceled", this._onAsyncCanceled, this).onSync("asyncReceived", this._onAsyncReceived, this).onSync("datasetRendered", this._onDatasetRendered, this).onSync("datasetCleared", this._onDatasetCleared, this); - onFocused = c(this, "activate", "open", "_onFocused"); - onBlurred = c(this, "deactivate", "_onBlurred"); - onEnterKeyed = c(this, "isActive", "isOpen", "_onEnterKeyed"); - onTabKeyed = c(this, "isActive", "isOpen", "_onTabKeyed"); - onEscKeyed = c(this, "isActive", "_onEscKeyed"); - onUpKeyed = c(this, "isActive", "open", "_onUpKeyed"); - onDownKeyed = c(this, "isActive", "open", "_onDownKeyed"); - onLeftKeyed = c(this, "isActive", "isOpen", "_onLeftKeyed"); - onRightKeyed = c(this, "isActive", "isOpen", "_onRightKeyed"); - onQueryChanged = c(this, "_openIfActive", "_onQueryChanged"); - onWhitespaceChanged = c(this, "_openIfActive", "_onWhitespaceChanged"); - this.input.bind().onSync("focused", onFocused, this).onSync("blurred", onBlurred, this).onSync("enterKeyed", onEnterKeyed, this).onSync("tabKeyed", onTabKeyed, this).onSync("escKeyed", onEscKeyed, this).onSync("upKeyed", onUpKeyed, this).onSync("downKeyed", onDownKeyed, this).onSync("leftKeyed", onLeftKeyed, this).onSync("rightKeyed", onRightKeyed, this).onSync("queryChanged", onQueryChanged, this).onSync("whitespaceChanged", onWhitespaceChanged, this).onSync("langDirChanged", this._onLangDirChanged, this); - } - _.mixin(Typeahead.prototype, { - _hacks: function hacks() { - var $input, $menu; - $input = this.input.$input || $("
"); - $menu = this.menu.$node || $("
"); - $input.on("blur.tt", function($e) { - var active, isActive, hasActive; - active = document.activeElement; - isActive = $menu.is(active); - hasActive = $menu.has(active).length > 0; - if (_.isMsie() && (isActive || hasActive)) { - $e.preventDefault(); - $e.stopImmediatePropagation(); - _.defer(function() { - $input.focus(); - }); - } - }); - $menu.on("mousedown.tt", function($e) { - $e.preventDefault(); - }); - }, - _onSelectableClicked: function onSelectableClicked(type, $el) { - this.select($el); - }, - _onDatasetCleared: function onDatasetCleared() { - this._updateHint(); - }, - _onDatasetRendered: function onDatasetRendered(type, suggestions, async, dataset) { - this._updateHint(); - if (this.autoselect) { - var cursorClass = this.selectors.cursor.substr(1); - this.menu.$node.find(this.selectors.suggestion).first().addClass(cursorClass); - } - this.eventBus.trigger("render", suggestions, async, dataset); - }, - _onAsyncRequested: function onAsyncRequested(type, dataset, query) { - this.eventBus.trigger("asyncrequest", query, dataset); - }, - _onAsyncCanceled: function onAsyncCanceled(type, dataset, query) { - this.eventBus.trigger("asynccancel", query, dataset); - }, - _onAsyncReceived: function onAsyncReceived(type, dataset, query) { - this.eventBus.trigger("asyncreceive", query, dataset); - }, - _onFocused: function onFocused() { - this._minLengthMet() && this.menu.update(this.input.getQuery()); - }, - _onBlurred: function onBlurred() { - if (this.input.hasQueryChangedSinceLastFocus()) { - this.eventBus.trigger("change", this.input.getQuery()); - } - }, - _onEnterKeyed: function onEnterKeyed(type, $e) { - var $selectable; - if ($selectable = this.menu.getActiveSelectable()) { - if (this.select($selectable)) { - $e.preventDefault(); - $e.stopPropagation(); - } - } else if (this.autoselect) { - if (this.select(this.menu.getTopSelectable())) { - $e.preventDefault(); - $e.stopPropagation(); - } - } - }, - _onTabKeyed: function onTabKeyed(type, $e) { - var $selectable; - if ($selectable = this.menu.getActiveSelectable()) { - this.select($selectable) && $e.preventDefault(); - } else if (this.autoselect) { - if ($selectable = this.menu.getTopSelectable()) { - this.autocomplete($selectable) && $e.preventDefault(); - } - } - }, - _onEscKeyed: function onEscKeyed() { - this.close(); - }, - _onUpKeyed: function onUpKeyed() { - this.moveCursor(-1); - }, - _onDownKeyed: function onDownKeyed() { - this.moveCursor(+1); - }, - _onLeftKeyed: function onLeftKeyed() { - if (this.dir === "rtl" && this.input.isCursorAtEnd()) { - this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable()); - } - }, - _onRightKeyed: function onRightKeyed() { - if (this.dir === "ltr" && this.input.isCursorAtEnd()) { - this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable()); - } - }, - _onQueryChanged: function onQueryChanged(e, query) { - this._minLengthMet(query) ? this.menu.update(query) : this.menu.empty(); - }, - _onWhitespaceChanged: function onWhitespaceChanged() { - this._updateHint(); - }, - _onLangDirChanged: function onLangDirChanged(e, dir) { - if (this.dir !== dir) { - this.dir = dir; - this.menu.setLanguageDirection(dir); - } - }, - _openIfActive: function openIfActive() { - this.isActive() && this.open(); - }, - _minLengthMet: function minLengthMet(query) { - query = _.isString(query) ? query : this.input.getQuery() || ""; - return query.length >= this.minLength; - }, - _updateHint: function updateHint() { - var $selectable, data, val, query, escapedQuery, frontMatchRegEx, match; - $selectable = this.menu.getTopSelectable(); - data = this.menu.getSelectableData($selectable); - val = this.input.getInputValue(); - if (data && !_.isBlankString(val) && !this.input.hasOverflow()) { - query = Input.normalizeQuery(val); - escapedQuery = _.escapeRegExChars(query); - frontMatchRegEx = new RegExp("^(?:" + escapedQuery + ")(.+$)", "i"); - match = frontMatchRegEx.exec(data.val); - match && this.input.setHint(val + match[1]); - } else { - this.input.clearHint(); - } - }, - isEnabled: function isEnabled() { - return this.enabled; - }, - enable: function enable() { - this.enabled = true; - }, - disable: function disable() { - this.enabled = false; - }, - isActive: function isActive() { - return this.active; - }, - activate: function activate() { - if (this.isActive()) { - return true; - } else if (!this.isEnabled() || this.eventBus.before("active")) { - return false; - } else { - this.active = true; - this.eventBus.trigger("active"); - return true; - } - }, - deactivate: function deactivate() { - if (!this.isActive()) { - return true; - } else if (this.eventBus.before("idle")) { - return false; - } else { - this.active = false; - this.close(); - this.eventBus.trigger("idle"); - return true; - } - }, - isOpen: function isOpen() { - return this.menu.isOpen(); - }, - open: function open() { - if (!this.isOpen() && !this.eventBus.before("open")) { - this.input.setAriaExpanded(true); - this.menu.open(); - this._updateHint(); - this.eventBus.trigger("open"); - } - return this.isOpen(); - }, - close: function close() { - if (this.isOpen() && !this.eventBus.before("close")) { - this.input.setAriaExpanded(false); - this.menu.close(); - this.input.clearHint(); - this.input.resetInputValue(); - this.eventBus.trigger("close"); - } - return !this.isOpen(); - }, - setVal: function setVal(val) { - this.input.setQuery(_.toStr(val)); - }, - getVal: function getVal() { - return this.input.getQuery(); - }, - select: function select($selectable) { - var data = this.menu.getSelectableData($selectable); - if (data && !this.eventBus.before("select", data.obj, data.dataset)) { - this.input.setQuery(data.val, true); - this.eventBus.trigger("select", data.obj, data.dataset); - this.close(); - return true; - } - return false; - }, - autocomplete: function autocomplete($selectable) { - var query, data, isValid; - query = this.input.getQuery(); - data = this.menu.getSelectableData($selectable); - isValid = data && query !== data.val; - if (isValid && !this.eventBus.before("autocomplete", data.obj, data.dataset)) { - this.input.setQuery(data.val); - this.eventBus.trigger("autocomplete", data.obj, data.dataset); - return true; - } - return false; - }, - moveCursor: function moveCursor(delta) { - var query, $candidate, data, suggestion, datasetName, cancelMove, id; - query = this.input.getQuery(); - $candidate = this.menu.selectableRelativeToCursor(delta); - data = this.menu.getSelectableData($candidate); - suggestion = data ? data.obj : null; - datasetName = data ? data.dataset : null; - id = $candidate ? $candidate.attr("id") : null; - this.input.trigger("cursorchange", id); - cancelMove = this._minLengthMet() && this.menu.update(query); - if (!cancelMove && !this.eventBus.before("cursorchange", suggestion, datasetName)) { - this.menu.setCursor($candidate); - if (data) { - if (typeof data.val === "string") { - this.input.setInputValue(data.val); - } - } else { - this.input.resetInputValue(); - this._updateHint(); - } - this.eventBus.trigger("cursorchange", suggestion, datasetName); - return true; - } - return false; - }, - destroy: function destroy() { - this.input.destroy(); - this.menu.destroy(); - } - }); - return Typeahead; - function c(ctx) { - var methods = [].slice.call(arguments, 1); - return function() { - var args = [].slice.call(arguments); - _.each(methods, function(method) { - return ctx[method].apply(ctx, args); - }); - }; - } - }(); - (function() { - "use strict"; - var old, keys, methods; - old = $.fn.typeahead; - keys = { - www: "tt-www", - attrs: "tt-attrs", - typeahead: "tt-typeahead" - }; - methods = { - initialize: function initialize(o, datasets) { - var www; - datasets = _.isArray(datasets) ? datasets : [].slice.call(arguments, 1); - o = o || {}; - www = WWW(o.classNames); - return this.each(attach); - function attach() { - var $input, $wrapper, $hint, $menu, defaultHint, defaultMenu, eventBus, input, menu, status, typeahead, MenuConstructor; - _.each(datasets, function(d) { - d.highlight = !!o.highlight; - }); - $input = $(this); - $wrapper = $(www.html.wrapper); - $hint = $elOrNull(o.hint); - $menu = $elOrNull(o.menu); - defaultHint = o.hint !== false && !$hint; - defaultMenu = o.menu !== false && !$menu; - defaultHint && ($hint = buildHintFromInput($input, www)); - defaultMenu && ($menu = $(www.html.menu).css(www.css.menu)); - $hint && $hint.val(""); - $input = prepInput($input, www); - if (defaultHint || defaultMenu) { - $wrapper.css(www.css.wrapper); - $input.css(defaultHint ? www.css.input : www.css.inputWithNoHint); - $input.wrap($wrapper).parent().prepend(defaultHint ? $hint : null).append(defaultMenu ? $menu : null); - } - MenuConstructor = defaultMenu ? DefaultMenu : Menu; - eventBus = new EventBus({ - el: $input - }); - input = new Input({ - hint: $hint, - input: $input, - menu: $menu - }, www); - menu = new MenuConstructor({ - node: $menu, - datasets: datasets - }, www); - status = new Status({ - $input: $input, - menu: menu - }); - typeahead = new Typeahead({ - input: input, - menu: menu, - eventBus: eventBus, - minLength: o.minLength, - autoselect: o.autoselect - }, www); - $input.data(keys.www, www); - $input.data(keys.typeahead, typeahead); - } - }, - isEnabled: function isEnabled() { - var enabled; - ttEach(this.first(), function(t) { - enabled = t.isEnabled(); - }); - return enabled; - }, - enable: function enable() { - ttEach(this, function(t) { - t.enable(); - }); - return this; - }, - disable: function disable() { - ttEach(this, function(t) { - t.disable(); - }); - return this; - }, - isActive: function isActive() { - var active; - ttEach(this.first(), function(t) { - active = t.isActive(); - }); - return active; - }, - activate: function activate() { - ttEach(this, function(t) { - t.activate(); - }); - return this; - }, - deactivate: function deactivate() { - ttEach(this, function(t) { - t.deactivate(); - }); - return this; - }, - isOpen: function isOpen() { - var open; - ttEach(this.first(), function(t) { - open = t.isOpen(); - }); - return open; - }, - open: function open() { - ttEach(this, function(t) { - t.open(); - }); - return this; - }, - close: function close() { - ttEach(this, function(t) { - t.close(); - }); - return this; - }, - select: function select(el) { - var success = false, $el = $(el); - ttEach(this.first(), function(t) { - success = t.select($el); - }); - return success; - }, - autocomplete: function autocomplete(el) { - var success = false, $el = $(el); - ttEach(this.first(), function(t) { - success = t.autocomplete($el); - }); - return success; - }, - moveCursor: function moveCursoe(delta) { - var success = false; - ttEach(this.first(), function(t) { - success = t.moveCursor(delta); - }); - return success; - }, - val: function val(newVal) { - var query; - if (!arguments.length) { - ttEach(this.first(), function(t) { - query = t.getVal(); - }); - return query; - } else { - ttEach(this, function(t) { - t.setVal(_.toStr(newVal)); - }); - return this; - } - }, - destroy: function destroy() { - ttEach(this, function(typeahead, $input) { - revert($input); - typeahead.destroy(); - }); - return this; - } - }; - $.fn.typeahead = function(method) { - if (methods[method]) { - return methods[method].apply(this, [].slice.call(arguments, 1)); - } else { - return methods.initialize.apply(this, arguments); - } - }; - $.fn.typeahead.noConflict = function noConflict() { - $.fn.typeahead = old; - return this; - }; - function ttEach($els, fn) { - $els.each(function() { - var $input = $(this), typeahead; - (typeahead = $input.data(keys.typeahead)) && fn(typeahead, $input); - }); - } - function buildHintFromInput($input, www) { - return $input.clone().addClass(www.classes.hint).removeData().css(www.css.hint).css(getBackgroundStyles($input)).prop({ - readonly: true, - required: false - }).removeAttr("id name placeholder").removeClass("required").attr({ - spellcheck: "false", - tabindex: -1 - }); - } - function prepInput($input, www) { - $input.data(keys.attrs, { - dir: $input.attr("dir"), - autocomplete: $input.attr("autocomplete"), - spellcheck: $input.attr("spellcheck"), - style: $input.attr("style") - }); - $input.addClass(www.classes.input).attr({ - spellcheck: false - }); - try { - !$input.attr("dir") && $input.attr("dir", "auto"); - } catch (e) {} - return $input; - } - function getBackgroundStyles($el) { - return { - backgroundAttachment: $el.css("background-attachment"), - backgroundClip: $el.css("background-clip"), - backgroundColor: $el.css("background-color"), - backgroundImage: $el.css("background-image"), - backgroundOrigin: $el.css("background-origin"), - backgroundPosition: $el.css("background-position"), - backgroundRepeat: $el.css("background-repeat"), - backgroundSize: $el.css("background-size") - }; - } - function revert($input) { - var www, $wrapper; - www = $input.data(keys.www); - $wrapper = $input.parent().filter(www.selectors.wrapper); - _.each($input.data(keys.attrs), function(val, key) { - _.isUndefined(val) ? $input.removeAttr(key) : $input.attr(key, val); - }); - $input.removeData(keys.typeahead).removeData(keys.www).removeData(keys.attr).removeClass(www.classes.input); - if ($wrapper.length) { - $input.detach().insertAfter($wrapper); - $wrapper.remove(); - } - } - function $elOrNull(obj) { - var isValid, $el; - isValid = _.isJQuery(obj) || _.isElement(obj); - $el = isValid ? $(obj).first() : []; - return $el.length ? $el : null; - } - })(); -}); \ No newline at end of file diff --git a/Carthage/Checkouts/BigInt/docs/search.json b/Carthage/Checkouts/BigInt/docs/search.json deleted file mode 100644 index 6f79c6be5..000000000 --- a/Carthage/Checkouts/BigInt/docs/search.json +++ /dev/null @@ -1 +0,0 @@ -{"Structs/BigInt/Words.html#/s:Sl7IndicesQa":{"name":"Indices","parent_name":"Words"},"Structs/BigInt/Words.html#/s:Sl5countSivp":{"name":"count","parent_name":"Words"},"Structs/BigInt/Words.html#/s:Sk7indices7IndicesQzvp":{"name":"indices","parent_name":"Words"},"Structs/BigInt/Words.html#/s:Sl10startIndex0B0Qzvp":{"name":"startIndex","parent_name":"Words"},"Structs/BigInt/Words.html#/s:Sl8endIndex0B0Qzvp":{"name":"endIndex","parent_name":"Words"},"Structs/BigInt/Words.html#/s:Sly7ElementQz5IndexQzcip":{"name":"subscript(_:)","parent_name":"Words"},"Structs/BigInt/Sign.html#/s:6BigIntAAV4SignO4plusyA2DmF":{"name":"plus","abstract":"

Undocumented

","parent_name":"Sign"},"Structs/BigInt/Sign.html#/s:6BigIntAAV4SignO5minusyA2DmF":{"name":"minus","abstract":"

Undocumented

","parent_name":"Sign"},"Structs/BigInt/Sign.html":{"name":"Sign","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:Sj9MagnitudeQa":{"name":"Magnitude","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV4Worda":{"name":"Word","abstract":"

The type representing a digit in BigInt‘s underlying number system.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:Sz8isSignedSbvpZ":{"name":"isSigned","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV9magnitudeAA0A4UIntVvp":{"name":"magnitude","abstract":"

The absolute value of this integer.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV4signAB4SignOvp":{"name":"sign","abstract":"

True iff the value of this integer is negative.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV4sign9magnitudeA2B4SignO_AA0A4UIntVtcfc":{"name":"init(sign:magnitude:)","abstract":"

Initializes a new big integer with the provided absolute number and sign flag.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV6isZeroSbvp":{"name":"isZero","abstract":"

Return true iff this integer is zero.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV6signumAByF":{"name":"signum()","abstract":"

Returns -1 if this value is negative and 1 if it’s positive; otherwise, 0.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1poiyA2B_ABtFZ":{"name":"+(_:_:)","abstract":"

Add a to b and return the result.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2peoiyyABz_ABtFZ":{"name":"+=(_:_:)","abstract":"

Add b to a in place.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1topyA2BFZ":{"name":"~(_:)","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1aoiyA2Bz_ABtFZ":{"name":"&(_:_:)","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1ooiyA2Bz_ABtFZ":{"name":"|(_:_:)","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1xoiyA2Bz_ABtFZ":{"name":"^(_:_:)","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2aeoiyyABz_ABtFZ":{"name":"&=(_:_:)","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2oeoiyyABz_ABtFZ":{"name":"|=(_:_:)","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2xeoiyyABz_ABtFZ":{"name":"^=(_:_:)","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"BigInt"},"Structs/BigInt.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2eeoiySbAB_ABtFZ":{"name":"==(_:_:)","abstract":"

Return true iff a is equal to b.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1loiySbAB_ABtFZ":{"name":"<(_:_:)","abstract":"

Return true iff a is less than b.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAVyABSWcfc":{"name":"init(_:)","abstract":"

Initialize a BigInt from bytes accessed from an UnsafeRawBufferPointer,","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAVyAB10Foundation4DataVcfc":{"name":"init(_:)","abstract":"

Initializes an integer from the bits stored inside a piece of Data.","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV9serialize10Foundation4DataVyF":{"name":"serialize()","abstract":"

Return a Data value that contains the base-256 representation of this integer, in network (big-endian) byte order and a prepended byte to indicate the sign (0 for positive, 1 for negative)

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV20quotientAndRemainder10dividingByAB0C0_AB9remaindertAB_tF":{"name":"quotientAndRemainder(dividingBy:)","abstract":"

Divide this integer by y and return the resulting quotient and remainder.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1doiyA2B_ABtFZ":{"name":"/(_:_:)","abstract":"

Divide a by b and return the quotient. Traps if b is zero.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1roiyA2B_ABtFZ":{"name":"%(_:_:)","abstract":"

Divide a by b and return the remainder. The result has the same sign as a.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV7modulusyA2BF":{"name":"modulus(_:)","abstract":"

Return the result of a mod b. The result is always a nonnegative integer that is less than the absolute value of b.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2deoiyyABz_ABtFZ":{"name":"/=(_:_:)","abstract":"

Divide a by b storing the quotient in a.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2reoiyyABz_ABtFZ":{"name":"%=(_:_:)","abstract":"

Divide a by b storing the remainder in a.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV5poweryABSiF":{"name":"power(_:)","abstract":"

Returns this integer raised to the power exponent.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV5power_7modulusA2B_ABtF":{"name":"power(_:modulus:)","abstract":"

Returns the remainder of this integer raised to the power exponent in modulo arithmetic under modulus.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:Sz7exactlyxSgqd___tcSBRd__lufc":{"name":"init(exactly:)","parent_name":"BigInt"},"Structs/BigInt.html#/s:Szyxqd__cSBRd__lufc":{"name":"init(_:)","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV21greatestCommonDivisor4withA2B_tF":{"name":"greatestCommonDivisor(with:)","abstract":"

Returns the greatest common divisor of a and b.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV7inverseyABSgABF":{"name":"inverse(_:)","abstract":"

Returns the multiplicative inverse of this integer in modulo modulus arithmetic,","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV4hash4intoys6HasherVz_tF":{"name":"hash(into:)","abstract":"

Append this BigInt to the specified hasher.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAVABycfc":{"name":"init()","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAVyAbA0A4UIntVcfc":{"name":"init(_:)","abstract":"

Initializes a new signed big integer with the same value as the specified unsigned big integer.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:Szyxqd__cSzRd__lufc":{"name":"init(_:)","parent_name":"BigInt"},"Structs/BigInt.html#/s:Sj7exactlyxSgqd___tcSzRd__lufc":{"name":"init(exactly:)","parent_name":"BigInt"},"Structs/BigInt.html#/s:Sz8clampingxqd___tcSzRd__lufc":{"name":"init(clamping:)","parent_name":"BigInt"},"Structs/BigInt.html#/s:Sz18truncatingIfNeededxqd___tcSzRd__lufc":{"name":"init(truncatingIfNeeded:)","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV14integerLiteralABs5Int64V_tcfc":{"name":"init(integerLiteral:)","abstract":"

Initialize a new big integer from an integer literal.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1moiyA2B_ABtFZ":{"name":"*(_:_:)","abstract":"

Multiply a with b and return the result.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2meoiyyABz_ABtFZ":{"name":"*=(_:_:)","abstract":"

Multiply a with b in place.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV21isStrongProbablePrimeySbABF":{"name":"isStrongProbablePrime(_:)","abstract":"

Returns true iff this integer passes the strong probable prime test for the specified base.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV7isPrime6roundsSbSi_tF":{"name":"isPrime(rounds:)","abstract":"

Returns true if this integer is probably prime. Returns false if this integer is definitely not prime.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV3alloiyA2B_ABtFZ":{"name":"&<<(_:_:)","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV4alleoiyyABz_ABtFZ":{"name":"&<<=(_:_:)","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV3aggoiyA2B_ABtFZ":{"name":"&>>(_:_:)","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV4aggeoiyyABz_ABtFZ":{"name":"&>>=(_:_:)","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2lloiyA2B_xtSzRzlFZ":{"name":"<<(_:_:)","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV3lleoiyyABz_xtSzRzlFZ":{"name":"<<=(_:_:)","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2ggoiyA2B_xtSzRzlFZ":{"name":">>(_:_:)","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV3ggeoiyyABz_xtSzRzlFZ":{"name":">>=(_:_:)","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV10squareRootAByF":{"name":"squareRoot()","abstract":"

Returns the integer square root of a big integer; i.e., the largest integer whose square isn’t greater than value.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:Sx6StrideQa":{"name":"Stride","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV8advanced2byA2B_tF":{"name":"advanced(by:)","abstract":"

Returns self + n.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV8distance2toA2B_tF":{"name":"distance(to:)","abstract":"

Returns other - self.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV_5radixABSgx_SitcSyRzlufc":{"name":"init(_:radix:)","abstract":"

Initialize a big integer from an ASCII representation in a given radix. Numerals above 9 are represented by","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV20unicodeScalarLiteralABs7UnicodeO0D0V_tcfc":{"name":"init(unicodeScalarLiteral:)","abstract":"

Initialize a new big integer from a Unicode scalar.","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV30extendedGraphemeClusterLiteralABSS_tcfc":{"name":"init(extendedGraphemeClusterLiteral:)","abstract":"

Initialize a new big integer from an extended grapheme cluster.","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV13stringLiteralABSS_tcfc":{"name":"init(stringLiteral:)","abstract":"

Initialize a new big integer from a decimal number represented by a string literal of arbitrary length.","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV11descriptionSSvp":{"name":"description","abstract":"

Return the decimal representation of this integer.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV21playgroundDescriptionypvp":{"name":"playgroundDescription","abstract":"

Return the playground quick look representation of this integer.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV6negateyyF":{"name":"negate()","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1soiyA2B_ABtFZ":{"name":"-(_:_:)","abstract":"

Subtract b from a and return the result.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2seoiyyABz_ABtFZ":{"name":"-=(_:_:)","abstract":"

Subtract b from a in place.

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV8bitWidthSivp":{"name":"bitWidth","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV20trailingZeroBitCountSivp":{"name":"trailingZeroBitCount","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt/Words.html":{"name":"Words","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV5wordsAB5WordsVvp":{"name":"words","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV5wordsABx_tcSTRzSu7ElementRtzlufc":{"name":"init(words:)","abstract":"

Undocumented

","parent_name":"BigInt"},"Structs/BigUInt/Words.html#/s:Sl10startIndex0B0Qzvp":{"name":"startIndex","parent_name":"Words"},"Structs/BigUInt/Words.html#/s:Sl8endIndex0B0Qzvp":{"name":"endIndex","parent_name":"Words"},"Structs/BigUInt/Words.html#/s:Sly7ElementQz5IndexQzcip":{"name":"subscript(_:)","parent_name":"Words"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV4Worda":{"name":"Word","abstract":"

The type representing a digit in BigUInt‘s underlying number system.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntVACycfc":{"name":"init()","abstract":"

Initializes a new BigUInt with value 0.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV5wordsACSaySuG_tcfc":{"name":"init(words:)","abstract":"

Initializes a new BigUInt with the specified digits. The digits are ordered from least to most significant.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV1poiyA2C_ACtFZ":{"name":"+(_:_:)","abstract":"

Add a and b together and return the result.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2peoiyyACz_ACtFZ":{"name":"+=(_:_:)","abstract":"

Add a and b together, and store the sum in a.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Sz8isSignedSbvpZ":{"name":"isSigned","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV6signumACyF":{"name":"signum()","abstract":"

Returns 1 if this value is, positive; otherwise, 0.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV1topyA2CFZ":{"name":"~(_:)","abstract":"

Return the ones’ complement of a.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2oeoiyyACz_ACtFZ":{"name":"|=(_:_:)","abstract":"

Calculate the bitwise OR of a and b, and store the result in a.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2aeoiyyACz_ACtFZ":{"name":"&=(_:_:)","abstract":"

Calculate the bitwise AND of a and b and return the result.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2xeoiyyACz_ACtFZ":{"name":"^=(_:_:)","abstract":"

Calculate the bitwise XOR of a and b and return the result.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV7compareySo18NSComparisonResultVAC_ACtFZ":{"name":"compare(_:_:)","abstract":"

Compare a to b and return an NSComparisonResult indicating their order.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2eeoiySbAC_ACtFZ":{"name":"==(_:_:)","abstract":"

Return true iff a is equal to b.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV1loiySbAC_ACtFZ":{"name":"<(_:_:)","abstract":"

Return true iff a is less than b.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntVyACSWcfc":{"name":"init(_:)","abstract":"

Initialize a BigInt from bytes accessed from an UnsafeRawBufferPointer

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntVyAC10Foundation4DataVcfc":{"name":"init(_:)","abstract":"

Initializes an integer from the bits stored inside a piece of Data.","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV9serialize10Foundation4DataVyF":{"name":"serialize()","abstract":"

Return a Data value that contains the base-256 representation of this integer, in network (big-endian) byte order.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV20quotientAndRemainder10dividingByAC0D0_AC9remaindertAC_tF":{"name":"quotientAndRemainder(dividingBy:)","abstract":"

Divide this integer by y and return the resulting quotient and remainder.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV1doiyA2C_ACtFZ":{"name":"/(_:_:)","abstract":"

Divide x by y and return the quotient.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV1roiyA2C_ACtFZ":{"name":"%(_:_:)","abstract":"

Divide x by y and return the remainder.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2deoiyyACz_ACtFZ":{"name":"/=(_:_:)","abstract":"

Divide x by y and store the quotient in x.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2reoiyyACz_ACtFZ":{"name":"%=(_:_:)","abstract":"

Divide x by y and store the remainder in x.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV5poweryACSiF":{"name":"power(_:)","abstract":"

Returns this integer raised to the power exponent.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV5power_7modulusA2C_ACtF":{"name":"power(_:modulus:)","abstract":"

Returns the remainder of this integer raised to the power exponent in modulo arithmetic under modulus.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Sz7exactlyxSgqd___tcSBRd__lufc":{"name":"init(exactly:)","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Szyxqd__cSBRd__lufc":{"name":"init(_:)","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV21greatestCommonDivisor4withA2C_tF":{"name":"greatestCommonDivisor(with:)","abstract":"

Returns the greatest common divisor of self and b.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV7inverseyACSgACF":{"name":"inverse(_:)","abstract":"

Returns the multiplicative inverse of this integer in modulo modulus arithmetic,","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV4hash4intoys6HasherVz_tF":{"name":"hash(into:)","abstract":"

Append this BigUInt to the specified hasher.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Sj7exactlyxSgqd___tcSzRd__lufc":{"name":"init(exactly:)","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Szyxqd__cSzRd__lufc":{"name":"init(_:)","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Sz18truncatingIfNeededxqd___tcSzRd__lufc":{"name":"init(truncatingIfNeeded:)","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Sz8clampingxqd___tcSzRd__lufc":{"name":"init(clamping:)","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV14integerLiteralACs6UInt64V_tcfc":{"name":"init(integerLiteral:)","abstract":"

Initialize a new big integer from an integer literal.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV8multiply6byWordySu_tF":{"name":"multiply(byWord:)","abstract":"

Multiply this big integer by a single word, and store the result in place of the original big integer.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV10multiplied6byWordACSu_tF":{"name":"multiplied(byWord:)","abstract":"

Multiply this big integer by a single Word, and return the result.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV14multiplyAndAdd__9shiftedByyAC_SuSitF":{"name":"multiplyAndAdd(_:_:shiftedBy:)","abstract":"

Multiply x by y, and add the result to this integer, optionally shifted shift words to the left.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV10multiplied2byA2C_tF":{"name":"multiplied(by:)","abstract":"

Multiply this integer by y and return the result.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV25directMultiplicationLimitSivpZ":{"name":"directMultiplicationLimit","abstract":"

Multiplication switches to an asymptotically better recursive algorithm when arguments have more words than this limit.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV1moiyA2C_ACtFZ":{"name":"*(_:_:)","abstract":"

Multiply a by b and return the result.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2meoiyyACz_ACtFZ":{"name":"*=(_:_:)","abstract":"

Multiply a by b and store the result in a.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV21isStrongProbablePrimeySbACF":{"name":"isStrongProbablePrime(_:)","abstract":"

Returns true iff this integer passes the strong probable prime test for the specified base.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV7isPrime6roundsSbSi_tF":{"name":"isPrime(rounds:)","abstract":"

Returns true if this integer is probably prime. Returns false if this integer is definitely not prime.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV13randomInteger16withMaximumWidth5usingACSi_xztSGRzlFZ":{"name":"randomInteger(withMaximumWidth:using:)","abstract":"

Create a big unsigned integer consisting of width uniformly distributed random bits.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV13randomInteger16withMaximumWidthACSi_tFZ":{"name":"randomInteger(withMaximumWidth:)","abstract":"

Create a big unsigned integer consisting of width uniformly distributed random bits.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV13randomInteger14withExactWidth5usingACSi_xztSGRzlFZ":{"name":"randomInteger(withExactWidth:using:)","abstract":"

Create a big unsigned integer consisting of width-1 uniformly distributed random bits followed by a one bit.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV13randomInteger14withExactWidthACSi_tFZ":{"name":"randomInteger(withExactWidth:)","abstract":"

Create a big unsigned integer consisting of width-1 uniformly distributed random bits followed by a one bit.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV13randomInteger8lessThan5usingA2C_xztSGRzlFZ":{"name":"randomInteger(lessThan:using:)","abstract":"

Create a uniformly distributed random unsigned integer that’s less than the specified limit.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV13randomInteger8lessThanA2C_tFZ":{"name":"randomInteger(lessThan:)","abstract":"

Create a uniformly distributed random unsigned integer that’s less than the specified limit.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV3ggeoiyyACz_xtSzRzlFZ":{"name":">>=(_:_:)","abstract":"

Undocumented

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV3lleoiyyACz_xtSzRzlFZ":{"name":"<<=(_:_:)","abstract":"

Undocumented

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2ggoiyA2C_xtSzRzlFZ":{"name":">>(_:_:)","abstract":"

Undocumented

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2lloiyA2C_xtSzRzlFZ":{"name":"<<(_:_:)","abstract":"

Undocumented

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV10squareRootACyF":{"name":"squareRoot()","abstract":"

Returns the integer square root of a big integer; i.e., the largest integer whose square isn’t greater than value.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV6Stridea":{"name":"Stride","abstract":"

A type that can represent the distance between two values ofa BigUInt.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV8advanced2byAc2AV_tF":{"name":"advanced(by:)","abstract":"

Adds n to self and returns the result. Traps if the result would be less than zero.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV8distance2toA2AVAC_tF":{"name":"distance(to:)","abstract":"

Returns the (potentially negative) difference between self and other as a BigInt. Never traps.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV_5radixACSgx_SitcSyRzlufc":{"name":"init(_:radix:)","abstract":"

Initialize a big integer from an ASCII representation in a given radix. Numerals above 9 are represented by","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV20unicodeScalarLiteralACs7UnicodeO0E0V_tcfc":{"name":"init(unicodeScalarLiteral:)","abstract":"

Initialize a new big integer from a Unicode scalar.","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV30extendedGraphemeClusterLiteralACSS_tcfc":{"name":"init(extendedGraphemeClusterLiteral:)","abstract":"

Initialize a new big integer from an extended grapheme cluster.","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV13stringLiteralACSS_tcfc":{"name":"init(stringLiteral:)","abstract":"

Initialize a new big integer from a decimal number represented by a string literal of arbitrary length.","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV11descriptionSSvp":{"name":"description","abstract":"

Return the decimal representation of this integer.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV21playgroundDescriptionypvp":{"name":"playgroundDescription","abstract":"

Return the playground quick look representation of this integer.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV25subtractReportingOverflow_9shiftedBySbAC_SitF":{"name":"subtractReportingOverflow(_:shiftedBy:)","abstract":"

Subtract other from this integer in place, and return a flag indicating if the operation caused an","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV28subtractingReportingOverflow_9shiftedByAC12partialValue_Sb8overflowtAC_SitF":{"name":"subtractingReportingOverflow(_:shiftedBy:)","abstract":"

Subtract other from this integer, returning the difference and a flag indicating arithmetic overflow.","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV28subtractingReportingOverflowyAC12partialValue_Sb8overflowtACF":{"name":"subtractingReportingOverflow(_:)","abstract":"

Subtracts other from self, returning the result and a flag indicating arithmetic overflow.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV8subtract_9shiftedByyAC_SitF":{"name":"subtract(_:shiftedBy:)","abstract":"

Subtract other from this integer in place.","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV11subtracting_9shiftedByA2C_SitF":{"name":"subtracting(_:shiftedBy:)","abstract":"

Subtract b from this integer, and return the difference.","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV9decrement9shiftedByySi_tF":{"name":"decrement(shiftedBy:)","abstract":"

Decrement this integer by one.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV1soiyA2C_ACtFZ":{"name":"-(_:_:)","abstract":"

Subtract b from a and return the result.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2seoiyyACz_ACtFZ":{"name":"-=(_:_:)","abstract":"

Subtract b from a and store the result in a.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV5bitAtSbSi_tcip":{"name":"subscript(bitAt:)","abstract":"

Undocumented

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV8bitWidthSivp":{"name":"bitWidth","abstract":"

The minimum number of bits required to represent this integer in binary.

","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV19leadingZeroBitCountSivp":{"name":"leadingZeroBitCount","abstract":"

The number of leading zero bits in the binary representation of this integer in base 2^(Word.bitWidth).","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV20trailingZeroBitCountSivp":{"name":"trailingZeroBitCount","abstract":"

The number of trailing zero bits in the binary representation of this integer.

","parent_name":"BigUInt"},"Structs/BigUInt/Words.html":{"name":"Words","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Sz5words5WordsQzvp":{"name":"words","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV5wordsACx_tcSTRzSu7ElementRtzlufc":{"name":"init(words:)","abstract":"

Undocumented

","parent_name":"BigUInt"},"Structs/BigUInt.html":{"name":"BigUInt","abstract":"

An arbitary precision unsigned integer type, also known as a “big integer”.

"},"Structs/BigInt.html":{"name":"BigInt","abstract":"

An arbitary precision signed integer type, also known as a “big integer”.

"},"Extensions/String.html#/s:SS6BigIntEySSAA0A4UIntVcfc":{"name":"init(_:)","abstract":"

Initialize a new string with the base-10 representation of an unsigned big integer.

","parent_name":"String"},"Extensions/String.html#/s:SS6BigIntE_5radix9uppercaseSSAA0A4UIntV_SiSbtcfc":{"name":"init(_:radix:uppercase:)","abstract":"

Initialize a new string representing an unsigned big integer in the given radix (base).

","parent_name":"String"},"Extensions/String.html#/s:SS6BigIntE_5radix9uppercaseSSA2AV_SiSbtcfc":{"name":"init(_:radix:uppercase:)","abstract":"

Initialize a new string representing a signed big integer in the given radix (base).

","parent_name":"String"},"Extensions/BinaryFloatingPoint.html#/s:SB6BigInts17FixedWidthInteger11RawExponentRpzsAB0F11SignificandRpzrlEyxA2AVcfc":{"name":"init(_:)","abstract":"

Undocumented

","parent_name":"BinaryFloatingPoint"},"Extensions/BinaryFloatingPoint.html#/s:SB6BigInts17FixedWidthInteger11RawExponentRpzsAB0F11SignificandRpzrlEyxAA0A4UIntVcfc":{"name":"init(_:)","abstract":"

Undocumented

","parent_name":"BinaryFloatingPoint"},"Extensions/BinaryFloatingPoint.html":{"name":"BinaryFloatingPoint"},"Extensions/String.html":{"name":"String"},"Extensions.html":{"name":"Extensions","abstract":"

The following extensions are available globally.

"},"Structs.html":{"name":"Structures","abstract":"

The following structures are available globally.

"}} \ No newline at end of file diff --git a/Carthage/Checkouts/BigInt/docs/undocumented.json b/Carthage/Checkouts/BigInt/docs/undocumented.json deleted file mode 100644 index 424f92a4e..000000000 --- a/Carthage/Checkouts/BigInt/docs/undocumented.json +++ /dev/null @@ -1,229 +0,0 @@ -{ - "warnings": [ - { - "file": "/Users/tim/Developer/BigInt/Sources/BigInt.swift", - "line": 30, - "symbol": "BigInt.Sign", - "symbol_kind": "source.lang.swift.decl.enum", - "warning": "undocumented" - }, - { - "file": "/Users/tim/Developer/BigInt/Sources/BigInt.swift", - "line": 31, - "symbol": "BigInt.Sign.plus", - "symbol_kind": "source.lang.swift.decl.enumelement", - "warning": "undocumented" - }, - { - "file": "/Users/tim/Developer/BigInt/Sources/BigInt.swift", - "line": 32, - "symbol": "BigInt.Sign.minus", - "symbol_kind": "source.lang.swift.decl.enumelement", - "warning": "undocumented" - }, - { - "file": "/Users/tim/Developer/BigInt/Sources/Bitwise Ops.swift", - "line": 50, - "symbol": "BigInt.~(_:)", - "symbol_kind": "source.lang.swift.decl.function.method.static", - "warning": "undocumented" - }, - { - "file": "/Users/tim/Developer/BigInt/Sources/Bitwise Ops.swift", - "line": 59, - "symbol": "BigInt.&(_:_:)", - "symbol_kind": "source.lang.swift.decl.function.method.static", - "warning": "undocumented" - }, - { - "file": "/Users/tim/Developer/BigInt/Sources/Bitwise Ops.swift", - "line": 76, - "symbol": "BigInt.|(_:_:)", - "symbol_kind": "source.lang.swift.decl.function.method.static", - "warning": "undocumented" - }, - { - "file": "/Users/tim/Developer/BigInt/Sources/Bitwise Ops.swift", - "line": 93, - "symbol": "BigInt.^(_:_:)", - "symbol_kind": "source.lang.swift.decl.function.method.static", - "warning": "undocumented" - }, - { - "file": "/Users/tim/Developer/BigInt/Sources/Bitwise Ops.swift", - "line": 110, - "symbol": "BigInt.&=(_:_:)", - "symbol_kind": "source.lang.swift.decl.function.method.static", - "warning": "undocumented" - }, - { - "file": "/Users/tim/Developer/BigInt/Sources/Bitwise Ops.swift", - "line": 114, - "symbol": "BigInt.|=(_:_:)", - "symbol_kind": "source.lang.swift.decl.function.method.static", - "warning": "undocumented" - }, - { - "file": "/Users/tim/Developer/BigInt/Sources/Bitwise Ops.swift", - "line": 118, - "symbol": "BigInt.^=(_:_:)", - "symbol_kind": "source.lang.swift.decl.function.method.static", - "warning": "undocumented" - }, - { - "file": "/Users/tim/Developer/BigInt/Sources/Floating Point Conversion.swift", - "line": 45, - "symbol": "BinaryFloatingPoint.init(_:)", - "symbol_kind": "source.lang.swift.decl.function.method.instance", - "warning": "undocumented" - }, - { - "file": "/Users/tim/Developer/BigInt/Sources/Floating Point Conversion.swift", - "line": 70, - "symbol": "BinaryFloatingPoint.init(_:)", - "symbol_kind": "source.lang.swift.decl.function.method.instance", - "warning": "undocumented" - }, - { - "file": "/Users/tim/Developer/BigInt/Sources/Integer Conversion.swift", - "line": 42, - "symbol": "BigInt.init()", - "symbol_kind": "source.lang.swift.decl.function.method.instance", - "warning": "undocumented" - }, - { - "file": "/Users/tim/Developer/BigInt/Sources/Shifts.swift", - "line": 109, - "symbol": "BigUInt.>>=(_:_:)", - "symbol_kind": "source.lang.swift.decl.function.method.static", - "warning": "undocumented" - }, - { - "file": "/Users/tim/Developer/BigInt/Sources/Shifts.swift", - "line": 121, - "symbol": "BigUInt.<<=(_:_:)", - "symbol_kind": "source.lang.swift.decl.function.method.static", - "warning": "undocumented" - }, - { - "file": "/Users/tim/Developer/BigInt/Sources/Shifts.swift", - "line": 129, - "symbol": "BigUInt.>>(_:_:)", - "symbol_kind": "source.lang.swift.decl.function.method.static", - "warning": "undocumented" - }, - { - "file": "/Users/tim/Developer/BigInt/Sources/Shifts.swift", - "line": 139, - "symbol": "BigUInt.<<(_:_:)", - "symbol_kind": "source.lang.swift.decl.function.method.static", - "warning": "undocumented" - }, - { - "file": "/Users/tim/Developer/BigInt/Sources/Shifts.swift", - "line": 168, - "symbol": "BigInt.&<<(_:_:)", - "symbol_kind": "source.lang.swift.decl.function.method.static", - "warning": "undocumented" - }, - { - "file": "/Users/tim/Developer/BigInt/Sources/Shifts.swift", - "line": 172, - "symbol": "BigInt.&<<=(_:_:)", - "symbol_kind": "source.lang.swift.decl.function.method.static", - "warning": "undocumented" - }, - { - "file": "/Users/tim/Developer/BigInt/Sources/Shifts.swift", - "line": 176, - "symbol": "BigInt.&>>(_:_:)", - "symbol_kind": "source.lang.swift.decl.function.method.static", - "warning": "undocumented" - }, - { - "file": "/Users/tim/Developer/BigInt/Sources/Shifts.swift", - "line": 180, - "symbol": "BigInt.&>>=(_:_:)", - "symbol_kind": "source.lang.swift.decl.function.method.static", - "warning": "undocumented" - }, - { - "file": "/Users/tim/Developer/BigInt/Sources/Shifts.swift", - "line": 184, - "symbol": "BigInt.<<(_:_:)", - "symbol_kind": "source.lang.swift.decl.function.method.static", - "warning": "undocumented" - }, - { - "file": "/Users/tim/Developer/BigInt/Sources/Shifts.swift", - "line": 189, - "symbol": "BigInt.<<=(_:_:)", - "symbol_kind": "source.lang.swift.decl.function.method.static", - "warning": "undocumented" - }, - { - "file": "/Users/tim/Developer/BigInt/Sources/Shifts.swift", - "line": 198, - "symbol": "BigInt.>>(_:_:)", - "symbol_kind": "source.lang.swift.decl.function.method.static", - "warning": "undocumented" - }, - { - "file": "/Users/tim/Developer/BigInt/Sources/Shifts.swift", - "line": 203, - "symbol": "BigInt.>>=(_:_:)", - "symbol_kind": "source.lang.swift.decl.function.method.static", - "warning": "undocumented" - }, - { - "file": "/Users/tim/Developer/BigInt/Sources/Subtraction.swift", - "line": 157, - "symbol": "BigInt.negate()", - "symbol_kind": "source.lang.swift.decl.function.method.instance", - "warning": "undocumented" - }, - { - "file": "/Users/tim/Developer/BigInt/Sources/Words and Bits.swift", - "line": 24, - "symbol": "BigUInt.subscript(bitAt:)", - "symbol_kind": "source.lang.swift.decl.function.subscript", - "warning": "undocumented" - }, - { - "file": "/Users/tim/Developer/BigInt/Sources/Words and Bits.swift", - "line": 78, - "symbol": "BigInt.bitWidth", - "symbol_kind": "source.lang.swift.decl.var.instance", - "warning": "undocumented" - }, - { - "file": "/Users/tim/Developer/BigInt/Sources/Words and Bits.swift", - "line": 83, - "symbol": "BigInt.trailingZeroBitCount", - "symbol_kind": "source.lang.swift.decl.var.instance", - "warning": "undocumented" - }, - { - "file": "/Users/tim/Developer/BigInt/Sources/Words and Bits.swift", - "line": 105, - "symbol": "BigUInt.init(words:)", - "symbol_kind": "source.lang.swift.decl.function.method.instance", - "warning": "undocumented" - }, - { - "file": "/Users/tim/Developer/BigInt/Sources/Words and Bits.swift", - "line": 188, - "symbol": "BigInt.words", - "symbol_kind": "source.lang.swift.decl.var.instance", - "warning": "undocumented" - }, - { - "file": "/Users/tim/Developer/BigInt/Sources/Words and Bits.swift", - "line": 192, - "symbol": "BigInt.init(words:)", - "symbol_kind": "source.lang.swift.decl.function.method.instance", - "warning": "undocumented" - } - ], - "source_directory": "/Users/tim/Developer/BigInt" -} \ No newline at end of file diff --git a/Carthage/Checkouts/BigInt/generate-docs.sh b/Carthage/Checkouts/BigInt/generate-docs.sh deleted file mode 100755 index 3682a5273..000000000 --- a/Carthage/Checkouts/BigInt/generate-docs.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -set -e - -module="BigInt" -workspace="BigInt.xcworkspace" -scheme="BigInt-macOS" - -version="$(grep VERSION_STRING version.xcconfig | sed 's/^VERSION_STRING = //' | sed 's/ *$//')" -today="$(date '+%Y-%m-%d')" - -if git rev-parse "v$version" >/dev/null 2>&1; then - # Use the tagged commit when we have one - ref="v$version" -else - # Otherwise, use the current commit. - ref="$(git rev-parse HEAD)" -fi - -jazzy \ - --clean \ - --author "Károly Lőrentey" \ - --author_url "https://twitter.com/lorentey" \ - --github_url "https://github.com/attaswift/$module" \ - --github-file-prefix "https://github.com/attaswift/$module/tree/$ref" \ - --module-version "$version" \ - --copyright "© 2016 [Károly Lőrentey](https://twitter.com/lorentey). (Last updated: $today)" \ - --xcodebuild-arguments "-workspace,$workspace,-scheme,$scheme" \ - --module "$module" \ - --root-url "https://attaswift.github.io/$module/reference/" \ - --theme fullwidth \ - --output docs diff --git a/Carthage/Checkouts/BigInt/images/BigInt.sketch b/Carthage/Checkouts/BigInt/images/BigInt.sketch deleted file mode 100644 index a74eb9b7e..000000000 Binary files a/Carthage/Checkouts/BigInt/images/BigInt.sketch and /dev/null differ diff --git a/Carthage/Checkouts/BigInt/images/banner.png b/Carthage/Checkouts/BigInt/images/banner.png deleted file mode 100644 index d0410a45f..000000000 Binary files a/Carthage/Checkouts/BigInt/images/banner.png and /dev/null differ diff --git a/Carthage/Checkouts/BigInt/version.xcconfig b/Carthage/Checkouts/BigInt/version.xcconfig deleted file mode 100644 index 934ed2105..000000000 --- a/Carthage/Checkouts/BigInt/version.xcconfig +++ /dev/null @@ -1,13 +0,0 @@ -// Increment the build number whenever you modify the version string. -VERSION_STRING = 5.3.0 -BUILD_NUMBER = 18 - -PROJECT_NAME = BigInt -BUNDLE_IDENTIFIER_BASE = org.attaswift.$(PROJECT_NAME) - -IPHONEOS_DEPLOYMENT_TARGET = 8.0 -MACOSX_DEPLOYMENT_TARGET = 10.9 -WATCHOS_DEPLOYMENT_TARGET = 2.0 -TVOS_DEPLOYMENT_TARGET = 9.0 - -APPLICATION_EXTENSION_API_ONLY = YES diff --git a/Carthage/Checkouts/CryptoSwift/.github/CODEOWNERS b/Carthage/Checkouts/CryptoSwift/.github/CODEOWNERS deleted file mode 100644 index 2904e51a2..000000000 --- a/Carthage/Checkouts/CryptoSwift/.github/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ -* @krzyzanowskim diff --git a/Carthage/Checkouts/CryptoSwift/.github/FUNDING.yml b/Carthage/Checkouts/CryptoSwift/.github/FUNDING.yml deleted file mode 100644 index 2d35203b5..000000000 --- a/Carthage/Checkouts/CryptoSwift/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -github: [krzyzanowskim] diff --git a/Carthage/Checkouts/CryptoSwift/.github/ISSUE_TEMPLATE/bug_report.md b/Carthage/Checkouts/CryptoSwift/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index c53722084..000000000 --- a/Carthage/Checkouts/CryptoSwift/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve - ---- - -**Describe the bug** - - -**Reproduce** -Steps to reproduce: -1. diff --git a/Carthage/Checkouts/CryptoSwift/.github/PULL_REQUEST_TEMPLATE.md b/Carthage/Checkouts/CryptoSwift/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 8d172fd9c..000000000 --- a/Carthage/Checkouts/CryptoSwift/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,9 +0,0 @@ -Fixes # - -Checklist: -- [ ] Correct file headers (see CONTRIBUTING.md). -- [ ] Formatted with [SwiftFormat](https://github.com/nicklockwood/SwiftFormat). -- [ ] Tests added. - -Changes proposed in this pull request: -- diff --git a/Carthage/Checkouts/CryptoSwift/.github/workflows/linux.yml b/Carthage/Checkouts/CryptoSwift/.github/workflows/linux.yml deleted file mode 100644 index 7b8386682..000000000 --- a/Carthage/Checkouts/CryptoSwift/.github/workflows/linux.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Linux - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-20.04 - - steps: - - uses: actions/checkout@v2 - - - name: Swift Package Build - run: swift build -v - - - name: Run tests - run: swift test -c release -Xswiftc -enable-testing -Xswiftc -DCI -Xswiftc -Xfrontend -Xswiftc -solver-memory-threshold -Xswiftc -Xfrontend -Xswiftc 999999999 diff --git a/Carthage/Checkouts/CryptoSwift/.github/workflows/macos.yml b/Carthage/Checkouts/CryptoSwift/.github/workflows/macos.yml deleted file mode 100644 index dff79ff77..000000000 --- a/Carthage/Checkouts/CryptoSwift/.github/workflows/macos.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: macOS - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -env: - DEVELOPER_DIR: /Applications/Xcode_12.2.app/Contents/Developer - -jobs: - build: - - runs-on: macos-latest - - steps: - - uses: actions/checkout@v2 - - - name: Swift Package Build - run: swift build -v - - - name: Run tests - run: swift test -c release -Xswiftc -enable-testing -Xswiftc -DCI -Xswiftc -Xfrontend -Xswiftc -solver-memory-threshold -Xswiftc -Xfrontend -Xswiftc 999999999 diff --git a/Carthage/Checkouts/CryptoSwift/.gitignore b/Carthage/Checkouts/CryptoSwift/.gitignore deleted file mode 100644 index fd97c263d..000000000 --- a/Carthage/Checkouts/CryptoSwift/.gitignore +++ /dev/null @@ -1,25 +0,0 @@ -### Xcode ### -.build/ -build/ -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata -*.xccheckout -*.moved-aside -DerivedData -*.xcuserstate -timeline.xctimeline -.swiftpm/xcode - -/Framework -.DS_Store -Carthage/Build - -.idea -.vscode diff --git a/Carthage/Checkouts/CryptoSwift/.mailmap b/Carthage/Checkouts/CryptoSwift/.mailmap deleted file mode 100644 index 61779d2da..000000000 --- a/Carthage/Checkouts/CryptoSwift/.mailmap +++ /dev/null @@ -1,5 +0,0 @@ -Marcin Krzyzanowski <758033+krzyzanowskim@users.noreply.github.com> -Marcin Krzyzanowski -Marcin Krzyzanowski -Marcin Krzyzanowski -Luis Reisewitz \ No newline at end of file diff --git a/Carthage/Checkouts/CryptoSwift/.swiftformat b/Carthage/Checkouts/CryptoSwift/.swiftformat deleted file mode 100644 index 19f0f78bf..000000000 --- a/Carthage/Checkouts/CryptoSwift/.swiftformat +++ /dev/null @@ -1,36 +0,0 @@ - ---exclude .build, Carthage, DerivedData, .git, Tests/LinuxMain.swift, Tests/CryptoSwiftTests/XCTestManifests.swift, Tests/TestsPerformance/XCTestManifests.swift - ---swiftversion 5.0 ---allman false ---commas always ---comments indent ---elseposition same-line ---empty void ---exponentcase lowercase ---exponentgrouping disabled ---fractiongrouping disabled ---header ignore ---octalgrouping 4,8 ---decimalgrouping 3,6 ---binarygrouping 4,8 ---hexgrouping ignore ---hexliteralcase lowercase ---ifdef indent ---indent 2 ---indentcase true ---importgrouping testable-bottom ---linebreaks lf ---operatorfunc spaced ---patternlet inline ---ranges no-space ---self insert ---semicolons inline ---stripunusedargs closure-only ---trimwhitespace always ---wraparguments preserve ---wrapcollections before-first - -# rules - ---rules indent, braces, isEmpty, redundantBreak, blankLinesAroundMark, blankLinesAtEndOfScope, blankLinesBetweenScopes, consecutiveBlankLines, consecutiveSpaces, duplicateImports, elseOnSameLine, leadingDelimiters, redundantBreak, redundantExtensionACL, redundantFileprivate, redundantGet, redundantInit, redundantLet, redundantNilInit, redundantObjc, redundantParens, redundantPattern, redundantRawValues, redundantReturn, redundantSelf, redundantVoidReturnType, semicolons, sortedImports, spaceAroundBraces, spaceAroundBrackets, spaceAroundComments, spaceAroundGenerics, spaceAroundOperators, spaceAroundParens, spaceInsideBraces, spaceInsideBrackets, specifiers, strongOutlets, strongifiedSelf, todos, void, wrapArguments, yodaConditions, trailingSpace \ No newline at end of file diff --git a/Carthage/Checkouts/CryptoSwift/.travis.yml b/Carthage/Checkouts/CryptoSwift/.travis.yml deleted file mode 100644 index 3e6127b23..000000000 --- a/Carthage/Checkouts/CryptoSwift/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: generic -matrix: - include: - # Test Ubuntu Linux 14.04 - - os: linux - dist: trusty - sudo: required - - os: osx - osx_image: xcode11.4 -install: - - eval "$(curl -sL https://swiftenv.fuller.li/install.sh)" -script: - - swift test -c release -Xswiftc -enable-testing -Xswiftc -DCI -Xswiftc -Xfrontend -Xswiftc -solver-memory-threshold -Xswiftc -Xfrontend -Xswiftc 999999999 diff --git a/Carthage/Checkouts/CryptoSwift/CHANGELOG b/Carthage/Checkouts/CryptoSwift/CHANGELOG deleted file mode 100644 index 2ea9da25e..000000000 --- a/Carthage/Checkouts/CryptoSwift/CHANGELOG +++ /dev/null @@ -1,332 +0,0 @@ -1.4.2 -- Update Xcode project to Xcode 13 -- Add SHA3 support for HMAC -- Update HMAC.Variant API (deprecate current cases) - -1.4.1 -- Introduce ISO 10126 padding -- fix various compiler warnings -- Revert Xcode project deployment target - -1.4.0 -- Customize CFB segment size (cfb8, cfb128). -- Adapt Swift @inlineable for better code optimization - -1.3.8 -- Revert xcframework revolution. Back to build from sources. (I'm sorry) - -1.3.7 -- Re-release to workaround Swift Package Manager release - -1.3.6 -- Fix macOS binary -- Windows support - -1.3.5 -- Re-release binary framework due to codesign issue - -1.3.4 -- Distribute optimized binary (xcframework) via SPM for apple platforms - -1.3.3 -- Adds OCB Authenticated-Encryption Algorithm (RFC7253) -- build-framework.sh output CryptoSwift.xcframework -- Xcode 12.2 maintenance updates -- Removed CryptoSwift.playground (couldn't make it work since Xcode 12 update) - -1.3.2 -- Swift 5.3 update (Xcode 12) -- Bump target platform (iOS 9, macOS 10.12) -- Allow CMAC with any Cipher -- Remove CMAC key limit - -1.3.1 -- Fix tests -- Swift 5.2 update -- Address possible timing issue - -1.3.0 -- Adds ISO-78164 padding -- Performance improvements -- Swift 5.1 update - -1.2.0 -- Performance improvements -- Workaround Xcode test builds with Xcode 11 - -1.1.3 -- Fix build crash: https://bugs.swift.org/browse/SR-11630 -- Fixes Xcode project tests build -- SwiftFormat all the things -- Increase/fix SHA2 data length for big input by use Int64 for calculation - -1.1.2 -- Fix Swift 5.0 build (for real this time) - -1.1.1 -- Fix Swift 5.0 build - -1.1.0 -- Replace RandomBytesSequence with Swift.RandomNumberGenerator -- Fix CBC-MAC -- Update SPM support -- Update for Xcode 11 and Swift 5.1 -- Xcode: BUILD_LIBRARY_FOR_DISTRIBUTION = YES - -1.0.0 -- Swift 5 -- Let's -- Celebrate -- This -- Event -- With -- 1.0.0 release -- After -- 4 years -- Thank you - -0.15.0 -- Adds The scrypt Password-Based Key Derivation Function (https://tools.ietf.org/html/rfc7914) -- Minor improvements - -0.14.0 -- Fixed decryption of AES-GCM ciphertexts with custom tag length - -0.13.1 -- Adds AES-GCM tag length configuration. -- Fixes count check for initializing UInt64 from Data. - -0.13.0 -- Adds CBC-MAC authenticator. -- Adds AES-CCM operation mode. - -0.12.0 -- Swift 4.2 maintenance update. - -0.11.0 -- API: Cryptor.seek() is throwable -- Adds proper stream support for CTR encryption with Updaptable interface. -- Refactor internals for the stream cipher modes. -- Set minimum deployment target to 8.0 (again). - -0.10.0 -- API: BlockMode is no longer an enum. Please migrate to eg. CBC() etc... -- Adds AES-GCM support. #97 - Feature sponsored by GesundheitsCloud (http://www.gesundheitscloud.de/) -- Adds CRC32c support. -- Improves AES variant validation. -- Fixes empty password in PBKDF2. - -0.9.0 -- Swift 4.1 compatibility -- Added CMAC message authenticator https://tools.ietf.org/html/rfc4493 -- Added AEADChaCha20Poly1305 (AEAD_CHACHA20_POLY1305) https://tools.ietf.org/html/rfc7539#section-2.8.1 - -0.8.3 -- Fixes SHA3 padding. -- Fixes Carthage builds. - -0.8.2 -- Fixes SHA3 partial updates calculations. -- Makes ChaCha20 processing faster again. - -0.8.1 -- Adds Data(hex:) helper. -- Adds HKDF (HMAC-based Extract-and-Expand Key Derivation Function) -- Prevent ChaCha overflow error - -0.8.0 -- Adds SHA3 Keccak variants -- Adds String.bytes helper to convert String to array of bytes -- Improves AES performance -- Speeds up compilation times with Swift 4 -- Fixes: Blowfish minimum key size is 5 -- Removes Ciphers "iv" parameter (value moved to BlockMode) -- BlockMode uses associated value for IV value where apply e.g. .CBC(iv: ivbytes) -- Refactors internal hacks no longer needed with Swift 4 - -0.7.2 -- Adds Padding enum (.pkcs5, .pkcs7, .noPadding, .zeroPadding) -- Removes Generics from the public API. -- Slightly improves SHA1, SHA2, SHA3 performance. -- Update SPM configuration for Swift 4 - -0.7.1 -- Swift 4.0 compatibility release - -0.7.0 -- Swift 3.2 compatibility release - -0.6.9 -- Fixed padding issue where padding was not properly added in CTR mode. -- Fixed thrown error on decrypting empty string, -- Fixed CI build script. -- Added String.encryptToBase64() - -0.6.8 -- Speed up MD5() -- Faster Array(hex:) -- Improve AES performance -- Fix tvOS bitcode -- Fix Blowfish CFB, OFB, CTR block modes. -- Fix Blowfish for 32-bit arch. -- Fix ChaCha20 preconditions - -0.6.7 -- Release for Xcode 8.2 -- Fix playground example - -0.6.6 -- Rework ChaCha20 -- Fix Poly1305 - -0.6.5 -- Significant performance improvement when processing lange amount of data. -- Degeneric functions and change Sequence -> Collection in generic constraints. - -0.6.4 -- More performance improvements -- Add convenient Digest.sha2(bytes:variant) -- New: Blowfish cipher - -0.6.3 -- Hotfix release -- Fixes bitPadding() that breaks Digests calculations, introduced in 0.6.2 - -0.6.2 -- SHA performance improvements by using less Swift in Swift -- Fix public access to all digests classes - -0.6.1 -- Update tests. -- New: RandomBytesSequence urandom values on Linux. -- Throw appropriate error for AES with invalid input where padding is needed. -- Improve performance, especially to SHA-1, SHA-2, PBKDF and related. -- Set deployment targets for all platform. Fixes Carthage builds. -- New: SHA-3 implementation (request #291) -- SHA-1 conforms to Updatable protocol and may be calculated incrementally. -- SHA-2 conforms to Updatable protocol and may be calculated incrementally. - -0.6.0 -- Remove bridge() workaround for Linux (not needed) -- make MD5() public -- Update README -- Convenience HMAC initializer for String input - -0.6.0-beta2 -- SHA-2 fix #319 -- HashProtocol -> Digest and refactor -- MD5 conforms to Updatable protocol and may be calculated incrementally -- Cipher protocol accepts Collection input now - -0.6.0-beta1 -- Swift 3 compatibility -- Multiplatform, Single-scheme Xcode Project -- Swift Package Manager fully supported (build and tests) -- Improved Linux support -- Travis configuration added -- Public interface tests added -- enum Authenticator -> protocol Authenticator -- CRC -> Checksum -- String.encrypt() returns hex string instead of Array -- removed String.decrypt() -- enum Hash -> struct Hash -- Convenience initializer of Array of bytes with Hex string. Array(hex: "0xb1b1b2b2") -- Fix reusability of ChaCha20 instance -- Replace optional initializers with throwable initializers -- Allow to set initial counter explicitly (AES block modes). RandomAccessCryptor.seek() - -0.5.2 -- Fix AES-CTR incremental updates. #287 -- Fixed PBKDF2 tests. #295 -- Fixed assertion check in PKCS7. #288 -- Updatable protocol accept SequenceType in place of Array - -0.5.1 -- Fixed PBKDF2 not taking key length parameter into account -- Switch to Array<> in code - -0.5 -- Added PBKDF1 https://tools.ietf.org/html/rfc2898#section-5.1 -- Added PBKDF2 https://tools.ietf.org/html/rfc2898#section-5.2 -- UpdatableCryptor protocol allows incremental encryption stream of data -- CryptoSwift.playground -- Docs update -- Added reflection control to CRC-32 (Luís Silva) -- Fix AES.init() (Pascal Pfiffner) - -0.4.1 -- fix NoPadding() - -0.4 -- Padding setup is now part of cipher constructor -- Added PBKDF2 http://tools.ietf.org/html/rfc2898#section-5.2 -- Add BlockCipher protocol -- Rename Cipher -> CipherProtocol -- Remove build-frameworks.sh script -- Keep sensitive data in memory with SecureBytes -- Allows direct use of HMAC and Poly1305 -- README update -- Fix missing Foundation import on Linux - -0.3.1 -- replace deprecated Bit with new enum. - -0.3 -- Swift 2.2 support -- use generators for cipher block modes should reduce memory overload. -- add OFB block mode -- add PCBC block mode -- String.decryptBase64ToString to decrypt Base64 encoded strings -- broke up complicated expressions which were taking ages to compile - -0.2.3 -- enable bitcode setting for Debug on an Apple TV -- faster compilation times -- improve padding functions - -0.2.2 -- Fix ChaCha20 cipher -- Replace for(;;) with for-in -- Workaround for "NSString are not yet implicitly convertible to String" on Linux - -0.2.1 -- Fix linux build -- re-add umbrella header - -0.2 -- Rabbit cipher (RFC4503) -- Linux Swift support -- Swift Package Manager support -- tvOS support -- Add optional seed to CRC -- Add umbrella header (CryptoSwift.h) -- Fix AES in CTR mode -- Fix no padding support for CTR and CFB block modes -- Fix access to AES.Error and ChaCha20.Error - -0.1.1 -- Fix Cococapods package (missing Foundation integration) - -0.1.0 -- Major performance improvements. -- Transition from Optionals to throw error. -- Replace enum Cipher with protocol for ciphers. -- Added CRC16 -- Fixed AES CFB decryption -- Drop internal "Foundation" dependency, nonetheless it is supported as usual. - -0.0.16 -- Critical fix for private "md5" selector issue (#135) - -0.0.15 -- Fix 32-bit CTR block mode -- Carthage support update -- Mark as App-Extension-Safe API - -0.0.14 -- hexString -> toHextString() #105 -- CTR (Counter mode) -- Hex string is lowercase now -- Carthage support -- Tests update -- Swift 2.0 support - overall update diff --git a/Carthage/Checkouts/CryptoSwift/CNAME b/Carthage/Checkouts/CryptoSwift/CNAME deleted file mode 100644 index d7c8ffd4c..000000000 --- a/Carthage/Checkouts/CryptoSwift/CNAME +++ /dev/null @@ -1 +0,0 @@ -cryptoswift.io diff --git a/Carthage/Checkouts/CryptoSwift/CODE_OF_CONDUCT.md b/Carthage/Checkouts/CryptoSwift/CODE_OF_CONDUCT.md deleted file mode 100644 index ea968f5a9..000000000 --- a/Carthage/Checkouts/CryptoSwift/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,46 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at marcin@krzyzanowskim.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ diff --git a/Carthage/Checkouts/CryptoSwift/CONTRIBUTING.md b/Carthage/Checkouts/CryptoSwift/CONTRIBUTING.md deleted file mode 100644 index 5ac923451..000000000 --- a/Carthage/Checkouts/CryptoSwift/CONTRIBUTING.md +++ /dev/null @@ -1,27 +0,0 @@ -By submitting a pull request, you represent that you have the right to license -your contribution to Marcin Krzyżanowski and the community, and agree by submitting the patch that your contributions are licensed under the CryptoSwift project license. - ---- - -Before submitting the pull request, please make sure you have tested your changes. - ---- - -For new files, please use the correct file header: - -``` -// -// CryptoSwift -// -// Copyright (C) Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// -``` diff --git a/Carthage/Checkouts/CryptoSwift/CONTRIBUTORS.txt b/Carthage/Checkouts/CryptoSwift/CONTRIBUTORS.txt deleted file mode 100644 index fe184e223..000000000 --- a/Carthage/Checkouts/CryptoSwift/CONTRIBUTORS.txt +++ /dev/null @@ -1,114 +0,0 @@ -For the purpose of tracking copyright, this is the list of individuals and -organizations who have contributed source code to CryptoSwift. - -### Contributors - -- Adolfo Martinelli -- Aidan Woods -- Alejandro Isaza -- Alex Binary -- Alex Vlasov -- AlexDenisov <1101.debian@gmail.com> -- Alexey Komnin -- Alsey Coleman Miller -- Andrew Wagner <845683+drewag@users.noreply.github.com> -- André Berenguel -- Anton -- Ayaka Nonaka -- Bart Cone -- Bing Cheung <32565605+eungch@users.noreply.github.com> -- Bogdan Bystritskiy -- Brice Cesarin -- Bruce Geerdes -- Bryan Chen -- Bryant Luk -- C.W. Betts -- Caio Mathielo -- Cheng-Yu Hsu -- Chris Amanse -- Christian Steffens -- Cihat Gündüz -- Cosmin Baies -- Dave Wood -- Dima Kalachov -- Dusan Klinec -- Eneko Alonso -- Eugene Berdnikov -- Evan Maloney -- Evin Ugur -- Frank Langel -- Frank Langel -- Franklin Schrans -- FreeThinker <59345560+Free-FreeThinker@users.noreply.github.com> -- Grzegorz Nowicki -- Hamilton Chapman -- Honza Dvorsky -- Howtin -- Ibrahim Kteish -- Igor Camilo -- Javier Soto -- Jeremy Greenwood -- John Hammerlund -- Jonas Obrist -- K.K. POON -- Keith Smiley -- Koray Koska -- Kyle Fuller -- Lex Tang -- Logan Wright -- Ludo Galabru -- Luis Reisewitz -- Luís Silva -- Madhava Jay -- Marc Prud'hommeaux -- Marcelo Fabri -- Marcin Krzyzanowski -- Masayuki Ono -- Matias Cudich -- Matias Piipari -- Matthew Chung -- Michael Ledin -- Michael Redig -- Mo Ramezanpoor -- Nate West -- Nathan Fallet -- Nicholas Maccharoli -- Nobutaka Yuasa -- Oscar De Moya -- Pantelis Zirinis -- Paolo Musolino -- Pascal Pfiffner -- Pedro Silva -- Pierpaolo Frasa -- Quinn McHenry -- Rich Lowenberg -- Roman Podymov -- Ronald Mannak -- SLboat -- Sali0m -- Sam Soffes -- Samuel GRAU -- ScottieY -- Semen Zhydenko -- Simon Hartmann -- Stefan Hintz -- Thomas Bibby -- Thomas Haak -- TictoDev -- Tomas Kraina -- Tomasz Szulc -- Tomasz Wierzbik -- Valeriy Van -- Xavier Matos -- Yannick Loriot -- Yury Lapitsky -- akreutz <27BBsan08!> -- jose -- mrahmiao -- spatno -- sweepty -- venj - -**Updating this list** - -Please do not edit this file manually. It is generated using `./scripts/generate-contributors-list.sh`. If a name is misspelled or appearing multiple times: add an entry in `./.mailmap` diff --git a/Carthage/Checkouts/CryptoSwift/CryptoSwift-TestHostApp/AppDelegate.swift b/Carthage/Checkouts/CryptoSwift/CryptoSwift-TestHostApp/AppDelegate.swift deleted file mode 100644 index b2d794078..000000000 --- a/Carthage/Checkouts/CryptoSwift/CryptoSwift-TestHostApp/AppDelegate.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import UIKit - -@UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate { - - var window: UIWindow? - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { - // Override point for customization after application launch. - true - } - - func applicationWillResignActive(_ application: UIApplication) { - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. - } - - func applicationDidEnterBackground(_ application: UIApplication) { - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. - } - - func applicationWillEnterForeground(_ application: UIApplication) { - // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. - } - - func applicationDidBecomeActive(_ application: UIApplication) { - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. - } - - func applicationWillTerminate(_ application: UIApplication) { - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. - } -} diff --git a/Carthage/Checkouts/CryptoSwift/CryptoSwift-TestHostApp/Default-568h@2x.png b/Carthage/Checkouts/CryptoSwift/CryptoSwift-TestHostApp/Default-568h@2x.png deleted file mode 100644 index 0891b7aab..000000000 Binary files a/Carthage/Checkouts/CryptoSwift/CryptoSwift-TestHostApp/Default-568h@2x.png and /dev/null differ diff --git a/Carthage/Checkouts/CryptoSwift/CryptoSwift-TestHostApp/Info.plist b/Carthage/Checkouts/CryptoSwift/CryptoSwift-TestHostApp/Info.plist deleted file mode 100644 index 76398107b..000000000 --- a/Carthage/Checkouts/CryptoSwift/CryptoSwift-TestHostApp/Info.plist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UIRequiredDeviceCapabilities - - armv7 - - UIRequiresFullScreen - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/Carthage/Checkouts/CryptoSwift/CryptoSwift.podspec b/Carthage/Checkouts/CryptoSwift/CryptoSwift.podspec deleted file mode 100644 index af4c611b8..000000000 --- a/Carthage/Checkouts/CryptoSwift/CryptoSwift.podspec +++ /dev/null @@ -1,19 +0,0 @@ -Pod::Spec.new do |s| - s.name = "CryptoSwift" - s.version = "1.4.2" - s.source = { :git => "https://github.com/krzyzanowskim/CryptoSwift.git", :tag => "#{s.version}" } - s.summary = "Cryptography in Swift. SHA, MD5, CRC, PBKDF, Poly1305, HMAC, CMAC, HDKF, Scrypt, ChaCha20, Rabbit, Blowfish, AES." - s.description = "Cryptography functions and helpers for Swift implemented in Swift. SHA-1, SHA-2, SHA-3, MD5, PBKDF1, PBKDF2, Scrypt, CRC, Poly1305, HMAC, ChaCha20, Rabbit, Blowfish, AES" - s.homepage = "https://github.com/krzyzanowskim/CryptoSwift" - s.license = {:type => "Attribution", :file => "LICENSE"} - s.authors = {'Marcin Krzyżanowski' => 'marcin@krzyzanowskim.com'} - s.social_media_url = "https://twitter.com/krzyzanowskim" - s.cocoapods_version = '>= 1.10.0' - s.swift_version = "5.3" - s.ios.deployment_target = "9.0" - s.osx.deployment_target = "10.12" - s.watchos.deployment_target = "2.0" - s.tvos.deployment_target = "9.0" - s.source_files = "Sources/CryptoSwift/**/*.swift" - s.requires_arc = true -end diff --git a/Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj/project.pbxproj b/Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj/project.pbxproj deleted file mode 100644 index 604fd17cd..000000000 --- a/Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1197 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 52; - objects = { - -/* Begin PBXBuildFile section */ - 0AF023D5230F2B0F008E4E68 /* ISO78164Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AF023D4230F2B0F008E4E68 /* ISO78164Padding.swift */; }; - 0EE73E71204D598100110E11 /* CMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EE73E70204D598100110E11 /* CMAC.swift */; }; - 0EE73E74204D59C200110E11 /* CMACTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EE73E72204D599C00110E11 /* CMACTests.swift */; }; - 14156CE52011422400DDCFBC /* ChaCha20Poly1305Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14156CE42011422400DDCFBC /* ChaCha20Poly1305Tests.swift */; }; - 1467460F2017BB3600DF04ED /* AEAD.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1467460E2017BB3600DF04ED /* AEAD.swift */; }; - 35F3E51C23BF9A6700A024A1 /* OCB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35F3E51B23BF9A6700A024A1 /* OCB.swift */; }; - 42012783267A6F1C00F82506 /* ISO10126Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42012782267A6F1C00F82506 /* ISO10126Padding.swift */; }; - 674A736F1BF5D85B00866C5B /* RabbitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 674A736E1BF5D85B00866C5B /* RabbitTests.swift */; }; - 750509991F6BEF2A00394A1B /* PKCS7.swift in Sources */ = {isa = PBXBuildFile; fileRef = 750509981F6BEF2A00394A1B /* PKCS7.swift */; }; - 750CC3EB1DC0CACE0096BE6E /* BlowfishTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 750CC3EA1DC0CACE0096BE6E /* BlowfishTests.swift */; }; - 75100F8F19B0BC890005C5F5 /* Poly1305Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75100F8E19B0BC890005C5F5 /* Poly1305Tests.swift */; }; - 751AA0F3255F4EB600D4719E /* AESOCBTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35F3E51D23BF9AD300A024A1 /* AESOCBTests.swift */; }; - 751EE9781F93996100161FFC /* AES.Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 751EE9771F93996100161FFC /* AES.Cryptors.swift */; }; - 75211F95207249D8004E41F8 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75211F94207249D8004E41F8 /* AppDelegate.swift */; }; - 7523742D2083C61D0016D662 /* GCM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7523742C2083C61C0016D662 /* GCM.swift */; }; - 7529366A20683DFC00195874 /* AEADChaCha20Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7529366920683DFC00195874 /* AEADChaCha20Poly1305.swift */; }; - 752BED9D208C120D00FC4743 /* Blowfish+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52541EE8B6CA0048EB3B /* Blowfish+Foundation.swift */; }; - 752BED9E208C121000FC4743 /* Blowfish.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52491EE8B6CA0048EB3B /* Blowfish.swift */; }; - 752BED9F208C135700FC4743 /* AES+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52531EE8B6CA0048EB3B /* AES+Foundation.swift */; }; - 753674072175D012003E32A6 /* StreamDecryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 753674062175D012003E32A6 /* StreamDecryptor.swift */; }; - 754310442050111A003FB1DF /* CompactMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 754310432050111A003FB1DF /* CompactMap.swift */; }; - 75482EA41CB310B7001F66A5 /* PBKDF.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75482EA31CB310B7001F66A5 /* PBKDF.swift */; }; - 754BE46819693E190098E6F3 /* DigestTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 754BE46719693E190098E6F3 /* DigestTests.swift */; }; - 755BA296235387700039CAB5 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7576F64C20725BD5006688F8 /* Default-568h@2x.png */; }; - 755FB1DA199E347D00475437 /* ExtensionsTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 755FB1D9199E347D00475437 /* ExtensionsTest.swift */; }; - 7564F0522072EAEB00CA5A96 /* PBKDFPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7576F6F6207290F8006688F8 /* PBKDFPerf.swift */; platformFilter = ios; }; - 7564F0532072EAEB00CA5A96 /* ChaCha20TestsPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7576F6F020728EAB006688F8 /* ChaCha20TestsPerf.swift */; platformFilter = ios; }; - 7564F0542072EAEB00CA5A96 /* RabbitTestsPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7576F6F220728F00006688F8 /* RabbitTestsPerf.swift */; platformFilter = ios; }; - 7564F0552072EAEB00CA5A96 /* ExtensionsTestPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7576F6F420729069006688F8 /* ExtensionsTestPerf.swift */; platformFilter = ios; }; - 7564F0562072EAEB00CA5A96 /* DigestTestsPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7576F6EB20726319006688F8 /* DigestTestsPerf.swift */; platformFilter = ios; }; - 7564F0572072EAEB00CA5A96 /* TestsPerformance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7595C14C2072E48C00EA1A5F /* TestsPerformance.swift */; platformFilter = ios; }; - 7564F0582072EAEB00CA5A96 /* AESTestsPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7576F6EE20726422006688F8 /* AESTestsPerf.swift */; platformFilter = ios; }; - 7564F05A2072EAEB00CA5A96 /* CryptoSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 754BE45519693E190098E6F3 /* CryptoSwift.framework */; }; - 7564F0642072ED7000CA5A96 /* CryptoSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 754BE45519693E190098E6F3 /* CryptoSwift.framework */; }; - 7564F0652072ED7000CA5A96 /* CryptoSwift.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 754BE45519693E190098E6F3 /* CryptoSwift.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 756A64C62111083B00BE8805 /* StreamEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 756A64C52111083B00BE8805 /* StreamEncryptor.swift */; }; - 757DA2531A4ED0A4002BA3EF /* PaddingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 757DA2521A4ED0A4002BA3EF /* PaddingTests.swift */; }; - 757DA2551A4ED408002BA3EF /* AESTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 757DA2541A4ED408002BA3EF /* AESTests.swift */; }; - 757DA2591A4ED4D7002BA3EF /* ChaCha20Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 757DA2581A4ED4D7002BA3EF /* ChaCha20Tests.swift */; }; - 758A94291A65C67400E46135 /* HMACTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 758A94271A65C59200E46135 /* HMACTests.swift */; }; - 758F95AB2072E8E20080D664 /* Bridging.h in Headers */ = {isa = PBXBuildFile; fileRef = 758F95AA2072E8E10080D664 /* Bridging.h */; }; - 7594CCBC217A76DC0055C95D /* AESCCMTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 755E0303217A756F00065FC6 /* AESCCMTests.swift */; }; - 7595C14D2072E48C00EA1A5F /* TestsPerformance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7595C14C2072E48C00EA1A5F /* TestsPerformance.swift */; }; - 7595C1582072E5B900EA1A5F /* DigestTestsPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7576F6EB20726319006688F8 /* DigestTestsPerf.swift */; }; - 7595C1592072E5B900EA1A5F /* AESTestsPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7576F6EE20726422006688F8 /* AESTestsPerf.swift */; }; - 7595C15A2072E5B900EA1A5F /* ChaCha20TestsPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7576F6F020728EAB006688F8 /* ChaCha20TestsPerf.swift */; }; - 7595C15B2072E5B900EA1A5F /* RabbitTestsPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7576F6F220728F00006688F8 /* RabbitTestsPerf.swift */; }; - 7595C15C2072E5B900EA1A5F /* ExtensionsTestPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7576F6F420729069006688F8 /* ExtensionsTestPerf.swift */; }; - 7595C15D2072E5B900EA1A5F /* PBKDFPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7576F6F6207290F8006688F8 /* PBKDFPerf.swift */; }; - 7595C1602072E64900EA1A5F /* CryptoSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 754BE45519693E190098E6F3 /* CryptoSwift.framework */; }; - 75B3ED77210F9DF7005D4ADA /* BlockDecryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B3ED76210F9DF7005D4ADA /* BlockDecryptor.swift */; }; - 75B3ED79210FA016005D4ADA /* BlockEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B3ED78210FA016005D4ADA /* BlockEncryptor.swift */; }; - 75B601EB197D6A6C0009B53D /* CryptoSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 754BE45519693E190098E6F3 /* CryptoSwift.framework */; }; - 75C2E76D1D55F097003D2BCA /* Access.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75C2E76C1D55F097003D2BCA /* Access.swift */; }; - 75D7AF38208BFB1600D22BEB /* UInt128.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75D7AF37208BFB1600D22BEB /* UInt128.swift */; }; - 75EC527B1EE8B73A0048EB3B /* CryptoSwift.h in Headers */ = {isa = PBXBuildFile; fileRef = 75EC527A1EE8B6CA0048EB3B /* CryptoSwift.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 75EC527C1EE8B8130048EB3B /* AES.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52381EE8B6CA0048EB3B /* AES.swift */; }; - 75EC527D1EE8B8130048EB3B /* Array+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52391EE8B6CA0048EB3B /* Array+Extension.swift */; }; - 75EC527E1EE8B8130048EB3B /* Authenticator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC523A1EE8B6CA0048EB3B /* Authenticator.swift */; }; - 75EC527F1EE8B8130048EB3B /* BatchedCollection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC523B1EE8B6CA0048EB3B /* BatchedCollection.swift */; }; - 75EC52801EE8B8130048EB3B /* Bit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC523C1EE8B6CA0048EB3B /* Bit.swift */; }; - 75EC52811EE8B8130048EB3B /* BlockCipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC523D1EE8B6CA0048EB3B /* BlockCipher.swift */; }; - 75EC52821EE8B8170048EB3B /* BlockMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC523F1EE8B6CA0048EB3B /* BlockMode.swift */; }; - 75EC52831EE8B8170048EB3B /* BlockModeOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52401EE8B6CA0048EB3B /* BlockModeOptions.swift */; }; - 75EC52841EE8B8170048EB3B /* CipherModeWorker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52411EE8B6CA0048EB3B /* CipherModeWorker.swift */; }; - 75EC52851EE8B8170048EB3B /* CBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52421EE8B6CA0048EB3B /* CBC.swift */; }; - 75EC52861EE8B8170048EB3B /* CFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52431EE8B6CA0048EB3B /* CFB.swift */; }; - 75EC52871EE8B8170048EB3B /* CTR.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52441EE8B6CA0048EB3B /* CTR.swift */; }; - 75EC52881EE8B8170048EB3B /* ECB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52451EE8B6CA0048EB3B /* ECB.swift */; }; - 75EC52891EE8B8170048EB3B /* OFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52461EE8B6CA0048EB3B /* OFB.swift */; }; - 75EC528A1EE8B8170048EB3B /* PCBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52471EE8B6CA0048EB3B /* PCBC.swift */; }; - 75EC528D1EE8B81A0048EB3B /* ChaCha20.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC524A1EE8B6CA0048EB3B /* ChaCha20.swift */; }; - 75EC528E1EE8B81A0048EB3B /* Checksum.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC524B1EE8B6CA0048EB3B /* Checksum.swift */; }; - 75EC528F1EE8B81A0048EB3B /* Cipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC524C1EE8B6CA0048EB3B /* Cipher.swift */; }; - 75EC52901EE8B81A0048EB3B /* Collection+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC524D1EE8B6CA0048EB3B /* Collection+Extension.swift */; }; - 75EC52911EE8B81A0048EB3B /* Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC524E1EE8B6CA0048EB3B /* Cryptors.swift */; }; - 75EC52931EE8B81A0048EB3B /* Digest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52501EE8B6CA0048EB3B /* Digest.swift */; }; - 75EC52941EE8B81A0048EB3B /* DigestType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52511EE8B6CA0048EB3B /* DigestType.swift */; }; - 75EC52971EE8B8200048EB3B /* ChaCha20+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52551EE8B6CA0048EB3B /* ChaCha20+Foundation.swift */; }; - 75EC52981EE8B8200048EB3B /* Array+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52561EE8B6CA0048EB3B /* Array+Foundation.swift */; }; - 75EC52991EE8B8200048EB3B /* Data+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52571EE8B6CA0048EB3B /* Data+Extension.swift */; }; - 75EC529A1EE8B8200048EB3B /* HMAC+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52581EE8B6CA0048EB3B /* HMAC+Foundation.swift */; }; - 75EC529B1EE8B8200048EB3B /* Rabbit+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52591EE8B6CA0048EB3B /* Rabbit+Foundation.swift */; }; - 75EC529C1EE8B8200048EB3B /* String+FoundationExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC525A1EE8B6CA0048EB3B /* String+FoundationExtension.swift */; }; - 75EC529D1EE8B8200048EB3B /* Utils+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC525B1EE8B6CA0048EB3B /* Utils+Foundation.swift */; }; - 75EC529E1EE8B8230048EB3B /* Generics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC525C1EE8B6CA0048EB3B /* Generics.swift */; }; - 75EC529F1EE8B8230048EB3B /* HMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC525D1EE8B6CA0048EB3B /* HMAC.swift */; }; - 75EC52A01EE8B8290048EB3B /* Int+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC525F1EE8B6CA0048EB3B /* Int+Extension.swift */; }; - 75EC52A21EE8B8290048EB3B /* MD5.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52611EE8B6CA0048EB3B /* MD5.swift */; }; - 75EC52A31EE8B8290048EB3B /* NoPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52621EE8B6CA0048EB3B /* NoPadding.swift */; }; - 75EC52A41EE8B8290048EB3B /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52631EE8B6CA0048EB3B /* Operators.swift */; }; - 75EC52A51EE8B8290048EB3B /* Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52641EE8B6CA0048EB3B /* Padding.swift */; }; - 75EC52A61EE8B8390048EB3B /* PBKDF1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52661EE8B6CA0048EB3B /* PBKDF1.swift */; }; - 75EC52A71EE8B8390048EB3B /* PBKDF2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52671EE8B6CA0048EB3B /* PBKDF2.swift */; }; - 75EC52A81EE8B8390048EB3B /* PKCS5.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52681EE8B6CA0048EB3B /* PKCS5.swift */; }; - 75EC52A91EE8B83D0048EB3B /* PKCS7Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52691EE8B6CA0048EB3B /* PKCS7Padding.swift */; }; - 75EC52AA1EE8B83D0048EB3B /* Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC526A1EE8B6CA0048EB3B /* Poly1305.swift */; }; - 75EC52AB1EE8B83D0048EB3B /* Rabbit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC526B1EE8B6CA0048EB3B /* Rabbit.swift */; }; - 75EC52AC1EE8B83D0048EB3B /* Cryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC526C1EE8B6CA0048EB3B /* Cryptor.swift */; }; - 75EC52AE1EE8B83D0048EB3B /* SecureBytes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC526E1EE8B6CA0048EB3B /* SecureBytes.swift */; }; - 75EC52AF1EE8B83D0048EB3B /* SHA1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC526F1EE8B6CA0048EB3B /* SHA1.swift */; }; - 75EC52B01EE8B83D0048EB3B /* SHA2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52701EE8B6CA0048EB3B /* SHA2.swift */; }; - 75EC52B11EE8B83D0048EB3B /* SHA3.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52711EE8B6CA0048EB3B /* SHA3.swift */; }; - 75EC52B21EE8B83D0048EB3B /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52721EE8B6CA0048EB3B /* String+Extension.swift */; }; - 75EC52B31EE8B83D0048EB3B /* UInt16+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52731EE8B6CA0048EB3B /* UInt16+Extension.swift */; }; - 75EC52B41EE8B83D0048EB3B /* UInt32+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52741EE8B6CA0048EB3B /* UInt32+Extension.swift */; }; - 75EC52B51EE8B83D0048EB3B /* UInt64+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52751EE8B6CA0048EB3B /* UInt64+Extension.swift */; }; - 75EC52B61EE8B83D0048EB3B /* UInt8+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52761EE8B6CA0048EB3B /* UInt8+Extension.swift */; }; - 75EC52B71EE8B83D0048EB3B /* Updatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52771EE8B6CA0048EB3B /* Updatable.swift */; }; - 75EC52B81EE8B83D0048EB3B /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52781EE8B6CA0048EB3B /* Utils.swift */; }; - 75EC52B91EE8B83D0048EB3B /* ZeroPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52791EE8B6CA0048EB3B /* ZeroPadding.swift */; }; - 75F4E434216C93EF00F09710 /* CCM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75F4E433216C93EF00F09710 /* CCM.swift */; }; - 75F4E436216C98DE00F09710 /* CBCMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75F4E435216C98DE00F09710 /* CBCMAC.swift */; }; - 81F279DD2181F58300449EDA /* Scrypt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81F279DC2181F58300449EDA /* Scrypt.swift */; }; - 81F279DF2181F5A000449EDA /* ScryptTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81F279DE2181F5A000449EDA /* ScryptTests.swift */; }; - 81F279E12181F5C500449EDA /* ScryptTestsPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81F279E02181F5C500449EDA /* ScryptTestsPerf.swift */; }; - 81F279E22181F5C500449EDA /* ScryptTestsPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81F279E02181F5C500449EDA /* ScryptTestsPerf.swift */; platformFilter = ios; }; - E3FD2D531D6B81CE00A9F35F /* Error+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3FD2D511D6B813C00A9F35F /* Error+Extension.swift */; }; - E6200E141FB9A7AE00258382 /* HKDF.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6200E131FB9A7AE00258382 /* HKDF.swift */; }; - E6200E171FB9B68C00258382 /* HKDFTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6200E151FB9B67C00258382 /* HKDFTests.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 7564F0502072EAEB00CA5A96 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 754BE44C19693E190098E6F3 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 754BE45419693E190098E6F3; - remoteInfo = CryptoSwift; - }; - 7564F0612072EB5D00CA5A96 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 754BE44C19693E190098E6F3 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 75211F91207249D8004E41F8; - remoteInfo = "CryptoSwift-TestHostApp"; - }; - 7564F0662072ED7000CA5A96 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 754BE44C19693E190098E6F3 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 754BE45419693E190098E6F3; - remoteInfo = CryptoSwift; - }; - 7595C15E2072E64000EA1A5F /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 754BE44C19693E190098E6F3 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 754BE45419693E190098E6F3; - remoteInfo = CryptoSwift; - }; - 75B601E3197D69EB0009B53D /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 754BE44C19693E190098E6F3 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 754BE45419693E190098E6F3; - remoteInfo = CryptoSwift; - }; - 75F9482120BDDF9900956311 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 754BE44C19693E190098E6F3 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 75211F91207249D8004E41F8; - remoteInfo = "CryptoSwift-TestHostApp"; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 7564F0682072ED7000CA5A96 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - 7564F0652072ED7000CA5A96 /* CryptoSwift.framework in Embed Frameworks */, - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; - 75B601E0197D69770009B53D /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 0AF023D4230F2B0F008E4E68 /* ISO78164Padding.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ISO78164Padding.swift; sourceTree = ""; }; - 0EE73E70204D598100110E11 /* CMAC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CMAC.swift; sourceTree = ""; }; - 0EE73E72204D599C00110E11 /* CMACTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CMACTests.swift; sourceTree = ""; }; - 14156CE42011422400DDCFBC /* ChaCha20Poly1305Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChaCha20Poly1305Tests.swift; sourceTree = ""; }; - 1467460E2017BB3600DF04ED /* AEAD.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AEAD.swift; sourceTree = ""; }; - 35F3E51B23BF9A6700A024A1 /* OCB.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OCB.swift; sourceTree = ""; }; - 35F3E51D23BF9AD300A024A1 /* AESOCBTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AESOCBTests.swift; sourceTree = ""; }; - 42012782267A6F1C00F82506 /* ISO10126Padding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ISO10126Padding.swift; sourceTree = ""; }; - 674A736E1BF5D85B00866C5B /* RabbitTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RabbitTests.swift; sourceTree = ""; }; - 750509981F6BEF2A00394A1B /* PKCS7.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PKCS7.swift; sourceTree = ""; }; - 750CC3EA1DC0CACE0096BE6E /* BlowfishTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BlowfishTests.swift; sourceTree = ""; }; - 75100F8E19B0BC890005C5F5 /* Poly1305Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Poly1305Tests.swift; sourceTree = ""; }; - 751EE9771F93996100161FFC /* AES.Cryptors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AES.Cryptors.swift; sourceTree = ""; }; - 75211F92207249D8004E41F8 /* CryptoSwift-TestHostApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "CryptoSwift-TestHostApp.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 75211F94207249D8004E41F8 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 75211FA0207249D8004E41F8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 75211FA520724A0F004E41F8 /* CryptoSwift-TestHostApp-Test.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "CryptoSwift-TestHostApp-Test.xcconfig"; sourceTree = ""; }; - 75211FA820724A0F004E41F8 /* CryptoSwift-Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "CryptoSwift-Shared.xcconfig"; sourceTree = ""; }; - 75211FA920724A0F004E41F8 /* CryptoSwift-TestHostApp-Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "CryptoSwift-TestHostApp-Shared.xcconfig"; sourceTree = ""; }; - 75211FAA20724A0F004E41F8 /* Project-Release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Project-Release.xcconfig"; sourceTree = ""; }; - 75211FAC20724A0F004E41F8 /* CryptoSwift-Release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "CryptoSwift-Release.xcconfig"; sourceTree = ""; }; - 75211FAE20724A10004E41F8 /* Tests-Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Tests-Shared.xcconfig"; sourceTree = ""; }; - 75211FAF20724A10004E41F8 /* CryptoSwift-Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "CryptoSwift-Debug.xcconfig"; sourceTree = ""; }; - 75211FB020724A10004E41F8 /* Project-Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Project-Debug.xcconfig"; sourceTree = ""; }; - 75211FB120724A10004E41F8 /* Tests-Test.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Tests-Test.xcconfig"; sourceTree = ""; }; - 75211FB220724A10004E41F8 /* Project-Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Project-Shared.xcconfig"; sourceTree = ""; }; - 75211FB420724A10004E41F8 /* CryptoSwift-Test.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "CryptoSwift-Test.xcconfig"; sourceTree = ""; }; - 7523742C2083C61C0016D662 /* GCM.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GCM.swift; sourceTree = ""; }; - 7529366920683DFC00195874 /* AEADChaCha20Poly1305.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AEADChaCha20Poly1305.swift; sourceTree = ""; }; - 753674062175D012003E32A6 /* StreamDecryptor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StreamDecryptor.swift; sourceTree = ""; }; - 7536A93E207254A000F39140 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.3.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; - 754310432050111A003FB1DF /* CompactMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompactMap.swift; sourceTree = ""; }; - 75482EA31CB310B7001F66A5 /* PBKDF.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PBKDF.swift; sourceTree = ""; }; - 754BE45519693E190098E6F3 /* CryptoSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CryptoSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 754BE46019693E190098E6F3 /* CryptoSwiftTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CryptoSwiftTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 754BE46719693E190098E6F3 /* DigestTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DigestTests.swift; sourceTree = ""; }; - 755E0303217A756F00065FC6 /* AESCCMTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AESCCMTests.swift; sourceTree = ""; }; - 755FB1D9199E347D00475437 /* ExtensionsTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExtensionsTest.swift; sourceTree = ""; }; - 7564F0602072EAEB00CA5A96 /* TestsPerformance-iOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "TestsPerformance-iOS.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - 756A64C52111083B00BE8805 /* StreamEncryptor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StreamEncryptor.swift; sourceTree = ""; }; - 756BFDCA1A82B87300B9D9A4 /* Bridging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Bridging.h; sourceTree = ""; }; - 7576F64C20725BD5006688F8 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; - 7576F6EB20726319006688F8 /* DigestTestsPerf.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DigestTestsPerf.swift; sourceTree = ""; }; - 7576F6EE20726422006688F8 /* AESTestsPerf.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AESTestsPerf.swift; sourceTree = ""; }; - 7576F6F020728EAB006688F8 /* ChaCha20TestsPerf.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChaCha20TestsPerf.swift; sourceTree = ""; }; - 7576F6F220728F00006688F8 /* RabbitTestsPerf.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RabbitTestsPerf.swift; sourceTree = ""; }; - 7576F6F420729069006688F8 /* ExtensionsTestPerf.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExtensionsTestPerf.swift; sourceTree = ""; }; - 7576F6F6207290F8006688F8 /* PBKDFPerf.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PBKDFPerf.swift; sourceTree = ""; }; - 757DA2521A4ED0A4002BA3EF /* PaddingTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PaddingTests.swift; sourceTree = ""; }; - 757DA2541A4ED408002BA3EF /* AESTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AESTests.swift; sourceTree = ""; }; - 757DA2581A4ED4D7002BA3EF /* ChaCha20Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChaCha20Tests.swift; sourceTree = ""; }; - 758A94271A65C59200E46135 /* HMACTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMACTests.swift; sourceTree = ""; }; - 758F95AA2072E8E10080D664 /* Bridging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Bridging.h; sourceTree = ""; }; - 7595C14A2072E48C00EA1A5F /* TestsPerformance-Mac.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "TestsPerformance-Mac.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - 7595C14C2072E48C00EA1A5F /* TestsPerformance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestsPerformance.swift; sourceTree = ""; }; - 75B3ED76210F9DF7005D4ADA /* BlockDecryptor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlockDecryptor.swift; sourceTree = ""; }; - 75B3ED78210FA016005D4ADA /* BlockEncryptor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlockEncryptor.swift; sourceTree = ""; }; - 75C2E76C1D55F097003D2BCA /* Access.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Access.swift; sourceTree = ""; }; - 75D7AF37208BFB1600D22BEB /* UInt128.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UInt128.swift; sourceTree = ""; }; - 75EC52381EE8B6CA0048EB3B /* AES.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AES.swift; sourceTree = ""; }; - 75EC52391EE8B6CA0048EB3B /* Array+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Array+Extension.swift"; sourceTree = ""; }; - 75EC523A1EE8B6CA0048EB3B /* Authenticator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Authenticator.swift; sourceTree = ""; }; - 75EC523B1EE8B6CA0048EB3B /* BatchedCollection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BatchedCollection.swift; sourceTree = ""; }; - 75EC523C1EE8B6CA0048EB3B /* Bit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Bit.swift; sourceTree = ""; }; - 75EC523D1EE8B6CA0048EB3B /* BlockCipher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlockCipher.swift; sourceTree = ""; }; - 75EC523F1EE8B6CA0048EB3B /* BlockMode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlockMode.swift; sourceTree = ""; }; - 75EC52401EE8B6CA0048EB3B /* BlockModeOptions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlockModeOptions.swift; sourceTree = ""; }; - 75EC52411EE8B6CA0048EB3B /* CipherModeWorker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CipherModeWorker.swift; sourceTree = ""; }; - 75EC52421EE8B6CA0048EB3B /* CBC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CBC.swift; sourceTree = ""; }; - 75EC52431EE8B6CA0048EB3B /* CFB.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CFB.swift; sourceTree = ""; }; - 75EC52441EE8B6CA0048EB3B /* CTR.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CTR.swift; sourceTree = ""; }; - 75EC52451EE8B6CA0048EB3B /* ECB.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ECB.swift; sourceTree = ""; }; - 75EC52461EE8B6CA0048EB3B /* OFB.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OFB.swift; sourceTree = ""; }; - 75EC52471EE8B6CA0048EB3B /* PCBC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PCBC.swift; sourceTree = ""; }; - 75EC52491EE8B6CA0048EB3B /* Blowfish.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Blowfish.swift; sourceTree = ""; }; - 75EC524A1EE8B6CA0048EB3B /* ChaCha20.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChaCha20.swift; sourceTree = ""; }; - 75EC524B1EE8B6CA0048EB3B /* Checksum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Checksum.swift; sourceTree = ""; }; - 75EC524C1EE8B6CA0048EB3B /* Cipher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cipher.swift; sourceTree = ""; }; - 75EC524D1EE8B6CA0048EB3B /* Collection+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Collection+Extension.swift"; sourceTree = ""; }; - 75EC524E1EE8B6CA0048EB3B /* Cryptors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cryptors.swift; sourceTree = ""; }; - 75EC52501EE8B6CA0048EB3B /* Digest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Digest.swift; sourceTree = ""; }; - 75EC52511EE8B6CA0048EB3B /* DigestType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DigestType.swift; sourceTree = ""; }; - 75EC52531EE8B6CA0048EB3B /* AES+Foundation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AES+Foundation.swift"; sourceTree = ""; }; - 75EC52541EE8B6CA0048EB3B /* Blowfish+Foundation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Blowfish+Foundation.swift"; sourceTree = ""; }; - 75EC52551EE8B6CA0048EB3B /* ChaCha20+Foundation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ChaCha20+Foundation.swift"; sourceTree = ""; }; - 75EC52561EE8B6CA0048EB3B /* Array+Foundation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Array+Foundation.swift"; sourceTree = ""; }; - 75EC52571EE8B6CA0048EB3B /* Data+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Data+Extension.swift"; sourceTree = ""; }; - 75EC52581EE8B6CA0048EB3B /* HMAC+Foundation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "HMAC+Foundation.swift"; sourceTree = ""; }; - 75EC52591EE8B6CA0048EB3B /* Rabbit+Foundation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Rabbit+Foundation.swift"; sourceTree = ""; }; - 75EC525A1EE8B6CA0048EB3B /* String+FoundationExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+FoundationExtension.swift"; sourceTree = ""; }; - 75EC525B1EE8B6CA0048EB3B /* Utils+Foundation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Utils+Foundation.swift"; sourceTree = ""; }; - 75EC525C1EE8B6CA0048EB3B /* Generics.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Generics.swift; sourceTree = ""; }; - 75EC525D1EE8B6CA0048EB3B /* HMAC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HMAC.swift; sourceTree = ""; }; - 75EC525F1EE8B6CA0048EB3B /* Int+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Int+Extension.swift"; sourceTree = ""; }; - 75EC52611EE8B6CA0048EB3B /* MD5.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MD5.swift; sourceTree = ""; }; - 75EC52621EE8B6CA0048EB3B /* NoPadding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoPadding.swift; sourceTree = ""; }; - 75EC52631EE8B6CA0048EB3B /* Operators.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Operators.swift; sourceTree = ""; }; - 75EC52641EE8B6CA0048EB3B /* Padding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Padding.swift; sourceTree = ""; }; - 75EC52661EE8B6CA0048EB3B /* PBKDF1.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PBKDF1.swift; sourceTree = ""; }; - 75EC52671EE8B6CA0048EB3B /* PBKDF2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PBKDF2.swift; sourceTree = ""; }; - 75EC52681EE8B6CA0048EB3B /* PKCS5.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PKCS5.swift; sourceTree = ""; }; - 75EC52691EE8B6CA0048EB3B /* PKCS7Padding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PKCS7Padding.swift; sourceTree = ""; }; - 75EC526A1EE8B6CA0048EB3B /* Poly1305.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Poly1305.swift; sourceTree = ""; }; - 75EC526B1EE8B6CA0048EB3B /* Rabbit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Rabbit.swift; sourceTree = ""; }; - 75EC526C1EE8B6CA0048EB3B /* Cryptor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cryptor.swift; sourceTree = ""; }; - 75EC526E1EE8B6CA0048EB3B /* SecureBytes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecureBytes.swift; sourceTree = ""; }; - 75EC526F1EE8B6CA0048EB3B /* SHA1.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SHA1.swift; sourceTree = ""; }; - 75EC52701EE8B6CA0048EB3B /* SHA2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SHA2.swift; sourceTree = ""; }; - 75EC52711EE8B6CA0048EB3B /* SHA3.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SHA3.swift; sourceTree = ""; }; - 75EC52721EE8B6CA0048EB3B /* String+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Extension.swift"; sourceTree = ""; }; - 75EC52731EE8B6CA0048EB3B /* UInt16+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UInt16+Extension.swift"; sourceTree = ""; }; - 75EC52741EE8B6CA0048EB3B /* UInt32+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UInt32+Extension.swift"; sourceTree = ""; }; - 75EC52751EE8B6CA0048EB3B /* UInt64+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UInt64+Extension.swift"; sourceTree = ""; }; - 75EC52761EE8B6CA0048EB3B /* UInt8+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UInt8+Extension.swift"; sourceTree = ""; }; - 75EC52771EE8B6CA0048EB3B /* Updatable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Updatable.swift; sourceTree = ""; }; - 75EC52781EE8B6CA0048EB3B /* Utils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Utils.swift; sourceTree = ""; }; - 75EC52791EE8B6CA0048EB3B /* ZeroPadding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZeroPadding.swift; sourceTree = ""; }; - 75EC527A1EE8B6CA0048EB3B /* CryptoSwift.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CryptoSwift.h; sourceTree = ""; }; - 75F4E433216C93EF00F09710 /* CCM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CCM.swift; sourceTree = ""; }; - 75F4E435216C98DE00F09710 /* CBCMAC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CBCMAC.swift; sourceTree = ""; }; - 75F4E437216C9B5D00F09710 /* CHANGELOG */ = {isa = PBXFileReference; lastKnownFileType = text; path = CHANGELOG; sourceTree = SOURCE_ROOT; }; - 75F4E438216C9B6900F09710 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = SOURCE_ROOT; }; - 81F279DC2181F58300449EDA /* Scrypt.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Scrypt.swift; sourceTree = ""; }; - 81F279DE2181F5A000449EDA /* ScryptTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScryptTests.swift; sourceTree = ""; }; - 81F279E02181F5C500449EDA /* ScryptTestsPerf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScryptTestsPerf.swift; sourceTree = ""; }; - E3FD2D511D6B813C00A9F35F /* Error+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Error+Extension.swift"; sourceTree = ""; }; - E6200E131FB9A7AE00258382 /* HKDF.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HKDF.swift; sourceTree = ""; }; - E6200E151FB9B67C00258382 /* HKDFTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HKDFTests.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 75211F8F207249D8004E41F8 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 7564F0642072ED7000CA5A96 /* CryptoSwift.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 754BE45119693E190098E6F3 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 754BE45D19693E190098E6F3 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 75B601EB197D6A6C0009B53D /* CryptoSwift.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 7564F0592072EAEB00CA5A96 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 7564F05A2072EAEB00CA5A96 /* CryptoSwift.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 7595C1472072E48C00EA1A5F /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 7595C1602072E64900EA1A5F /* CryptoSwift.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 24B0BBA29D734E62809E53BC /* Frameworks */ = { - isa = PBXGroup; - children = ( - 7536A93E207254A000F39140 /* UIKit.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 75211F93207249D8004E41F8 /* CryptoSwift-TestHostApp */ = { - isa = PBXGroup; - children = ( - 7576F64C20725BD5006688F8 /* Default-568h@2x.png */, - 75211F94207249D8004E41F8 /* AppDelegate.swift */, - 75211FA0207249D8004E41F8 /* Info.plist */, - ); - path = "CryptoSwift-TestHostApp"; - sourceTree = ""; - }; - 7529366820683DFC00195874 /* AEAD */ = { - isa = PBXGroup; - children = ( - 1467460E2017BB3600DF04ED /* AEAD.swift */, - 7529366920683DFC00195874 /* AEADChaCha20Poly1305.swift */, - ); - path = AEAD; - sourceTree = ""; - }; - 754BE44B19693E190098E6F3 = { - isa = PBXGroup; - children = ( - 75843E9A2072457A0050583A /* config */, - 75EC52361EE8B6CA0048EB3B /* Sources */, - 754BE46419693E190098E6F3 /* Tests */, - 7595C14B2072E48C00EA1A5F /* TestsPerformance */, - 75211F93207249D8004E41F8 /* CryptoSwift-TestHostApp */, - 754BE46519693E190098E6F3 /* Supporting Files */, - 754BE45619693E190098E6F3 /* Products */, - 24B0BBA29D734E62809E53BC /* Frameworks */, - ); - indentWidth = 2; - sourceTree = ""; - tabWidth = 2; - }; - 754BE45619693E190098E6F3 /* Products */ = { - isa = PBXGroup; - children = ( - 754BE45519693E190098E6F3 /* CryptoSwift.framework */, - 754BE46019693E190098E6F3 /* CryptoSwiftTests.xctest */, - 75211F92207249D8004E41F8 /* CryptoSwift-TestHostApp.app */, - 7595C14A2072E48C00EA1A5F /* TestsPerformance-Mac.xctest */, - 7564F0602072EAEB00CA5A96 /* TestsPerformance-iOS.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 754BE46419693E190098E6F3 /* Tests */ = { - isa = PBXGroup; - children = ( - 81F279DE2181F5A000449EDA /* ScryptTests.swift */, - 81F279E02181F5C500449EDA /* ScryptTestsPerf.swift */, - 14156CE42011422400DDCFBC /* ChaCha20Poly1305Tests.swift */, - E3FD2D511D6B813C00A9F35F /* Error+Extension.swift */, - 754BE46719693E190098E6F3 /* DigestTests.swift */, - 7576F6EB20726319006688F8 /* DigestTestsPerf.swift */, - 75100F8E19B0BC890005C5F5 /* Poly1305Tests.swift */, - 758A94271A65C59200E46135 /* HMACTests.swift */, - 0EE73E72204D599C00110E11 /* CMACTests.swift */, - E6200E151FB9B67C00258382 /* HKDFTests.swift */, - 757DA2541A4ED408002BA3EF /* AESTests.swift */, - 755E0303217A756F00065FC6 /* AESCCMTests.swift */, - 35F3E51D23BF9AD300A024A1 /* AESOCBTests.swift */, - 7576F6EE20726422006688F8 /* AESTestsPerf.swift */, - 750CC3EA1DC0CACE0096BE6E /* BlowfishTests.swift */, - 757DA2581A4ED4D7002BA3EF /* ChaCha20Tests.swift */, - 7576F6F020728EAB006688F8 /* ChaCha20TestsPerf.swift */, - 674A736E1BF5D85B00866C5B /* RabbitTests.swift */, - 7576F6F220728F00006688F8 /* RabbitTestsPerf.swift */, - 755FB1D9199E347D00475437 /* ExtensionsTest.swift */, - 7576F6F420729069006688F8 /* ExtensionsTestPerf.swift */, - 757DA2521A4ED0A4002BA3EF /* PaddingTests.swift */, - 75482EA31CB310B7001F66A5 /* PBKDF.swift */, - 7576F6F6207290F8006688F8 /* PBKDFPerf.swift */, - 75C2E76C1D55F097003D2BCA /* Access.swift */, - 756BFDCA1A82B87300B9D9A4 /* Bridging.h */, - ); - name = Tests; - path = Tests/CryptoSwiftTests; - sourceTree = ""; - }; - 754BE46519693E190098E6F3 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 75F4E438216C9B6900F09710 /* README.md */, - 75F4E437216C9B5D00F09710 /* CHANGELOG */, - ); - name = "Supporting Files"; - path = CryptoSwiftTests; - sourceTree = ""; - }; - 75843E9A2072457A0050583A /* config */ = { - isa = PBXGroup; - children = ( - 75211FAF20724A10004E41F8 /* CryptoSwift-Debug.xcconfig */, - 75211FAC20724A0F004E41F8 /* CryptoSwift-Release.xcconfig */, - 75211FA820724A0F004E41F8 /* CryptoSwift-Shared.xcconfig */, - 75211FB420724A10004E41F8 /* CryptoSwift-Test.xcconfig */, - 75211FA520724A0F004E41F8 /* CryptoSwift-TestHostApp-Test.xcconfig */, - 75211FA920724A0F004E41F8 /* CryptoSwift-TestHostApp-Shared.xcconfig */, - 75211FB020724A10004E41F8 /* Project-Debug.xcconfig */, - 75211FAA20724A0F004E41F8 /* Project-Release.xcconfig */, - 75211FB220724A10004E41F8 /* Project-Shared.xcconfig */, - 75211FAE20724A10004E41F8 /* Tests-Shared.xcconfig */, - 75211FB120724A10004E41F8 /* Tests-Test.xcconfig */, - ); - path = config; - sourceTree = ""; - }; - 7595C14B2072E48C00EA1A5F /* TestsPerformance */ = { - isa = PBXGroup; - children = ( - 758F95AA2072E8E10080D664 /* Bridging.h */, - 7595C14C2072E48C00EA1A5F /* TestsPerformance.swift */, - ); - name = TestsPerformance; - path = Tests/TestsPerformance; - sourceTree = ""; - }; - 75EC52361EE8B6CA0048EB3B /* Sources */ = { - isa = PBXGroup; - children = ( - 75EC52371EE8B6CA0048EB3B /* CryptoSwift */, - 75EC527A1EE8B6CA0048EB3B /* CryptoSwift.h */, - ); - path = Sources; - sourceTree = ""; - }; - 75EC52371EE8B6CA0048EB3B /* CryptoSwift */ = { - isa = PBXGroup; - children = ( - 0AF023D4230F2B0F008E4E68 /* ISO78164Padding.swift */, - 42012782267A6F1C00F82506 /* ISO10126Padding.swift */, - 7529366820683DFC00195874 /* AEAD */, - 75EC52381EE8B6CA0048EB3B /* AES.swift */, - 751EE9771F93996100161FFC /* AES.Cryptors.swift */, - 75EC52391EE8B6CA0048EB3B /* Array+Extension.swift */, - 75EC523A1EE8B6CA0048EB3B /* Authenticator.swift */, - 75EC523B1EE8B6CA0048EB3B /* BatchedCollection.swift */, - 75EC523C1EE8B6CA0048EB3B /* Bit.swift */, - 75EC523D1EE8B6CA0048EB3B /* BlockCipher.swift */, - 75EC523E1EE8B6CA0048EB3B /* BlockMode */, - 75EC52491EE8B6CA0048EB3B /* Blowfish.swift */, - 75EC524A1EE8B6CA0048EB3B /* ChaCha20.swift */, - 75EC524B1EE8B6CA0048EB3B /* Checksum.swift */, - 75EC524C1EE8B6CA0048EB3B /* Cipher.swift */, - 0EE73E70204D598100110E11 /* CMAC.swift */, - 75F4E435216C98DE00F09710 /* CBCMAC.swift */, - 75EC524D1EE8B6CA0048EB3B /* Collection+Extension.swift */, - 75EC524E1EE8B6CA0048EB3B /* Cryptors.swift */, - 75EC52501EE8B6CA0048EB3B /* Digest.swift */, - 75EC52511EE8B6CA0048EB3B /* DigestType.swift */, - 75EC52521EE8B6CA0048EB3B /* Foundation */, - 75EC525C1EE8B6CA0048EB3B /* Generics.swift */, - E6200E131FB9A7AE00258382 /* HKDF.swift */, - 75EC525D1EE8B6CA0048EB3B /* HMAC.swift */, - 75EC52611EE8B6CA0048EB3B /* MD5.swift */, - 75EC52621EE8B6CA0048EB3B /* NoPadding.swift */, - 75EC52631EE8B6CA0048EB3B /* Operators.swift */, - 75EC52641EE8B6CA0048EB3B /* Padding.swift */, - 75EC52651EE8B6CA0048EB3B /* PKCS */, - 75EC526A1EE8B6CA0048EB3B /* Poly1305.swift */, - 75EC526B1EE8B6CA0048EB3B /* Rabbit.swift */, - 75EC526C1EE8B6CA0048EB3B /* Cryptor.swift */, - 75EC526E1EE8B6CA0048EB3B /* SecureBytes.swift */, - 81F279DC2181F58300449EDA /* Scrypt.swift */, - 75EC526F1EE8B6CA0048EB3B /* SHA1.swift */, - 75EC52701EE8B6CA0048EB3B /* SHA2.swift */, - 75EC52711EE8B6CA0048EB3B /* SHA3.swift */, - 75EC52721EE8B6CA0048EB3B /* String+Extension.swift */, - 75EC525F1EE8B6CA0048EB3B /* Int+Extension.swift */, - 75EC52761EE8B6CA0048EB3B /* UInt8+Extension.swift */, - 75EC52731EE8B6CA0048EB3B /* UInt16+Extension.swift */, - 75EC52741EE8B6CA0048EB3B /* UInt32+Extension.swift */, - 75EC52751EE8B6CA0048EB3B /* UInt64+Extension.swift */, - 75D7AF37208BFB1600D22BEB /* UInt128.swift */, - 75EC52771EE8B6CA0048EB3B /* Updatable.swift */, - 75EC52781EE8B6CA0048EB3B /* Utils.swift */, - 75EC52791EE8B6CA0048EB3B /* ZeroPadding.swift */, - 754310432050111A003FB1DF /* CompactMap.swift */, - 75B3ED76210F9DF7005D4ADA /* BlockDecryptor.swift */, - 75B3ED78210FA016005D4ADA /* BlockEncryptor.swift */, - 753674062175D012003E32A6 /* StreamDecryptor.swift */, - 756A64C52111083B00BE8805 /* StreamEncryptor.swift */, - ); - path = CryptoSwift; - sourceTree = ""; - }; - 75EC523E1EE8B6CA0048EB3B /* BlockMode */ = { - isa = PBXGroup; - children = ( - 75EC523F1EE8B6CA0048EB3B /* BlockMode.swift */, - 75EC52401EE8B6CA0048EB3B /* BlockModeOptions.swift */, - 75EC52411EE8B6CA0048EB3B /* CipherModeWorker.swift */, - 75EC52421EE8B6CA0048EB3B /* CBC.swift */, - 75EC52431EE8B6CA0048EB3B /* CFB.swift */, - 75EC52441EE8B6CA0048EB3B /* CTR.swift */, - 7523742C2083C61C0016D662 /* GCM.swift */, - 75F4E433216C93EF00F09710 /* CCM.swift */, - 75EC52451EE8B6CA0048EB3B /* ECB.swift */, - 75EC52461EE8B6CA0048EB3B /* OFB.swift */, - 75EC52471EE8B6CA0048EB3B /* PCBC.swift */, - 35F3E51B23BF9A6700A024A1 /* OCB.swift */, - ); - path = BlockMode; - sourceTree = ""; - }; - 75EC52521EE8B6CA0048EB3B /* Foundation */ = { - isa = PBXGroup; - children = ( - 75EC52531EE8B6CA0048EB3B /* AES+Foundation.swift */, - 75EC52541EE8B6CA0048EB3B /* Blowfish+Foundation.swift */, - 75EC52551EE8B6CA0048EB3B /* ChaCha20+Foundation.swift */, - 75EC52561EE8B6CA0048EB3B /* Array+Foundation.swift */, - 75EC52571EE8B6CA0048EB3B /* Data+Extension.swift */, - 75EC52581EE8B6CA0048EB3B /* HMAC+Foundation.swift */, - 75EC52591EE8B6CA0048EB3B /* Rabbit+Foundation.swift */, - 75EC525A1EE8B6CA0048EB3B /* String+FoundationExtension.swift */, - 75EC525B1EE8B6CA0048EB3B /* Utils+Foundation.swift */, - ); - path = Foundation; - sourceTree = ""; - }; - 75EC52651EE8B6CA0048EB3B /* PKCS */ = { - isa = PBXGroup; - children = ( - 75EC52691EE8B6CA0048EB3B /* PKCS7Padding.swift */, - 75EC52661EE8B6CA0048EB3B /* PBKDF1.swift */, - 75EC52671EE8B6CA0048EB3B /* PBKDF2.swift */, - 75EC52681EE8B6CA0048EB3B /* PKCS5.swift */, - 750509981F6BEF2A00394A1B /* PKCS7.swift */, - ); - path = PKCS; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 754BE45219693E190098E6F3 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 758F95AB2072E8E20080D664 /* Bridging.h in Headers */, - 75EC527B1EE8B73A0048EB3B /* CryptoSwift.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 75211F91207249D8004E41F8 /* CryptoSwift-TestHostApp */ = { - isa = PBXNativeTarget; - buildConfigurationList = 75211FA4207249D8004E41F8 /* Build configuration list for PBXNativeTarget "CryptoSwift-TestHostApp" */; - buildPhases = ( - 75211F8E207249D8004E41F8 /* Sources */, - 75211F8F207249D8004E41F8 /* Frameworks */, - 75211F90207249D8004E41F8 /* Resources */, - 7564F0682072ED7000CA5A96 /* Embed Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 7564F0672072ED7000CA5A96 /* PBXTargetDependency */, - ); - name = "CryptoSwift-TestHostApp"; - productName = "CryptoSwift-TestHostApp"; - productReference = 75211F92207249D8004E41F8 /* CryptoSwift-TestHostApp.app */; - productType = "com.apple.product-type.application"; - }; - 754BE45419693E190098E6F3 /* CryptoSwift */ = { - isa = PBXNativeTarget; - buildConfigurationList = 754BE46B19693E190098E6F3 /* Build configuration list for PBXNativeTarget "CryptoSwift" */; - buildPhases = ( - 754BE45019693E190098E6F3 /* Sources */, - 754BE45119693E190098E6F3 /* Frameworks */, - 754BE45219693E190098E6F3 /* Headers */, - 754BE45319693E190098E6F3 /* Resources */, - 75B601E0197D69770009B53D /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = CryptoSwift; - productName = CryptoSwift; - productReference = 754BE45519693E190098E6F3 /* CryptoSwift.framework */; - productType = "com.apple.product-type.framework"; - }; - 754BE45F19693E190098E6F3 /* CryptoSwiftTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 754BE46E19693E190098E6F3 /* Build configuration list for PBXNativeTarget "CryptoSwiftTests" */; - buildPhases = ( - 754BE45C19693E190098E6F3 /* Sources */, - 754BE45D19693E190098E6F3 /* Frameworks */, - 754BE45E19693E190098E6F3 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 75B601E4197D69EB0009B53D /* PBXTargetDependency */, - 75F9482220BDDF9900956311 /* PBXTargetDependency */, - ); - name = CryptoSwiftTests; - productName = Tests; - productReference = 754BE46019693E190098E6F3 /* CryptoSwiftTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 7564F04E2072EAEB00CA5A96 /* TestsPerformance-iOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = 7564F05C2072EAEB00CA5A96 /* Build configuration list for PBXNativeTarget "TestsPerformance-iOS" */; - buildPhases = ( - 7564F0512072EAEB00CA5A96 /* Sources */, - 7564F0592072EAEB00CA5A96 /* Frameworks */, - 7564F05B2072EAEB00CA5A96 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 7564F04F2072EAEB00CA5A96 /* PBXTargetDependency */, - 7564F0622072EB5D00CA5A96 /* PBXTargetDependency */, - ); - name = "TestsPerformance-iOS"; - productName = TestsPerformance; - productReference = 7564F0602072EAEB00CA5A96 /* TestsPerformance-iOS.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 7595C1492072E48C00EA1A5F /* TestsPerformance-Mac */ = { - isa = PBXNativeTarget; - buildConfigurationList = 7595C1522072E48C00EA1A5F /* Build configuration list for PBXNativeTarget "TestsPerformance-Mac" */; - buildPhases = ( - 7595C1462072E48C00EA1A5F /* Sources */, - 7595C1472072E48C00EA1A5F /* Frameworks */, - 7595C1482072E48C00EA1A5F /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 7595C15F2072E64000EA1A5F /* PBXTargetDependency */, - ); - name = "TestsPerformance-Mac"; - productName = TestsPerformance; - productReference = 7595C14A2072E48C00EA1A5F /* TestsPerformance-Mac.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 754BE44C19693E190098E6F3 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0930; - LastUpgradeCheck = 1300; - ORGANIZATIONNAME = "Marcin Krzyzanowski"; - TargetAttributes = { - 75211F91207249D8004E41F8 = { - CreatedOnToolsVersion = 9.3; - LastSwiftMigration = 1020; - ProvisioningStyle = Manual; - }; - 754BE45419693E190098E6F3 = { - CreatedOnToolsVersion = 6.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Manual; - }; - 754BE45F19693E190098E6F3 = { - CreatedOnToolsVersion = 6.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Manual; - }; - 7564F04E2072EAEB00CA5A96 = { - LastSwiftMigration = 1020; - ProvisioningStyle = Manual; - TestTargetID = 75211F91207249D8004E41F8; - }; - 7595C1492072E48C00EA1A5F = { - CreatedOnToolsVersion = 9.3; - LastSwiftMigration = 1020; - ProvisioningStyle = Manual; - }; - }; - }; - buildConfigurationList = 754BE44F19693E190098E6F3 /* Build configuration list for PBXProject "CryptoSwift" */; - compatibilityVersion = "Xcode 8.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 754BE44B19693E190098E6F3; - productRefGroup = 754BE45619693E190098E6F3 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 754BE45419693E190098E6F3 /* CryptoSwift */, - 75211F91207249D8004E41F8 /* CryptoSwift-TestHostApp */, - 754BE45F19693E190098E6F3 /* CryptoSwiftTests */, - 7595C1492072E48C00EA1A5F /* TestsPerformance-Mac */, - 7564F04E2072EAEB00CA5A96 /* TestsPerformance-iOS */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 75211F90207249D8004E41F8 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 755BA296235387700039CAB5 /* Default-568h@2x.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 754BE45319693E190098E6F3 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 754BE45E19693E190098E6F3 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 7564F05B2072EAEB00CA5A96 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 7595C1482072E48C00EA1A5F /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 75211F8E207249D8004E41F8 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 75211F95207249D8004E41F8 /* AppDelegate.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 754BE45019693E190098E6F3 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 42012783267A6F1C00F82506 /* ISO10126Padding.swift in Sources */, - 0AF023D5230F2B0F008E4E68 /* ISO78164Padding.swift in Sources */, - 75EC52861EE8B8170048EB3B /* CFB.swift in Sources */, - 75EC52901EE8B81A0048EB3B /* Collection+Extension.swift in Sources */, - 0EE73E71204D598100110E11 /* CMAC.swift in Sources */, - 7523742D2083C61D0016D662 /* GCM.swift in Sources */, - 75F4E436216C98DE00F09710 /* CBCMAC.swift in Sources */, - 752BED9F208C135700FC4743 /* AES+Foundation.swift in Sources */, - E6200E141FB9A7AE00258382 /* HKDF.swift in Sources */, - 75EC529F1EE8B8230048EB3B /* HMAC.swift in Sources */, - 75EC52B91EE8B83D0048EB3B /* ZeroPadding.swift in Sources */, - 7529366A20683DFC00195874 /* AEADChaCha20Poly1305.swift in Sources */, - 75EC529E1EE8B8230048EB3B /* Generics.swift in Sources */, - 75EC52AA1EE8B83D0048EB3B /* Poly1305.swift in Sources */, - 75EC52AC1EE8B83D0048EB3B /* Cryptor.swift in Sources */, - 75EC52821EE8B8170048EB3B /* BlockMode.swift in Sources */, - 75EC52AE1EE8B83D0048EB3B /* SecureBytes.swift in Sources */, - 75EC528F1EE8B81A0048EB3B /* Cipher.swift in Sources */, - 75B3ED79210FA016005D4ADA /* BlockEncryptor.swift in Sources */, - 75EC52A01EE8B8290048EB3B /* Int+Extension.swift in Sources */, - 75EC52B01EE8B83D0048EB3B /* SHA2.swift in Sources */, - 752BED9D208C120D00FC4743 /* Blowfish+Foundation.swift in Sources */, - 75EC52B71EE8B83D0048EB3B /* Updatable.swift in Sources */, - 75EC528E1EE8B81A0048EB3B /* Checksum.swift in Sources */, - 754310442050111A003FB1DF /* CompactMap.swift in Sources */, - 75EC52811EE8B8130048EB3B /* BlockCipher.swift in Sources */, - 75EC52941EE8B81A0048EB3B /* DigestType.swift in Sources */, - 75EC529B1EE8B8200048EB3B /* Rabbit+Foundation.swift in Sources */, - 756A64C62111083B00BE8805 /* StreamEncryptor.swift in Sources */, - 75EC52A61EE8B8390048EB3B /* PBKDF1.swift in Sources */, - 75EC52B41EE8B83D0048EB3B /* UInt32+Extension.swift in Sources */, - 75EC52911EE8B81A0048EB3B /* Cryptors.swift in Sources */, - 75EC52881EE8B8170048EB3B /* ECB.swift in Sources */, - 75EC52841EE8B8170048EB3B /* CipherModeWorker.swift in Sources */, - 75EC52A41EE8B8290048EB3B /* Operators.swift in Sources */, - 75EC529A1EE8B8200048EB3B /* HMAC+Foundation.swift in Sources */, - 75EC52B21EE8B83D0048EB3B /* String+Extension.swift in Sources */, - 750509991F6BEF2A00394A1B /* PKCS7.swift in Sources */, - 75EC52B51EE8B83D0048EB3B /* UInt64+Extension.swift in Sources */, - 75EC52AF1EE8B83D0048EB3B /* SHA1.swift in Sources */, - 75EC52801EE8B8130048EB3B /* Bit.swift in Sources */, - 75EC52971EE8B8200048EB3B /* ChaCha20+Foundation.swift in Sources */, - 75F4E434216C93EF00F09710 /* CCM.swift in Sources */, - 75EC52871EE8B8170048EB3B /* CTR.swift in Sources */, - 75EC52A21EE8B8290048EB3B /* MD5.swift in Sources */, - 75EC527C1EE8B8130048EB3B /* AES.swift in Sources */, - 752BED9E208C121000FC4743 /* Blowfish.swift in Sources */, - 75EC52A91EE8B83D0048EB3B /* PKCS7Padding.swift in Sources */, - 75EC52A51EE8B8290048EB3B /* Padding.swift in Sources */, - 75EC527F1EE8B8130048EB3B /* BatchedCollection.swift in Sources */, - 75EC52991EE8B8200048EB3B /* Data+Extension.swift in Sources */, - 75EC52B61EE8B83D0048EB3B /* UInt8+Extension.swift in Sources */, - 75EC52891EE8B8170048EB3B /* OFB.swift in Sources */, - 75EC52831EE8B8170048EB3B /* BlockModeOptions.swift in Sources */, - 753674072175D012003E32A6 /* StreamDecryptor.swift in Sources */, - 751EE9781F93996100161FFC /* AES.Cryptors.swift in Sources */, - 75EC527D1EE8B8130048EB3B /* Array+Extension.swift in Sources */, - 75D7AF38208BFB1600D22BEB /* UInt128.swift in Sources */, - 75EC52B31EE8B83D0048EB3B /* UInt16+Extension.swift in Sources */, - 75EC52A81EE8B8390048EB3B /* PKCS5.swift in Sources */, - 1467460F2017BB3600DF04ED /* AEAD.swift in Sources */, - 35F3E51C23BF9A6700A024A1 /* OCB.swift in Sources */, - 75EC528A1EE8B8170048EB3B /* PCBC.swift in Sources */, - 75EC528D1EE8B81A0048EB3B /* ChaCha20.swift in Sources */, - 75EC52851EE8B8170048EB3B /* CBC.swift in Sources */, - 75EC52A71EE8B8390048EB3B /* PBKDF2.swift in Sources */, - 75EC529D1EE8B8200048EB3B /* Utils+Foundation.swift in Sources */, - 75EC527E1EE8B8130048EB3B /* Authenticator.swift in Sources */, - 75EC52AB1EE8B83D0048EB3B /* Rabbit.swift in Sources */, - 75B3ED77210F9DF7005D4ADA /* BlockDecryptor.swift in Sources */, - 75EC529C1EE8B8200048EB3B /* String+FoundationExtension.swift in Sources */, - 75EC52B81EE8B83D0048EB3B /* Utils.swift in Sources */, - 75EC52981EE8B8200048EB3B /* Array+Foundation.swift in Sources */, - 75EC52B11EE8B83D0048EB3B /* SHA3.swift in Sources */, - 75EC52A31EE8B8290048EB3B /* NoPadding.swift in Sources */, - 81F279DD2181F58300449EDA /* Scrypt.swift in Sources */, - 75EC52931EE8B81A0048EB3B /* Digest.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 754BE45C19693E190098E6F3 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 751AA0F3255F4EB600D4719E /* AESOCBTests.swift in Sources */, - 75C2E76D1D55F097003D2BCA /* Access.swift in Sources */, - 75482EA41CB310B7001F66A5 /* PBKDF.swift in Sources */, - 758A94291A65C67400E46135 /* HMACTests.swift in Sources */, - 75100F8F19B0BC890005C5F5 /* Poly1305Tests.swift in Sources */, - E6200E171FB9B68C00258382 /* HKDFTests.swift in Sources */, - 754BE46819693E190098E6F3 /* DigestTests.swift in Sources */, - E3FD2D531D6B81CE00A9F35F /* Error+Extension.swift in Sources */, - 757DA2591A4ED4D7002BA3EF /* ChaCha20Tests.swift in Sources */, - 755FB1DA199E347D00475437 /* ExtensionsTest.swift in Sources */, - 81F279DF2181F5A000449EDA /* ScryptTests.swift in Sources */, - 674A736F1BF5D85B00866C5B /* RabbitTests.swift in Sources */, - 0EE73E74204D59C200110E11 /* CMACTests.swift in Sources */, - 750CC3EB1DC0CACE0096BE6E /* BlowfishTests.swift in Sources */, - 757DA2531A4ED0A4002BA3EF /* PaddingTests.swift in Sources */, - 14156CE52011422400DDCFBC /* ChaCha20Poly1305Tests.swift in Sources */, - 757DA2551A4ED408002BA3EF /* AESTests.swift in Sources */, - 7594CCBC217A76DC0055C95D /* AESCCMTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 7564F0512072EAEB00CA5A96 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 7564F0522072EAEB00CA5A96 /* PBKDFPerf.swift in Sources */, - 7564F0532072EAEB00CA5A96 /* ChaCha20TestsPerf.swift in Sources */, - 7564F0542072EAEB00CA5A96 /* RabbitTestsPerf.swift in Sources */, - 7564F0552072EAEB00CA5A96 /* ExtensionsTestPerf.swift in Sources */, - 7564F0562072EAEB00CA5A96 /* DigestTestsPerf.swift in Sources */, - 81F279E22181F5C500449EDA /* ScryptTestsPerf.swift in Sources */, - 7564F0572072EAEB00CA5A96 /* TestsPerformance.swift in Sources */, - 7564F0582072EAEB00CA5A96 /* AESTestsPerf.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 7595C1462072E48C00EA1A5F /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 7595C15D2072E5B900EA1A5F /* PBKDFPerf.swift in Sources */, - 7595C15A2072E5B900EA1A5F /* ChaCha20TestsPerf.swift in Sources */, - 7595C15B2072E5B900EA1A5F /* RabbitTestsPerf.swift in Sources */, - 7595C15C2072E5B900EA1A5F /* ExtensionsTestPerf.swift in Sources */, - 7595C1582072E5B900EA1A5F /* DigestTestsPerf.swift in Sources */, - 81F279E12181F5C500449EDA /* ScryptTestsPerf.swift in Sources */, - 7595C14D2072E48C00EA1A5F /* TestsPerformance.swift in Sources */, - 7595C1592072E5B900EA1A5F /* AESTestsPerf.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 7564F04F2072EAEB00CA5A96 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 754BE45419693E190098E6F3 /* CryptoSwift */; - targetProxy = 7564F0502072EAEB00CA5A96 /* PBXContainerItemProxy */; - }; - 7564F0622072EB5D00CA5A96 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - platformFilter = ios; - target = 75211F91207249D8004E41F8 /* CryptoSwift-TestHostApp */; - targetProxy = 7564F0612072EB5D00CA5A96 /* PBXContainerItemProxy */; - }; - 7564F0672072ED7000CA5A96 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 754BE45419693E190098E6F3 /* CryptoSwift */; - targetProxy = 7564F0662072ED7000CA5A96 /* PBXContainerItemProxy */; - }; - 7595C15F2072E64000EA1A5F /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 754BE45419693E190098E6F3 /* CryptoSwift */; - targetProxy = 7595C15E2072E64000EA1A5F /* PBXContainerItemProxy */; - }; - 75B601E4197D69EB0009B53D /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 754BE45419693E190098E6F3 /* CryptoSwift */; - targetProxy = 75B601E3197D69EB0009B53D /* PBXContainerItemProxy */; - }; - 75F9482220BDDF9900956311 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - platformFilter = ios; - target = 75211F91207249D8004E41F8 /* CryptoSwift-TestHostApp */; - targetProxy = 75F9482120BDDF9900956311 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 75211FA1207249D8004E41F8 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - }; - name = Debug; - }; - 75211FA2207249D8004E41F8 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - }; - name = Release; - }; - 75211FA3207249D8004E41F8 /* Test */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 75211FA520724A0F004E41F8 /* CryptoSwift-TestHostApp-Test.xcconfig */; - buildSettings = { - }; - name = Test; - }; - 754BE46919693E190098E6F3 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 75211FB020724A10004E41F8 /* Project-Debug.xcconfig */; - buildSettings = { - }; - name = Debug; - }; - 754BE46A19693E190098E6F3 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 75211FAA20724A0F004E41F8 /* Project-Release.xcconfig */; - buildSettings = { - }; - name = Release; - }; - 754BE46C19693E190098E6F3 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 75211FAF20724A10004E41F8 /* CryptoSwift-Debug.xcconfig */; - buildSettings = { - }; - name = Debug; - }; - 754BE46D19693E190098E6F3 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 75211FAC20724A0F004E41F8 /* CryptoSwift-Release.xcconfig */; - buildSettings = { - }; - name = Release; - }; - 754BE46F19693E190098E6F3 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - }; - name = Debug; - }; - 754BE47019693E190098E6F3 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - }; - name = Release; - }; - 7564F05D2072EAEB00CA5A96 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - SDKROOT = iphoneos; - }; - name = Debug; - }; - 7564F05E2072EAEB00CA5A96 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - SDKROOT = iphoneos; - }; - name = Release; - }; - 7564F05F2072EAEB00CA5A96 /* Test */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 75211FB120724A10004E41F8 /* Tests-Test.xcconfig */; - buildSettings = { - SDKROOT = iphoneos; - }; - name = Test; - }; - 756B66AA1F6AAFDB00DEC41C /* Test */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 75211FB220724A10004E41F8 /* Project-Shared.xcconfig */; - buildSettings = { - }; - name = Test; - }; - 756B66AB1F6AAFDB00DEC41C /* Test */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 75211FB420724A10004E41F8 /* CryptoSwift-Test.xcconfig */; - buildSettings = { - }; - name = Test; - }; - 756B66AC1F6AAFDB00DEC41C /* Test */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 75211FB120724A10004E41F8 /* Tests-Test.xcconfig */; - buildSettings = { - }; - name = Test; - }; - 7595C14F2072E48C00EA1A5F /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - }; - name = Debug; - }; - 7595C1502072E48C00EA1A5F /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - }; - name = Release; - }; - 7595C1512072E48C00EA1A5F /* Test */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 75211FB120724A10004E41F8 /* Tests-Test.xcconfig */; - buildSettings = { - }; - name = Test; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 75211FA4207249D8004E41F8 /* Build configuration list for PBXNativeTarget "CryptoSwift-TestHostApp" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 75211FA1207249D8004E41F8 /* Debug */, - 75211FA2207249D8004E41F8 /* Release */, - 75211FA3207249D8004E41F8 /* Test */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 754BE44F19693E190098E6F3 /* Build configuration list for PBXProject "CryptoSwift" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 754BE46919693E190098E6F3 /* Debug */, - 754BE46A19693E190098E6F3 /* Release */, - 756B66AA1F6AAFDB00DEC41C /* Test */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 754BE46B19693E190098E6F3 /* Build configuration list for PBXNativeTarget "CryptoSwift" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 754BE46C19693E190098E6F3 /* Debug */, - 754BE46D19693E190098E6F3 /* Release */, - 756B66AB1F6AAFDB00DEC41C /* Test */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 754BE46E19693E190098E6F3 /* Build configuration list for PBXNativeTarget "CryptoSwiftTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 754BE46F19693E190098E6F3 /* Debug */, - 754BE47019693E190098E6F3 /* Release */, - 756B66AC1F6AAFDB00DEC41C /* Test */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 7564F05C2072EAEB00CA5A96 /* Build configuration list for PBXNativeTarget "TestsPerformance-iOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 7564F05D2072EAEB00CA5A96 /* Debug */, - 7564F05E2072EAEB00CA5A96 /* Release */, - 7564F05F2072EAEB00CA5A96 /* Test */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 7595C1522072E48C00EA1A5F /* Build configuration list for PBXNativeTarget "TestsPerformance-Mac" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 7595C14F2072E48C00EA1A5F /* Debug */, - 7595C1502072E48C00EA1A5F /* Release */, - 7595C1512072E48C00EA1A5F /* Test */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 754BE44C19693E190098E6F3 /* Project object */; -} diff --git a/Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 3f9cecc0a..000000000 --- a/Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index 08de0be8d..000000000 --- a/Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded - - - diff --git a/Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj/xcshareddata/IDETemplateMacros.plist b/Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj/xcshareddata/IDETemplateMacros.plist deleted file mode 120000 index 64dc763b4..000000000 --- a/Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj/xcshareddata/IDETemplateMacros.plist +++ /dev/null @@ -1 +0,0 @@ -../../IDETemplateMacros.plist \ No newline at end of file diff --git a/Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj/xcshareddata/xcschemes/CryptoSwift-TestHostApp.xcscheme b/Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj/xcshareddata/xcschemes/CryptoSwift-TestHostApp.xcscheme deleted file mode 100644 index 2cebce72f..000000000 --- a/Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj/xcshareddata/xcschemes/CryptoSwift-TestHostApp.xcscheme +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj/xcshareddata/xcschemes/CryptoSwift.xcscheme b/Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj/xcshareddata/xcschemes/CryptoSwift.xcscheme deleted file mode 100644 index aa1909e08..000000000 --- a/Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj/xcshareddata/xcschemes/CryptoSwift.xcscheme +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj/xcshareddata/xcschemes/Tests.xcscheme b/Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj/xcshareddata/xcschemes/Tests.xcscheme deleted file mode 100644 index add0a9c76..000000000 --- a/Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj/xcshareddata/xcschemes/Tests.xcscheme +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj/xcshareddata/xcschemes/TestsPerformance-Mac.xcscheme b/Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj/xcshareddata/xcschemes/TestsPerformance-Mac.xcscheme deleted file mode 100644 index f14fd676b..000000000 --- a/Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj/xcshareddata/xcschemes/TestsPerformance-Mac.xcscheme +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj/xcshareddata/xcschemes/TestsPerformance-iOS.xcscheme b/Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj/xcshareddata/xcschemes/TestsPerformance-iOS.xcscheme deleted file mode 100644 index 0a17a714b..000000000 --- a/Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj/xcshareddata/xcschemes/TestsPerformance-iOS.xcscheme +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/CryptoSwift/IDETemplateMacros.plist b/Carthage/Checkouts/CryptoSwift/IDETemplateMacros.plist deleted file mode 100644 index e42562a48..000000000 --- a/Carthage/Checkouts/CryptoSwift/IDETemplateMacros.plist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - FILEHEADER - // CryptoSwift -// -// Copyright (C) 2014-__YEAR__ Marcin Krzyżanowski <marcin@krzyzanowskim.com> -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - - diff --git a/Carthage/Checkouts/CryptoSwift/Info.plist b/Carthage/Checkouts/CryptoSwift/Info.plist deleted file mode 100644 index 187703aa8..000000000 --- a/Carthage/Checkouts/CryptoSwift/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - $(MARKETING_VERSION) - CFBundleSignature - ???? - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Carthage/Checkouts/CryptoSwift/LICENSE b/Carthage/Checkouts/CryptoSwift/LICENSE deleted file mode 100644 index e52af7df6..000000000 --- a/Carthage/Checkouts/CryptoSwift/LICENSE +++ /dev/null @@ -1,11 +0,0 @@ -Copyright (C) 2014-2017 Marcin Krzyżanowski -This software is provided 'as-is', without any express or implied warranty. - -In no event will the authors be held liable for any damages arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: - -- The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -- Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -- This notice may not be removed or altered from any source or binary distribution. -- Redistributions of any form whatsoever must retain the following acknowledgment: 'This product includes software developed by the "Marcin Krzyzanowski" (http://krzyzanowskim.com/).' diff --git a/Carthage/Checkouts/CryptoSwift/Makefile b/Carthage/Checkouts/CryptoSwift/Makefile deleted file mode 100644 index 8b259431f..000000000 --- a/Carthage/Checkouts/CryptoSwift/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -.PHONY: frameworks - -CWD := $(abspath $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST)))))) - -frameworks: - $(CWD)/scripts/build-framework.sh - @echo "Framework built in $(CWD)/CryptoSwift.xcframework" - -all: frameworks diff --git a/Carthage/Checkouts/CryptoSwift/Package.swift b/Carthage/Checkouts/CryptoSwift/Package.swift deleted file mode 100644 index d35499cca..000000000 --- a/Carthage/Checkouts/CryptoSwift/Package.swift +++ /dev/null @@ -1,22 +0,0 @@ -// swift-tools-version:5.3 - -import PackageDescription - -let package = Package( - name: "CryptoSwift", - platforms: [ - .macOS(.v10_12), .iOS(.v9), .tvOS(.v9), .watchOS(.v2) - ], - products: [ - .library( - name: "CryptoSwift", - targets: ["CryptoSwift"] - ) - ], - targets: [ - .target(name: "CryptoSwift"), - .testTarget(name: "CryptoSwiftTests", dependencies: ["CryptoSwift"]), - .testTarget(name: "TestsPerformance", dependencies: ["CryptoSwift"]) - ], - swiftLanguageVersions: [.v5] -) diff --git a/Carthage/Checkouts/CryptoSwift/README.md b/Carthage/Checkouts/CryptoSwift/README.md deleted file mode 100644 index 2343660b1..000000000 --- a/Carthage/Checkouts/CryptoSwift/README.md +++ /dev/null @@ -1,551 +0,0 @@ -[![Platform](https://img.shields.io/badge/Platforms-iOS%20%7C%20Android%20%7CmacOS%20%7C%20watchOS%20%7C%20tvOS%20%7C%20Linux-4E4E4E.svg?colorA=28a745)](#installation) - -[![Swift support](https://img.shields.io/badge/Swift-3.1%20%7C%203.2%20%7C%204.0%20%7C%204.1%20%7C%204.2%20%7C%205.0-lightgrey.svg?colorA=28a745&colorB=4E4E4E)](#swift-versions-support) -[![Swift Package Manager compatible](https://img.shields.io/badge/SPM-compatible-brightgreen.svg?style=flat&colorA=28a745&&colorB=4E4E4E)](https://github.com/apple/swift-package-manager) -[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/CryptoSwift.svg?style=flat&label=CocoaPods&colorA=28a745&&colorB=4E4E4E)](https://cocoapods.org/pods/CryptoSwift) -[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-brightgreen.svg?style=flat&colorA=28a745&&colorB=4E4E4E)](https://github.com/Carthage/Carthage) - -# CryptoSwift - -Crypto related functions and helpers for [Swift](https://swift.org) implemented in Swift. ([#PureSwift](https://twitter.com/hashtag/pureswift)) - -**Note**: The `master` branch follows the latest currently released **version of Swift**. If you need an earlier version for an older version of Swift, you can specify its version in your `Podfile` or use the code on the branch for that version. Older branches are unsupported. Check [versions](#swift-versions-support) for details. - ---- - -[Requirements](#requirements) | [Features](#features) | [Contribution](#contribution) | [Installation](#installation) | [Swift versions](#swift-versions-support) | [How-to](#how-to) | [Author](#author) | [License](#license) | [Changelog](#changelog) - -## Sponsorship - -It takes some time to keep it all for your convenience, so maybe spare $1, so I can keep working on that. There are more than 8000 clones daily. If I'd get $1/month from each company that uses my work here, I'd say we're even. Hurry up, find the [Sponsorship](https://github.com/users/krzyzanowskim/sponsorship) button, and fulfill your duty. - -CryptoSwift isn't backed by any big company and is developer in my spare time that I also use to as a freelancer. - -[![Twitter](https://img.shields.io/badge/Twitter-@krzyzanowskim-blue.svg?style=flat)](http://twitter.com/krzyzanowskim) - -## Requirements -Good mood - -## Features - -- Easy to use -- Convenient extensions for String and Data -- Support for incremental updates (stream, ...) -- iOS, Android, macOS, AppleTV, watchOS, Linux support - -#### Hash (Digest) - [MD5](http://tools.ietf.org/html/rfc1321) -| [SHA1](http://tools.ietf.org/html/rfc3174) -| [SHA2-224](http://tools.ietf.org/html/rfc6234) -| [SHA2-256](http://tools.ietf.org/html/rfc6234) -| [SHA2-384](http://tools.ietf.org/html/rfc6234) -| [SHA2-512](http://tools.ietf.org/html/rfc6234) -| [SHA3](http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf) - -#### Cyclic Redundancy Check (CRC) - [CRC32](http://en.wikipedia.org/wiki/Cyclic_redundancy_check) -| [CRC32C](http://en.wikipedia.org/wiki/Cyclic_redundancy_check) -| [CRC16](http://en.wikipedia.org/wiki/Cyclic_redundancy_check) - -#### Cipher - [AES-128, AES-192, AES-256](http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf) -| [ChaCha20](http://cr.yp.to/chacha/chacha-20080128.pdf) -| [Rabbit](https://tools.ietf.org/html/rfc4503) -| [Blowfish](https://www.schneier.com/academic/blowfish/) - -#### Message authenticators - [Poly1305](http://cr.yp.to/mac/poly1305-20050329.pdf) -| [HMAC (MD5, SHA1, SHA256)](https://www.ietf.org/rfc/rfc2104.txt) -| [CMAC](https://tools.ietf.org/html/rfc4493) -| [CBC-MAC](https://en.wikipedia.org/wiki/CBC-MAC) - -#### Cipher mode of operation -- Electronic codebook ([ECB](http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Electronic_codebook_.28ECB.29)) -- Cipher-block chaining ([CBC](http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher-block_chaining_.28CBC.29)) -- Propagating Cipher Block Chaining ([PCBC](http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Propagating_Cipher_Block_Chaining_.28PCBC.29)) -- Cipher feedback ([CFB](http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_feedback_.28CFB.29)) -- Output Feedback ([OFB](http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Output_Feedback_.28OFB.29)) -- Counter Mode ([CTR](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Counter_.28CTR.29)) -- Galois/Counter Mode ([GCM](https://csrc.nist.gov/publications/detail/sp/800-38d/final)) -- Counter with Cipher Block Chaining-Message Authentication Code ([CCM](https://csrc.nist.gov/publications/detail/sp/800-38c/final)) -- OCB Authenticated-Encryption Algorithm ([OCB](https://tools.ietf.org/html/rfc7253)) - -#### Password-Based Key Derivation Function -- [PBKDF1](http://tools.ietf.org/html/rfc2898#section-5.1) (Password-Based Key Derivation Function 1) -- [PBKDF2](http://tools.ietf.org/html/rfc2898#section-5.2) (Password-Based Key Derivation Function 2) -- [HKDF](https://tools.ietf.org/html/rfc5869) (HMAC-based Extract-and-Expand Key Derivation Function) -- [Scrypt](https://tools.ietf.org/html/rfc7914) (The scrypt Password-Based Key Derivation Function) - -#### Data padding - PKCS#5 -| [PKCS#7](http://tools.ietf.org/html/rfc5652#section-6.3) -| [Zero padding](https://en.wikipedia.org/wiki/Padding_(cryptography)#Zero_padding) -| [ISO78164](http://www.embedx.com/pdfs/ISO_STD_7816/info_isoiec7816-4%7Bed21.0%7Den.pdf) -| [ISO10126](https://en.wikipedia.org/wiki/Padding_(cryptography)#ISO_10126) -| No padding - -#### Authenticated Encryption with Associated Data (AEAD) -- [AEAD\_CHACHA20\_POLY1305](https://tools.ietf.org/html/rfc7539#section-2.8) - -## Why -[Why?](https://github.com/krzyzanowskim/CryptoSwift/issues/5) [Because I can](https://github.com/krzyzanowskim/CryptoSwift/issues/5#issuecomment-53379391). - -## How do I get involved? - -You want to help, great! Go ahead and fork our repo, make your changes and send us a pull request. - -## Contribution - -Check out [CONTRIBUTING.md](CONTRIBUTING.md) for more information on how to help with CryptoSwift. - -- If you found a bug, [open an issue](https://github.com/krzyzanowskim/CryptoSwift/issues). -- If you have a feature request, [open an issue](https://github.com/krzyzanowskim/CryptoSwift/issues). - -## Installation - -### Hardened Runtime (macOS) and Xcode - -Binary CryptoSwift.xcframework (Used by Swift Package Manager package integration) won't load properly in your app if the app uses **Sign to Run Locally** Signing Certificate with Hardened Runtime enabled. It is possible to setup Xcode like this. To solve the problem you have two options: -- Use proper Signing Certificate, eg. *Development* <- this is the proper action -- Use `Disable Library Validation` aka `com.apple.security.cs.disable-library-validation` entitlement - -#### Xcode Project - -To install CryptoSwift, add it as a submodule to your project (on the top level project directory): - - git submodule add https://github.com/krzyzanowskim/CryptoSwift.git - -It is recommended to enable [Whole-Module Optimization](https://swift.org/blog/whole-module-optimizations/) to gain better performance. Non-optimized build results in significantly worse performance. - -#### Swift Package Manager - -You can use [Swift Package Manager](https://swift.org/package-manager/) and specify dependency in `Package.swift` by adding this: - -```swift -.package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", .upToNextMajor(from: "1.4.2")) -``` - -See: [Package.swift - manual](http://blog.krzyzanowskim.com/2016/08/09/package-swift-manual/) - -Notice: Swift Package Manager uses debug configuration for debug Xcode build, that may result in significant (up to x10000) worse performance. Performance characteristic is different in Release build. To overcome this prolem, consider embed `CryptoSwift.xcframework` described below. - -#### CocoaPods - -You can use [CocoaPods](https://cocoapods.org/pods/CryptoSwift). - -```ruby -pod 'CryptoSwift', '~> 1.4.1' -``` - -Bear in mind that CocoaPods will build CryptoSwift without [Whole-Module Optimization](https://swift.org/blog/whole-module-optimizations/) that may impact performance. You can change it manually after installation, or use [cocoapods-wholemodule](https://github.com/jedlewison/cocoapods-wholemodule) plugin. - -#### Carthage - -You can use [Carthage](https://github.com/Carthage/Carthage). -Specify in Cartfile: - -```ruby -github "krzyzanowskim/CryptoSwift" -``` - -Run `carthage` to build the framework and drag the built CryptoSwift.framework into your Xcode project. Follow [build instructions](https://github.com/Carthage/Carthage#getting-started). [Common issues](https://github.com/krzyzanowskim/CryptoSwift/issues/492#issuecomment-330822874). - -#### XCFramework - -XCFrameworks require Xcode 11 or later and they can be integrated similarly to how we’re used to integrating the `.framework` format. -Please use script [scripts/build-framework.sh](scripts/build-framework.sh) to generate binary `CryptoSwift.xcframework` archive that you can use as a dependency in Xcode. - -CryptoSwift.xcframework is a Release (Optimized) binary that offer best available Swift code performance. - -Screen Shot 2020-10-27 at 00 06 32 - -#### Embedded Framework - -Embedded frameworks require a minimum deployment target of iOS 9 or macOS Sierra (10.12). Drag the `CryptoSwift.xcodeproj` file into your Xcode project, and add appropriate framework as a dependency to your target. Now select your App and choose the General tab for the app target. Find *Embedded Binaries* and press "+", then select `CryptoSwift.framework` (iOS, macOS, watchOS or tvOS) - -![](https://cloud.githubusercontent.com/assets/758033/10834511/25a26852-7e9a-11e5-8c01-6cc8f1838459.png) - -Sometimes "embedded framework" option is not available. In that case, you have to add new build phase for the target. - -![](https://cloud.githubusercontent.com/assets/758033/18415615/d5edabb0-77f8-11e6-8c94-f41d9fc2b8cb.png) - -##### iOS, macOS, watchOS, tvOS - -In the project, you'll find [single scheme](https://mxcl.dev/PromiseKit/news/2016/08/Multiplatform-Single-Scheme-Xcode-Projects/) for all platforms: -- CryptoSwift - -#### Swift versions support - -- Swift 1.2: branch [swift12](https://github.com/krzyzanowskim/CryptoSwift/tree/swift12) version <= 0.0.13 -- Swift 2.1: branch [swift21](https://github.com/krzyzanowskim/CryptoSwift/tree/swift21) version <= 0.2.3 -- Swift 2.2, 2.3: branch [swift2](https://github.com/krzyzanowskim/CryptoSwift/tree/swift2) version <= 0.5.2 -- Swift 3.1, branch [swift3](https://github.com/krzyzanowskim/CryptoSwift/tree/swift3) version <= 0.6.9 -- Swift 3.2, branch [swift32](https://github.com/krzyzanowskim/CryptoSwift/tree/swift32) version = 0.7.0 -- Swift 4.0, branch [swift4](https://github.com/krzyzanowskim/CryptoSwift/tree/swift4) version <= 0.12.0 -- Swift 4.2, branch [swift42](https://github.com/krzyzanowskim/CryptoSwift/tree/swift42) version <= 0.15.0 -- Swift 5.0, branch [swift5](https://github.com/krzyzanowskim/CryptoSwift/tree/swift5) version <= 1.2.0 -- Swift 5.1, branch [swift5](https://github.com/krzyzanowskim/CryptoSwift/tree/swift51) version <= 1.3.3 -- Swift 5.3 and newer, branch [master](https://github.com/krzyzanowskim/CryptoSwift/tree/master) - -## How-to - -* [Basics (data types, conversion, ...)](#basics) -* [Digest (MD5, SHA...)](#calculate-digest) -* [Message authenticators (HMAC, CMAC...)](#message-authenticators-1) -* [Password-Based Key Derivation Function (PBKDF2, ...)](#password-based-key-derivation-functions) -* [HMAC-based Key Derivation Function (HKDF)](#hmac-based-key-derivation-function) -* [Data Padding](#data-padding) -* [ChaCha20](#chacha20) -* [Rabbit](#rabbit) -* [Blowfish](#blowfish) -* [AES - Advanced Encryption Standard](#aes) -* [AES-GCM](#aes-gcm) -* [Authenticated Encryption with Associated Data (AEAD)](#aead) - -##### Basics - -```swift -import CryptoSwift -``` - -CryptoSwift uses array of bytes aka `Array` as a base type for all operations. Every data may be converted to a stream of bytes. You will find convenience functions that accept `String` or `Data`, and it will be internally converted to the array of bytes. - -##### Data types conversion - -For your convenience, **CryptoSwift** provides two functions to easily convert an array of bytes to `Data` or `Data` to an array of bytes: - -Data from bytes: - -```swift -let data = Data( [0x01, 0x02, 0x03]) -``` - -`Data` to `Array` - -```swift -let bytes = data.bytes // [1,2,3] -``` - -[Hexadecimal](https://en.wikipedia.org/wiki/Hexadecimal) encoding: - -```swift -let bytes = Array(hex: "0x010203") // [1,2,3] -let hex = bytes.toHexString() // "010203" -``` - -Build bytes out of `String` -```swift -let bytes: Array = "cipherkey".bytes // Array("cipherkey".utf8) -``` - -Also... check out helpers that work with **Base64** encoded data: -```swift -"aPf/i9th9iX+vf49eR7PYk2q7S5xmm3jkRLejgzHNJs=".decryptBase64ToString(cipher) -"aPf/i9th9iX+vf49eR7PYk2q7S5xmm3jkRLejgzHNJs=".decryptBase64(cipher) -bytes.toBase64() -``` - -##### Calculate Digest - -Hashing a data or array of bytes (aka `Array`) -```swift -/* Hash struct usage */ -let bytes: Array = [0x01, 0x02, 0x03] -let digest = input.md5() -let digest = Digest.md5(bytes) -``` - -```swift -let data = Data([0x01, 0x02, 0x03]) - -let hash = data.md5() -let hash = data.sha1() -let hash = data.sha224() -let hash = data.sha256() -let hash = data.sha384() -let hash = data.sha512() -``` -```swift -do { - var digest = MD5() - let partial1 = try digest.update(withBytes: [0x31, 0x32]) - let partial2 = try digest.update(withBytes: [0x33]) - let result = try digest.finish() -} catch { } -``` - -Hashing a String and printing result - -```swift -let hash = "123".md5() // "123".bytes.md5() -``` - -##### Calculate CRC - -```swift -bytes.crc16() -data.crc16() - -bytes.crc32() -data.crc32() -``` - -##### Message authenticators - -```swift -// Calculate Message Authentication Code (MAC) for message -let key: Array = [1,2,3,4,5,6,7,8,9,10,...] - -try Poly1305(key: key).authenticate(bytes) -try HMAC(key: key, variant: .sha256).authenticate(bytes) -try CMAC(key: key).authenticate(bytes) -``` - -##### Password-Based Key Derivation Functions - -```swift -let password: Array = Array("s33krit".utf8) -let salt: Array = Array("nacllcan".utf8) - -let key = try PKCS5.PBKDF2(password: password, salt: salt, iterations: 4096, keyLength: 32, variant: .sha256).calculate() -``` - -```swift -let password: Array = Array("s33krit".utf8) -let salt: Array = Array("nacllcan".utf8) -// Scrypt implementation does not implement work parallelization, so `p` parameter will -// increase the work time even in multicore systems -let key = try Scrypt(password: password, salt: salt, dkLen: 64, N: 16384, r: 8, p: 1).calculate() -``` - -##### HMAC-based Key Derivation Function - -```swift -let password: Array = Array("s33krit".utf8) -let salt: Array = Array("nacllcan".utf8) - -let key = try HKDF(password: password, salt: salt, variant: .sha256).calculate() -``` - - -##### Data Padding - -Some content-encryption algorithms assume the input length is a multiple of `k` octets, where `k` is greater than one. For such algorithms, the input shall be padded. - -```swift -Padding.pkcs7.add(to: bytes, blockSize: AES.blockSize) -``` - -#### Working with Ciphers -##### ChaCha20 - -```swift -let encrypted = try ChaCha20(key: key, iv: iv).encrypt(message) -let decrypted = try ChaCha20(key: key, iv: iv).decrypt(encrypted) -``` - -##### Rabbit - -```swift -let encrypted = try Rabbit(key: key, iv: iv).encrypt(message) -let decrypted = try Rabbit(key: key, iv: iv).decrypt(encrypted) -``` -##### Blowfish - -```swift -let encrypted = try Blowfish(key: key, blockMode: CBC(iv: iv), padding: .pkcs7).encrypt(message) -let decrypted = try Blowfish(key: key, blockMode: CBC(iv: iv), padding: .pkcs7).decrypt(encrypted) -``` - -##### AES - -Notice regarding padding: *Manual padding of data is optional, and CryptoSwift is using PKCS7 padding by default. If you need to manually disable/enable padding, you can do this by setting parameter for __AES__ class* - -Variant of AES encryption (AES-128, AES-192, AES-256) depends on given key length: - -- AES-128 = 16 bytes -- AES-192 = 24 bytes -- AES-256 = 32 bytes - -AES-256 example - -```swift -let encryptedBytes = try AES(key: [1,2,3,...,32], blockMode: CBC(iv: [1,2,3,...,16]), padding: .pkcs7) -``` - -Full example: - -```swift -let password: [UInt8] = Array("s33krit".utf8) -let salt: [UInt8] = Array("nacllcan".utf8) - -/* Generate a key from a `password`. Optional if you already have a key */ -let key = try PKCS5.PBKDF2( - password: password, - salt: salt, - iterations: 4096, - keyLength: 32, /* AES-256 */ - variant: .sha256 -).calculate() - -/* Generate random IV value. IV is public value. Either need to generate, or get it from elsewhere */ -let iv = AES.randomIV(AES.blockSize) - -/* AES cryptor instance */ -let aes = try AES(key: key, blockMode: CBC(iv: iv), padding: .pkcs7) - -/* Encrypt Data */ -let inputData = Data() -let encryptedBytes = try aes.encrypt(inputData.bytes) -let encryptedData = Data(encryptedBytes) - -/* Decrypt Data */ -let decryptedBytes = try aes.decrypt(encryptedData.bytes) -let decryptedData = Data(decryptedBytes) -``` - -###### All at once -```swift -do { - let aes = try AES(key: "keykeykeykeykeyk", iv: "drowssapdrowssap") // aes128 - let ciphertext = try aes.encrypt(Array("Nullam quis risus eget urna mollis ornare vel eu leo.".utf8)) -} catch { } -``` - -###### Incremental updates - -Incremental operations use instance of Cryptor and encrypt/decrypt one part at a time, this way you can save on memory for large files. - -```swift -do { - var encryptor = try AES(key: "keykeykeykeykeyk", iv: "drowssapdrowssap").makeEncryptor() - - var ciphertext = Array() - // aggregate partial results - ciphertext += try encryptor.update(withBytes: Array("Nullam quis risus ".utf8)) - ciphertext += try encryptor.update(withBytes: Array("eget urna mollis ".utf8)) - ciphertext += try encryptor.update(withBytes: Array("ornare vel eu leo.".utf8)) - // finish at the end - ciphertext += try encryptor.finish() - - print(ciphertext.toHexString()) -} catch { - print(error) -} -``` - -###### AES Advanced usage -```swift -let input: Array = [0,1,2,3,4,5,6,7,8,9] - -let key: Array = [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00] -let iv: Array = // Random bytes of `AES.blockSize` length - -do { - let encrypted = try AES(key: key, blockMode: CBC(iv: iv), padding: .pkcs7).encrypt(input) - let decrypted = try AES(key: key, blockMode: CBC(iv: iv), padding: .pkcs7).decrypt(encrypted) -} catch { - print(error) -} -``` - -AES without data padding - -```swift -let input: Array = [0,1,2,3,4,5,6,7,8,9] -let encrypted: Array = try! AES(key: Array("secret0key000000".utf8), blockMode: CBC(iv: Array("0123456789012345".utf8)), padding: .noPadding).encrypt(input) -``` - -Using convenience extensions - -```swift -let plain = Data([0x01, 0x02, 0x03]) -let encrypted = try! plain.encrypt(ChaCha20(key: key, iv: iv)) -let decrypted = try! encrypted.decrypt(ChaCha20(key: key, iv: iv)) -``` - -##### AES-GCM - -The result of Galois/Counter Mode (GCM) encryption is ciphertext and **authentication tag**, that is later used to decryption. - -encryption - -```swift -do { - // In combined mode, the authentication tag is directly appended to the encrypted message. This is usually what you want. - let gcm = GCM(iv: iv, mode: .combined) - let aes = try AES(key: key, blockMode: gcm, padding: .noPadding) - let encrypted = try aes.encrypt(plaintext) - let tag = gcm.authenticationTag -} catch { - // failed -} -``` - -decryption - -```swift -do { - // In combined mode, the authentication tag is appended to the encrypted message. This is usually what you want. - let gcm = GCM(iv: iv, mode: .combined) - let aes = try AES(key: key, blockMode: gcm, padding: .noPadding) - return try aes.decrypt(encrypted) -} catch { - // failed -} -``` - -**Note**: GCM instance is not intended to be reused. So you can't use the same `GCM` instance from encoding to also perform decoding. - -##### AES-CCM - -The result of Counter with Cipher Block Chaining-Message Authentication Code encryption is ciphertext and **authentication tag**, that is later used to decryption. - -```swift -do { - // The authentication tag is appended to the encrypted message. - let tagLength = 8 - let ccm = CCM(iv: iv, tagLength: tagLength, messageLength: ciphertext.count - tagLength, additionalAuthenticatedData: data) - let aes = try AES(key: key, blockMode: ccm, padding: .noPadding) - return try aes.decrypt(encrypted) -} catch { - // failed -} -``` - -Check documentation or CCM specification for valid parameters for CCM. - -##### AEAD - -```swift -let encrypt = try AEADChaCha20Poly1305.encrypt(plaintext, key: key, iv: nonce, authenticationHeader: header) -let decrypt = try AEADChaCha20Poly1305.decrypt(ciphertext, key: key, iv: nonce, authenticationHeader: header, authenticationTag: tagArr: tag) -``` - -## Author - -CryptoSwift is owned and maintained by [Marcin Krzyżanowski](http://www.krzyzanowskim.com) - -You can follow me on Twitter at [@krzyzanowskim](http://twitter.com/krzyzanowskim) for project updates and releases. - -# Cryptography Notice - -This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See http://www.wassenaar.org/ for more information. - -## License - -Copyright (C) 2014-2021 Marcin Krzyżanowski -This software is provided 'as-is', without any express or implied warranty. - -In no event will the authors be held liable for any damages arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: - -- The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, **an acknowledgment in the product documentation is required**. -- Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -- This notice may not be removed or altered from any source or binary distribution. -- Redistributions of any form whatsoever must retain the following acknowledgment: 'This product includes software developed by the "Marcin Krzyzanowski" (http://krzyzanowskim.com/).' - -## Changelog - -See [CHANGELOG](./CHANGELOG) file. diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift.h b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift.h deleted file mode 100644 index 85fe67543..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// CryptoSwift.h -// CryptoSwift -// -// Created by Sam Soffes on 11/29/15. -// Copyright © 2015 Marcin Krzyzanowski. All rights reserved. -// - -@import Foundation; - -//! Project version number for CryptoSwift. -FOUNDATION_EXPORT double CryptoSwiftVersionNumber; - -//! Project version string for CryptoSwift. -FOUNDATION_EXPORT const unsigned char CryptoSwiftVersionString[]; diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/AEAD/AEAD.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/AEAD/AEAD.swift deleted file mode 100644 index 3b45ab44f..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/AEAD/AEAD.swift +++ /dev/null @@ -1,40 +0,0 @@ -// -// AEAD.swift -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// -// - -// https://www.iana.org/assignments/aead-parameters/aead-parameters.xhtml - -/// Authenticated Encryption with Associated Data (AEAD) -public protocol AEAD { - static var kLen: Int { get } // key length - static var ivRange: Range { get } // nonce length -} - -extension AEAD { - static func calculateAuthenticationTag(authenticator: Authenticator, cipherText: Array, authenticationHeader: Array) throws -> Array { - let headerPadding = ((16 - (authenticationHeader.count & 0xf)) & 0xf) - let cipherPadding = ((16 - (cipherText.count & 0xf)) & 0xf) - - var mac = authenticationHeader - mac += Array(repeating: 0, count: headerPadding) - mac += cipherText - mac += Array(repeating: 0, count: cipherPadding) - mac += UInt64(bigEndian: UInt64(authenticationHeader.count)).bytes() - mac += UInt64(bigEndian: UInt64(cipherText.count)).bytes() - - return try authenticator.authenticate(mac) - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/AEAD/AEADChaCha20Poly1305.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/AEAD/AEADChaCha20Poly1305.swift deleted file mode 100644 index b4c9aeb0f..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/AEAD/AEADChaCha20Poly1305.swift +++ /dev/null @@ -1,59 +0,0 @@ -// -// ChaCha20Poly1305.swift -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// -// -// https://tools.ietf.org/html/rfc7539#section-2.8.1 - -/// AEAD_CHACHA20_POLY1305 -public final class AEADChaCha20Poly1305: AEAD { - public static let kLen = 32 // key length - public static var ivRange = Range(12...12) - - /// Authenticated encryption - public static func encrypt(_ plainText: Array, key: Array, iv: Array, authenticationHeader: Array) throws -> (cipherText: Array, authenticationTag: Array) { - let cipher = try ChaCha20(key: key, iv: iv) - - var polykey = Array(repeating: 0, count: kLen) - var toEncrypt = polykey - polykey = try cipher.encrypt(polykey) - toEncrypt += polykey - toEncrypt += plainText - - let fullCipherText = try cipher.encrypt(toEncrypt) - let cipherText = Array(fullCipherText.dropFirst(64)) - - let tag = try calculateAuthenticationTag(authenticator: Poly1305(key: polykey), cipherText: cipherText, authenticationHeader: authenticationHeader) - return (cipherText, tag) - } - - /// Authenticated decryption - public static func decrypt(_ cipherText: Array, key: Array, iv: Array, authenticationHeader: Array, authenticationTag: Array) throws -> (plainText: Array, success: Bool) { - let chacha = try ChaCha20(key: key, iv: iv) - - let polykey = try chacha.encrypt(Array(repeating: 0, count: self.kLen)) - let mac = try calculateAuthenticationTag(authenticator: Poly1305(key: polykey), cipherText: cipherText, authenticationHeader: authenticationHeader) - guard mac == authenticationTag else { - return (cipherText, false) - } - - var toDecrypt = Array(reserveCapacity: cipherText.count + 64) - toDecrypt += polykey - toDecrypt += polykey - toDecrypt += cipherText - let fullPlainText = try chacha.decrypt(toDecrypt) - let plainText = Array(fullPlainText.dropFirst(64)) - return (plainText, true) - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/AES.Cryptors.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/AES.Cryptors.swift deleted file mode 100644 index f84c92bcd..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/AES.Cryptors.swift +++ /dev/null @@ -1,39 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// MARK: Cryptors - -extension AES: Cryptors { - @inlinable - public func makeEncryptor() throws -> Cryptor & Updatable { - let blockSize = blockMode.customBlockSize ?? AES.blockSize - let worker = try blockMode.worker(blockSize: blockSize, cipherOperation: encrypt, encryptionOperation: encrypt) - if worker is StreamModeWorker { - return try StreamEncryptor(blockSize: blockSize, padding: padding, worker) - } - return try BlockEncryptor(blockSize: blockSize, padding: padding, worker) - } - - @inlinable - public func makeDecryptor() throws -> Cryptor & Updatable { - let blockSize = blockMode.customBlockSize ?? AES.blockSize - let cipherOperation: CipherOperationOnBlock = blockMode.options.contains(.useEncryptToDecrypt) == true ? encrypt : decrypt - let worker = try blockMode.worker(blockSize: blockSize, cipherOperation: cipherOperation, encryptionOperation: encrypt) - if worker is StreamModeWorker { - return try StreamDecryptor(blockSize: blockSize, padding: padding, worker) - } - return try BlockDecryptor(blockSize: blockSize, padding: padding, worker) - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/AES.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/AES.swift deleted file mode 100644 index 211bda6d2..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/AES.swift +++ /dev/null @@ -1,556 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// Implementation of Gladman algorithm http://www.gladman.me.uk/AES -// - -/// The Advanced Encryption Standard (AES) -public final class AES: BlockCipher { - public enum Error: Swift.Error { - /// Invalid key - case invalidKeySize - /// Data padding is required - case dataPaddingRequired - /// Invalid Data - case invalidData - } - - public enum Variant: Int { - case aes128 = 1, aes192, aes256 - - var Nk: Int { // Nk words - [4, 6, 8][self.rawValue - 1] - } - - var Nb: Int { // Nb words - 4 - } - - var Nr: Int { // Nr - self.Nk + 6 - } - } - - @usableFromInline - internal let variantNr: Int - - @usableFromInline - internal let variantNb: Int - - @usableFromInline - internal let variantNk: Int - - public static let blockSize: Int = 16 // 128 /8 - public let keySize: Int - - /// AES Variant - public let variant: Variant - - // Parameters - let key: Key - - @usableFromInline - let blockMode: BlockMode - - @usableFromInline - let padding: Padding - - // - @usableFromInline - internal lazy var expandedKey: Array> = self.expandKey(self.key, variant: self.variant) - - @usableFromInline - internal lazy var expandedKeyInv: Array> = self.expandKeyInv(self.key, variant: self.variant) - - private lazy var sBoxes: (sBox: Array, invSBox: Array) = self.calculateSBox() - private lazy var sBox: Array = self.sBoxes.sBox - private lazy var sBoxInv: Array = self.sBoxes.invSBox - - // Parameters for Linear Congruence Generators - private static let Rcon: Array = [ - 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, - 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, - 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, - 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, - 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, - 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, - 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, - 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, - 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, - 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, - 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, - 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, - 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, - 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, - 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, - 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d - ] - - @usableFromInline static let T0: Array = [0xa56363c6, 0x847c7cf8, 0x997777ee, 0x8d7b7bf6, 0xdf2f2ff, 0xbd6b6bd6, 0xb16f6fde, 0x54c5c591, 0x50303060, 0x3010102, 0xa96767ce, 0x7d2b2b56, 0x19fefee7, 0x62d7d7b5, 0xe6abab4d, 0x9a7676ec, 0x45caca8f, 0x9d82821f, 0x40c9c989, 0x877d7dfa, 0x15fafaef, 0xeb5959b2, 0xc947478e, 0xbf0f0fb, 0xecadad41, 0x67d4d4b3, 0xfda2a25f, 0xeaafaf45, 0xbf9c9c23, 0xf7a4a453, 0x967272e4, 0x5bc0c09b, 0xc2b7b775, 0x1cfdfde1, 0xae93933d, 0x6a26264c, 0x5a36366c, 0x413f3f7e, 0x2f7f7f5, 0x4fcccc83, 0x5c343468, 0xf4a5a551, 0x34e5e5d1, 0x8f1f1f9, 0x937171e2, 0x73d8d8ab, 0x53313162, 0x3f15152a, 0xc040408, 0x52c7c795, 0x65232346, 0x5ec3c39d, 0x28181830, 0xa1969637, 0xf05050a, 0xb59a9a2f, 0x907070e, 0x36121224, 0x9b80801b, 0x3de2e2df, 0x26ebebcd, 0x6927274e, 0xcdb2b27f, 0x9f7575ea, 0x1b090912, 0x9e83831d, 0x742c2c58, 0x2e1a1a34, 0x2d1b1b36, 0xb26e6edc, 0xee5a5ab4, 0xfba0a05b, 0xf65252a4, 0x4d3b3b76, 0x61d6d6b7, 0xceb3b37d, 0x7b292952, 0x3ee3e3dd, 0x712f2f5e, 0x97848413, 0xf55353a6, 0x68d1d1b9, 0x0, 0x2cededc1, 0x60202040, 0x1ffcfce3, 0xc8b1b179, 0xed5b5bb6, 0xbe6a6ad4, 0x46cbcb8d, 0xd9bebe67, 0x4b393972, 0xde4a4a94, 0xd44c4c98, 0xe85858b0, 0x4acfcf85, 0x6bd0d0bb, 0x2aefefc5, 0xe5aaaa4f, 0x16fbfbed, 0xc5434386, 0xd74d4d9a, 0x55333366, 0x94858511, 0xcf45458a, 0x10f9f9e9, 0x6020204, 0x817f7ffe, 0xf05050a0, 0x443c3c78, 0xba9f9f25, 0xe3a8a84b, 0xf35151a2, 0xfea3a35d, 0xc0404080, 0x8a8f8f05, 0xad92923f, 0xbc9d9d21, 0x48383870, 0x4f5f5f1, 0xdfbcbc63, 0xc1b6b677, 0x75dadaaf, 0x63212142, 0x30101020, 0x1affffe5, 0xef3f3fd, 0x6dd2d2bf, 0x4ccdcd81, 0x140c0c18, 0x35131326, 0x2fececc3, 0xe15f5fbe, 0xa2979735, 0xcc444488, 0x3917172e, 0x57c4c493, 0xf2a7a755, 0x827e7efc, 0x473d3d7a, 0xac6464c8, 0xe75d5dba, 0x2b191932, 0x957373e6, 0xa06060c0, 0x98818119, 0xd14f4f9e, 0x7fdcdca3, 0x66222244, 0x7e2a2a54, 0xab90903b, 0x8388880b, 0xca46468c, 0x29eeeec7, 0xd3b8b86b, 0x3c141428, 0x79dedea7, 0xe25e5ebc, 0x1d0b0b16, 0x76dbdbad, 0x3be0e0db, 0x56323264, 0x4e3a3a74, 0x1e0a0a14, 0xdb494992, 0xa06060c, 0x6c242448, 0xe45c5cb8, 0x5dc2c29f, 0x6ed3d3bd, 0xefacac43, 0xa66262c4, 0xa8919139, 0xa4959531, 0x37e4e4d3, 0x8b7979f2, 0x32e7e7d5, 0x43c8c88b, 0x5937376e, 0xb76d6dda, 0x8c8d8d01, 0x64d5d5b1, 0xd24e4e9c, 0xe0a9a949, 0xb46c6cd8, 0xfa5656ac, 0x7f4f4f3, 0x25eaeacf, 0xaf6565ca, 0x8e7a7af4, 0xe9aeae47, 0x18080810, 0xd5baba6f, 0x887878f0, 0x6f25254a, 0x722e2e5c, 0x241c1c38, 0xf1a6a657, 0xc7b4b473, 0x51c6c697, 0x23e8e8cb, 0x7cdddda1, 0x9c7474e8, 0x211f1f3e, 0xdd4b4b96, 0xdcbdbd61, 0x868b8b0d, 0x858a8a0f, 0x907070e0, 0x423e3e7c, 0xc4b5b571, 0xaa6666cc, 0xd8484890, 0x5030306, 0x1f6f6f7, 0x120e0e1c, 0xa36161c2, 0x5f35356a, 0xf95757ae, 0xd0b9b969, 0x91868617, 0x58c1c199, 0x271d1d3a, 0xb99e9e27, 0x38e1e1d9, 0x13f8f8eb, 0xb398982b, 0x33111122, 0xbb6969d2, 0x70d9d9a9, 0x898e8e07, 0xa7949433, 0xb69b9b2d, 0x221e1e3c, 0x92878715, 0x20e9e9c9, 0x49cece87, 0xff5555aa, 0x78282850, 0x7adfdfa5, 0x8f8c8c03, 0xf8a1a159, 0x80898909, 0x170d0d1a, 0xdabfbf65, 0x31e6e6d7, 0xc6424284, 0xb86868d0, 0xc3414182, 0xb0999929, 0x772d2d5a, 0x110f0f1e, 0xcbb0b07b, 0xfc5454a8, 0xd6bbbb6d, 0x3a16162c] - @usableFromInline static let T0_INV: Array = [0x50a7f451, 0x5365417e, 0xc3a4171a, 0x965e273a, 0xcb6bab3b, 0xf1459d1f, 0xab58faac, 0x9303e34b, 0x55fa3020, 0xf66d76ad, 0x9176cc88, 0x254c02f5, 0xfcd7e54f, 0xd7cb2ac5, 0x80443526, 0x8fa362b5, 0x495ab1de, 0x671bba25, 0x980eea45, 0xe1c0fe5d, 0x2752fc3, 0x12f04c81, 0xa397468d, 0xc6f9d36b, 0xe75f8f03, 0x959c9215, 0xeb7a6dbf, 0xda595295, 0x2d83bed4, 0xd3217458, 0x2969e049, 0x44c8c98e, 0x6a89c275, 0x78798ef4, 0x6b3e5899, 0xdd71b927, 0xb64fe1be, 0x17ad88f0, 0x66ac20c9, 0xb43ace7d, 0x184adf63, 0x82311ae5, 0x60335197, 0x457f5362, 0xe07764b1, 0x84ae6bbb, 0x1ca081fe, 0x942b08f9, 0x58684870, 0x19fd458f, 0x876cde94, 0xb7f87b52, 0x23d373ab, 0xe2024b72, 0x578f1fe3, 0x2aab5566, 0x728ebb2, 0x3c2b52f, 0x9a7bc586, 0xa50837d3, 0xf2872830, 0xb2a5bf23, 0xba6a0302, 0x5c8216ed, 0x2b1ccf8a, 0x92b479a7, 0xf0f207f3, 0xa1e2694e, 0xcdf4da65, 0xd5be0506, 0x1f6234d1, 0x8afea6c4, 0x9d532e34, 0xa055f3a2, 0x32e18a05, 0x75ebf6a4, 0x39ec830b, 0xaaef6040, 0x69f715e, 0x51106ebd, 0xf98a213e, 0x3d06dd96, 0xae053edd, 0x46bde64d, 0xb58d5491, 0x55dc471, 0x6fd40604, 0xff155060, 0x24fb9819, 0x97e9bdd6, 0xcc434089, 0x779ed967, 0xbd42e8b0, 0x888b8907, 0x385b19e7, 0xdbeec879, 0x470a7ca1, 0xe90f427c, 0xc91e84f8, 0x0, 0x83868009, 0x48ed2b32, 0xac70111e, 0x4e725a6c, 0xfbff0efd, 0x5638850f, 0x1ed5ae3d, 0x27392d36, 0x64d90f0a, 0x21a65c68, 0xd1545b9b, 0x3a2e3624, 0xb1670a0c, 0xfe75793, 0xd296eeb4, 0x9e919b1b, 0x4fc5c080, 0xa220dc61, 0x694b775a, 0x161a121c, 0xaba93e2, 0xe52aa0c0, 0x43e0223c, 0x1d171b12, 0xb0d090e, 0xadc78bf2, 0xb9a8b62d, 0xc8a91e14, 0x8519f157, 0x4c0775af, 0xbbdd99ee, 0xfd607fa3, 0x9f2601f7, 0xbcf5725c, 0xc53b6644, 0x347efb5b, 0x7629438b, 0xdcc623cb, 0x68fcedb6, 0x63f1e4b8, 0xcadc31d7, 0x10856342, 0x40229713, 0x2011c684, 0x7d244a85, 0xf83dbbd2, 0x1132f9ae, 0x6da129c7, 0x4b2f9e1d, 0xf330b2dc, 0xec52860d, 0xd0e3c177, 0x6c16b32b, 0x99b970a9, 0xfa489411, 0x2264e947, 0xc48cfca8, 0x1a3ff0a0, 0xd82c7d56, 0xef903322, 0xc74e4987, 0xc1d138d9, 0xfea2ca8c, 0x360bd498, 0xcf81f5a6, 0x28de7aa5, 0x268eb7da, 0xa4bfad3f, 0xe49d3a2c, 0xd927850, 0x9bcc5f6a, 0x62467e54, 0xc2138df6, 0xe8b8d890, 0x5ef7392e, 0xf5afc382, 0xbe805d9f, 0x7c93d069, 0xa92dd56f, 0xb31225cf, 0x3b99acc8, 0xa77d1810, 0x6e639ce8, 0x7bbb3bdb, 0x97826cd, 0xf418596e, 0x1b79aec, 0xa89a4f83, 0x656e95e6, 0x7ee6ffaa, 0x8cfbc21, 0xe6e815ef, 0xd99be7ba, 0xce366f4a, 0xd4099fea, 0xd67cb029, 0xafb2a431, 0x31233f2a, 0x3094a5c6, 0xc066a235, 0x37bc4e74, 0xa6ca82fc, 0xb0d090e0, 0x15d8a733, 0x4a9804f1, 0xf7daec41, 0xe50cd7f, 0x2ff69117, 0x8dd64d76, 0x4db0ef43, 0x544daacc, 0xdf0496e4, 0xe3b5d19e, 0x1b886a4c, 0xb81f2cc1, 0x7f516546, 0x4ea5e9d, 0x5d358c01, 0x737487fa, 0x2e410bfb, 0x5a1d67b3, 0x52d2db92, 0x335610e9, 0x1347d66d, 0x8c61d79a, 0x7a0ca137, 0x8e14f859, 0x893c13eb, 0xee27a9ce, 0x35c961b7, 0xede51ce1, 0x3cb1477a, 0x59dfd29c, 0x3f73f255, 0x79ce1418, 0xbf37c773, 0xeacdf753, 0x5baafd5f, 0x146f3ddf, 0x86db4478, 0x81f3afca, 0x3ec468b9, 0x2c342438, 0x5f40a3c2, 0x72c31d16, 0xc25e2bc, 0x8b493c28, 0x41950dff, 0x7101a839, 0xdeb30c08, 0x9ce4b4d8, 0x90c15664, 0x6184cb7b, 0x70b632d5, 0x745c6c48, 0x4257b8d0] - @usableFromInline static let T1: Array = [0x6363c6a5, 0x7c7cf884, 0x7777ee99, 0x7b7bf68d, 0xf2f2ff0d, 0x6b6bd6bd, 0x6f6fdeb1, 0xc5c59154, 0x30306050, 0x1010203, 0x6767cea9, 0x2b2b567d, 0xfefee719, 0xd7d7b562, 0xabab4de6, 0x7676ec9a, 0xcaca8f45, 0x82821f9d, 0xc9c98940, 0x7d7dfa87, 0xfafaef15, 0x5959b2eb, 0x47478ec9, 0xf0f0fb0b, 0xadad41ec, 0xd4d4b367, 0xa2a25ffd, 0xafaf45ea, 0x9c9c23bf, 0xa4a453f7, 0x7272e496, 0xc0c09b5b, 0xb7b775c2, 0xfdfde11c, 0x93933dae, 0x26264c6a, 0x36366c5a, 0x3f3f7e41, 0xf7f7f502, 0xcccc834f, 0x3434685c, 0xa5a551f4, 0xe5e5d134, 0xf1f1f908, 0x7171e293, 0xd8d8ab73, 0x31316253, 0x15152a3f, 0x404080c, 0xc7c79552, 0x23234665, 0xc3c39d5e, 0x18183028, 0x969637a1, 0x5050a0f, 0x9a9a2fb5, 0x7070e09, 0x12122436, 0x80801b9b, 0xe2e2df3d, 0xebebcd26, 0x27274e69, 0xb2b27fcd, 0x7575ea9f, 0x909121b, 0x83831d9e, 0x2c2c5874, 0x1a1a342e, 0x1b1b362d, 0x6e6edcb2, 0x5a5ab4ee, 0xa0a05bfb, 0x5252a4f6, 0x3b3b764d, 0xd6d6b761, 0xb3b37dce, 0x2929527b, 0xe3e3dd3e, 0x2f2f5e71, 0x84841397, 0x5353a6f5, 0xd1d1b968, 0x0, 0xededc12c, 0x20204060, 0xfcfce31f, 0xb1b179c8, 0x5b5bb6ed, 0x6a6ad4be, 0xcbcb8d46, 0xbebe67d9, 0x3939724b, 0x4a4a94de, 0x4c4c98d4, 0x5858b0e8, 0xcfcf854a, 0xd0d0bb6b, 0xefefc52a, 0xaaaa4fe5, 0xfbfbed16, 0x434386c5, 0x4d4d9ad7, 0x33336655, 0x85851194, 0x45458acf, 0xf9f9e910, 0x2020406, 0x7f7ffe81, 0x5050a0f0, 0x3c3c7844, 0x9f9f25ba, 0xa8a84be3, 0x5151a2f3, 0xa3a35dfe, 0x404080c0, 0x8f8f058a, 0x92923fad, 0x9d9d21bc, 0x38387048, 0xf5f5f104, 0xbcbc63df, 0xb6b677c1, 0xdadaaf75, 0x21214263, 0x10102030, 0xffffe51a, 0xf3f3fd0e, 0xd2d2bf6d, 0xcdcd814c, 0xc0c1814, 0x13132635, 0xececc32f, 0x5f5fbee1, 0x979735a2, 0x444488cc, 0x17172e39, 0xc4c49357, 0xa7a755f2, 0x7e7efc82, 0x3d3d7a47, 0x6464c8ac, 0x5d5dbae7, 0x1919322b, 0x7373e695, 0x6060c0a0, 0x81811998, 0x4f4f9ed1, 0xdcdca37f, 0x22224466, 0x2a2a547e, 0x90903bab, 0x88880b83, 0x46468cca, 0xeeeec729, 0xb8b86bd3, 0x1414283c, 0xdedea779, 0x5e5ebce2, 0xb0b161d, 0xdbdbad76, 0xe0e0db3b, 0x32326456, 0x3a3a744e, 0xa0a141e, 0x494992db, 0x6060c0a, 0x2424486c, 0x5c5cb8e4, 0xc2c29f5d, 0xd3d3bd6e, 0xacac43ef, 0x6262c4a6, 0x919139a8, 0x959531a4, 0xe4e4d337, 0x7979f28b, 0xe7e7d532, 0xc8c88b43, 0x37376e59, 0x6d6ddab7, 0x8d8d018c, 0xd5d5b164, 0x4e4e9cd2, 0xa9a949e0, 0x6c6cd8b4, 0x5656acfa, 0xf4f4f307, 0xeaeacf25, 0x6565caaf, 0x7a7af48e, 0xaeae47e9, 0x8081018, 0xbaba6fd5, 0x7878f088, 0x25254a6f, 0x2e2e5c72, 0x1c1c3824, 0xa6a657f1, 0xb4b473c7, 0xc6c69751, 0xe8e8cb23, 0xdddda17c, 0x7474e89c, 0x1f1f3e21, 0x4b4b96dd, 0xbdbd61dc, 0x8b8b0d86, 0x8a8a0f85, 0x7070e090, 0x3e3e7c42, 0xb5b571c4, 0x6666ccaa, 0x484890d8, 0x3030605, 0xf6f6f701, 0xe0e1c12, 0x6161c2a3, 0x35356a5f, 0x5757aef9, 0xb9b969d0, 0x86861791, 0xc1c19958, 0x1d1d3a27, 0x9e9e27b9, 0xe1e1d938, 0xf8f8eb13, 0x98982bb3, 0x11112233, 0x6969d2bb, 0xd9d9a970, 0x8e8e0789, 0x949433a7, 0x9b9b2db6, 0x1e1e3c22, 0x87871592, 0xe9e9c920, 0xcece8749, 0x5555aaff, 0x28285078, 0xdfdfa57a, 0x8c8c038f, 0xa1a159f8, 0x89890980, 0xd0d1a17, 0xbfbf65da, 0xe6e6d731, 0x424284c6, 0x6868d0b8, 0x414182c3, 0x999929b0, 0x2d2d5a77, 0xf0f1e11, 0xb0b07bcb, 0x5454a8fc, 0xbbbb6dd6, 0x16162c3a] - @usableFromInline static let T1_INV: Array = [0xa7f45150, 0x65417e53, 0xa4171ac3, 0x5e273a96, 0x6bab3bcb, 0x459d1ff1, 0x58faacab, 0x3e34b93, 0xfa302055, 0x6d76adf6, 0x76cc8891, 0x4c02f525, 0xd7e54ffc, 0xcb2ac5d7, 0x44352680, 0xa362b58f, 0x5ab1de49, 0x1bba2567, 0xeea4598, 0xc0fe5de1, 0x752fc302, 0xf04c8112, 0x97468da3, 0xf9d36bc6, 0x5f8f03e7, 0x9c921595, 0x7a6dbfeb, 0x595295da, 0x83bed42d, 0x217458d3, 0x69e04929, 0xc8c98e44, 0x89c2756a, 0x798ef478, 0x3e58996b, 0x71b927dd, 0x4fe1beb6, 0xad88f017, 0xac20c966, 0x3ace7db4, 0x4adf6318, 0x311ae582, 0x33519760, 0x7f536245, 0x7764b1e0, 0xae6bbb84, 0xa081fe1c, 0x2b08f994, 0x68487058, 0xfd458f19, 0x6cde9487, 0xf87b52b7, 0xd373ab23, 0x24b72e2, 0x8f1fe357, 0xab55662a, 0x28ebb207, 0xc2b52f03, 0x7bc5869a, 0x837d3a5, 0x872830f2, 0xa5bf23b2, 0x6a0302ba, 0x8216ed5c, 0x1ccf8a2b, 0xb479a792, 0xf207f3f0, 0xe2694ea1, 0xf4da65cd, 0xbe0506d5, 0x6234d11f, 0xfea6c48a, 0x532e349d, 0x55f3a2a0, 0xe18a0532, 0xebf6a475, 0xec830b39, 0xef6040aa, 0x9f715e06, 0x106ebd51, 0x8a213ef9, 0x6dd963d, 0x53eddae, 0xbde64d46, 0x8d5491b5, 0x5dc47105, 0xd406046f, 0x155060ff, 0xfb981924, 0xe9bdd697, 0x434089cc, 0x9ed96777, 0x42e8b0bd, 0x8b890788, 0x5b19e738, 0xeec879db, 0xa7ca147, 0xf427ce9, 0x1e84f8c9, 0x0, 0x86800983, 0xed2b3248, 0x70111eac, 0x725a6c4e, 0xff0efdfb, 0x38850f56, 0xd5ae3d1e, 0x392d3627, 0xd90f0a64, 0xa65c6821, 0x545b9bd1, 0x2e36243a, 0x670a0cb1, 0xe757930f, 0x96eeb4d2, 0x919b1b9e, 0xc5c0804f, 0x20dc61a2, 0x4b775a69, 0x1a121c16, 0xba93e20a, 0x2aa0c0e5, 0xe0223c43, 0x171b121d, 0xd090e0b, 0xc78bf2ad, 0xa8b62db9, 0xa91e14c8, 0x19f15785, 0x775af4c, 0xdd99eebb, 0x607fa3fd, 0x2601f79f, 0xf5725cbc, 0x3b6644c5, 0x7efb5b34, 0x29438b76, 0xc623cbdc, 0xfcedb668, 0xf1e4b863, 0xdc31d7ca, 0x85634210, 0x22971340, 0x11c68420, 0x244a857d, 0x3dbbd2f8, 0x32f9ae11, 0xa129c76d, 0x2f9e1d4b, 0x30b2dcf3, 0x52860dec, 0xe3c177d0, 0x16b32b6c, 0xb970a999, 0x489411fa, 0x64e94722, 0x8cfca8c4, 0x3ff0a01a, 0x2c7d56d8, 0x903322ef, 0x4e4987c7, 0xd138d9c1, 0xa2ca8cfe, 0xbd49836, 0x81f5a6cf, 0xde7aa528, 0x8eb7da26, 0xbfad3fa4, 0x9d3a2ce4, 0x9278500d, 0xcc5f6a9b, 0x467e5462, 0x138df6c2, 0xb8d890e8, 0xf7392e5e, 0xafc382f5, 0x805d9fbe, 0x93d0697c, 0x2dd56fa9, 0x1225cfb3, 0x99acc83b, 0x7d1810a7, 0x639ce86e, 0xbb3bdb7b, 0x7826cd09, 0x18596ef4, 0xb79aec01, 0x9a4f83a8, 0x6e95e665, 0xe6ffaa7e, 0xcfbc2108, 0xe815efe6, 0x9be7bad9, 0x366f4ace, 0x99fead4, 0x7cb029d6, 0xb2a431af, 0x233f2a31, 0x94a5c630, 0x66a235c0, 0xbc4e7437, 0xca82fca6, 0xd090e0b0, 0xd8a73315, 0x9804f14a, 0xdaec41f7, 0x50cd7f0e, 0xf691172f, 0xd64d768d, 0xb0ef434d, 0x4daacc54, 0x496e4df, 0xb5d19ee3, 0x886a4c1b, 0x1f2cc1b8, 0x5165467f, 0xea5e9d04, 0x358c015d, 0x7487fa73, 0x410bfb2e, 0x1d67b35a, 0xd2db9252, 0x5610e933, 0x47d66d13, 0x61d79a8c, 0xca1377a, 0x14f8598e, 0x3c13eb89, 0x27a9ceee, 0xc961b735, 0xe51ce1ed, 0xb1477a3c, 0xdfd29c59, 0x73f2553f, 0xce141879, 0x37c773bf, 0xcdf753ea, 0xaafd5f5b, 0x6f3ddf14, 0xdb447886, 0xf3afca81, 0xc468b93e, 0x3424382c, 0x40a3c25f, 0xc31d1672, 0x25e2bc0c, 0x493c288b, 0x950dff41, 0x1a83971, 0xb30c08de, 0xe4b4d89c, 0xc1566490, 0x84cb7b61, 0xb632d570, 0x5c6c4874, 0x57b8d042] - @usableFromInline static let T2: Array = [0x63c6a563, 0x7cf8847c, 0x77ee9977, 0x7bf68d7b, 0xf2ff0df2, 0x6bd6bd6b, 0x6fdeb16f, 0xc59154c5, 0x30605030, 0x1020301, 0x67cea967, 0x2b567d2b, 0xfee719fe, 0xd7b562d7, 0xab4de6ab, 0x76ec9a76, 0xca8f45ca, 0x821f9d82, 0xc98940c9, 0x7dfa877d, 0xfaef15fa, 0x59b2eb59, 0x478ec947, 0xf0fb0bf0, 0xad41ecad, 0xd4b367d4, 0xa25ffda2, 0xaf45eaaf, 0x9c23bf9c, 0xa453f7a4, 0x72e49672, 0xc09b5bc0, 0xb775c2b7, 0xfde11cfd, 0x933dae93, 0x264c6a26, 0x366c5a36, 0x3f7e413f, 0xf7f502f7, 0xcc834fcc, 0x34685c34, 0xa551f4a5, 0xe5d134e5, 0xf1f908f1, 0x71e29371, 0xd8ab73d8, 0x31625331, 0x152a3f15, 0x4080c04, 0xc79552c7, 0x23466523, 0xc39d5ec3, 0x18302818, 0x9637a196, 0x50a0f05, 0x9a2fb59a, 0x70e0907, 0x12243612, 0x801b9b80, 0xe2df3de2, 0xebcd26eb, 0x274e6927, 0xb27fcdb2, 0x75ea9f75, 0x9121b09, 0x831d9e83, 0x2c58742c, 0x1a342e1a, 0x1b362d1b, 0x6edcb26e, 0x5ab4ee5a, 0xa05bfba0, 0x52a4f652, 0x3b764d3b, 0xd6b761d6, 0xb37dceb3, 0x29527b29, 0xe3dd3ee3, 0x2f5e712f, 0x84139784, 0x53a6f553, 0xd1b968d1, 0x0, 0xedc12ced, 0x20406020, 0xfce31ffc, 0xb179c8b1, 0x5bb6ed5b, 0x6ad4be6a, 0xcb8d46cb, 0xbe67d9be, 0x39724b39, 0x4a94de4a, 0x4c98d44c, 0x58b0e858, 0xcf854acf, 0xd0bb6bd0, 0xefc52aef, 0xaa4fe5aa, 0xfbed16fb, 0x4386c543, 0x4d9ad74d, 0x33665533, 0x85119485, 0x458acf45, 0xf9e910f9, 0x2040602, 0x7ffe817f, 0x50a0f050, 0x3c78443c, 0x9f25ba9f, 0xa84be3a8, 0x51a2f351, 0xa35dfea3, 0x4080c040, 0x8f058a8f, 0x923fad92, 0x9d21bc9d, 0x38704838, 0xf5f104f5, 0xbc63dfbc, 0xb677c1b6, 0xdaaf75da, 0x21426321, 0x10203010, 0xffe51aff, 0xf3fd0ef3, 0xd2bf6dd2, 0xcd814ccd, 0xc18140c, 0x13263513, 0xecc32fec, 0x5fbee15f, 0x9735a297, 0x4488cc44, 0x172e3917, 0xc49357c4, 0xa755f2a7, 0x7efc827e, 0x3d7a473d, 0x64c8ac64, 0x5dbae75d, 0x19322b19, 0x73e69573, 0x60c0a060, 0x81199881, 0x4f9ed14f, 0xdca37fdc, 0x22446622, 0x2a547e2a, 0x903bab90, 0x880b8388, 0x468cca46, 0xeec729ee, 0xb86bd3b8, 0x14283c14, 0xdea779de, 0x5ebce25e, 0xb161d0b, 0xdbad76db, 0xe0db3be0, 0x32645632, 0x3a744e3a, 0xa141e0a, 0x4992db49, 0x60c0a06, 0x24486c24, 0x5cb8e45c, 0xc29f5dc2, 0xd3bd6ed3, 0xac43efac, 0x62c4a662, 0x9139a891, 0x9531a495, 0xe4d337e4, 0x79f28b79, 0xe7d532e7, 0xc88b43c8, 0x376e5937, 0x6ddab76d, 0x8d018c8d, 0xd5b164d5, 0x4e9cd24e, 0xa949e0a9, 0x6cd8b46c, 0x56acfa56, 0xf4f307f4, 0xeacf25ea, 0x65caaf65, 0x7af48e7a, 0xae47e9ae, 0x8101808, 0xba6fd5ba, 0x78f08878, 0x254a6f25, 0x2e5c722e, 0x1c38241c, 0xa657f1a6, 0xb473c7b4, 0xc69751c6, 0xe8cb23e8, 0xdda17cdd, 0x74e89c74, 0x1f3e211f, 0x4b96dd4b, 0xbd61dcbd, 0x8b0d868b, 0x8a0f858a, 0x70e09070, 0x3e7c423e, 0xb571c4b5, 0x66ccaa66, 0x4890d848, 0x3060503, 0xf6f701f6, 0xe1c120e, 0x61c2a361, 0x356a5f35, 0x57aef957, 0xb969d0b9, 0x86179186, 0xc19958c1, 0x1d3a271d, 0x9e27b99e, 0xe1d938e1, 0xf8eb13f8, 0x982bb398, 0x11223311, 0x69d2bb69, 0xd9a970d9, 0x8e07898e, 0x9433a794, 0x9b2db69b, 0x1e3c221e, 0x87159287, 0xe9c920e9, 0xce8749ce, 0x55aaff55, 0x28507828, 0xdfa57adf, 0x8c038f8c, 0xa159f8a1, 0x89098089, 0xd1a170d, 0xbf65dabf, 0xe6d731e6, 0x4284c642, 0x68d0b868, 0x4182c341, 0x9929b099, 0x2d5a772d, 0xf1e110f, 0xb07bcbb0, 0x54a8fc54, 0xbb6dd6bb, 0x162c3a16] - @usableFromInline static let T2_INV: Array = [0xf45150a7, 0x417e5365, 0x171ac3a4, 0x273a965e, 0xab3bcb6b, 0x9d1ff145, 0xfaacab58, 0xe34b9303, 0x302055fa, 0x76adf66d, 0xcc889176, 0x2f5254c, 0xe54ffcd7, 0x2ac5d7cb, 0x35268044, 0x62b58fa3, 0xb1de495a, 0xba25671b, 0xea45980e, 0xfe5de1c0, 0x2fc30275, 0x4c8112f0, 0x468da397, 0xd36bc6f9, 0x8f03e75f, 0x9215959c, 0x6dbfeb7a, 0x5295da59, 0xbed42d83, 0x7458d321, 0xe0492969, 0xc98e44c8, 0xc2756a89, 0x8ef47879, 0x58996b3e, 0xb927dd71, 0xe1beb64f, 0x88f017ad, 0x20c966ac, 0xce7db43a, 0xdf63184a, 0x1ae58231, 0x51976033, 0x5362457f, 0x64b1e077, 0x6bbb84ae, 0x81fe1ca0, 0x8f9942b, 0x48705868, 0x458f19fd, 0xde94876c, 0x7b52b7f8, 0x73ab23d3, 0x4b72e202, 0x1fe3578f, 0x55662aab, 0xebb20728, 0xb52f03c2, 0xc5869a7b, 0x37d3a508, 0x2830f287, 0xbf23b2a5, 0x302ba6a, 0x16ed5c82, 0xcf8a2b1c, 0x79a792b4, 0x7f3f0f2, 0x694ea1e2, 0xda65cdf4, 0x506d5be, 0x34d11f62, 0xa6c48afe, 0x2e349d53, 0xf3a2a055, 0x8a0532e1, 0xf6a475eb, 0x830b39ec, 0x6040aaef, 0x715e069f, 0x6ebd5110, 0x213ef98a, 0xdd963d06, 0x3eddae05, 0xe64d46bd, 0x5491b58d, 0xc471055d, 0x6046fd4, 0x5060ff15, 0x981924fb, 0xbdd697e9, 0x4089cc43, 0xd967779e, 0xe8b0bd42, 0x8907888b, 0x19e7385b, 0xc879dbee, 0x7ca1470a, 0x427ce90f, 0x84f8c91e, 0x0, 0x80098386, 0x2b3248ed, 0x111eac70, 0x5a6c4e72, 0xefdfbff, 0x850f5638, 0xae3d1ed5, 0x2d362739, 0xf0a64d9, 0x5c6821a6, 0x5b9bd154, 0x36243a2e, 0xa0cb167, 0x57930fe7, 0xeeb4d296, 0x9b1b9e91, 0xc0804fc5, 0xdc61a220, 0x775a694b, 0x121c161a, 0x93e20aba, 0xa0c0e52a, 0x223c43e0, 0x1b121d17, 0x90e0b0d, 0x8bf2adc7, 0xb62db9a8, 0x1e14c8a9, 0xf1578519, 0x75af4c07, 0x99eebbdd, 0x7fa3fd60, 0x1f79f26, 0x725cbcf5, 0x6644c53b, 0xfb5b347e, 0x438b7629, 0x23cbdcc6, 0xedb668fc, 0xe4b863f1, 0x31d7cadc, 0x63421085, 0x97134022, 0xc6842011, 0x4a857d24, 0xbbd2f83d, 0xf9ae1132, 0x29c76da1, 0x9e1d4b2f, 0xb2dcf330, 0x860dec52, 0xc177d0e3, 0xb32b6c16, 0x70a999b9, 0x9411fa48, 0xe9472264, 0xfca8c48c, 0xf0a01a3f, 0x7d56d82c, 0x3322ef90, 0x4987c74e, 0x38d9c1d1, 0xca8cfea2, 0xd498360b, 0xf5a6cf81, 0x7aa528de, 0xb7da268e, 0xad3fa4bf, 0x3a2ce49d, 0x78500d92, 0x5f6a9bcc, 0x7e546246, 0x8df6c213, 0xd890e8b8, 0x392e5ef7, 0xc382f5af, 0x5d9fbe80, 0xd0697c93, 0xd56fa92d, 0x25cfb312, 0xacc83b99, 0x1810a77d, 0x9ce86e63, 0x3bdb7bbb, 0x26cd0978, 0x596ef418, 0x9aec01b7, 0x4f83a89a, 0x95e6656e, 0xffaa7ee6, 0xbc2108cf, 0x15efe6e8, 0xe7bad99b, 0x6f4ace36, 0x9fead409, 0xb029d67c, 0xa431afb2, 0x3f2a3123, 0xa5c63094, 0xa235c066, 0x4e7437bc, 0x82fca6ca, 0x90e0b0d0, 0xa73315d8, 0x4f14a98, 0xec41f7da, 0xcd7f0e50, 0x91172ff6, 0x4d768dd6, 0xef434db0, 0xaacc544d, 0x96e4df04, 0xd19ee3b5, 0x6a4c1b88, 0x2cc1b81f, 0x65467f51, 0x5e9d04ea, 0x8c015d35, 0x87fa7374, 0xbfb2e41, 0x67b35a1d, 0xdb9252d2, 0x10e93356, 0xd66d1347, 0xd79a8c61, 0xa1377a0c, 0xf8598e14, 0x13eb893c, 0xa9ceee27, 0x61b735c9, 0x1ce1ede5, 0x477a3cb1, 0xd29c59df, 0xf2553f73, 0x141879ce, 0xc773bf37, 0xf753eacd, 0xfd5f5baa, 0x3ddf146f, 0x447886db, 0xafca81f3, 0x68b93ec4, 0x24382c34, 0xa3c25f40, 0x1d1672c3, 0xe2bc0c25, 0x3c288b49, 0xdff4195, 0xa8397101, 0xc08deb3, 0xb4d89ce4, 0x566490c1, 0xcb7b6184, 0x32d570b6, 0x6c48745c, 0xb8d04257] - @usableFromInline static let T3: Array = [0xc6a56363, 0xf8847c7c, 0xee997777, 0xf68d7b7b, 0xff0df2f2, 0xd6bd6b6b, 0xdeb16f6f, 0x9154c5c5, 0x60503030, 0x2030101, 0xcea96767, 0x567d2b2b, 0xe719fefe, 0xb562d7d7, 0x4de6abab, 0xec9a7676, 0x8f45caca, 0x1f9d8282, 0x8940c9c9, 0xfa877d7d, 0xef15fafa, 0xb2eb5959, 0x8ec94747, 0xfb0bf0f0, 0x41ecadad, 0xb367d4d4, 0x5ffda2a2, 0x45eaafaf, 0x23bf9c9c, 0x53f7a4a4, 0xe4967272, 0x9b5bc0c0, 0x75c2b7b7, 0xe11cfdfd, 0x3dae9393, 0x4c6a2626, 0x6c5a3636, 0x7e413f3f, 0xf502f7f7, 0x834fcccc, 0x685c3434, 0x51f4a5a5, 0xd134e5e5, 0xf908f1f1, 0xe2937171, 0xab73d8d8, 0x62533131, 0x2a3f1515, 0x80c0404, 0x9552c7c7, 0x46652323, 0x9d5ec3c3, 0x30281818, 0x37a19696, 0xa0f0505, 0x2fb59a9a, 0xe090707, 0x24361212, 0x1b9b8080, 0xdf3de2e2, 0xcd26ebeb, 0x4e692727, 0x7fcdb2b2, 0xea9f7575, 0x121b0909, 0x1d9e8383, 0x58742c2c, 0x342e1a1a, 0x362d1b1b, 0xdcb26e6e, 0xb4ee5a5a, 0x5bfba0a0, 0xa4f65252, 0x764d3b3b, 0xb761d6d6, 0x7dceb3b3, 0x527b2929, 0xdd3ee3e3, 0x5e712f2f, 0x13978484, 0xa6f55353, 0xb968d1d1, 0x0, 0xc12ceded, 0x40602020, 0xe31ffcfc, 0x79c8b1b1, 0xb6ed5b5b, 0xd4be6a6a, 0x8d46cbcb, 0x67d9bebe, 0x724b3939, 0x94de4a4a, 0x98d44c4c, 0xb0e85858, 0x854acfcf, 0xbb6bd0d0, 0xc52aefef, 0x4fe5aaaa, 0xed16fbfb, 0x86c54343, 0x9ad74d4d, 0x66553333, 0x11948585, 0x8acf4545, 0xe910f9f9, 0x4060202, 0xfe817f7f, 0xa0f05050, 0x78443c3c, 0x25ba9f9f, 0x4be3a8a8, 0xa2f35151, 0x5dfea3a3, 0x80c04040, 0x58a8f8f, 0x3fad9292, 0x21bc9d9d, 0x70483838, 0xf104f5f5, 0x63dfbcbc, 0x77c1b6b6, 0xaf75dada, 0x42632121, 0x20301010, 0xe51affff, 0xfd0ef3f3, 0xbf6dd2d2, 0x814ccdcd, 0x18140c0c, 0x26351313, 0xc32fecec, 0xbee15f5f, 0x35a29797, 0x88cc4444, 0x2e391717, 0x9357c4c4, 0x55f2a7a7, 0xfc827e7e, 0x7a473d3d, 0xc8ac6464, 0xbae75d5d, 0x322b1919, 0xe6957373, 0xc0a06060, 0x19988181, 0x9ed14f4f, 0xa37fdcdc, 0x44662222, 0x547e2a2a, 0x3bab9090, 0xb838888, 0x8cca4646, 0xc729eeee, 0x6bd3b8b8, 0x283c1414, 0xa779dede, 0xbce25e5e, 0x161d0b0b, 0xad76dbdb, 0xdb3be0e0, 0x64563232, 0x744e3a3a, 0x141e0a0a, 0x92db4949, 0xc0a0606, 0x486c2424, 0xb8e45c5c, 0x9f5dc2c2, 0xbd6ed3d3, 0x43efacac, 0xc4a66262, 0x39a89191, 0x31a49595, 0xd337e4e4, 0xf28b7979, 0xd532e7e7, 0x8b43c8c8, 0x6e593737, 0xdab76d6d, 0x18c8d8d, 0xb164d5d5, 0x9cd24e4e, 0x49e0a9a9, 0xd8b46c6c, 0xacfa5656, 0xf307f4f4, 0xcf25eaea, 0xcaaf6565, 0xf48e7a7a, 0x47e9aeae, 0x10180808, 0x6fd5baba, 0xf0887878, 0x4a6f2525, 0x5c722e2e, 0x38241c1c, 0x57f1a6a6, 0x73c7b4b4, 0x9751c6c6, 0xcb23e8e8, 0xa17cdddd, 0xe89c7474, 0x3e211f1f, 0x96dd4b4b, 0x61dcbdbd, 0xd868b8b, 0xf858a8a, 0xe0907070, 0x7c423e3e, 0x71c4b5b5, 0xccaa6666, 0x90d84848, 0x6050303, 0xf701f6f6, 0x1c120e0e, 0xc2a36161, 0x6a5f3535, 0xaef95757, 0x69d0b9b9, 0x17918686, 0x9958c1c1, 0x3a271d1d, 0x27b99e9e, 0xd938e1e1, 0xeb13f8f8, 0x2bb39898, 0x22331111, 0xd2bb6969, 0xa970d9d9, 0x7898e8e, 0x33a79494, 0x2db69b9b, 0x3c221e1e, 0x15928787, 0xc920e9e9, 0x8749cece, 0xaaff5555, 0x50782828, 0xa57adfdf, 0x38f8c8c, 0x59f8a1a1, 0x9808989, 0x1a170d0d, 0x65dabfbf, 0xd731e6e6, 0x84c64242, 0xd0b86868, 0x82c34141, 0x29b09999, 0x5a772d2d, 0x1e110f0f, 0x7bcbb0b0, 0xa8fc5454, 0x6dd6bbbb, 0x2c3a1616] - @usableFromInline static let T3_INV: Array = [0x5150a7f4, 0x7e536541, 0x1ac3a417, 0x3a965e27, 0x3bcb6bab, 0x1ff1459d, 0xacab58fa, 0x4b9303e3, 0x2055fa30, 0xadf66d76, 0x889176cc, 0xf5254c02, 0x4ffcd7e5, 0xc5d7cb2a, 0x26804435, 0xb58fa362, 0xde495ab1, 0x25671bba, 0x45980eea, 0x5de1c0fe, 0xc302752f, 0x8112f04c, 0x8da39746, 0x6bc6f9d3, 0x3e75f8f, 0x15959c92, 0xbfeb7a6d, 0x95da5952, 0xd42d83be, 0x58d32174, 0x492969e0, 0x8e44c8c9, 0x756a89c2, 0xf478798e, 0x996b3e58, 0x27dd71b9, 0xbeb64fe1, 0xf017ad88, 0xc966ac20, 0x7db43ace, 0x63184adf, 0xe582311a, 0x97603351, 0x62457f53, 0xb1e07764, 0xbb84ae6b, 0xfe1ca081, 0xf9942b08, 0x70586848, 0x8f19fd45, 0x94876cde, 0x52b7f87b, 0xab23d373, 0x72e2024b, 0xe3578f1f, 0x662aab55, 0xb20728eb, 0x2f03c2b5, 0x869a7bc5, 0xd3a50837, 0x30f28728, 0x23b2a5bf, 0x2ba6a03, 0xed5c8216, 0x8a2b1ccf, 0xa792b479, 0xf3f0f207, 0x4ea1e269, 0x65cdf4da, 0x6d5be05, 0xd11f6234, 0xc48afea6, 0x349d532e, 0xa2a055f3, 0x532e18a, 0xa475ebf6, 0xb39ec83, 0x40aaef60, 0x5e069f71, 0xbd51106e, 0x3ef98a21, 0x963d06dd, 0xddae053e, 0x4d46bde6, 0x91b58d54, 0x71055dc4, 0x46fd406, 0x60ff1550, 0x1924fb98, 0xd697e9bd, 0x89cc4340, 0x67779ed9, 0xb0bd42e8, 0x7888b89, 0xe7385b19, 0x79dbeec8, 0xa1470a7c, 0x7ce90f42, 0xf8c91e84, 0x0, 0x9838680, 0x3248ed2b, 0x1eac7011, 0x6c4e725a, 0xfdfbff0e, 0xf563885, 0x3d1ed5ae, 0x3627392d, 0xa64d90f, 0x6821a65c, 0x9bd1545b, 0x243a2e36, 0xcb1670a, 0x930fe757, 0xb4d296ee, 0x1b9e919b, 0x804fc5c0, 0x61a220dc, 0x5a694b77, 0x1c161a12, 0xe20aba93, 0xc0e52aa0, 0x3c43e022, 0x121d171b, 0xe0b0d09, 0xf2adc78b, 0x2db9a8b6, 0x14c8a91e, 0x578519f1, 0xaf4c0775, 0xeebbdd99, 0xa3fd607f, 0xf79f2601, 0x5cbcf572, 0x44c53b66, 0x5b347efb, 0x8b762943, 0xcbdcc623, 0xb668fced, 0xb863f1e4, 0xd7cadc31, 0x42108563, 0x13402297, 0x842011c6, 0x857d244a, 0xd2f83dbb, 0xae1132f9, 0xc76da129, 0x1d4b2f9e, 0xdcf330b2, 0xdec5286, 0x77d0e3c1, 0x2b6c16b3, 0xa999b970, 0x11fa4894, 0x472264e9, 0xa8c48cfc, 0xa01a3ff0, 0x56d82c7d, 0x22ef9033, 0x87c74e49, 0xd9c1d138, 0x8cfea2ca, 0x98360bd4, 0xa6cf81f5, 0xa528de7a, 0xda268eb7, 0x3fa4bfad, 0x2ce49d3a, 0x500d9278, 0x6a9bcc5f, 0x5462467e, 0xf6c2138d, 0x90e8b8d8, 0x2e5ef739, 0x82f5afc3, 0x9fbe805d, 0x697c93d0, 0x6fa92dd5, 0xcfb31225, 0xc83b99ac, 0x10a77d18, 0xe86e639c, 0xdb7bbb3b, 0xcd097826, 0x6ef41859, 0xec01b79a, 0x83a89a4f, 0xe6656e95, 0xaa7ee6ff, 0x2108cfbc, 0xefe6e815, 0xbad99be7, 0x4ace366f, 0xead4099f, 0x29d67cb0, 0x31afb2a4, 0x2a31233f, 0xc63094a5, 0x35c066a2, 0x7437bc4e, 0xfca6ca82, 0xe0b0d090, 0x3315d8a7, 0xf14a9804, 0x41f7daec, 0x7f0e50cd, 0x172ff691, 0x768dd64d, 0x434db0ef, 0xcc544daa, 0xe4df0496, 0x9ee3b5d1, 0x4c1b886a, 0xc1b81f2c, 0x467f5165, 0x9d04ea5e, 0x15d358c, 0xfa737487, 0xfb2e410b, 0xb35a1d67, 0x9252d2db, 0xe9335610, 0x6d1347d6, 0x9a8c61d7, 0x377a0ca1, 0x598e14f8, 0xeb893c13, 0xceee27a9, 0xb735c961, 0xe1ede51c, 0x7a3cb147, 0x9c59dfd2, 0x553f73f2, 0x1879ce14, 0x73bf37c7, 0x53eacdf7, 0x5f5baafd, 0xdf146f3d, 0x7886db44, 0xca81f3af, 0xb93ec468, 0x382c3424, 0xc25f40a3, 0x1672c31d, 0xbc0c25e2, 0x288b493c, 0xff41950d, 0x397101a8, 0x8deb30c, 0xd89ce4b4, 0x6490c156, 0x7b6184cb, 0xd570b632, 0x48745c6c, 0xd04257b8] - @usableFromInline static let U1: Array = [0x0, 0xb0d090e, 0x161a121c, 0x1d171b12, 0x2c342438, 0x27392d36, 0x3a2e3624, 0x31233f2a, 0x58684870, 0x5365417e, 0x4e725a6c, 0x457f5362, 0x745c6c48, 0x7f516546, 0x62467e54, 0x694b775a, 0xb0d090e0, 0xbbdd99ee, 0xa6ca82fc, 0xadc78bf2, 0x9ce4b4d8, 0x97e9bdd6, 0x8afea6c4, 0x81f3afca, 0xe8b8d890, 0xe3b5d19e, 0xfea2ca8c, 0xf5afc382, 0xc48cfca8, 0xcf81f5a6, 0xd296eeb4, 0xd99be7ba, 0x7bbb3bdb, 0x70b632d5, 0x6da129c7, 0x66ac20c9, 0x578f1fe3, 0x5c8216ed, 0x41950dff, 0x4a9804f1, 0x23d373ab, 0x28de7aa5, 0x35c961b7, 0x3ec468b9, 0xfe75793, 0x4ea5e9d, 0x19fd458f, 0x12f04c81, 0xcb6bab3b, 0xc066a235, 0xdd71b927, 0xd67cb029, 0xe75f8f03, 0xec52860d, 0xf1459d1f, 0xfa489411, 0x9303e34b, 0x980eea45, 0x8519f157, 0x8e14f859, 0xbf37c773, 0xb43ace7d, 0xa92dd56f, 0xa220dc61, 0xf66d76ad, 0xfd607fa3, 0xe07764b1, 0xeb7a6dbf, 0xda595295, 0xd1545b9b, 0xcc434089, 0xc74e4987, 0xae053edd, 0xa50837d3, 0xb81f2cc1, 0xb31225cf, 0x82311ae5, 0x893c13eb, 0x942b08f9, 0x9f2601f7, 0x46bde64d, 0x4db0ef43, 0x50a7f451, 0x5baafd5f, 0x6a89c275, 0x6184cb7b, 0x7c93d069, 0x779ed967, 0x1ed5ae3d, 0x15d8a733, 0x8cfbc21, 0x3c2b52f, 0x32e18a05, 0x39ec830b, 0x24fb9819, 0x2ff69117, 0x8dd64d76, 0x86db4478, 0x9bcc5f6a, 0x90c15664, 0xa1e2694e, 0xaaef6040, 0xb7f87b52, 0xbcf5725c, 0xd5be0506, 0xdeb30c08, 0xc3a4171a, 0xc8a91e14, 0xf98a213e, 0xf2872830, 0xef903322, 0xe49d3a2c, 0x3d06dd96, 0x360bd498, 0x2b1ccf8a, 0x2011c684, 0x1132f9ae, 0x1a3ff0a0, 0x728ebb2, 0xc25e2bc, 0x656e95e6, 0x6e639ce8, 0x737487fa, 0x78798ef4, 0x495ab1de, 0x4257b8d0, 0x5f40a3c2, 0x544daacc, 0xf7daec41, 0xfcd7e54f, 0xe1c0fe5d, 0xeacdf753, 0xdbeec879, 0xd0e3c177, 0xcdf4da65, 0xc6f9d36b, 0xafb2a431, 0xa4bfad3f, 0xb9a8b62d, 0xb2a5bf23, 0x83868009, 0x888b8907, 0x959c9215, 0x9e919b1b, 0x470a7ca1, 0x4c0775af, 0x51106ebd, 0x5a1d67b3, 0x6b3e5899, 0x60335197, 0x7d244a85, 0x7629438b, 0x1f6234d1, 0x146f3ddf, 0x97826cd, 0x2752fc3, 0x335610e9, 0x385b19e7, 0x254c02f5, 0x2e410bfb, 0x8c61d79a, 0x876cde94, 0x9a7bc586, 0x9176cc88, 0xa055f3a2, 0xab58faac, 0xb64fe1be, 0xbd42e8b0, 0xd4099fea, 0xdf0496e4, 0xc2138df6, 0xc91e84f8, 0xf83dbbd2, 0xf330b2dc, 0xee27a9ce, 0xe52aa0c0, 0x3cb1477a, 0x37bc4e74, 0x2aab5566, 0x21a65c68, 0x10856342, 0x1b886a4c, 0x69f715e, 0xd927850, 0x64d90f0a, 0x6fd40604, 0x72c31d16, 0x79ce1418, 0x48ed2b32, 0x43e0223c, 0x5ef7392e, 0x55fa3020, 0x1b79aec, 0xaba93e2, 0x17ad88f0, 0x1ca081fe, 0x2d83bed4, 0x268eb7da, 0x3b99acc8, 0x3094a5c6, 0x59dfd29c, 0x52d2db92, 0x4fc5c080, 0x44c8c98e, 0x75ebf6a4, 0x7ee6ffaa, 0x63f1e4b8, 0x68fcedb6, 0xb1670a0c, 0xba6a0302, 0xa77d1810, 0xac70111e, 0x9d532e34, 0x965e273a, 0x8b493c28, 0x80443526, 0xe90f427c, 0xe2024b72, 0xff155060, 0xf418596e, 0xc53b6644, 0xce366f4a, 0xd3217458, 0xd82c7d56, 0x7a0ca137, 0x7101a839, 0x6c16b32b, 0x671bba25, 0x5638850f, 0x5d358c01, 0x40229713, 0x4b2f9e1d, 0x2264e947, 0x2969e049, 0x347efb5b, 0x3f73f255, 0xe50cd7f, 0x55dc471, 0x184adf63, 0x1347d66d, 0xcadc31d7, 0xc1d138d9, 0xdcc623cb, 0xd7cb2ac5, 0xe6e815ef, 0xede51ce1, 0xf0f207f3, 0xfbff0efd, 0x92b479a7, 0x99b970a9, 0x84ae6bbb, 0x8fa362b5, 0xbe805d9f, 0xb58d5491, 0xa89a4f83, 0xa397468d] - @usableFromInline static let U2: Array = [0x0, 0xd090e0b, 0x1a121c16, 0x171b121d, 0x3424382c, 0x392d3627, 0x2e36243a, 0x233f2a31, 0x68487058, 0x65417e53, 0x725a6c4e, 0x7f536245, 0x5c6c4874, 0x5165467f, 0x467e5462, 0x4b775a69, 0xd090e0b0, 0xdd99eebb, 0xca82fca6, 0xc78bf2ad, 0xe4b4d89c, 0xe9bdd697, 0xfea6c48a, 0xf3afca81, 0xb8d890e8, 0xb5d19ee3, 0xa2ca8cfe, 0xafc382f5, 0x8cfca8c4, 0x81f5a6cf, 0x96eeb4d2, 0x9be7bad9, 0xbb3bdb7b, 0xb632d570, 0xa129c76d, 0xac20c966, 0x8f1fe357, 0x8216ed5c, 0x950dff41, 0x9804f14a, 0xd373ab23, 0xde7aa528, 0xc961b735, 0xc468b93e, 0xe757930f, 0xea5e9d04, 0xfd458f19, 0xf04c8112, 0x6bab3bcb, 0x66a235c0, 0x71b927dd, 0x7cb029d6, 0x5f8f03e7, 0x52860dec, 0x459d1ff1, 0x489411fa, 0x3e34b93, 0xeea4598, 0x19f15785, 0x14f8598e, 0x37c773bf, 0x3ace7db4, 0x2dd56fa9, 0x20dc61a2, 0x6d76adf6, 0x607fa3fd, 0x7764b1e0, 0x7a6dbfeb, 0x595295da, 0x545b9bd1, 0x434089cc, 0x4e4987c7, 0x53eddae, 0x837d3a5, 0x1f2cc1b8, 0x1225cfb3, 0x311ae582, 0x3c13eb89, 0x2b08f994, 0x2601f79f, 0xbde64d46, 0xb0ef434d, 0xa7f45150, 0xaafd5f5b, 0x89c2756a, 0x84cb7b61, 0x93d0697c, 0x9ed96777, 0xd5ae3d1e, 0xd8a73315, 0xcfbc2108, 0xc2b52f03, 0xe18a0532, 0xec830b39, 0xfb981924, 0xf691172f, 0xd64d768d, 0xdb447886, 0xcc5f6a9b, 0xc1566490, 0xe2694ea1, 0xef6040aa, 0xf87b52b7, 0xf5725cbc, 0xbe0506d5, 0xb30c08de, 0xa4171ac3, 0xa91e14c8, 0x8a213ef9, 0x872830f2, 0x903322ef, 0x9d3a2ce4, 0x6dd963d, 0xbd49836, 0x1ccf8a2b, 0x11c68420, 0x32f9ae11, 0x3ff0a01a, 0x28ebb207, 0x25e2bc0c, 0x6e95e665, 0x639ce86e, 0x7487fa73, 0x798ef478, 0x5ab1de49, 0x57b8d042, 0x40a3c25f, 0x4daacc54, 0xdaec41f7, 0xd7e54ffc, 0xc0fe5de1, 0xcdf753ea, 0xeec879db, 0xe3c177d0, 0xf4da65cd, 0xf9d36bc6, 0xb2a431af, 0xbfad3fa4, 0xa8b62db9, 0xa5bf23b2, 0x86800983, 0x8b890788, 0x9c921595, 0x919b1b9e, 0xa7ca147, 0x775af4c, 0x106ebd51, 0x1d67b35a, 0x3e58996b, 0x33519760, 0x244a857d, 0x29438b76, 0x6234d11f, 0x6f3ddf14, 0x7826cd09, 0x752fc302, 0x5610e933, 0x5b19e738, 0x4c02f525, 0x410bfb2e, 0x61d79a8c, 0x6cde9487, 0x7bc5869a, 0x76cc8891, 0x55f3a2a0, 0x58faacab, 0x4fe1beb6, 0x42e8b0bd, 0x99fead4, 0x496e4df, 0x138df6c2, 0x1e84f8c9, 0x3dbbd2f8, 0x30b2dcf3, 0x27a9ceee, 0x2aa0c0e5, 0xb1477a3c, 0xbc4e7437, 0xab55662a, 0xa65c6821, 0x85634210, 0x886a4c1b, 0x9f715e06, 0x9278500d, 0xd90f0a64, 0xd406046f, 0xc31d1672, 0xce141879, 0xed2b3248, 0xe0223c43, 0xf7392e5e, 0xfa302055, 0xb79aec01, 0xba93e20a, 0xad88f017, 0xa081fe1c, 0x83bed42d, 0x8eb7da26, 0x99acc83b, 0x94a5c630, 0xdfd29c59, 0xd2db9252, 0xc5c0804f, 0xc8c98e44, 0xebf6a475, 0xe6ffaa7e, 0xf1e4b863, 0xfcedb668, 0x670a0cb1, 0x6a0302ba, 0x7d1810a7, 0x70111eac, 0x532e349d, 0x5e273a96, 0x493c288b, 0x44352680, 0xf427ce9, 0x24b72e2, 0x155060ff, 0x18596ef4, 0x3b6644c5, 0x366f4ace, 0x217458d3, 0x2c7d56d8, 0xca1377a, 0x1a83971, 0x16b32b6c, 0x1bba2567, 0x38850f56, 0x358c015d, 0x22971340, 0x2f9e1d4b, 0x64e94722, 0x69e04929, 0x7efb5b34, 0x73f2553f, 0x50cd7f0e, 0x5dc47105, 0x4adf6318, 0x47d66d13, 0xdc31d7ca, 0xd138d9c1, 0xc623cbdc, 0xcb2ac5d7, 0xe815efe6, 0xe51ce1ed, 0xf207f3f0, 0xff0efdfb, 0xb479a792, 0xb970a999, 0xae6bbb84, 0xa362b58f, 0x805d9fbe, 0x8d5491b5, 0x9a4f83a8, 0x97468da3] - @usableFromInline static let U3: Array = [0x0, 0x90e0b0d, 0x121c161a, 0x1b121d17, 0x24382c34, 0x2d362739, 0x36243a2e, 0x3f2a3123, 0x48705868, 0x417e5365, 0x5a6c4e72, 0x5362457f, 0x6c48745c, 0x65467f51, 0x7e546246, 0x775a694b, 0x90e0b0d0, 0x99eebbdd, 0x82fca6ca, 0x8bf2adc7, 0xb4d89ce4, 0xbdd697e9, 0xa6c48afe, 0xafca81f3, 0xd890e8b8, 0xd19ee3b5, 0xca8cfea2, 0xc382f5af, 0xfca8c48c, 0xf5a6cf81, 0xeeb4d296, 0xe7bad99b, 0x3bdb7bbb, 0x32d570b6, 0x29c76da1, 0x20c966ac, 0x1fe3578f, 0x16ed5c82, 0xdff4195, 0x4f14a98, 0x73ab23d3, 0x7aa528de, 0x61b735c9, 0x68b93ec4, 0x57930fe7, 0x5e9d04ea, 0x458f19fd, 0x4c8112f0, 0xab3bcb6b, 0xa235c066, 0xb927dd71, 0xb029d67c, 0x8f03e75f, 0x860dec52, 0x9d1ff145, 0x9411fa48, 0xe34b9303, 0xea45980e, 0xf1578519, 0xf8598e14, 0xc773bf37, 0xce7db43a, 0xd56fa92d, 0xdc61a220, 0x76adf66d, 0x7fa3fd60, 0x64b1e077, 0x6dbfeb7a, 0x5295da59, 0x5b9bd154, 0x4089cc43, 0x4987c74e, 0x3eddae05, 0x37d3a508, 0x2cc1b81f, 0x25cfb312, 0x1ae58231, 0x13eb893c, 0x8f9942b, 0x1f79f26, 0xe64d46bd, 0xef434db0, 0xf45150a7, 0xfd5f5baa, 0xc2756a89, 0xcb7b6184, 0xd0697c93, 0xd967779e, 0xae3d1ed5, 0xa73315d8, 0xbc2108cf, 0xb52f03c2, 0x8a0532e1, 0x830b39ec, 0x981924fb, 0x91172ff6, 0x4d768dd6, 0x447886db, 0x5f6a9bcc, 0x566490c1, 0x694ea1e2, 0x6040aaef, 0x7b52b7f8, 0x725cbcf5, 0x506d5be, 0xc08deb3, 0x171ac3a4, 0x1e14c8a9, 0x213ef98a, 0x2830f287, 0x3322ef90, 0x3a2ce49d, 0xdd963d06, 0xd498360b, 0xcf8a2b1c, 0xc6842011, 0xf9ae1132, 0xf0a01a3f, 0xebb20728, 0xe2bc0c25, 0x95e6656e, 0x9ce86e63, 0x87fa7374, 0x8ef47879, 0xb1de495a, 0xb8d04257, 0xa3c25f40, 0xaacc544d, 0xec41f7da, 0xe54ffcd7, 0xfe5de1c0, 0xf753eacd, 0xc879dbee, 0xc177d0e3, 0xda65cdf4, 0xd36bc6f9, 0xa431afb2, 0xad3fa4bf, 0xb62db9a8, 0xbf23b2a5, 0x80098386, 0x8907888b, 0x9215959c, 0x9b1b9e91, 0x7ca1470a, 0x75af4c07, 0x6ebd5110, 0x67b35a1d, 0x58996b3e, 0x51976033, 0x4a857d24, 0x438b7629, 0x34d11f62, 0x3ddf146f, 0x26cd0978, 0x2fc30275, 0x10e93356, 0x19e7385b, 0x2f5254c, 0xbfb2e41, 0xd79a8c61, 0xde94876c, 0xc5869a7b, 0xcc889176, 0xf3a2a055, 0xfaacab58, 0xe1beb64f, 0xe8b0bd42, 0x9fead409, 0x96e4df04, 0x8df6c213, 0x84f8c91e, 0xbbd2f83d, 0xb2dcf330, 0xa9ceee27, 0xa0c0e52a, 0x477a3cb1, 0x4e7437bc, 0x55662aab, 0x5c6821a6, 0x63421085, 0x6a4c1b88, 0x715e069f, 0x78500d92, 0xf0a64d9, 0x6046fd4, 0x1d1672c3, 0x141879ce, 0x2b3248ed, 0x223c43e0, 0x392e5ef7, 0x302055fa, 0x9aec01b7, 0x93e20aba, 0x88f017ad, 0x81fe1ca0, 0xbed42d83, 0xb7da268e, 0xacc83b99, 0xa5c63094, 0xd29c59df, 0xdb9252d2, 0xc0804fc5, 0xc98e44c8, 0xf6a475eb, 0xffaa7ee6, 0xe4b863f1, 0xedb668fc, 0xa0cb167, 0x302ba6a, 0x1810a77d, 0x111eac70, 0x2e349d53, 0x273a965e, 0x3c288b49, 0x35268044, 0x427ce90f, 0x4b72e202, 0x5060ff15, 0x596ef418, 0x6644c53b, 0x6f4ace36, 0x7458d321, 0x7d56d82c, 0xa1377a0c, 0xa8397101, 0xb32b6c16, 0xba25671b, 0x850f5638, 0x8c015d35, 0x97134022, 0x9e1d4b2f, 0xe9472264, 0xe0492969, 0xfb5b347e, 0xf2553f73, 0xcd7f0e50, 0xc471055d, 0xdf63184a, 0xd66d1347, 0x31d7cadc, 0x38d9c1d1, 0x23cbdcc6, 0x2ac5d7cb, 0x15efe6e8, 0x1ce1ede5, 0x7f3f0f2, 0xefdfbff, 0x79a792b4, 0x70a999b9, 0x6bbb84ae, 0x62b58fa3, 0x5d9fbe80, 0x5491b58d, 0x4f83a89a, 0x468da397] - @usableFromInline static let U4: Array = [0x0, 0xe0b0d09, 0x1c161a12, 0x121d171b, 0x382c3424, 0x3627392d, 0x243a2e36, 0x2a31233f, 0x70586848, 0x7e536541, 0x6c4e725a, 0x62457f53, 0x48745c6c, 0x467f5165, 0x5462467e, 0x5a694b77, 0xe0b0d090, 0xeebbdd99, 0xfca6ca82, 0xf2adc78b, 0xd89ce4b4, 0xd697e9bd, 0xc48afea6, 0xca81f3af, 0x90e8b8d8, 0x9ee3b5d1, 0x8cfea2ca, 0x82f5afc3, 0xa8c48cfc, 0xa6cf81f5, 0xb4d296ee, 0xbad99be7, 0xdb7bbb3b, 0xd570b632, 0xc76da129, 0xc966ac20, 0xe3578f1f, 0xed5c8216, 0xff41950d, 0xf14a9804, 0xab23d373, 0xa528de7a, 0xb735c961, 0xb93ec468, 0x930fe757, 0x9d04ea5e, 0x8f19fd45, 0x8112f04c, 0x3bcb6bab, 0x35c066a2, 0x27dd71b9, 0x29d67cb0, 0x3e75f8f, 0xdec5286, 0x1ff1459d, 0x11fa4894, 0x4b9303e3, 0x45980eea, 0x578519f1, 0x598e14f8, 0x73bf37c7, 0x7db43ace, 0x6fa92dd5, 0x61a220dc, 0xadf66d76, 0xa3fd607f, 0xb1e07764, 0xbfeb7a6d, 0x95da5952, 0x9bd1545b, 0x89cc4340, 0x87c74e49, 0xddae053e, 0xd3a50837, 0xc1b81f2c, 0xcfb31225, 0xe582311a, 0xeb893c13, 0xf9942b08, 0xf79f2601, 0x4d46bde6, 0x434db0ef, 0x5150a7f4, 0x5f5baafd, 0x756a89c2, 0x7b6184cb, 0x697c93d0, 0x67779ed9, 0x3d1ed5ae, 0x3315d8a7, 0x2108cfbc, 0x2f03c2b5, 0x532e18a, 0xb39ec83, 0x1924fb98, 0x172ff691, 0x768dd64d, 0x7886db44, 0x6a9bcc5f, 0x6490c156, 0x4ea1e269, 0x40aaef60, 0x52b7f87b, 0x5cbcf572, 0x6d5be05, 0x8deb30c, 0x1ac3a417, 0x14c8a91e, 0x3ef98a21, 0x30f28728, 0x22ef9033, 0x2ce49d3a, 0x963d06dd, 0x98360bd4, 0x8a2b1ccf, 0x842011c6, 0xae1132f9, 0xa01a3ff0, 0xb20728eb, 0xbc0c25e2, 0xe6656e95, 0xe86e639c, 0xfa737487, 0xf478798e, 0xde495ab1, 0xd04257b8, 0xc25f40a3, 0xcc544daa, 0x41f7daec, 0x4ffcd7e5, 0x5de1c0fe, 0x53eacdf7, 0x79dbeec8, 0x77d0e3c1, 0x65cdf4da, 0x6bc6f9d3, 0x31afb2a4, 0x3fa4bfad, 0x2db9a8b6, 0x23b2a5bf, 0x9838680, 0x7888b89, 0x15959c92, 0x1b9e919b, 0xa1470a7c, 0xaf4c0775, 0xbd51106e, 0xb35a1d67, 0x996b3e58, 0x97603351, 0x857d244a, 0x8b762943, 0xd11f6234, 0xdf146f3d, 0xcd097826, 0xc302752f, 0xe9335610, 0xe7385b19, 0xf5254c02, 0xfb2e410b, 0x9a8c61d7, 0x94876cde, 0x869a7bc5, 0x889176cc, 0xa2a055f3, 0xacab58fa, 0xbeb64fe1, 0xb0bd42e8, 0xead4099f, 0xe4df0496, 0xf6c2138d, 0xf8c91e84, 0xd2f83dbb, 0xdcf330b2, 0xceee27a9, 0xc0e52aa0, 0x7a3cb147, 0x7437bc4e, 0x662aab55, 0x6821a65c, 0x42108563, 0x4c1b886a, 0x5e069f71, 0x500d9278, 0xa64d90f, 0x46fd406, 0x1672c31d, 0x1879ce14, 0x3248ed2b, 0x3c43e022, 0x2e5ef739, 0x2055fa30, 0xec01b79a, 0xe20aba93, 0xf017ad88, 0xfe1ca081, 0xd42d83be, 0xda268eb7, 0xc83b99ac, 0xc63094a5, 0x9c59dfd2, 0x9252d2db, 0x804fc5c0, 0x8e44c8c9, 0xa475ebf6, 0xaa7ee6ff, 0xb863f1e4, 0xb668fced, 0xcb1670a, 0x2ba6a03, 0x10a77d18, 0x1eac7011, 0x349d532e, 0x3a965e27, 0x288b493c, 0x26804435, 0x7ce90f42, 0x72e2024b, 0x60ff1550, 0x6ef41859, 0x44c53b66, 0x4ace366f, 0x58d32174, 0x56d82c7d, 0x377a0ca1, 0x397101a8, 0x2b6c16b3, 0x25671bba, 0xf563885, 0x15d358c, 0x13402297, 0x1d4b2f9e, 0x472264e9, 0x492969e0, 0x5b347efb, 0x553f73f2, 0x7f0e50cd, 0x71055dc4, 0x63184adf, 0x6d1347d6, 0xd7cadc31, 0xd9c1d138, 0xcbdcc623, 0xc5d7cb2a, 0xefe6e815, 0xe1ede51c, 0xf3f0f207, 0xfdfbff0e, 0xa792b479, 0xa999b970, 0xbb84ae6b, 0xb58fa362, 0x9fbe805d, 0x91b58d54, 0x83a89a4f, 0x8da39746] - - /// Initialize AES with variant calculated out of key length: - /// - 16 bytes (AES-128) - /// - 24 bytes (AES-192) - /// - 32 bytes (AES-256) - /// - /// - parameter key: Key. Length of the key decides on AES variant. - /// - parameter iv: Initialization Vector (Optional for some blockMode values) - /// - parameter blockMode: Cipher mode of operation - /// - parameter padding: Padding method. .pkcs7, .noPadding, .zeroPadding, ... - /// - /// - throws: AES.Error - /// - /// - returns: Instance - public init(key: Array, blockMode: BlockMode, padding: Padding = .pkcs7) throws { - self.key = Key(bytes: key) - self.blockMode = blockMode - self.padding = padding - self.keySize = self.key.count - - // Validate key size - switch self.keySize * 8 { - case 128: - self.variant = .aes128 - case 192: - self.variant = .aes192 - case 256: - self.variant = .aes256 - default: - throw Error.invalidKeySize - } - - self.variantNb = self.variant.Nb - self.variantNk = self.variant.Nk - self.variantNr = self.variant.Nr - } - - @inlinable - internal func encrypt(block: ArraySlice) -> Array? { - if self.blockMode.options.contains(.paddingRequired) && block.count != AES.blockSize { - return Array(block) - } - - let rounds = self.variantNr - let rk = self.expandedKey - - let b00 = UInt32(block[block.startIndex.advanced(by: 0)]) - let b01 = UInt32(block[block.startIndex.advanced(by: 1)]) << 8 - let b02 = UInt32(block[block.startIndex.advanced(by: 2)]) << 16 - let b03 = UInt32(block[block.startIndex.advanced(by: 3)]) << 24 - var b0 = b00 | b01 | b02 | b03 - - let b10 = UInt32(block[block.startIndex.advanced(by: 4)]) - let b11 = UInt32(block[block.startIndex.advanced(by: 5)]) << 8 - let b12 = UInt32(block[block.startIndex.advanced(by: 6)]) << 16 - let b13 = UInt32(block[block.startIndex.advanced(by: 7)]) << 24 - var b1 = b10 | b11 | b12 | b13 - - let b20 = UInt32(block[block.startIndex.advanced(by: 8)]) - let b21 = UInt32(block[block.startIndex.advanced(by: 9)]) << 8 - let b22 = UInt32(block[block.startIndex.advanced(by: 10)]) << 16 - let b23 = UInt32(block[block.startIndex.advanced(by: 11)]) << 24 - var b2 = b20 | b21 | b22 | b23 - - let b30 = UInt32(block[block.startIndex.advanced(by: 12)]) - let b31 = UInt32(block[block.startIndex.advanced(by: 13)]) << 8 - let b32 = UInt32(block[block.startIndex.advanced(by: 14)]) << 16 - let b33 = UInt32(block[block.startIndex.advanced(by: 15)]) << 24 - var b3 = b30 | b31 | b32 | b33 - - let tLength = 4 - let t = UnsafeMutablePointer.allocate(capacity: tLength) - t.initialize(repeating: 0, count: tLength) - defer { - t.deinitialize(count: tLength) - t.deallocate() - } - - for r in 0..> 8) & 0xff)] - let lb02 = AES.T2[Int((t[2] >> 16) & 0xff)] - let lb03 = AES.T3[Int(t[3] >> 24)] - b0 = lb00 ^ lb01 ^ lb02 ^ lb03 - - let lb10 = AES.T0[Int(t[1] & 0xff)] - let lb11 = AES.T1[Int((t[2] >> 8) & 0xff)] - let lb12 = AES.T2[Int((t[3] >> 16) & 0xff)] - let lb13 = AES.T3[Int(t[0] >> 24)] - b1 = lb10 ^ lb11 ^ lb12 ^ lb13 - - let lb20 = AES.T0[Int(t[2] & 0xff)] - let lb21 = AES.T1[Int((t[3] >> 8) & 0xff)] - let lb22 = AES.T2[Int((t[0] >> 16) & 0xff)] - let lb23 = AES.T3[Int(t[1] >> 24)] - b2 = lb20 ^ lb21 ^ lb22 ^ lb23 - - let lb30 = AES.T0[Int(t[3] & 0xff)] - let lb31 = AES.T1[Int((t[0] >> 8) & 0xff)] - let lb32 = AES.T2[Int((t[1] >> 16) & 0xff)] - let lb33 = AES.T3[Int(t[2] >> 24)] - b3 = lb30 ^ lb31 ^ lb32 ^ lb33 - } - - // last round - let r = rounds - 1 - - t[0] = b0 ^ rk[r][0] - t[1] = b1 ^ rk[r][1] - t[2] = b2 ^ rk[r][2] - t[3] = b3 ^ rk[r][3] - - // rounds - b0 = F1(t[0], t[1], t[2], t[3]) ^ rk[rounds][0] - b1 = F1(t[1], t[2], t[3], t[0]) ^ rk[rounds][1] - b2 = F1(t[2], t[3], t[0], t[1]) ^ rk[rounds][2] - b3 = F1(t[3], t[0], t[1], t[2]) ^ rk[rounds][3] - - let encrypted: Array = [ - UInt8(b0 & 0xff), UInt8((b0 >> 8) & 0xff), UInt8((b0 >> 16) & 0xff), UInt8((b0 >> 24) & 0xff), - UInt8(b1 & 0xff), UInt8((b1 >> 8) & 0xff), UInt8((b1 >> 16) & 0xff), UInt8((b1 >> 24) & 0xff), - UInt8(b2 & 0xff), UInt8((b2 >> 8) & 0xff), UInt8((b2 >> 16) & 0xff), UInt8((b2 >> 24) & 0xff), - UInt8(b3 & 0xff), UInt8((b3 >> 8) & 0xff), UInt8((b3 >> 16) & 0xff), UInt8((b3 >> 24) & 0xff) - ] - return encrypted - } - - @usableFromInline - internal func decrypt(block: ArraySlice) -> Array? { - if self.blockMode.options.contains(.paddingRequired) && block.count != AES.blockSize { - return Array(block) - } - - let rounds = self.variantNr - let rk = self.expandedKeyInv - - // Save miliseconds by not using `block.toUInt32Array()` - let b00 = UInt32(block[block.startIndex.advanced(by: 0)]) - let b01 = UInt32(block[block.startIndex.advanced(by: 1)]) << 8 - let b02 = UInt32(block[block.startIndex.advanced(by: 2)]) << 16 - let b03 = UInt32(block[block.startIndex.advanced(by: 3)]) << 24 - var b0 = b00 | b01 | b02 | b03 - - let b10 = UInt32(block[block.startIndex.advanced(by: 4)]) - let b11 = UInt32(block[block.startIndex.advanced(by: 5)]) << 8 - let b12 = UInt32(block[block.startIndex.advanced(by: 6)]) << 16 - let b13 = UInt32(block[block.startIndex.advanced(by: 7)]) << 24 - var b1 = b10 | b11 | b12 | b13 - - let b20 = UInt32(block[block.startIndex.advanced(by: 8)]) - let b21 = UInt32(block[block.startIndex.advanced(by: 9)]) << 8 - let b22 = UInt32(block[block.startIndex.advanced(by: 10)]) << 16 - let b23 = UInt32(block[block.startIndex.advanced(by: 11)]) << 24 - var b2 = b20 | b21 | b22 | b23 - - let b30 = UInt32(block[block.startIndex.advanced(by: 12)]) - let b31 = UInt32(block[block.startIndex.advanced(by: 13)]) << 8 - let b32 = UInt32(block[block.startIndex.advanced(by: 14)]) << 16 - let b33 = UInt32(block[block.startIndex.advanced(by: 15)]) << 24 - var b3 = b30 | b31 | b32 | b33 - - let tLength = 4 - let t = UnsafeMutablePointer.allocate(capacity: tLength) - t.initialize(repeating: 0, count: tLength) - defer { - t.deinitialize(count: tLength) - t.deallocate() - } - - for r in (2...rounds).reversed() { - t[0] = b0 ^ rk[r][0] - t[1] = b1 ^ rk[r][1] - t[2] = b2 ^ rk[r][2] - t[3] = b3 ^ rk[r][3] - - let b00 = AES.T0_INV[Int(t[0] & 0xff)] - let b01 = AES.T1_INV[Int((t[3] >> 8) & 0xff)] - let b02 = AES.T2_INV[Int((t[2] >> 16) & 0xff)] - let b03 = AES.T3_INV[Int(t[1] >> 24)] - b0 = b00 ^ b01 ^ b02 ^ b03 - - let b10 = AES.T0_INV[Int(t[1] & 0xff)] - let b11 = AES.T1_INV[Int((t[0] >> 8) & 0xff)] - let b12 = AES.T2_INV[Int((t[3] >> 16) & 0xff)] - let b13 = AES.T3_INV[Int(t[2] >> 24)] - b1 = b10 ^ b11 ^ b12 ^ b13 - - let b20 = AES.T0_INV[Int(t[2] & 0xff)] - let b21 = AES.T1_INV[Int((t[1] >> 8) & 0xff)] - let b22 = AES.T2_INV[Int((t[0] >> 16) & 0xff)] - let b23 = AES.T3_INV[Int(t[3] >> 24)] - b2 = b20 ^ b21 ^ b22 ^ b23 - - let b30 = AES.T0_INV[Int(t[3] & 0xff)] - let b31 = AES.T1_INV[Int((t[2] >> 8) & 0xff)] - let b32 = AES.T2_INV[Int((t[1] >> 16) & 0xff)] - let b33 = AES.T3_INV[Int(t[0] >> 24)] - b3 = b30 ^ b31 ^ b32 ^ b33 - } - - // last round - t[0] = b0 ^ rk[1][0] - t[1] = b1 ^ rk[1][1] - t[2] = b2 ^ rk[1][2] - t[3] = b3 ^ rk[1][3] - - // rounds - - let lb00 = self.sBoxInv[Int(B0(t[0]))] - let lb01 = (sBoxInv[Int(B1(t[3]))] << 8) - let lb02 = (sBoxInv[Int(B2(t[2]))] << 16) - let lb03 = (sBoxInv[Int(B3(t[1]))] << 24) - b0 = lb00 | lb01 | lb02 | lb03 ^ rk[0][0] - - let lb10 = self.sBoxInv[Int(B0(t[1]))] - let lb11 = (sBoxInv[Int(B1(t[0]))] << 8) - let lb12 = (sBoxInv[Int(B2(t[3]))] << 16) - let lb13 = (sBoxInv[Int(B3(t[2]))] << 24) - b1 = lb10 | lb11 | lb12 | lb13 ^ rk[0][1] - - let lb20 = self.sBoxInv[Int(B0(t[2]))] - let lb21 = (sBoxInv[Int(B1(t[1]))] << 8) - let lb22 = (sBoxInv[Int(B2(t[0]))] << 16) - let lb23 = (sBoxInv[Int(B3(t[3]))] << 24) - b2 = lb20 | lb21 | lb22 | lb23 ^ rk[0][2] - - let lb30 = self.sBoxInv[Int(B0(t[3]))] - let lb31 = (sBoxInv[Int(B1(t[2]))] << 8) - let lb32 = (sBoxInv[Int(B2(t[1]))] << 16) - let lb33 = (sBoxInv[Int(B3(t[0]))] << 24) - b3 = lb30 | lb31 | lb32 | lb33 ^ rk[0][3] - - let result: Array = [ - UInt8(b0 & 0xff), UInt8((b0 >> 8) & 0xff), UInt8((b0 >> 16) & 0xff), UInt8((b0 >> 24) & 0xff), - UInt8(b1 & 0xff), UInt8((b1 >> 8) & 0xff), UInt8((b1 >> 16) & 0xff), UInt8((b1 >> 24) & 0xff), - UInt8(b2 & 0xff), UInt8((b2 >> 8) & 0xff), UInt8((b2 >> 16) & 0xff), UInt8((b2 >> 24) & 0xff), - UInt8(b3 & 0xff), UInt8((b3 >> 8) & 0xff), UInt8((b3 >> 16) & 0xff), UInt8((b3 >> 24) & 0xff) - ] - return result - } -} - -extension AES { - private func expandKeyInv(_ key: Key, variant: Variant) -> Array> { - let rounds = self.variantNr - var rk2: Array> = self.expandKey(key, variant: variant) - - for r in 1.. Array> { - func convertExpandedKey(_ expanded: Array) -> Array> { - expanded.batched(by: 4).map({ UInt32(bytes: $0.reversed()) }).batched(by: 4).map { Array($0) } - } - - /* - * Function used in the Key Expansion routine that takes a four-byte - * input word and applies an S-box to each of the four bytes to - * produce an output word. - */ - func subWord(_ word: Array) -> Array { - precondition(word.count == 4) - - var result = word - for i in 0..<4 { - result[i] = UInt8(self.sBox[Int(word[i])]) - } - return result - } - - @inline(__always) - func subWordInPlace(_ word: inout Array) { - precondition(word.count == 4) - word[0] = UInt8(self.sBox[Int(word[0])]) - word[1] = UInt8(self.sBox[Int(word[1])]) - word[2] = UInt8(self.sBox[Int(word[2])]) - word[3] = UInt8(self.sBox[Int(word[3])]) - } - - let wLength = self.variantNb * (self.variantNr + 1) * 4 - let w = UnsafeMutablePointer.allocate(capacity: wLength) - w.initialize(repeating: 0, count: wLength) - defer { - w.deinitialize(count: wLength) - w.deallocate() - } - - for i in 0.. - - for i in self.variantNk..(repeating: 0, count: 4) - - for wordIdx in 0..<4 { - tmp[wordIdx] = w[4 * (i - 1) + wordIdx] - } - if (i % self.variantNk) == 0 { - tmp = subWord(rotateLeft(UInt32(bytes: tmp), by: 8).bytes(totalBytes: 4)) - tmp[0] = tmp.first! ^ AES.Rcon[i / variantNk] - } else if self.variantNk > 6 && (i % self.variantNk) == 4 { - subWordInPlace(&tmp) - } - - // xor array of bytes - for wordIdx in 0..<4 { - w[4 * i + wordIdx] = w[4 * (i - variantNk) + wordIdx] ^ tmp[wordIdx] - } - } - return convertExpandedKey(Array(UnsafeBufferPointer(start: w, count: wLength))) - } - - @inline(__always) - private func B0(_ x: UInt32) -> UInt32 { - x & 0xff - } - - @inline(__always) - private func B1(_ x: UInt32) -> UInt32 { - (x >> 8) & 0xff - } - - @inline(__always) - private func B2(_ x: UInt32) -> UInt32 { - (x >> 16) & 0xff - } - - @inline(__always) - private func B3(_ x: UInt32) -> UInt32 { - (x >> 24) & 0xff - } - - @inline(__always) @usableFromInline - internal func F1(_ x0: UInt32, _ x1: UInt32, _ x2: UInt32, _ x3: UInt32) -> UInt32 { - var result: UInt32 = 0 - result |= UInt32(self.B1(AES.T0[Int(x0 & 255)])) - result |= UInt32(self.B1(AES.T0[Int((x1 >> 8) & 255)])) << 8 - result |= UInt32(self.B1(AES.T0[Int((x2 >> 16) & 255)])) << 16 - result |= UInt32(self.B1(AES.T0[Int(x3 >> 24)])) << 24 - return result - } - - private func calculateSBox() -> (sBox: Array, invSBox: Array) { - let sboxLength = 256 - let sbox = UnsafeMutablePointer.allocate(capacity: sboxLength) - let invsbox = UnsafeMutablePointer.allocate(capacity: sboxLength) - sbox.initialize(repeating: 0, count: sboxLength) - invsbox.initialize(repeating: 0, count: sboxLength) - defer { - sbox.deinitialize(count: sboxLength) - sbox.deallocate() - invsbox.deinitialize(count: sboxLength) - invsbox.deallocate() - } - - sbox[0] = 0x63 - - var p: UInt8 = 1, q: UInt8 = 1 - - repeat { - p = p ^ (UInt8(truncatingIfNeeded: Int(p) << 1) ^ ((p & 0x80) == 0x80 ? 0x1b : 0)) - q ^= q << 1 - q ^= q << 2 - q ^= q << 4 - q ^= (q & 0x80) == 0x80 ? 0x09 : 0 - - let s = 0x63 ^ q ^ rotateLeft(q, by: 1) ^ rotateLeft(q, by: 2) ^ rotateLeft(q, by: 3) ^ rotateLeft(q, by: 4) - - sbox[Int(p)] = UInt32(s) - invsbox[Int(s)] = UInt32(p) - } while p != 1 - - return (sBox: Array(UnsafeBufferPointer(start: sbox, count: sboxLength)), invSBox: Array(UnsafeBufferPointer(start: invsbox, count: sboxLength))) - } -} - -// MARK: Cipher - -extension AES: Cipher { - @inlinable - public func encrypt(_ bytes: ArraySlice) throws -> Array { - let blockSize = self.blockMode.customBlockSize ?? AES.blockSize - let chunks = bytes.batched(by: blockSize) - - var oneTimeCryptor = try makeEncryptor() - var out = Array(reserveCapacity: bytes.count) - for chunk in chunks { - out += try oneTimeCryptor.update(withBytes: chunk, isLast: false) - } - // Padding may be added at the very end - out += try oneTimeCryptor.finish() - - if self.blockMode.options.contains(.paddingRequired) && (out.count % AES.blockSize != 0) { - throw Error.dataPaddingRequired - } - - return out - } - - @inlinable - public func decrypt(_ bytes: ArraySlice) throws -> Array { - if self.blockMode.options.contains(.paddingRequired) && (bytes.count % AES.blockSize != 0) { - throw Error.dataPaddingRequired - } - - var oneTimeCryptor = try makeDecryptor() - let chunks = bytes.batched(by: AES.blockSize) - if chunks.isEmpty { - throw Error.invalidData - } - - var out = Array(reserveCapacity: bytes.count) - - var lastIdx = chunks.startIndex - chunks.indices.formIndex(&lastIdx, offsetBy: chunks.count - 1) - - // To properly remove padding, `isLast` has to be known when called with the last chunk of ciphertext - // Last chunk of ciphertext may contains padded data so next call to update(..) won't be able to remove it - for idx in chunks.indices { - out += try oneTimeCryptor.update(withBytes: chunks[idx], isLast: idx == lastIdx) - } - return out - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Array+Extension.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Array+Extension.swift deleted file mode 100644 index 6ae3601a7..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Array+Extension.swift +++ /dev/null @@ -1,150 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -extension Array { - @inlinable - init(reserveCapacity: Int) { - self = Array() - self.reserveCapacity(reserveCapacity) - } - - @inlinable - var slice: ArraySlice { - self[self.startIndex ..< self.endIndex] - } -} - -extension Array where Element == UInt8 { - public init(hex: String) { - self.init(reserveCapacity: hex.unicodeScalars.lazy.underestimatedCount) - var buffer: UInt8? - var skip = hex.hasPrefix("0x") ? 2 : 0 - for char in hex.unicodeScalars.lazy { - guard skip == 0 else { - skip -= 1 - continue - } - guard char.value >= 48 && char.value <= 102 else { - removeAll() - return - } - let v: UInt8 - let c: UInt8 = UInt8(char.value) - switch c { - case let c where c <= 57: - v = c - 48 - case let c where c >= 65 && c <= 70: - v = c - 55 - case let c where c >= 97: - v = c - 87 - default: - removeAll() - return - } - if let b = buffer { - append(b << 4 | v) - buffer = nil - } else { - buffer = v - } - } - if let b = buffer { - append(b) - } - } - - public func toHexString() -> String { - `lazy`.reduce(into: "") { - var s = String($1, radix: 16) - if s.count == 1 { - s = "0" + s - } - $0 += s - } - } -} - -extension Array where Element == UInt8 { - /// split in chunks with given chunk size - @available(*, deprecated) - public func chunks(size chunksize: Int) -> Array> { - var words = Array>() - words.reserveCapacity(count / chunksize) - for idx in stride(from: chunksize, through: count, by: chunksize) { - words.append(Array(self[idx - chunksize ..< idx])) // slow for large table - } - let remainder = suffix(count % chunksize) - if !remainder.isEmpty { - words.append(Array(remainder)) - } - return words - } - - public func md5() -> [Element] { - Digest.md5(self) - } - - public func sha1() -> [Element] { - Digest.sha1(self) - } - - public func sha224() -> [Element] { - Digest.sha224(self) - } - - public func sha256() -> [Element] { - Digest.sha256(self) - } - - public func sha384() -> [Element] { - Digest.sha384(self) - } - - public func sha512() -> [Element] { - Digest.sha512(self) - } - - public func sha2(_ variant: SHA2.Variant) -> [Element] { - Digest.sha2(self, variant: variant) - } - - public func sha3(_ variant: SHA3.Variant) -> [Element] { - Digest.sha3(self, variant: variant) - } - - public func crc32(seed: UInt32? = nil, reflect: Bool = true) -> UInt32 { - Checksum.crc32(self, seed: seed, reflect: reflect) - } - - public func crc32c(seed: UInt32? = nil, reflect: Bool = true) -> UInt32 { - Checksum.crc32c(self, seed: seed, reflect: reflect) - } - - public func crc16(seed: UInt16? = nil) -> UInt16 { - Checksum.crc16(self, seed: seed) - } - - public func encrypt(cipher: Cipher) throws -> [Element] { - try cipher.encrypt(self.slice) - } - - public func decrypt(cipher: Cipher) throws -> [Element] { - try cipher.decrypt(self.slice) - } - - public func authenticate(with authenticator: A) throws -> [Element] { - try authenticator.authenticate(self) - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Authenticator.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Authenticator.swift deleted file mode 100644 index fd0ad4bcd..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Authenticator.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -/// Message authentication code. -public protocol Authenticator { - /// Calculate Message Authentication Code (MAC) for message. - func authenticate(_ bytes: Array) throws -> Array -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BatchedCollection.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BatchedCollection.swift deleted file mode 100644 index 8d55d0a9d..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BatchedCollection.swift +++ /dev/null @@ -1,81 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -@usableFromInline -struct BatchedCollectionIndex { - let range: Range -} - -extension BatchedCollectionIndex: Comparable { - @usableFromInline - static func == (lhs: BatchedCollectionIndex, rhs: BatchedCollectionIndex) -> Bool { - lhs.range.lowerBound == rhs.range.lowerBound - } - - @usableFromInline - static func < (lhs: BatchedCollectionIndex, rhs: BatchedCollectionIndex) -> Bool { - lhs.range.lowerBound < rhs.range.lowerBound - } -} - -protocol BatchedCollectionType: Collection { - associatedtype Base: Collection -} - -@usableFromInline -struct BatchedCollection: Collection { - let base: Base - let size: Int - - @usableFromInline - init(base: Base, size: Int) { - self.base = base - self.size = size - } - - @usableFromInline - typealias Index = BatchedCollectionIndex - - private func nextBreak(after idx: Base.Index) -> Base.Index { - self.base.index(idx, offsetBy: self.size, limitedBy: self.base.endIndex) ?? self.base.endIndex - } - - @usableFromInline - var startIndex: Index { - Index(range: self.base.startIndex.. Index { - Index(range: idx.range.upperBound.. Base.SubSequence { - self.base[idx.range] - } -} - -extension Collection { - @inlinable - func batched(by size: Int) -> BatchedCollection { - BatchedCollection(base: self, size: size) - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Bit.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Bit.swift deleted file mode 100644 index f1ec5b79e..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Bit.swift +++ /dev/null @@ -1,26 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -public enum Bit: Int { - case zero - case one -} - -extension Bit { - @inlinable - func inverted() -> Bit { - self == .zero ? .one : .zero - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockCipher.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockCipher.swift deleted file mode 100644 index f79117802..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockCipher.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -protocol BlockCipher: Cipher { - static var blockSize: Int { get } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockDecryptor.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockDecryptor.swift deleted file mode 100644 index 935cdfa32..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockDecryptor.swift +++ /dev/null @@ -1,98 +0,0 @@ -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -public class BlockDecryptor: Cryptor, Updatable { - @usableFromInline - let blockSize: Int - - @usableFromInline - let padding: Padding - - @usableFromInline - var worker: CipherModeWorker - - @usableFromInline - var accumulated = Array() - - @usableFromInline - init(blockSize: Int, padding: Padding, _ worker: CipherModeWorker) throws { - self.blockSize = blockSize - self.padding = padding - self.worker = worker - } - - @inlinable - public func update(withBytes bytes: ArraySlice, isLast: Bool = false) throws -> Array { - self.accumulated += bytes - - // If a worker (eg GCM) can combine ciphertext + tag - // we need to remove tag from the ciphertext. - if !isLast && self.accumulated.count < self.blockSize + self.worker.additionalBufferSize { - return [] - } - - let accumulatedWithoutSuffix: Array - if self.worker.additionalBufferSize > 0 { - // FIXME: how slow is that? - accumulatedWithoutSuffix = Array(self.accumulated.prefix(self.accumulated.count - self.worker.additionalBufferSize)) - } else { - accumulatedWithoutSuffix = self.accumulated - } - - var processedBytesCount = 0 - var plaintext = Array(reserveCapacity: accumulatedWithoutSuffix.count) - // Processing in a block-size manner. It's good for block modes, but bad for stream modes. - for var chunk in accumulatedWithoutSuffix.batched(by: self.blockSize) { - if isLast || (accumulatedWithoutSuffix.count - processedBytesCount) >= blockSize { - let isLastChunk = processedBytesCount + chunk.count == accumulatedWithoutSuffix.count - - if isLast, isLastChunk, var finalizingWorker = worker as? FinalizingDecryptModeWorker { - chunk = try finalizingWorker.willDecryptLast(bytes: chunk + accumulated.suffix(worker.additionalBufferSize)) // tag size - } - - if !chunk.isEmpty { - plaintext += worker.decrypt(block: chunk) - } - - if isLast, isLastChunk, var finalizingWorker = worker as? FinalizingDecryptModeWorker { - plaintext = Array(try finalizingWorker.didDecryptLast(bytes: plaintext.slice)) - } - - processedBytesCount += chunk.count - } - } - accumulated.removeFirst(processedBytesCount) // super-slow - - if isLast { - if accumulatedWithoutSuffix.isEmpty, var finalizingWorker = worker as? FinalizingDecryptModeWorker { - try finalizingWorker.willDecryptLast(bytes: self.accumulated.suffix(self.worker.additionalBufferSize)) - plaintext = Array(try finalizingWorker.didDecryptLast(bytes: plaintext.slice)) - } - plaintext = self.padding.remove(from: plaintext, blockSize: self.blockSize) - } - - return plaintext - } - - public func seek(to position: Int) throws { - guard var worker = self.worker as? SeekableModeWorker else { - fatalError("Not supported") - } - - try worker.seek(to: position) - self.worker = worker - - accumulated = [] - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockEncryptor.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockEncryptor.swift deleted file mode 100644 index 0ab1ed61a..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockEncryptor.swift +++ /dev/null @@ -1,62 +0,0 @@ -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -@usableFromInline -final class BlockEncryptor: Cryptor, Updatable { - private let blockSize: Int - private var worker: CipherModeWorker - private let padding: Padding - // Accumulated bytes. Not all processed bytes. - private var accumulated = Array(reserveCapacity: 16) - - private var lastBlockRemainder = 0 - - @usableFromInline - init(blockSize: Int, padding: Padding, _ worker: CipherModeWorker) throws { - self.blockSize = blockSize - self.padding = padding - self.worker = worker - } - - // MARK: Updatable - - public func update(withBytes bytes: ArraySlice, isLast: Bool) throws -> Array { - self.accumulated += bytes - - if isLast { - self.accumulated = self.padding.add(to: self.accumulated, blockSize: self.blockSize) - } - - var encrypted = Array(reserveCapacity: accumulated.count) - for chunk in self.accumulated.batched(by: self.blockSize) { - if isLast || chunk.count == self.blockSize { - encrypted += self.worker.encrypt(block: chunk) - } - } - - // Stream encrypts all, so it removes all elements - self.accumulated.removeFirst(encrypted.count) - - if var finalizingWorker = worker as? FinalizingEncryptModeWorker, isLast == true { - encrypted = Array(try finalizingWorker.finalize(encrypt: encrypted.slice)) - } - - return encrypted - } - - @usableFromInline - func seek(to: Int) throws { - fatalError("Not supported") - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockMode.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockMode.swift deleted file mode 100644 index ff410d7a2..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockMode.swift +++ /dev/null @@ -1,26 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -public typealias CipherOperationOnBlock = (_ block: ArraySlice) -> Array? - -public protocol BlockMode { - var options: BlockModeOption { get } - //TODO: doesn't have to be public - @inlinable func worker(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock, encryptionOperation: @escaping CipherOperationOnBlock) throws -> CipherModeWorker - - var customBlockSize: Int? { get } -} - -typealias StreamMode = BlockMode diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockModeOptions.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockModeOptions.swift deleted file mode 100644 index a21dd8951..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockModeOptions.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -public struct BlockModeOption: OptionSet { - public let rawValue: Int - - public init(rawValue: Int) { - self.rawValue = rawValue - } - - @usableFromInline - static let none = BlockModeOption(rawValue: 1 << 0) - - @usableFromInline - static let initializationVectorRequired = BlockModeOption(rawValue: 1 << 1) - - @usableFromInline - static let paddingRequired = BlockModeOption(rawValue: 1 << 2) - - @usableFromInline - static let useEncryptToDecrypt = BlockModeOption(rawValue: 1 << 3) -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockMode/CBC.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockMode/CBC.swift deleted file mode 100644 index ca5d6462f..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockMode/CBC.swift +++ /dev/null @@ -1,76 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// Cipher-block chaining (CBC) -// - -public struct CBC: BlockMode { - public enum Error: Swift.Error { - /// Invalid IV - case invalidInitializationVector - } - - public let options: BlockModeOption = [.initializationVectorRequired, .paddingRequired] - - private let iv: Array - - public let customBlockSize: Int? = nil - - public init(iv: Array) { - self.iv = iv - } - - public func worker(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock, encryptionOperation: @escaping CipherOperationOnBlock) throws -> CipherModeWorker { - if self.iv.count != blockSize { - throw Error.invalidInitializationVector - } - - return CBCModeWorker(blockSize: blockSize, iv: self.iv.slice, cipherOperation: cipherOperation) - } -} - -struct CBCModeWorker: BlockModeWorker { - let cipherOperation: CipherOperationOnBlock - var blockSize: Int - let additionalBufferSize: Int = 0 - private let iv: ArraySlice - private var prev: ArraySlice? - - @inlinable - init(blockSize: Int, iv: ArraySlice, cipherOperation: @escaping CipherOperationOnBlock) { - self.blockSize = blockSize - self.iv = iv - self.cipherOperation = cipherOperation - } - - @inlinable - mutating func encrypt(block plaintext: ArraySlice) -> Array { - guard let ciphertext = cipherOperation(xor(prev ?? iv, plaintext)) else { - return Array(plaintext) - } - self.prev = ciphertext.slice - return ciphertext - } - - @inlinable - mutating func decrypt(block ciphertext: ArraySlice) -> Array { - guard let plaintext = cipherOperation(ciphertext) else { - return Array(ciphertext) - } - let result: Array = xor(prev ?? self.iv, plaintext) - self.prev = ciphertext - return result - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockMode/CCM.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockMode/CCM.swift deleted file mode 100644 index a42cbbfac..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockMode/CCM.swift +++ /dev/null @@ -1,365 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// CCM mode combines the well known CBC-MAC with the well known counter mode of encryption. -// https://tools.ietf.org/html/rfc3610 -// https://csrc.nist.gov/publications/detail/sp/800-38c/final - -#if canImport(Darwin) -import Darwin -#elseif canImport(Glibc) -import Glibc -#elseif canImport(ucrt) -import ucrt -#endif - -/// Counter with Cipher Block Chaining-Message Authentication Code -public struct CCM: StreamMode { - public enum Error: Swift.Error { - /// Invalid IV - case invalidInitializationVector - case invalidParameter - case fail - } - - public let options: BlockModeOption = [.initializationVectorRequired, .useEncryptToDecrypt] - private let nonce: Array - private let additionalAuthenticatedData: Array? - private let tagLength: Int - private let messageLength: Int // total message length. need to know in advance - public let customBlockSize: Int? = nil - - // `authenticationTag` nil for encryption, known tag for decryption - /// For encryption, the value is set at the end of the encryption. - /// For decryption, this is a known Tag to validate against. - public var authenticationTag: Array? - - /// Initialize CCM - /// - /// - Parameters: - /// - iv: Initialization vector. Nonce. Valid length between 7 and 13 bytes. - /// - tagLength: Authentication tag length, in bytes. Value of {4, 6, 8, 10, 12, 14, 16}. - /// - messageLength: Plaintext message length (excluding tag if attached). Length have to be provided in advance. - /// - additionalAuthenticatedData: Additional authenticated data. - public init(iv: Array, tagLength: Int, messageLength: Int, additionalAuthenticatedData: Array? = nil) { - self.nonce = iv - self.tagLength = tagLength - self.additionalAuthenticatedData = additionalAuthenticatedData - self.messageLength = messageLength // - tagLength - } - - /// Initialize CCM - /// - /// - Parameters: - /// - iv: Initialization vector. Nonce. Valid length between 7 and 13 bytes. - /// - tagLength: Authentication tag length, in bytes. Value of {4, 6, 8, 10, 12, 14, 16}. - /// - messageLength: Plaintext message length (excluding tag if attached). Length have to be provided in advance. - /// - authenticationTag: Authentication Tag value if not concatenated to ciphertext. - /// - additionalAuthenticatedData: Additional authenticated data. - public init(iv: Array, tagLength: Int, messageLength: Int, authenticationTag: Array, additionalAuthenticatedData: Array? = nil) { - self.init(iv: iv, tagLength: tagLength, messageLength: messageLength, additionalAuthenticatedData: additionalAuthenticatedData) - self.authenticationTag = authenticationTag - } - - public func worker(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock, encryptionOperation: @escaping CipherOperationOnBlock) throws -> CipherModeWorker { - if self.nonce.isEmpty { - throw Error.invalidInitializationVector - } - - return CCMModeWorker(blockSize: blockSize, nonce: self.nonce.slice, messageLength: self.messageLength, additionalAuthenticatedData: self.additionalAuthenticatedData, tagLength: self.tagLength, cipherOperation: cipherOperation) - } -} - -class CCMModeWorker: StreamModeWorker, SeekableModeWorker, CounterModeWorker, FinalizingEncryptModeWorker, FinalizingDecryptModeWorker { - typealias Counter = Int - var counter = 0 - - let cipherOperation: CipherOperationOnBlock - let blockSize: Int - private let tagLength: Int - private let messageLength: Int // total message length. need to know in advance - private let q: UInt8 - - let additionalBufferSize: Int - private var keystreamPosIdx = 0 - private let nonce: Array - private var last_y: ArraySlice = [] - private var keystream: Array = [] - // Known Tag used to validate during decryption - private var expectedTag: Array? - - public enum Error: Swift.Error { - case invalidParameter - } - - init(blockSize: Int, nonce: ArraySlice, messageLength: Int, additionalAuthenticatedData: [UInt8]?, expectedTag: Array? = nil, tagLength: Int, cipherOperation: @escaping CipherOperationOnBlock) { - self.blockSize = 16 // CCM is defined for 128 block size - self.tagLength = tagLength - self.additionalBufferSize = tagLength - self.messageLength = messageLength - self.expectedTag = expectedTag - self.cipherOperation = cipherOperation - self.nonce = Array(nonce) - self.q = UInt8(15 - nonce.count) // n = 15-q - - let hasAssociatedData = additionalAuthenticatedData != nil && !additionalAuthenticatedData!.isEmpty - self.processControlInformation(nonce: self.nonce, tagLength: tagLength, hasAssociatedData: hasAssociatedData) - - if let aad = additionalAuthenticatedData, hasAssociatedData { - self.process(aad: aad) - } - } - - // For the very first time setup new IV (aka y0) from the block0 - private func processControlInformation(nonce: [UInt8], tagLength: Int, hasAssociatedData: Bool) { - let block0 = try! format(nonce: nonce, Q: UInt32(self.messageLength), q: self.q, t: UInt8(tagLength), hasAssociatedData: hasAssociatedData).slice - let y0 = self.cipherOperation(block0)!.slice - self.last_y = y0 - } - - private func process(aad: [UInt8]) { - let encodedAAD = format(aad: aad) - - for block_i in encodedAAD.batched(by: 16) { - let y_i = self.cipherOperation(xor(block_i, self.last_y))!.slice - self.last_y = y_i - } - } - - private func S(i: Int) throws -> [UInt8] { - let ctr = try format(counter: i, nonce: nonce, q: q) - return self.cipherOperation(ctr.slice)! - } - - @inlinable - func seek(to position: Int) throws { - self.counter = position - self.keystream = try self.S(i: position) - let offset = position % self.blockSize - self.keystreamPosIdx = offset - } - - func encrypt(block plaintext: ArraySlice) -> Array { - var result = Array(reserveCapacity: plaintext.count) - - var processed = 0 - while processed < plaintext.count { - // Need a full block here to update keystream and do CBC - if self.keystream.isEmpty || self.keystreamPosIdx == self.blockSize { - // y[i], where i is the counter. Can encrypt 1 block at a time - self.counter += 1 - guard let S = try? S(i: counter) else { return Array(plaintext) } - let plaintextP = addPadding(Array(plaintext), blockSize: blockSize) - guard let y = cipherOperation(xor(last_y, plaintextP)) else { return Array(plaintext) } - self.last_y = y.slice - - self.keystream = S - self.keystreamPosIdx = 0 - } - - let xored: Array = xor(plaintext[plaintext.startIndex.advanced(by: processed)...], keystream[keystreamPosIdx...]) - keystreamPosIdx += xored.count - processed += xored.count - result += xored - } - return result - } - - @inlinable - func finalize(encrypt ciphertext: ArraySlice) throws -> ArraySlice { - // concatenate T at the end - guard let S0 = try? S(i: 0) else { return ciphertext } - - let computedTag = xor(last_y.prefix(self.tagLength), S0) as ArraySlice - return ciphertext + computedTag - } - - // Decryption is stream - // CBC is block - private var accumulatedPlaintext: [UInt8] = [] - - func decrypt(block ciphertext: ArraySlice) -> Array { - var output = Array(reserveCapacity: ciphertext.count) - - do { - var currentCounter = self.counter - var processed = 0 - while processed < ciphertext.count { - // Need a full block here to update keystream and do CBC - // New keystream for a new block - if self.keystream.isEmpty || self.keystreamPosIdx == self.blockSize { - currentCounter += 1 - guard let S = try? S(i: currentCounter) else { return Array(ciphertext) } - self.keystream = S - self.keystreamPosIdx = 0 - } - - let xored: Array = xor(ciphertext[ciphertext.startIndex.advanced(by: processed)...], keystream[keystreamPosIdx...]) // plaintext - keystreamPosIdx += xored.count - processed += xored.count - output += xored - self.counter = currentCounter - } - } - - // Accumulate plaintext for the MAC calculations at the end. - // It would be good to process it together though, here. - self.accumulatedPlaintext += output - - // Shouldn't return plaintext until validate tag. - // With incremental update, can't validate tag until all block are processed. - return output - } - - @inlinable - func finalize(decrypt plaintext: ArraySlice) throws -> ArraySlice { - // concatenate T at the end - let computedTag = Array(last_y.prefix(self.tagLength)) - guard let expectedTag = self.expectedTag, expectedTag == computedTag else { - throw CCM.Error.fail - } - - return plaintext - } - - @discardableResult - func willDecryptLast(bytes ciphertext: ArraySlice) throws -> ArraySlice { - // get tag of additionalBufferSize size - // `ciphertext` contains at least additionalBufferSize bytes - // overwrite expectedTag property used later for verification - guard let S0 = try? S(i: 0) else { return ciphertext } - self.expectedTag = xor(ciphertext.suffix(self.tagLength), S0) as [UInt8] - return ciphertext[ciphertext.startIndex..) throws -> ArraySlice { - - // Calculate Tag, from the last CBC block, for accumulated plaintext. - var processed = 0 - for block in self.accumulatedPlaintext.batched(by: self.blockSize) { - let blockP = addPadding(Array(block), blockSize: blockSize) - guard let y = cipherOperation(xor(last_y, blockP)) else { return plaintext } - self.last_y = y.slice - processed += block.count - } - self.accumulatedPlaintext.removeFirst(processed) - return plaintext - } -} - -// Q - octet length of P -// q - octet length of Q. Maximum length (in octets) of payload. An element of {2,3,4,5,6,7,8} -// t - octet length of T (MAC length). An element of {4,6,8,10,12,14,16} -private func format(nonce N: [UInt8], Q: UInt32, q: UInt8, t: UInt8, hasAssociatedData: Bool) throws -> [UInt8] { - var flags0: UInt8 = 0 - - if hasAssociatedData { - // 7 bit - flags0 |= (1 << 6) - } - - // 6,5,4 bit is t in 3 bits - flags0 |= (((t - 2) / 2) & 0x07) << 3 - - // 3,2,1 bit is q in 3 bits - flags0 |= ((q - 1) & 0x07) << 0 - - var block0: [UInt8] = Array(repeating: 0, count: 16) - block0[0] = flags0 - - // N in 1...(15-q) octets, n = 15-q - // n is an element of {7,8,9,10,11,12,13} - let n = 15 - Int(q) - guard (n + Int(q)) == 15 else { - // n+q == 15 - throw CCMModeWorker.Error.invalidParameter - } - block0[1...n] = N[0...(n - 1)] - - // Q in (16-q)...15 octets - block0[(16 - Int(q))...15] = Q.bytes(totalBytes: Int(q)).slice - - return block0 -} - -/// Formatting of the Counter Blocks. Ctr[i] -/// The counter generation function. -/// Q - octet length of P -/// q - octet length of Q. Maximum length (in octets) of payload. An element of {2,3,4,5,6,7,8} -private func format(counter i: Int, nonce N: [UInt8], q: UInt8) throws -> [UInt8] { - var flags0: UInt8 = 0 - - // bit 8,7 is Reserved - // bit 4,5,6 shall be set to 0 - // 3,2,1 bit is q in 3 bits - flags0 |= ((q - 1) & 0x07) << 0 - - var block = Array(repeating: 0, count: 16) // block[0] - block[0] = flags0 - - // N in 1...(15-q) octets, n = 15-q - // n is an element of {7,8,9,10,11,12,13} - let n = 15 - Int(q) - guard (n + Int(q)) == 15 else { - // n+q == 15 - throw CCMModeWorker.Error.invalidParameter - } - block[1...n] = N[0...(n - 1)] - - // [i]8q in (16-q)...15 octets - block[(16 - Int(q))...15] = i.bytes(totalBytes: Int(q)).slice - - return block -} - -/// Resulting can be partitioned into 16-octet blocks -private func format(aad: [UInt8]) -> [UInt8] { - let a = aad.count - - switch Double(a) { - case 0..<65280: // 2^16-2^8 - // [a]16 - return addPadding(a.bytes(totalBytes: 2) + aad, blockSize: 16) - case 65280..<4_294_967_296: // 2^32 - // [a]32 - return addPadding([0xFF, 0xFE] + a.bytes(totalBytes: 4) + aad, blockSize: 16) - case 4_294_967_296.., blockSize: Int) -> Array { - if bytes.isEmpty { - return Array(repeating: 0, count: blockSize) - } - - let remainder = bytes.count % blockSize - if remainder == 0 { - return bytes - } - - let paddingCount = blockSize - remainder - if paddingCount > 0 { - return bytes + Array(repeating: 0, count: paddingCount) - } - return bytes -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockMode/CFB.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockMode/CFB.swift deleted file mode 100644 index 95e91add7..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockMode/CFB.swift +++ /dev/null @@ -1,102 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// Cipher feedback (CFB) -// - -public struct CFB: BlockMode { - public enum Error: Swift.Error { - /// Invalid IV - case invalidInitializationVector - } - - public enum SegmentSize: Int { - case cfb8 = 1 // Encrypt byte per byte - case cfb128 = 16 // Encrypt 16 bytes per 16 bytes (default) - } - - public let options: BlockModeOption = [.initializationVectorRequired, .useEncryptToDecrypt] - private let iv: Array - private let segmentSize: SegmentSize - public let customBlockSize: Int? - - public init(iv: Array, segmentSize: SegmentSize = .cfb128) { - self.iv = iv - self.segmentSize = segmentSize - self.customBlockSize = segmentSize.rawValue - } - - public func worker(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock, encryptionOperation: @escaping CipherOperationOnBlock) throws -> CipherModeWorker { - if !(self.iv.count == blockSize || (segmentSize == .cfb8 && self.iv.count == AES.blockSize)) { - throw Error.invalidInitializationVector - } - - return CFBModeWorker(blockSize: blockSize, iv: self.iv.slice, segmentSize: segmentSize, cipherOperation: cipherOperation) - } -} - -struct CFBModeWorker: BlockModeWorker { - let cipherOperation: CipherOperationOnBlock - let blockSize: Int - let additionalBufferSize: Int = 0 - private let iv: ArraySlice - private let segmentSize: CFB.SegmentSize - private var prev: ArraySlice? - - init(blockSize: Int, iv: ArraySlice, segmentSize: CFB.SegmentSize, cipherOperation: @escaping CipherOperationOnBlock) { - self.blockSize = blockSize - self.iv = iv - self.segmentSize = segmentSize - self.cipherOperation = cipherOperation - } - - @inlinable - mutating func encrypt(block plaintext: ArraySlice) -> Array { - switch segmentSize { - case .cfb128: - guard let ciphertext = cipherOperation(prev ?? iv) else { - return Array(plaintext) - } - self.prev = xor(plaintext, ciphertext.slice) - return Array(self.prev ?? []) - case .cfb8: - guard let ciphertext = cipherOperation(prev ?? iv) else { - return Array(plaintext) - } - let result = [Array(plaintext)[0] ^ Array(ciphertext)[0]] - self.prev = Array((prev ?? iv).dropFirst()) + [result[0]] - return result - } - } - - @inlinable - mutating func decrypt(block ciphertext: ArraySlice) -> Array { - switch segmentSize { - case .cfb128: - guard let plaintext = cipherOperation(prev ?? iv) else { - return Array(ciphertext) - } - let result: Array = xor(plaintext, ciphertext) - prev = ciphertext - return result - case .cfb8: - guard let plaintext = cipherOperation(prev ?? iv) else { - return Array(ciphertext) - } - self.prev = Array((prev ?? iv).dropFirst()) + [Array(ciphertext)[0]] - return [Array(ciphertext)[0] ^ Array(plaintext)[0]] - } - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockMode/CTR.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockMode/CTR.swift deleted file mode 100644 index f0074ae4d..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockMode/CTR.swift +++ /dev/null @@ -1,138 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// Counter (CTR) - -public struct CTR: StreamMode { - public enum Error: Swift.Error { - /// Invalid IV - case invalidInitializationVector - } - - public let options: BlockModeOption = [.initializationVectorRequired, .useEncryptToDecrypt] - private let iv: Array - private let counter: Int - public let customBlockSize: Int? = nil - - public init(iv: Array, counter: Int = 0) { - self.iv = iv - self.counter = counter - } - - public func worker(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock, encryptionOperation: @escaping CipherOperationOnBlock) throws -> CipherModeWorker { - if self.iv.count != blockSize { - throw Error.invalidInitializationVector - } - - return CTRModeWorker(blockSize: blockSize, iv: self.iv.slice, counter: self.counter, cipherOperation: cipherOperation) - } -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -struct CTRModeWorker: StreamModeWorker, SeekableModeWorker, CounterModeWorker { - typealias Counter = CTRCounter - - final class CTRCounter { - private let constPrefix: Array - private var value: UInt64 - //TODO: make it an updatable value, computing is too slow - var bytes: Array { - self.constPrefix + self.value.bytes() - } - - @inlinable - init(_ initialValue: Array) { - let halfIndex = initialValue.startIndex.advanced(by: initialValue.count / 2) - self.constPrefix = Array(initialValue[initialValue.startIndex.., startAt index: Int) { - self.init(buildCounterValue(nonce, counter: UInt64(index))) - } - - static func += (lhs: CTRCounter, rhs: Int) { - lhs.value += UInt64(rhs) - } - } - - let cipherOperation: CipherOperationOnBlock - let additionalBufferSize: Int = 0 - let iv: Array - var counter: CTRCounter - - private let blockSize: Int - - // The same keystream is used for the block length plaintext - // As new data is added, keystream suffix is used to xor operation. - private var keystream: Array - private var keystreamPosIdx = 0 - - init(blockSize: Int, iv: ArraySlice, counter: Int, cipherOperation: @escaping CipherOperationOnBlock) { - self.cipherOperation = cipherOperation - self.blockSize = blockSize - self.iv = Array(iv) - - // the first keystream is calculated from the nonce = initial value of counter - self.counter = CTRCounter(nonce: Array(iv), startAt: counter) - self.keystream = Array(cipherOperation(self.counter.bytes.slice)!) - } - - @inlinable - mutating func seek(to position: Int) throws { - let offset = position % self.blockSize - self.counter = CTRCounter(nonce: self.iv, startAt: position / self.blockSize) - self.keystream = Array(self.cipherOperation(self.counter.bytes.slice)!) - self.keystreamPosIdx = offset - } - - // plaintext is at most blockSize long - @inlinable - mutating func encrypt(block plaintext: ArraySlice) -> Array { - var result = Array(reserveCapacity: plaintext.count) - - var processed = 0 - while processed < plaintext.count { - // Update keystream - if self.keystreamPosIdx == self.blockSize { - self.counter += 1 - self.keystream = Array(self.cipherOperation(self.counter.bytes.slice)!) - self.keystreamPosIdx = 0 - } - - let xored: Array = xor(plaintext[plaintext.startIndex.advanced(by: processed)...], keystream[keystreamPosIdx...]) - keystreamPosIdx += xored.count - processed += xored.count - result += xored - } - - return result - } - - mutating func decrypt(block ciphertext: ArraySlice) -> Array { - self.encrypt(block: ciphertext) - } -} - -private func buildCounterValue(_ iv: Array, counter: UInt64) -> Array { - let noncePartLen = iv.count / 2 - let noncePrefix = iv[iv.startIndex.. -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -public protocol CipherModeWorker { - var cipherOperation: CipherOperationOnBlock { get } - - // Additional space needed when incrementally process data - // eg. for GCM combined mode - var additionalBufferSize: Int { get } - - @inlinable - mutating func encrypt(block plaintext: ArraySlice) -> Array - - @inlinable - mutating func decrypt(block ciphertext: ArraySlice) -> Array -} - -/// Block workers use `BlockEncryptor` -public protocol BlockModeWorker: CipherModeWorker { - var blockSize: Int { get } -} - -public protocol CounterModeWorker: CipherModeWorker { - associatedtype Counter - var counter: Counter { get set } -} - -public protocol SeekableModeWorker: CipherModeWorker { - mutating func seek(to position: Int) throws -} - -/// Stream workers use `StreamEncryptor` -public protocol StreamModeWorker: CipherModeWorker { -} - -public protocol FinalizingEncryptModeWorker: CipherModeWorker { - // Any final calculations, eg. calculate tag - // Called after the last block is encrypted - mutating func finalize(encrypt ciphertext: ArraySlice) throws -> ArraySlice -} - -public protocol FinalizingDecryptModeWorker: CipherModeWorker { - // Called before decryption, hence input is ciphertext. - // ciphertext is either a last block, or a tag (for stream workers) - @discardableResult - mutating func willDecryptLast(bytes ciphertext: ArraySlice) throws -> ArraySlice - // Called after decryption, hence input is ciphertext - mutating func didDecryptLast(bytes plaintext: ArraySlice) throws -> ArraySlice - // Any final calculations, eg. calculate tag - // Called after the last block is encrypted - mutating func finalize(decrypt plaintext: ArraySlice) throws -> ArraySlice -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockMode/ECB.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockMode/ECB.swift deleted file mode 100644 index 4e8f9ba03..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockMode/ECB.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// Electronic codebook (ECB) -// - -public struct ECB: BlockMode { - public let options: BlockModeOption = .paddingRequired - public let customBlockSize: Int? = nil - - public init() { - } - - public func worker(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock, encryptionOperation: @escaping CipherOperationOnBlock) throws -> CipherModeWorker { - ECBModeWorker(blockSize: blockSize, cipherOperation: cipherOperation) - } -} - -struct ECBModeWorker: BlockModeWorker { - typealias Element = Array - let cipherOperation: CipherOperationOnBlock - let blockSize: Int - let additionalBufferSize: Int = 0 - - init(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock) { - self.blockSize = blockSize - self.cipherOperation = cipherOperation - } - - @inlinable - mutating func encrypt(block plaintext: ArraySlice) -> Array { - guard let ciphertext = cipherOperation(plaintext) else { - return Array(plaintext) - } - return ciphertext - } - - mutating func decrypt(block ciphertext: ArraySlice) -> Array { - self.encrypt(block: ciphertext) - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockMode/GCM.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockMode/GCM.swift deleted file mode 100644 index 2aaeb3422..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockMode/GCM.swift +++ /dev/null @@ -1,374 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// Galois/Counter Mode (GCM) -// https://csrc.nist.gov/publications/detail/sp/800-38d/final -// ref: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.694.695&rep=rep1&type=pdf -// - -public final class GCM: BlockMode { - public enum Mode { - /// In combined mode, the authentication tag is directly appended to the encrypted message. This is usually what you want. - case combined - /// Some applications may need to store the authentication tag and the encrypted message at different locations. - case detached - } - - public let options: BlockModeOption = [.initializationVectorRequired, .useEncryptToDecrypt] - - public enum Error: Swift.Error { - /// Invalid IV - case invalidInitializationVector - /// Special symbol FAIL that indicates that the inputs are not authentic. - case fail - } - - private let iv: Array - private let additionalAuthenticatedData: Array? - private let mode: Mode - public let customBlockSize: Int? = nil - - /// Length of authentication tag, in bytes. - /// For encryption, the value is given as init parameter. - /// For decryption, the length of given authentication tag is used. - private let tagLength: Int - - // `authenticationTag` nil for encryption, known tag for decryption - /// For encryption, the value is set at the end of the encryption. - /// For decryption, this is a known Tag to validate against. - public var authenticationTag: Array? - - // encrypt - /// Possible tag lengths: 4,8,12,13,14,15,16 - public init(iv: Array, additionalAuthenticatedData: Array? = nil, tagLength: Int = 16, mode: Mode = .detached) { - self.iv = iv - self.additionalAuthenticatedData = additionalAuthenticatedData - self.mode = mode - self.tagLength = tagLength - } - - // decrypt - public convenience init(iv: Array, authenticationTag: Array, additionalAuthenticatedData: Array? = nil, mode: Mode = .detached) { - self.init(iv: iv, additionalAuthenticatedData: additionalAuthenticatedData, tagLength: authenticationTag.count, mode: mode) - self.authenticationTag = authenticationTag - } - - public func worker(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock, encryptionOperation: @escaping CipherOperationOnBlock) throws -> CipherModeWorker { - if self.iv.isEmpty { - throw Error.invalidInitializationVector - } - - let worker = GCMModeWorker(iv: iv.slice, aad: self.additionalAuthenticatedData?.slice, expectedTag: self.authenticationTag, tagLength: self.tagLength, mode: self.mode, cipherOperation: cipherOperation) - worker.didCalculateTag = { [weak self] tag in - self?.authenticationTag = tag - } - return worker - } -} - -// MARK: - Worker - -final class GCMModeWorker: BlockModeWorker, FinalizingEncryptModeWorker, FinalizingDecryptModeWorker { - let cipherOperation: CipherOperationOnBlock - - // Callback called when authenticationTag is ready - var didCalculateTag: ((Array) -> Void)? - - private let tagLength: Int - // GCM nonce is 96-bits by default. It's the most effective length for the IV - private static let nonceSize = 12 - - // GCM is designed for 128-bit ciphers like AES (but not really for Blowfish). 64-bit mode is not implemented. - let blockSize = 16 // 128 bit - let additionalBufferSize: Int - private let iv: ArraySlice - private let mode: GCM.Mode - private var counter: UInt128 - private let eky0: UInt128 // move to GF? - private let h: UInt128 - - // Additional authenticated data - private let aad: ArraySlice? - // Known Tag used to validate during decryption - private var expectedTag: Array? - - // Note: need new worker to reset instance - // Use empty aad if not specified. AAD is optional. - private lazy var gf: GF = { - if let aad = aad { - return GF(aad: Array(aad), h: h, blockSize: blockSize) - } - return GF(aad: [UInt8](), h: h, blockSize: blockSize) - }() - - init(iv: ArraySlice, aad: ArraySlice? = nil, expectedTag: Array? = nil, tagLength: Int, mode: GCM.Mode, cipherOperation: @escaping CipherOperationOnBlock) { - self.cipherOperation = cipherOperation - self.iv = iv - self.mode = mode - self.aad = aad - self.expectedTag = expectedTag - self.tagLength = tagLength - self.h = UInt128(cipherOperation(Array(repeating: 0, count: self.blockSize).slice)!) // empty block - - if mode == .combined { - self.additionalBufferSize = tagLength - } else { - self.additionalBufferSize = 0 - } - - // Assume nonce is 12 bytes long, otherwise initial counter would be calulated from GHASH - // counter = GF.ghash(aad: [UInt8](), ciphertext: nonce) - if iv.count == GCMModeWorker.nonceSize { - self.counter = makeCounter(nonce: Array(self.iv)) - } else { - self.counter = GF.ghash(h: self.h, aad: [UInt8](), ciphertext: Array(iv), blockSize: self.blockSize) - } - - // Set constants - self.eky0 = UInt128(cipherOperation(self.counter.bytes.slice)!) - } - - func encrypt(block plaintext: ArraySlice) -> Array { - self.counter = incrementCounter(self.counter) - - guard let ekyN = cipherOperation(counter.bytes.slice) else { - return Array(plaintext) - } - - // plaintext block ^ ek1 - let ciphertext = xor(plaintext, ekyN) as Array - - // update ghash incrementally - gf.ghashUpdate(block: ciphertext) - - return Array(ciphertext) - } - - @inlinable - func finalize(encrypt ciphertext: ArraySlice) throws -> ArraySlice { - // Calculate MAC tag. - let ghash = self.gf.ghashFinish() - let tag = Array((ghash ^ self.eky0).bytes.prefix(self.tagLength)) - - // Notify handler - self.didCalculateTag?(tag) - - switch self.mode { - case .combined: - return (ciphertext + tag).slice - case .detached: - return ciphertext - } - } - - @inlinable - func decrypt(block ciphertext: ArraySlice) -> Array { - self.counter = incrementCounter(self.counter) - - // update ghash incrementally - self.gf.ghashUpdate(block: Array(ciphertext)) - - guard let ekN = cipherOperation(counter.bytes.slice) else { - return Array(ciphertext) - } - - // ciphertext block ^ ek1 - let plaintext = xor(ciphertext, ekN) as Array - return plaintext - } - - // The authenticated decryption operation has five inputs: K, IV , C, A, and T. It has only a single - // output, either the plaintext value P or a special symbol FAIL that indicates that the inputs are not - // authentic. - @discardableResult - func willDecryptLast(bytes ciphertext: ArraySlice) throws -> ArraySlice { - // Validate tag - switch self.mode { - case .combined: - // overwrite expectedTag property used later for verification - self.expectedTag = Array(ciphertext.suffix(self.tagLength)) - return ciphertext[ciphertext.startIndex..) throws -> ArraySlice { - // Calculate MAC tag. - let ghash = self.gf.ghashFinish() - let computedTag = Array((ghash ^ self.eky0).bytes.prefix(self.tagLength)) - - // Validate tag - guard let expectedTag = self.expectedTag, computedTag == expectedTag else { - throw GCM.Error.fail - } - - return plaintext - } - - func finalize(decrypt plaintext: ArraySlice) throws -> ArraySlice { - // do nothing - plaintext - } -} - -// MARK: - Local utils - -private func makeCounter(nonce: Array) -> UInt128 { - UInt128(nonce + [0, 0, 0, 1]) -} - -// Successive counter values are generated using the function incr(), which treats the rightmost 32 -// bits of its argument as a nonnegative integer with the least significant bit on the right -private func incrementCounter(_ counter: UInt128) -> UInt128 { - let b = counter.i.b + 1 - let a = (b == 0 ? counter.i.a + 1 : counter.i.a) - return UInt128((a, b)) -} - -// If data is not a multiple of block size bytes long then the remainder is zero padded -// Note: It's similar to ZeroPadding, but it's not the same. -private func addPadding(_ bytes: Array, blockSize: Int) -> Array { - if bytes.isEmpty { - return Array(repeating: 0, count: blockSize) - } - - let remainder = bytes.count % blockSize - if remainder == 0 { - return bytes - } - - let paddingCount = blockSize - remainder - if paddingCount > 0 { - return bytes + Array(repeating: 0, count: paddingCount) - } - return bytes -} - -// MARK: - GF - -/// The Field GF(2^128) -private final class GF { - static let r = UInt128(a: 0xE100000000000000, b: 0) - - let blockSize: Int - let h: UInt128 - - // AAD won't change - let aadLength: Int - - // Updated for every consumed block - var ciphertextLength: Int - - // Start with 0 - var x: UInt128 - - init(aad: [UInt8], h: UInt128, blockSize: Int) { - self.blockSize = blockSize - self.aadLength = aad.count - self.ciphertextLength = 0 - self.h = h - self.x = 0 - - // Calculate for AAD at the begining - self.x = GF.calculateX(aad: aad, x: self.x, h: h, blockSize: blockSize) - } - - @discardableResult - func ghashUpdate(block ciphertextBlock: Array) -> UInt128 { - self.ciphertextLength += ciphertextBlock.count - self.x = GF.calculateX(block: addPadding(ciphertextBlock, blockSize: self.blockSize), x: self.x, h: self.h, blockSize: self.blockSize) - return self.x - } - - func ghashFinish() -> UInt128 { - // len(A) || len(C) - let len = UInt128(a: UInt64(aadLength * 8), b: UInt64(ciphertextLength * 8)) - x = GF.multiply(self.x ^ len, self.h) - return self.x - } - - // GHASH. One-time calculation - static func ghash(x startx: UInt128 = 0, h: UInt128, aad: Array, ciphertext: Array, blockSize: Int) -> UInt128 { - var x = self.calculateX(aad: aad, x: startx, h: h, blockSize: blockSize) - x = self.calculateX(ciphertext: ciphertext, x: x, h: h, blockSize: blockSize) - - // len(aad) || len(ciphertext) - let len = UInt128(a: UInt64(aad.count * 8), b: UInt64(ciphertext.count * 8)) - x = self.multiply(x ^ len, h) - - return x - } - - // Calculate Ciphertext part, for all blocks - // Not used with incremental calculation. - private static func calculateX(ciphertext: [UInt8], x startx: UInt128, h: UInt128, blockSize: Int) -> UInt128 { - let pciphertext = addPadding(ciphertext, blockSize: blockSize) - let blocksCount = pciphertext.count / blockSize - - var x = startx - for i in 0.., x: UInt128, h: UInt128, blockSize: Int) -> UInt128 { - let k = x ^ UInt128(ciphertextBlock) - return self.multiply(k, h) - } - - // Calculate AAD part, for all blocks - private static func calculateX(aad: [UInt8], x startx: UInt128, h: UInt128, blockSize: Int) -> UInt128 { - let paad = addPadding(aad, blockSize: blockSize) - let blocksCount = paad.count / blockSize - - var x = startx - for i in 0.. UInt128 { - var z: UInt128 = 0 - var v = x - var k = UInt128(a: 1 << 63, b: 0) - - for _ in 0..<128 { - if y & k == k { - z = z ^ v - } - - if v & 1 != 1 { - v = v >> 1 - } else { - v = (v >> 1) ^ self.r - } - - k = k >> 1 - } - - return z - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockMode/OCB.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockMode/OCB.swift deleted file mode 100644 index 4741793c7..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockMode/OCB.swift +++ /dev/null @@ -1,398 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// The OCB Authenticated-Encryption Algorithm -// https://tools.ietf.org/html/rfc7253 -// - -public final class OCB: BlockMode { - - public enum Mode { - /// In combined mode, the authentication tag is directly appended to the encrypted message. This is usually what you want. - case combined - /// Some applications may need to store the authentication tag and the encrypted message at different locations. - case detached - } - - public let options: BlockModeOption = [.initializationVectorRequired] - - public enum Error: Swift.Error { - case invalidNonce - case fail - } - - private let N: Array - private let additionalAuthenticatedData: Array? - private let mode: Mode - public let customBlockSize: Int? = nil - - /// Length of authentication tag, in bytes. - /// For encryption, the value is given as init parameter. - /// For decryption, the length of given authentication tag is used. - private let tagLength: Int - - // `authenticationTag` nil for encryption, known tag for decryption - /// For encryption, the value is set at the end of the encryption. - /// For decryption, this is a known Tag to validate against. - public var authenticationTag: Array? - - // encrypt - public init(nonce N: Array, additionalAuthenticatedData: Array? = nil, tagLength: Int = 16, mode: Mode = .detached) { - self.N = N - self.additionalAuthenticatedData = additionalAuthenticatedData - self.mode = mode - self.tagLength = tagLength - } - - // decrypt - @inlinable - public convenience init(nonce N: Array, authenticationTag: Array, additionalAuthenticatedData: Array? = nil, mode: Mode = .detached) { - self.init(nonce: N, additionalAuthenticatedData: additionalAuthenticatedData, tagLength: authenticationTag.count, mode: mode) - self.authenticationTag = authenticationTag - } - - public func worker(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock, encryptionOperation: @escaping CipherOperationOnBlock) throws -> CipherModeWorker { - if self.N.isEmpty || self.N.count > 15 { - throw Error.invalidNonce - } - - let worker = OCBModeWorker(N: N.slice, aad: self.additionalAuthenticatedData?.slice, expectedTag: self.authenticationTag, tagLength: self.tagLength, mode: self.mode, cipherOperation: cipherOperation, encryptionOperation: encryptionOperation) - worker.didCalculateTag = { [weak self] tag in - self?.authenticationTag = tag - } - return worker - } -} - -// MARK: - Worker - -final class OCBModeWorker: BlockModeWorker, FinalizingEncryptModeWorker, FinalizingDecryptModeWorker { - - let cipherOperation: CipherOperationOnBlock - var hashOperation: CipherOperationOnBlock! - - // Callback called when authenticationTag is ready - var didCalculateTag: ((Array) -> Void)? - - private let tagLength: Int - - let blockSize = 16 // 128 bit - var additionalBufferSize: Int - private let mode: OCB.Mode - - // Additional authenticated data - private let aad: ArraySlice? - // Known Tag used to validate during decryption - private var expectedTag: Array? - - /* - * KEY-DEPENDENT - */ - // NOTE: elements are lazily calculated - private var l = [Array]() - private var lAsterisk: Array - private var lDollar: Array - - /* - * PER-ENCRYPTION/DECRYPTION - */ - private var mainBlockCount: UInt64 - private var offsetMain: Array - private var checksum: Array - - init(N: ArraySlice, aad: ArraySlice? = nil, expectedTag: Array? = nil, tagLength: Int, mode: OCB.Mode, cipherOperation: @escaping CipherOperationOnBlock, encryptionOperation: @escaping CipherOperationOnBlock) { - - self.cipherOperation = cipherOperation - self.hashOperation = encryptionOperation - self.mode = mode - self.aad = aad - self.expectedTag = expectedTag - self.tagLength = tagLength - - if mode == .combined { - self.additionalBufferSize = tagLength - } else { - self.additionalBufferSize = 0 - } - - /* - * KEY-DEPENDENT INITIALIZATION - */ - - let zeros = Array(repeating: 0, count: self.blockSize) - self.lAsterisk = self.hashOperation(zeros.slice)! /// L_* = ENCIPHER(K, zeros(128)) - self.lDollar = double(self.lAsterisk) /// L_$ = double(L_*) - self.l.append(double(self.lDollar)) /// L_0 = double(L_$) - - /* - * NONCE-DEPENDENT AND PER-ENCRYPTION/DECRYPTION INITIALIZATION - */ - - /// Nonce = num2str(TAGLEN mod 128,7) || zeros(120-bitlen(N)) || 1 || N - var nonce = Array(repeating: 0, count: blockSize) - nonce[(nonce.count - N.count)...] = N - nonce[0] = UInt8(tagLength) << 4 - nonce[blockSize - 1 - N.count] |= 1 - - /// bottom = str2num(Nonce[123..128]) - let bottom = nonce[15] & 0x3F - - /// Ktop = ENCIPHER(K, Nonce[1..122] || zeros(6)) - nonce[15] &= 0xC0 - let Ktop = self.hashOperation(nonce.slice)! - - /// Stretch = Ktop || (Ktop[1..64] xor Ktop[9..72]) - let Stretch = Ktop + xor(Ktop[0..<8], Ktop[1..<9]) - - /// Offset_0 = Stretch[1+bottom..128+bottom] - var offsetMAIN_0 = Array(repeating: 0, count: blockSize) - let bits = bottom % 8 - let bytes = Int(bottom / 8) - if bits == 0 { - offsetMAIN_0[0..> (8 - bits))) - } - } - - self.mainBlockCount = 0 - self.offsetMain = Array(offsetMAIN_0.slice) - self.checksum = Array(repeating: 0, count: self.blockSize) /// Checksum_0 = zeros(128) - } - - /// L_i = double(L_{i-1}) for every integer i > 0 - func getLSub(_ n: Int) -> Array { - while n >= self.l.count { - self.l.append(double(self.l.last!)) - } - return self.l[n] - } - - func computeTag() -> Array { - - let sum = self.hashAAD() - - /// Tag = ENCIPHER(K, Checksum_* xor Offset_* xor L_$) xor HASH(K,A) - return xor(self.hashOperation(xor(xor(self.checksum, self.offsetMain).slice, self.lDollar))!, sum) - } - - func hashAAD() -> Array { - var sum = Array(repeating: 0, count: blockSize) - - guard let aad = self.aad else { - return sum - } - - var offset = Array(repeating: 0, count: blockSize) - var blockCount: UInt64 = 1 - for aadBlock in aad.batched(by: self.blockSize) { - - if aadBlock.count == self.blockSize { - - /// Offset_i = Offset_{i-1} xor L_{ntz(i)} - offset = xor(offset, self.getLSub(ntz(blockCount))) - - /// Sum_i = Sum_{i-1} xor ENCIPHER(K, A_i xor Offset_i) - sum = xor(sum, self.hashOperation(xor(aadBlock, offset))!) - } else { - if !aadBlock.isEmpty { - - /// Offset_* = Offset_m xor L_* - offset = xor(offset, self.lAsterisk) - - /// CipherInput = (A_* || 1 || zeros(127-bitlen(A_*))) xor Offset_* - let cipherInput: Array = xor(extend(aadBlock, size: blockSize), offset) - - /// Sum = Sum_m xor ENCIPHER(K, CipherInput) - sum = xor(sum, self.hashOperation(cipherInput.slice)!) - } - } - blockCount += 1 - } - - return sum - } - - func encrypt(block plaintext: ArraySlice) -> Array { - - if plaintext.count == self.blockSize { - return self.processBlock(block: plaintext, forEncryption: true) - } else { - return self.processFinalBlock(block: plaintext, forEncryption: true) - } - } - - func finalize(encrypt ciphertext: ArraySlice) throws -> ArraySlice { - - let tag = self.computeTag() - - self.didCalculateTag?(tag) - - switch self.mode { - case .combined: - return ciphertext + tag - case .detached: - return ciphertext - } - } - - func decrypt(block ciphertext: ArraySlice) -> Array { - - if ciphertext.count == self.blockSize { - return self.processBlock(block: ciphertext, forEncryption: false) - } else { - return self.processFinalBlock(block: ciphertext, forEncryption: false) - } - } - - func finalize(decrypt plaintext: ArraySlice) throws -> ArraySlice { - // do nothing - plaintext - } - - private func processBlock(block: ArraySlice, forEncryption: Bool) -> Array { - - /* - * OCB-ENCRYPT/OCB-DECRYPT: Process any whole blocks - */ - - self.mainBlockCount += 1 - - /// Offset_i = Offset_{i-1} xor L_{ntz(i)} - self.offsetMain = xor(self.offsetMain, self.getLSub(ntz(self.mainBlockCount))) - - /// C_i = Offset_i xor ENCIPHER(K, P_i xor Offset_i) - /// P_i = Offset_i xor DECIPHER(K, C_i xor Offset_i) - var mainBlock = Array(block) - mainBlock = xor(mainBlock, offsetMain) - mainBlock = self.cipherOperation(mainBlock.slice)! - mainBlock = xor(mainBlock, self.offsetMain) - - /// Checksum_i = Checksum_{i-1} xor P_i - if forEncryption { - self.checksum = xor(self.checksum, block) - } else { - self.checksum = xor(self.checksum, mainBlock) - } - - return mainBlock - } - - private func processFinalBlock(block: ArraySlice, forEncryption: Bool) -> Array { - - let out: Array - - if block.isEmpty { - /// C_* = - /// P_* = - out = [] - - } else { - - /// Offset_* = Offset_m xor L_* - self.offsetMain = xor(self.offsetMain, self.lAsterisk) - - /// Pad = ENCIPHER(K, Offset_*) - let Pad = self.hashOperation(self.offsetMain.slice)! - - /// C_* = P_* xor Pad[1..bitlen(P_*)] - /// P_* = C_* xor Pad[1..bitlen(C_*)] - out = xor(block, Pad[0..) throws -> ArraySlice { - // Validate tag - switch self.mode { - case .combined: - // overwrite expectedTag property used later for verification - self.expectedTag = Array(ciphertext.suffix(self.tagLength)) - return ciphertext[ciphertext.startIndex..) throws -> ArraySlice { - // Calculate MAC tag. - let computedTag = self.computeTag() - - // Validate tag - guard let expectedTag = self.expectedTag, computedTag == expectedTag else { - throw OCB.Error.fail - } - - return plaintext - } -} - -// MARK: - Local utils - -private func ntz(_ x: UInt64) -> Int { - if x == 0 { - return 64 - } - - var xv = x - var n = 0 - while (xv & 1) == 0 { - n += 1 - xv = xv >> 1 - } - return n -} - -private func double(_ block: Array) -> Array { - var ( carry, result) = shiftLeft(block) - - /* - * NOTE: This construction is an attempt at a constant-time implementation. - */ - result[15] ^= (0x87 >> ((1 - carry) << 3)) - - return result -} - -private func shiftLeft(_ block: Array) -> (UInt8, Array) { - var output = Array(repeating: 0, count: block.count) - - var bit: UInt8 = 0 - - for i in 0..> 7) & 1 - } - return (bit, output) -} - -private func extend(_ block: ArraySlice, size: Int) -> Array { - var output = Array(repeating: 0, count: size) - output[0.. -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// Output Feedback (OFB) -// - -public struct OFB: BlockMode { - public enum Error: Swift.Error { - /// Invalid IV - case invalidInitializationVector - } - - public let options: BlockModeOption = [.initializationVectorRequired, .useEncryptToDecrypt] - private let iv: Array - public let customBlockSize: Int? = nil - - public init(iv: Array) { - self.iv = iv - } - - public func worker(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock, encryptionOperation: @escaping CipherOperationOnBlock) throws -> CipherModeWorker { - if self.iv.count != blockSize { - throw Error.invalidInitializationVector - } - - return OFBModeWorker(blockSize: blockSize, iv: self.iv.slice, cipherOperation: cipherOperation) - } -} - -struct OFBModeWorker: BlockModeWorker { - let cipherOperation: CipherOperationOnBlock - let blockSize: Int - let additionalBufferSize: Int = 0 - private let iv: ArraySlice - private var prev: ArraySlice? - - init(blockSize: Int, iv: ArraySlice, cipherOperation: @escaping CipherOperationOnBlock) { - self.blockSize = blockSize - self.iv = iv - self.cipherOperation = cipherOperation - } - - @inlinable - mutating func encrypt(block plaintext: ArraySlice) -> Array { - guard let ciphertext = cipherOperation(prev ?? iv) else { - return Array(plaintext) - } - self.prev = ciphertext.slice - return xor(plaintext, ciphertext) - } - - @inlinable - mutating func decrypt(block ciphertext: ArraySlice) -> Array { - guard let decrypted = cipherOperation(prev ?? iv) else { - return Array(ciphertext) - } - let plaintext: Array = xor(decrypted, ciphertext) - prev = decrypted.slice - return plaintext - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockMode/PCBC.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockMode/PCBC.swift deleted file mode 100644 index c6092475a..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/BlockMode/PCBC.swift +++ /dev/null @@ -1,74 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// Propagating Cipher Block Chaining (PCBC) -// - -public struct PCBC: BlockMode { - public enum Error: Swift.Error { - /// Invalid IV - case invalidInitializationVector - } - - public let options: BlockModeOption = [.initializationVectorRequired, .paddingRequired] - private let iv: Array - public let customBlockSize: Int? = nil - - public init(iv: Array) { - self.iv = iv - } - - public func worker(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock, encryptionOperation: @escaping CipherOperationOnBlock) throws -> CipherModeWorker { - if self.iv.count != blockSize { - throw Error.invalidInitializationVector - } - - return PCBCModeWorker(blockSize: blockSize, iv: self.iv.slice, cipherOperation: cipherOperation) - } -} - -struct PCBCModeWorker: BlockModeWorker { - let cipherOperation: CipherOperationOnBlock - var blockSize: Int - let additionalBufferSize: Int = 0 - private let iv: ArraySlice - private var prev: ArraySlice? - - @inlinable - init(blockSize: Int, iv: ArraySlice, cipherOperation: @escaping CipherOperationOnBlock) { - self.blockSize = blockSize - self.iv = iv - self.cipherOperation = cipherOperation - } - - @inlinable - mutating func encrypt(block plaintext: ArraySlice) -> Array { - guard let ciphertext = cipherOperation(xor(prev ?? iv, plaintext)) else { - return Array(plaintext) - } - self.prev = xor(plaintext, ciphertext.slice) - return ciphertext - } - - @inlinable - mutating func decrypt(block ciphertext: ArraySlice) -> Array { - guard let plaintext = cipherOperation(ciphertext) else { - return Array(ciphertext) - } - let result: Array = xor(prev ?? self.iv, plaintext) - self.prev = xor(plaintext.slice, ciphertext) - return result - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Blowfish.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Blowfish.swift deleted file mode 100644 index 8876fca2f..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Blowfish.swift +++ /dev/null @@ -1,537 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// https://en.wikipedia.org/wiki/Blowfish_(cipher) -// Based on Paul Kocher implementation -// - -public final class Blowfish { - public enum Error: Swift.Error { - /// Data padding is required - case dataPaddingRequired - /// Invalid key or IV - case invalidKeyOrInitializationVector - /// Invalid IV - case invalidInitializationVector - /// Invalid block mode - case invalidBlockMode - } - - public static let blockSize: Int = 8 // 64 bit - public let keySize: Int - - private let blockMode: BlockMode - private let padding: Padding - private var decryptWorker: CipherModeWorker! - private var encryptWorker: CipherModeWorker! - - private let N = 16 // rounds - private var P: Array - private var S: Array> - private let origP: Array = [ - 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, 0xa4093822, - 0x299f31d0, 0x082efa98, 0xec4e6c89, 0x452821e6, 0x38d01377, - 0xbe5466cf, 0x34e90c6c, 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, - 0xb5470917, 0x9216d5d9, 0x8979fb1b - ] - - private let origS: Array> = [ - [ - 0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7, - 0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99, - 0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16, - 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e, - 0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee, - 0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013, - 0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef, - 0x8e79dcb0, 0x603a180e, 0x6c9e0e8b, 0xb01e8a3e, - 0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60, - 0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440, - 0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce, - 0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a, - 0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e, - 0xafd6ba33, 0x6c24cf5c, 0x7a325381, 0x28958677, - 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193, - 0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032, - 0xef845d5d, 0xe98575b1, 0xdc262302, 0xeb651b88, - 0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239, - 0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e, - 0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0, - 0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3, - 0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98, - 0xa1f1651d, 0x39af0176, 0x66ca593e, 0x82430e88, - 0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe, - 0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6, - 0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d, - 0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b, - 0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7, - 0xe3fe501a, 0xb6794c3b, 0x976ce0bd, 0x04c006ba, - 0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463, - 0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f, - 0x6dfc511f, 0x9b30952c, 0xcc814544, 0xaf5ebd09, - 0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3, - 0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb, - 0x5579c0bd, 0x1a60320a, 0xd6a100c6, 0x402c7279, - 0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8, - 0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab, - 0x323db5fa, 0xfd238760, 0x53317b48, 0x3e00df82, - 0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db, - 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573, - 0x695b27b0, 0xbbca58c8, 0xe1ffa35d, 0xb8f011a0, - 0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b, - 0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790, - 0xe1ddf2da, 0xa4cb7e33, 0x62fb1341, 0xcee4c6e8, - 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4, - 0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0, - 0xd08ed1d0, 0xafc725e0, 0x8e3c5b2f, 0x8e7594b7, - 0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c, - 0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad, - 0x2f2f2218, 0xbe0e1777, 0xea752dfe, 0x8b021fa1, - 0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299, - 0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9, - 0x165fa266, 0x80957705, 0x93cc7314, 0x211a1477, - 0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf, - 0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49, - 0x00250e2d, 0x2071b35e, 0x226800bb, 0x57b8e0af, - 0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa, - 0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5, - 0x83260376, 0x6295cfa9, 0x11c81968, 0x4e734a41, - 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915, - 0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400, - 0x08ba6fb5, 0x571be91f, 0xf296ec6b, 0x2a0dd915, - 0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664, - 0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a - ], - [ - 0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623, - 0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266, - 0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1, - 0x193602a5, 0x75094c29, 0xa0591340, 0xe4183a3e, - 0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6, - 0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1, - 0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e, - 0x09686b3f, 0x3ebaefc9, 0x3c971814, 0x6b6a70a1, - 0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737, - 0x3e07841c, 0x7fdeae5c, 0x8e7d44ec, 0x5716f2b8, - 0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff, - 0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd, - 0xd19113f9, 0x7ca92ff6, 0x94324773, 0x22f54701, - 0x3ae5e581, 0x37c2dadc, 0xc8b57634, 0x9af3dda7, - 0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41, - 0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331, - 0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf, - 0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af, - 0xde9a771f, 0xd9930810, 0xb38bae12, 0xdccf3f2e, - 0x5512721f, 0x2e6b7124, 0x501adde6, 0x9f84cd87, - 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c, - 0xec7aec3a, 0xdb851dfa, 0x63094366, 0xc464c3d2, - 0xef1c1847, 0x3215d908, 0xdd433b37, 0x24c2ba16, - 0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd, - 0x71dff89e, 0x10314e55, 0x81ac77d6, 0x5f11199b, - 0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509, - 0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e, - 0x86e34570, 0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3, - 0x771fe71c, 0x4e3d06fa, 0x2965dcb9, 0x99e71d0f, - 0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a, - 0xc6150eba, 0x94e2ea78, 0xa5fc3c53, 0x1e0a2df4, - 0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960, - 0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66, - 0xe3bc4595, 0xa67bc883, 0xb17f37d1, 0x018cff28, - 0xc332ddef, 0xbe6c5aa5, 0x65582185, 0x68ab9802, - 0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84, - 0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510, - 0x13cca830, 0xeb61bd96, 0x0334fe1e, 0xaa0363cf, - 0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14, - 0xeecc86bc, 0x60622ca7, 0x9cab5cab, 0xb2f3846e, - 0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50, - 0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7, - 0x9b540b19, 0x875fa099, 0x95f7997e, 0x623d7da8, - 0xf837889a, 0x97e32d77, 0x11ed935f, 0x16681281, - 0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99, - 0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696, - 0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128, - 0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73, - 0x5d4a14d9, 0xe864b7e3, 0x42105d14, 0x203e13e0, - 0x45eee2b6, 0xa3aaabea, 0xdb6c4f15, 0xfacb4fd0, - 0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105, - 0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250, - 0xcf62a1f2, 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3, - 0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285, - 0x095bbf00, 0xad19489d, 0x1462b174, 0x23820e00, - 0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061, - 0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb, - 0x7cde3759, 0xcbee7460, 0x4085f2a7, 0xce77326e, - 0xa6078084, 0x19f8509e, 0xe8efd855, 0x61d99735, - 0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc, - 0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9, - 0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340, - 0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20, - 0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7 - ], - [ - 0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934, - 0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068, - 0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af, - 0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840, - 0x4d95fc1d, 0x96b591af, 0x70f4ddd3, 0x66a02f45, - 0xbfbc09ec, 0x03bd9785, 0x7fac6dd0, 0x31cb8504, - 0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a, - 0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb, - 0x68dc1462, 0xd7486900, 0x680ec0a4, 0x27a18dee, - 0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6, - 0xaace1e7c, 0xd3375fec, 0xce78a399, 0x406b2a42, - 0x20fe9e35, 0xd9f385b9, 0xee39d7ab, 0x3b124e8b, - 0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2, - 0x3a6efa74, 0xdd5b4332, 0x6841e7f7, 0xca7820fb, - 0xfb0af54e, 0xd8feb397, 0x454056ac, 0xba489527, - 0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b, - 0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33, - 0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c, - 0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3, - 0x95c11548, 0xe4c66d22, 0x48c1133f, 0xc70f86dc, - 0x07f9c9ee, 0x41041f0f, 0x404779a4, 0x5d886e17, - 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564, - 0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b, - 0x0e12b4c2, 0x02e1329e, 0xaf664fd1, 0xcad18115, - 0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922, - 0x85b2a20e, 0xe6ba0d99, 0xde720c8c, 0x2da2f728, - 0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0, - 0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e, - 0x0a476341, 0x992eff74, 0x3a6f6eab, 0xf4f8fd37, - 0xa812dc60, 0xa1ebddf8, 0x991be14c, 0xdb6e6b0d, - 0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804, - 0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b, - 0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3, - 0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb, - 0x37392eb3, 0xcc115979, 0x8026e297, 0xf42e312d, - 0x6842ada7, 0xc66a2b3b, 0x12754ccc, 0x782ef11c, - 0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350, - 0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9, - 0x44421659, 0x0a121386, 0xd90cec6e, 0xd5abea2a, - 0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe, - 0x9dbc8057, 0xf0f7c086, 0x60787bf8, 0x6003604d, - 0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc, - 0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f, - 0x77a057be, 0xbde8ae24, 0x55464299, 0xbf582e61, - 0x4e58f48f, 0xf2ddfda2, 0xf474ef38, 0x8789bdc2, - 0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9, - 0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2, - 0x466e598e, 0x20b45770, 0x8cd55591, 0xc902de4c, - 0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e, - 0xb77f19b6, 0xe0a9dc09, 0x662d09a1, 0xc4324633, - 0xe85a1f02, 0x09f0be8c, 0x4a99a025, 0x1d6efe10, - 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169, - 0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52, - 0x50115e01, 0xa70683fa, 0xa002b5c4, 0x0de6d027, - 0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5, - 0xf0177a28, 0xc0f586e0, 0x006058aa, 0x30dc7d62, - 0x11e69ed7, 0x2338ea63, 0x53c2dd94, 0xc2c21634, - 0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76, - 0x6f05e409, 0x4b7c0188, 0x39720a3d, 0x7c927c24, - 0x86e3725f, 0x724d9db9, 0x1ac15bb4, 0xd39eb8fc, - 0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4, - 0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c, - 0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837, - 0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0 - ], - [ - 0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b, - 0x5cb0679e, 0x4fa33742, 0xd3822740, 0x99bc9bbe, - 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b, - 0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4, - 0x5748ab2f, 0xbc946e79, 0xc6a376d2, 0x6549c2c8, - 0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6, - 0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304, - 0xa1fad5f0, 0x6a2d519a, 0x63ef8ce2, 0x9a86ee22, - 0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4, - 0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6, - 0x2826a2f9, 0xa73a3ae1, 0x4ba99586, 0xef5562e9, - 0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59, - 0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593, - 0xe990fd5a, 0x9e34d797, 0x2cf0b7d9, 0x022b8b51, - 0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28, - 0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c, - 0xe029ac71, 0xe019a5e6, 0x47b0acfd, 0xed93fa9b, - 0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28, - 0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c, - 0x15056dd4, 0x88f46dba, 0x03a16125, 0x0564f0bd, - 0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a, - 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319, - 0x7533d928, 0xb155fdf5, 0x03563482, 0x8aba3cbb, - 0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f, - 0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991, - 0xea7a90c2, 0xfb3e7bce, 0x5121ce64, 0x774fbe32, - 0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680, - 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166, - 0xb39a460a, 0x6445c0dd, 0x586cdecf, 0x1c20c8ae, - 0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb, - 0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5, - 0x72eacea8, 0xfa6484bb, 0x8d6612ae, 0xbf3c6f47, - 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370, - 0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d, - 0x4040cb08, 0x4eb4e2cc, 0x34d2466a, 0x0115af84, - 0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048, - 0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8, - 0x611560b1, 0xe7933fdc, 0xbb3a792b, 0x344525bd, - 0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9, - 0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7, - 0x1a908749, 0xd44fbd9a, 0xd0dadecb, 0xd50ada38, - 0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f, - 0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c, - 0xbf97222c, 0x15e6fc2a, 0x0f91fc71, 0x9b941525, - 0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1, - 0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442, - 0xe0ec6e0e, 0x1698db3b, 0x4c98a0be, 0x3278e964, - 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e, - 0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8, - 0xdf359f8d, 0x9b992f2e, 0xe60b6f47, 0x0fe3f11d, - 0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f, - 0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299, - 0xf523f357, 0xa6327623, 0x93a83531, 0x56cccd02, - 0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc, - 0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614, - 0xe6c6c7bd, 0x327a140a, 0x45e1d006, 0xc3f27b9a, - 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6, - 0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b, - 0x53113ec0, 0x1640e3d3, 0x38abbd60, 0x2547adf0, - 0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060, - 0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e, - 0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9, - 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f, - 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6 - ] - ] - - public init(key: Array, blockMode: BlockMode = CBC(iv: Array(repeating: 0, count: Blowfish.blockSize)), padding: Padding) throws { - precondition(key.count >= 5 && key.count <= 56) - - self.blockMode = blockMode - self.padding = padding - self.keySize = key.count - - self.S = self.origS - self.P = self.origP - - self.expandKey(key: key) - try self.setupBlockModeWorkers() - } - - private func setupBlockModeWorkers() throws { - self.encryptWorker = try self.blockMode.worker(blockSize: Blowfish.blockSize, cipherOperation: self.encrypt, encryptionOperation: self.encrypt) - - if self.blockMode.options.contains(.useEncryptToDecrypt) { - self.decryptWorker = try self.blockMode.worker(blockSize: Blowfish.blockSize, cipherOperation: self.encrypt, encryptionOperation: self.encrypt) - } else { - self.decryptWorker = try self.blockMode.worker(blockSize: Blowfish.blockSize, cipherOperation: self.decrypt, encryptionOperation: self.encrypt) - } - } - - private func reset() { - self.S = self.origS - self.P = self.origP - // todo expand key - } - - private func expandKey(key: Array) { - var j = 0 - for i in 0..<(self.N + 2) { - var data: UInt32 = 0x0 - for _ in 0..<4 { - data = (data << 8) | UInt32(key[j]) - j += 1 - if j >= key.count { - j = 0 - } - } - self.P[i] ^= data - } - - var datal: UInt32 = 0 - var datar: UInt32 = 0 - - for i in stride(from: 0, to: self.N + 2, by: 2) { - self.encryptBlowfishBlock(l: &datal, r: &datar) - self.P[i] = datal - self.P[i + 1] = datar - } - - for i in 0..<4 { - for j in stride(from: 0, to: 256, by: 2) { - self.encryptBlowfishBlock(l: &datal, r: &datar) - self.S[i][j] = datal - self.S[i][j + 1] = datar - } - } - } - - fileprivate func encrypt(block: ArraySlice) -> Array? { - var result = Array() - - var l = UInt32(bytes: block[block.startIndex..> 24) & 0xff), - UInt8((l >> 16) & 0xff) - ] - result += [ - UInt8((l >> 8) & 0xff), - UInt8((l >> 0) & 0xff) - ] - result += [ - UInt8((r >> 24) & 0xff), - UInt8((r >> 16) & 0xff) - ] - result += [ - UInt8((r >> 8) & 0xff), - UInt8((r >> 0) & 0xff) - ] - - return result - } - - fileprivate func decrypt(block: ArraySlice) -> Array? { - var result = Array() - - var l = UInt32(bytes: block[block.startIndex..> 24) & 0xff), - UInt8((l >> 16) & 0xff) - ] - result += [ - UInt8((l >> 8) & 0xff), - UInt8((l >> 0) & 0xff) - ] - result += [ - UInt8((r >> 24) & 0xff), - UInt8((r >> 16) & 0xff) - ] - result += [ - UInt8((r >> 8) & 0xff), - UInt8((r >> 0) & 0xff) - ] - return result - } - - /// Encrypts the 8-byte padded buffer - /// - /// - Parameters: - /// - l: left half - /// - r: right half - private func encryptBlowfishBlock(l: inout UInt32, r: inout UInt32) { - var Xl = l - var Xr = r - - for i in 0.. UInt32 { - let f1 = self.S[0][Int(x >> 24) & 0xff] - let f2 = self.S[1][Int(x >> 16) & 0xff] - let f3 = self.S[2][Int(x >> 8) & 0xff] - let f4 = self.S[3][Int(x & 0xff)] - return ((f1 &+ f2) ^ f3) &+ f4 - } -} - -extension Blowfish: Cipher { - /// Encrypt the 8-byte padded buffer, block by block. Note that for amounts of data larger than a block, it is not safe to just call encrypt() on successive blocks. - /// - /// - Parameter bytes: Plaintext data - /// - Returns: Encrypted data - public func encrypt(_ bytes: C) throws -> Array where C.Element == UInt8, C.Index == Int { - let bytes = self.padding.add(to: Array(bytes), blockSize: Blowfish.blockSize) // FIXME: Array(bytes) copies - - var out = Array() - out.reserveCapacity(bytes.count) - - for chunk in bytes.batched(by: Blowfish.blockSize) { - out += self.encryptWorker.encrypt(block: chunk) - } - - if self.blockMode.options.contains(.paddingRequired) && (out.count % Blowfish.blockSize != 0) { - throw Error.dataPaddingRequired - } - - return out - } - - /// Decrypt the 8-byte padded buffer - /// - /// - Parameter bytes: Ciphertext data - /// - Returns: Plaintext data - public func decrypt(_ bytes: C) throws -> Array where C.Element == UInt8, C.Index == Int { - if self.blockMode.options.contains(.paddingRequired) && (bytes.count % Blowfish.blockSize != 0) { - throw Error.dataPaddingRequired - } - - var out = Array() - out.reserveCapacity(bytes.count) - - for chunk in Array(bytes).batched(by: Blowfish.blockSize) { - out += self.decryptWorker.decrypt(block: chunk) // FIXME: copying here is innefective - } - - out = self.padding.remove(from: out, blockSize: Blowfish.blockSize) - - return out - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/CBCMAC.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/CBCMAC.swift deleted file mode 100644 index 941e4d1fa..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/CBCMAC.swift +++ /dev/null @@ -1,30 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -public final class CBCMAC: CMAC { - public override func authenticate(_ bytes: Array) throws -> Array { - var inBytes = bytes - bitPadding(to: &inBytes, blockSize: CMAC.BlockSize) - let blocks = inBytes.batched(by: CMAC.BlockSize) - - var lastBlockEncryptionResult: [UInt8] = CBCMAC.Zero - try blocks.forEach { block in - let aes = try AES(key: Array(key), blockMode: CBC(iv: lastBlockEncryptionResult), padding: .noPadding) - lastBlockEncryptionResult = try aes.encrypt(block) - } - - return lastBlockEncryptionResult - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/CMAC.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/CMAC.swift deleted file mode 100644 index f0e691cda..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/CMAC.swift +++ /dev/null @@ -1,106 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -public class CMAC: Authenticator { - public enum Error: Swift.Error { - case wrongKeyLength - } - - internal let key: SecureBytes - - internal static let BlockSize: Int = 16 - internal static let Zero: Array = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00] - private static let Rb: Array = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87] - - public init(key: Array) throws { - self.key = SecureBytes(bytes: key) - } - - // MARK: Authenticator - - // AES-CMAC - public func authenticate(_ bytes: Array) throws -> Array { - let cipher = try AES(key: Array(key), blockMode: CBC(iv: CMAC.Zero), padding: .noPadding) - return try self.authenticate(bytes, cipher: cipher) - } - - // CMAC using a Cipher - public func authenticate(_ bytes: Array, cipher: Cipher) throws -> Array { - let l = try cipher.encrypt(CMAC.Zero) - var subKey1 = self.leftShiftOneBit(l) - if (l[0] & 0x80) != 0 { - subKey1 = xor(CMAC.Rb, subKey1) - } - var subKey2 = self.leftShiftOneBit(subKey1) - if (subKey1[0] & 0x80) != 0 { - subKey2 = xor(CMAC.Rb, subKey2) - } - - let lastBlockComplete: Bool - let blockCount = (bytes.count + CMAC.BlockSize - 1) / CMAC.BlockSize - if blockCount == 0 { - lastBlockComplete = false - } else { - lastBlockComplete = bytes.count % CMAC.BlockSize == 0 - } - var paddedBytes = bytes - if !lastBlockComplete { - bitPadding(to: &paddedBytes, blockSize: CMAC.BlockSize) - } - - var blocks = Array(paddedBytes.batched(by: CMAC.BlockSize)) - var lastBlock = blocks.popLast()! - if lastBlockComplete { - lastBlock = xor(lastBlock, subKey1) - } else { - lastBlock = xor(lastBlock, subKey2) - } - - var x = Array(repeating: 0x00, count: CMAC.BlockSize) - var y = Array(repeating: 0x00, count: CMAC.BlockSize) - for block in blocks { - y = xor(block, x) - x = try cipher.encrypt(y) - } - // the difference between CMAC and CBC-MAC is that CMAC xors the final block with a secret value - y = self.process(lastBlock: lastBlock, with: x) - return try cipher.encrypt(y) - } - - func process(lastBlock: ArraySlice, with x: [UInt8]) -> [UInt8] { - xor(lastBlock, x) - } - - // MARK: Helper methods - - /** - Performs left shift by one bit to the bit string aquired after concatenating al bytes in the byte array - - parameters: - - bytes: byte array - - returns: bit shifted bit string split again in array of bytes - */ - private func leftShiftOneBit(_ bytes: Array) -> Array { - var shifted = Array(repeating: 0x00, count: bytes.count) - let last = bytes.count - 1 - for index in 0.. -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// https://tools.ietf.org/html/rfc7539 -// - -public final class ChaCha20: BlockCipher { - public enum Error: Swift.Error { - case invalidKeyOrInitializationVector - case notSupported - } - - public static let blockSize = 64 // 512 / 8 - public let keySize: Int - - fileprivate let key: Key - fileprivate var counter: Array - - public init(key: Array, iv nonce: Array) throws { - precondition(nonce.count == 12 || nonce.count == 8) - - if key.count != 32 { - throw Error.invalidKeyOrInitializationVector - } - - self.key = Key(bytes: key) - self.keySize = self.key.count - - if nonce.count == 8 { - self.counter = [0, 0, 0, 0, 0, 0, 0, 0] + nonce - } else { - self.counter = [0, 0, 0, 0] + nonce - } - - assert(self.counter.count == 16) - } - - /// https://tools.ietf.org/html/rfc7539#section-2.3. - fileprivate func core(block: inout Array, counter: Array, key: Array) { - precondition(block.count == ChaCha20.blockSize) - precondition(counter.count == 16) - precondition(key.count == 32) - - let j0: UInt32 = 0x61707865 - let j1: UInt32 = 0x3320646e // 0x3620646e sigma/tau - let j2: UInt32 = 0x79622d32 - let j3: UInt32 = 0x6b206574 - let j4: UInt32 = UInt32(bytes: key[0..<4]).bigEndian - let j5: UInt32 = UInt32(bytes: key[4..<8]).bigEndian - let j6: UInt32 = UInt32(bytes: key[8..<12]).bigEndian - let j7: UInt32 = UInt32(bytes: key[12..<16]).bigEndian - let j8: UInt32 = UInt32(bytes: key[16..<20]).bigEndian - let j9: UInt32 = UInt32(bytes: key[20..<24]).bigEndian - let j10: UInt32 = UInt32(bytes: key[24..<28]).bigEndian - let j11: UInt32 = UInt32(bytes: key[28..<32]).bigEndian - let j12: UInt32 = UInt32(bytes: counter[0..<4]).bigEndian - let j13: UInt32 = UInt32(bytes: counter[4..<8]).bigEndian - let j14: UInt32 = UInt32(bytes: counter[8..<12]).bigEndian - let j15: UInt32 = UInt32(bytes: counter[12..<16]).bigEndian - - var (x0, x1, x2, x3, x4, x5, x6, x7) = (j0, j1, j2, j3, j4, j5, j6, j7) - var (x8, x9, x10, x11, x12, x13, x14, x15) = (j8, j9, j10, j11, j12, j13, j14, j15) - - for _ in 0..<10 { // 20 rounds - x0 = x0 &+ x4 - x12 ^= x0 - x12 = (x12 << 16) | (x12 >> 16) - x8 = x8 &+ x12 - x4 ^= x8 - x4 = (x4 << 12) | (x4 >> 20) - x0 = x0 &+ x4 - x12 ^= x0 - x12 = (x12 << 8) | (x12 >> 24) - x8 = x8 &+ x12 - x4 ^= x8 - x4 = (x4 << 7) | (x4 >> 25) - x1 = x1 &+ x5 - x13 ^= x1 - x13 = (x13 << 16) | (x13 >> 16) - x9 = x9 &+ x13 - x5 ^= x9 - x5 = (x5 << 12) | (x5 >> 20) - x1 = x1 &+ x5 - x13 ^= x1 - x13 = (x13 << 8) | (x13 >> 24) - x9 = x9 &+ x13 - x5 ^= x9 - x5 = (x5 << 7) | (x5 >> 25) - x2 = x2 &+ x6 - x14 ^= x2 - x14 = (x14 << 16) | (x14 >> 16) - x10 = x10 &+ x14 - x6 ^= x10 - x6 = (x6 << 12) | (x6 >> 20) - x2 = x2 &+ x6 - x14 ^= x2 - x14 = (x14 << 8) | (x14 >> 24) - x10 = x10 &+ x14 - x6 ^= x10 - x6 = (x6 << 7) | (x6 >> 25) - x3 = x3 &+ x7 - x15 ^= x3 - x15 = (x15 << 16) | (x15 >> 16) - x11 = x11 &+ x15 - x7 ^= x11 - x7 = (x7 << 12) | (x7 >> 20) - x3 = x3 &+ x7 - x15 ^= x3 - x15 = (x15 << 8) | (x15 >> 24) - x11 = x11 &+ x15 - x7 ^= x11 - x7 = (x7 << 7) | (x7 >> 25) - x0 = x0 &+ x5 - x15 ^= x0 - x15 = (x15 << 16) | (x15 >> 16) - x10 = x10 &+ x15 - x5 ^= x10 - x5 = (x5 << 12) | (x5 >> 20) - x0 = x0 &+ x5 - x15 ^= x0 - x15 = (x15 << 8) | (x15 >> 24) - x10 = x10 &+ x15 - x5 ^= x10 - x5 = (x5 << 7) | (x5 >> 25) - x1 = x1 &+ x6 - x12 ^= x1 - x12 = (x12 << 16) | (x12 >> 16) - x11 = x11 &+ x12 - x6 ^= x11 - x6 = (x6 << 12) | (x6 >> 20) - x1 = x1 &+ x6 - x12 ^= x1 - x12 = (x12 << 8) | (x12 >> 24) - x11 = x11 &+ x12 - x6 ^= x11 - x6 = (x6 << 7) | (x6 >> 25) - x2 = x2 &+ x7 - x13 ^= x2 - x13 = (x13 << 16) | (x13 >> 16) - x8 = x8 &+ x13 - x7 ^= x8 - x7 = (x7 << 12) | (x7 >> 20) - x2 = x2 &+ x7 - x13 ^= x2 - x13 = (x13 << 8) | (x13 >> 24) - x8 = x8 &+ x13 - x7 ^= x8 - x7 = (x7 << 7) | (x7 >> 25) - x3 = x3 &+ x4 - x14 ^= x3 - x14 = (x14 << 16) | (x14 >> 16) - x9 = x9 &+ x14 - x4 ^= x9 - x4 = (x4 << 12) | (x4 >> 20) - x3 = x3 &+ x4 - x14 ^= x3 - x14 = (x14 << 8) | (x14 >> 24) - x9 = x9 &+ x14 - x4 ^= x9 - x4 = (x4 << 7) | (x4 >> 25) - } - - x0 = x0 &+ j0 - x1 = x1 &+ j1 - x2 = x2 &+ j2 - x3 = x3 &+ j3 - x4 = x4 &+ j4 - x5 = x5 &+ j5 - x6 = x6 &+ j6 - x7 = x7 &+ j7 - x8 = x8 &+ j8 - x9 = x9 &+ j9 - x10 = x10 &+ j10 - x11 = x11 &+ j11 - x12 = x12 &+ j12 - x13 = x13 &+ j13 - x14 = x14 &+ j14 - x15 = x15 &+ j15 - - block.replaceSubrange(0..<4, with: x0.bigEndian.bytes()) - block.replaceSubrange(4..<8, with: x1.bigEndian.bytes()) - block.replaceSubrange(8..<12, with: x2.bigEndian.bytes()) - block.replaceSubrange(12..<16, with: x3.bigEndian.bytes()) - block.replaceSubrange(16..<20, with: x4.bigEndian.bytes()) - block.replaceSubrange(20..<24, with: x5.bigEndian.bytes()) - block.replaceSubrange(24..<28, with: x6.bigEndian.bytes()) - block.replaceSubrange(28..<32, with: x7.bigEndian.bytes()) - block.replaceSubrange(32..<36, with: x8.bigEndian.bytes()) - block.replaceSubrange(36..<40, with: x9.bigEndian.bytes()) - block.replaceSubrange(40..<44, with: x10.bigEndian.bytes()) - block.replaceSubrange(44..<48, with: x11.bigEndian.bytes()) - block.replaceSubrange(48..<52, with: x12.bigEndian.bytes()) - block.replaceSubrange(52..<56, with: x13.bigEndian.bytes()) - block.replaceSubrange(56..<60, with: x14.bigEndian.bytes()) - block.replaceSubrange(60..<64, with: x15.bigEndian.bytes()) - } - - // XORKeyStream - func process(bytes: ArraySlice, counter: inout Array, key: Array) -> Array { - precondition(counter.count == 16) - precondition(key.count == 32) - - var block = Array(repeating: 0, count: ChaCha20.blockSize) - var bytesSlice = bytes - var out = Array(reserveCapacity: bytesSlice.count) - - while bytesSlice.count >= ChaCha20.blockSize { - self.core(block: &block, counter: counter, key: key) - for (i, x) in block.enumerated() { - out.append(bytesSlice[bytesSlice.startIndex + i] ^ x) - } - var u: UInt32 = 1 - for i in 0..<4 { - u += UInt32(counter[i]) - counter[i] = UInt8(u & 0xff) - u >>= 8 - } - bytesSlice = bytesSlice[bytesSlice.startIndex + ChaCha20.blockSize..) throws -> Array { - self.process(bytes: bytes, counter: &self.counter, key: Array(self.key)) - } - - public func decrypt(_ bytes: ArraySlice) throws -> Array { - try self.encrypt(bytes) - } -} - -// MARK: Encryptor - -extension ChaCha20 { - public struct ChaChaEncryptor: Cryptor, Updatable { - private var accumulated = Array() - private let chacha: ChaCha20 - - init(chacha: ChaCha20) { - self.chacha = chacha - } - - public mutating func update(withBytes bytes: ArraySlice, isLast: Bool = false) throws -> Array { - self.accumulated += bytes - - var encrypted = Array() - encrypted.reserveCapacity(self.accumulated.count) - for chunk in self.accumulated.batched(by: ChaCha20.blockSize) { - if isLast || self.accumulated.count >= ChaCha20.blockSize { - encrypted += try self.chacha.encrypt(chunk) - self.accumulated.removeFirst(chunk.count) // TODO: improve performance - } - } - return encrypted - } - - public func seek(to: Int) throws { - throw Error.notSupported - } - } -} - -// MARK: Decryptor - -extension ChaCha20 { - public struct ChaChaDecryptor: Cryptor, Updatable { - private var accumulated = Array() - - private var offset: Int = 0 - private var offsetToRemove: Int = 0 - private let chacha: ChaCha20 - - init(chacha: ChaCha20) { - self.chacha = chacha - } - - public mutating func update(withBytes bytes: ArraySlice, isLast: Bool = true) throws -> Array { - // prepend "offset" number of bytes at the beginning - if self.offset > 0 { - self.accumulated += Array(repeating: 0, count: self.offset) + bytes - self.offsetToRemove = self.offset - self.offset = 0 - } else { - self.accumulated += bytes - } - - var plaintext = Array() - plaintext.reserveCapacity(self.accumulated.count) - for chunk in self.accumulated.batched(by: ChaCha20.blockSize) { - if isLast || self.accumulated.count >= ChaCha20.blockSize { - plaintext += try self.chacha.decrypt(chunk) - - // remove "offset" from the beginning of first chunk - if self.offsetToRemove > 0 { - plaintext.removeFirst(self.offsetToRemove) // TODO: improve performance - self.offsetToRemove = 0 - } - - self.accumulated.removeFirst(chunk.count) - } - } - - return plaintext - } - - public func seek(to: Int) throws { - throw Error.notSupported - } - } -} - -// MARK: Cryptors - -extension ChaCha20: Cryptors { - //TODO: Use BlockEncryptor/BlockDecryptor - - public func makeEncryptor() -> Cryptor & Updatable { - ChaCha20.ChaChaEncryptor(chacha: self) - } - - public func makeDecryptor() -> Cryptor & Updatable { - ChaCha20.ChaChaDecryptor(chacha: self) - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Checksum.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Checksum.swift deleted file mode 100644 index 26ec12882..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Checksum.swift +++ /dev/null @@ -1,208 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -/// CRC - cyclic redundancy check code. -public final class Checksum { - - @usableFromInline - static let table32: Array = [ - 0x0000_0000, 0x7707_3096, 0xEE0E_612C, 0x9909_51BA, 0x076D_C419, 0x706A_F48F, 0xE963_A535, 0x9E64_95A3, - 0x0EDB_8832, 0x79DC_B8A4, 0xE0D5_E91E, 0x97D2_D988, 0x09B6_4C2B, 0x7EB1_7CBD, 0xE7B8_2D07, 0x90BF_1D91, - 0x1DB7_1064, 0x6AB0_20F2, 0xF3B9_7148, 0x84BE_41DE, 0x1ADA_D47D, 0x6DDD_E4EB, 0xF4D4_B551, 0x83D3_85C7, - 0x136C_9856, 0x646B_A8C0, 0xFD62_F97A, 0x8A65_C9EC, 0x1401_5C4F, 0x6306_6CD9, 0xFA0F_3D63, 0x8D08_0DF5, - 0x3B6E_20C8, 0x4C69_105E, 0xD560_41E4, 0xA267_7172, 0x3C03_E4D1, 0x4B04_D447, 0xD20D_85FD, 0xA50A_B56B, - 0x35B5_A8FA, 0x42B2_986C, 0xDBBB_C9D6, 0xACBC_F940, 0x32D8_6CE3, 0x45DF_5C75, 0xDCD6_0DCF, 0xABD1_3D59, - 0x26D9_30AC, 0x51DE_003A, 0xC8D7_5180, 0xBFD0_6116, 0x21B4_F4B5, 0x56B3_C423, 0xCFBA_9599, 0xB8BD_A50F, - 0x2802_B89E, 0x5F05_8808, 0xC60C_D9B2, 0xB10B_E924, 0x2F6F_7C87, 0x5868_4C11, 0xC161_1DAB, 0xB666_2D3D, - 0x76DC_4190, 0x01DB_7106, 0x98D2_20BC, 0xEFD5_102A, 0x71B1_8589, 0x06B6_B51F, 0x9FBF_E4A5, 0xE8B8_D433, - 0x7807_C9A2, 0x0F00_F934, 0x9609_A88E, 0xE10E_9818, 0x7F6A_0DBB, 0x086D_3D2D, 0x9164_6C97, 0xE663_5C01, - 0x6B6B_51F4, 0x1C6C_6162, 0x8565_30D8, 0xF262_004E, 0x6C06_95ED, 0x1B01_A57B, 0x8208_F4C1, 0xF50F_C457, - 0x65B0_D9C6, 0x12B7_E950, 0x8BBE_B8EA, 0xFCB9_887C, 0x62DD_1DDF, 0x15DA_2D49, 0x8CD3_7CF3, 0xFBD4_4C65, - 0x4DB2_6158, 0x3AB5_51CE, 0xA3BC_0074, 0xD4BB_30E2, 0x4ADF_A541, 0x3DD8_95D7, 0xA4D1_C46D, 0xD3D6_F4FB, - 0x4369_E96A, 0x346E_D9FC, 0xAD67_8846, 0xDA60_B8D0, 0x4404_2D73, 0x3303_1DE5, 0xAA0A_4C5F, 0xDD0D_7CC9, - 0x5005_713C, 0x2702_41AA, 0xBE0B_1010, 0xC90C_2086, 0x5768_B525, 0x206F_85B3, 0xB966_D409, 0xCE61_E49F, - 0x5EDE_F90E, 0x29D9_C998, 0xB0D0_9822, 0xC7D7_A8B4, 0x59B3_3D17, 0x2EB4_0D81, 0xB7BD_5C3B, 0xC0BA_6CAD, - 0xEDB8_8320, 0x9ABF_B3B6, 0x03B6_E20C, 0x74B1_D29A, 0xEAD5_4739, 0x9DD2_77AF, 0x04DB_2615, 0x73DC_1683, - 0xE363_0B12, 0x9464_3B84, 0x0D6D_6A3E, 0x7A6A_5AA8, 0xE40E_CF0B, 0x9309_FF9D, 0x0A00_AE27, 0x7D07_9EB1, - 0xF00F_9344, 0x8708_A3D2, 0x1E01_F268, 0x6906_C2FE, 0xF762_575D, 0x8065_67CB, 0x196C_3671, 0x6E6B_06E7, - 0xFED4_1B76, 0x89D3_2BE0, 0x10DA_7A5A, 0x67DD_4ACC, 0xF9B9_DF6F, 0x8EBE_EFF9, 0x17B7_BE43, 0x60B0_8ED5, - 0xD6D6_A3E8, 0xA1D1_937E, 0x38D8_C2C4, 0x4FDF_F252, 0xD1BB_67F1, 0xA6BC_5767, 0x3FB5_06DD, 0x48B2_364B, - 0xD80D_2BDA, 0xAF0A_1B4C, 0x3603_4AF6, 0x4104_7A60, 0xDF60_EFC3, 0xA867_DF55, 0x316E_8EEF, 0x4669_BE79, - 0xCB61_B38C, 0xBC66_831A, 0x256F_D2A0, 0x5268_E236, 0xCC0C_7795, 0xBB0B_4703, 0x2202_16B9, 0x5505_262F, - 0xC5BA_3BBE, 0xB2BD_0B28, 0x2BB4_5A92, 0x5CB3_6A04, 0xC2D7_FFA7, 0xB5D0_CF31, 0x2CD9_9E8B, 0x5BDE_AE1D, - 0x9B64_C2B0, 0xEC63_F226, 0x756A_A39C, 0x026D_930A, 0x9C09_06A9, 0xEB0E_363F, 0x7207_6785, 0x0500_5713, - 0x95BF_4A82, 0xE2B8_7A14, 0x7BB1_2BAE, 0x0CB6_1B38, 0x92D2_8E9B, 0xE5D5_BE0D, 0x7CDC_EFB7, 0x0BDB_DF21, - 0x86D3_D2D4, 0xF1D4_E242, 0x68DD_B3F8, 0x1FDA_836E, 0x81BE_16CD, 0xF6B9_265B, 0x6FB0_77E1, 0x18B7_4777, - 0x8808_5AE6, 0xFF0F_6A70, 0x6606_3BCA, 0x1101_0B5C, 0x8F65_9EFF, 0xF862_AE69, 0x616B_FFD3, 0x166C_CF45, - 0xA00A_E278, 0xD70D_D2EE, 0x4E04_8354, 0x3903_B3C2, 0xA767_2661, 0xD060_16F7, 0x4969_474D, 0x3E6E_77DB, - 0xAED1_6A4A, 0xD9D6_5ADC, 0x40DF_0B66, 0x37D8_3BF0, 0xA9BC_AE53, 0xDEBB_9EC5, 0x47B2_CF7F, 0x30B5_FFE9, - 0xBDBD_F21C, 0xCABA_C28A, 0x53B3_9330, 0x24B4_A3A6, 0xBAD0_3605, 0xCDD7_0693, 0x54DE_5729, 0x23D9_67BF, - 0xB366_7A2E, 0xC461_4AB8, 0x5D68_1B02, 0x2A6F_2B94, 0xB40B_BE37, 0xC30C_8EA1, 0x5A05_DF1B, 0x2D02_EF8D - ] - - @usableFromInline - static let table32c: Array = [ - 0x0000_0000, 0xF26B_8303, 0xE13B_70F7, 0x1350_F3F4, 0xC79A_971F, 0x35F1_141C, 0x26A1_E7E8, 0xD4CA_64EB, - 0x8AD9_58CF, 0x78B2_DBCC, 0x6BE2_2838, 0x9989_AB3B, 0x4D43_CFD0, 0xBF28_4CD3, 0xAC78_BF27, 0x5E13_3C24, - 0x105E_C76F, 0xE235_446C, 0xF165_B798, 0x030E_349B, 0xD7C4_5070, 0x25AF_D373, 0x36FF_2087, 0xC494_A384, - 0x9A87_9FA0, 0x68EC_1CA3, 0x7BBC_EF57, 0x89D7_6C54, 0x5D1D_08BF, 0xAF76_8BBC, 0xBC26_7848, 0x4E4D_FB4B, - 0x20BD_8EDE, 0xD2D6_0DDD, 0xC186_FE29, 0x33ED_7D2A, 0xE727_19C1, 0x154C_9AC2, 0x061C_6936, 0xF477_EA35, - 0xAA64_D611, 0x580F_5512, 0x4B5F_A6E6, 0xB934_25E5, 0x6DFE_410E, 0x9F95_C20D, 0x8CC5_31F9, 0x7EAE_B2FA, - 0x30E3_49B1, 0xC288_CAB2, 0xD1D8_3946, 0x23B3_BA45, 0xF779_DEAE, 0x0512_5DAD, 0x1642_AE59, 0xE429_2D5A, - 0xBA3A_117E, 0x4851_927D, 0x5B01_6189, 0xA96A_E28A, 0x7DA0_8661, 0x8FCB_0562, 0x9C9B_F696, 0x6EF0_7595, - 0x417B_1DBC, 0xB310_9EBF, 0xA040_6D4B, 0x522B_EE48, 0x86E1_8AA3, 0x748A_09A0, 0x67DA_FA54, 0x95B1_7957, - 0xCBA2_4573, 0x39C9_C670, 0x2A99_3584, 0xD8F2_B687, 0x0C38_D26C, 0xFE53_516F, 0xED03_A29B, 0x1F68_2198, - 0x5125_DAD3, 0xA34E_59D0, 0xB01E_AA24, 0x4275_2927, 0x96BF_4DCC, 0x64D4_CECF, 0x7784_3D3B, 0x85EF_BE38, - 0xDBFC_821C, 0x2997_011F, 0x3AC7_F2EB, 0xC8AC_71E8, 0x1C66_1503, 0xEE0D_9600, 0xFD5D_65F4, 0x0F36_E6F7, - 0x61C6_9362, 0x93AD_1061, 0x80FD_E395, 0x7296_6096, 0xA65C_047D, 0x5437_877E, 0x4767_748A, 0xB50C_F789, - 0xEB1F_CBAD, 0x1974_48AE, 0x0A24_BB5A, 0xF84F_3859, 0x2C85_5CB2, 0xDEEE_DFB1, 0xCDBE_2C45, 0x3FD5_AF46, - 0x7198_540D, 0x83F3_D70E, 0x90A3_24FA, 0x62C8_A7F9, 0xB602_C312, 0x4469_4011, 0x5739_B3E5, 0xA552_30E6, - 0xFB41_0CC2, 0x092A_8FC1, 0x1A7A_7C35, 0xE811_FF36, 0x3CDB_9BDD, 0xCEB0_18DE, 0xDDE0_EB2A, 0x2F8B_6829, - 0x82F6_3B78, 0x709D_B87B, 0x63CD_4B8F, 0x91A6_C88C, 0x456C_AC67, 0xB707_2F64, 0xA457_DC90, 0x563C_5F93, - 0x082F_63B7, 0xFA44_E0B4, 0xE914_1340, 0x1B7F_9043, 0xCFB5_F4A8, 0x3DDE_77AB, 0x2E8E_845F, 0xDCE5_075C, - 0x92A8_FC17, 0x60C3_7F14, 0x7393_8CE0, 0x81F8_0FE3, 0x5532_6B08, 0xA759_E80B, 0xB409_1BFF, 0x4662_98FC, - 0x1871_A4D8, 0xEA1A_27DB, 0xF94A_D42F, 0x0B21_572C, 0xDFEB_33C7, 0x2D80_B0C4, 0x3ED0_4330, 0xCCBB_C033, - 0xA24B_B5A6, 0x5020_36A5, 0x4370_C551, 0xB11B_4652, 0x65D1_22B9, 0x97BA_A1BA, 0x84EA_524E, 0x7681_D14D, - 0x2892_ED69, 0xDAF9_6E6A, 0xC9A9_9D9E, 0x3BC2_1E9D, 0xEF08_7A76, 0x1D63_F975, 0x0E33_0A81, 0xFC58_8982, - 0xB215_72C9, 0x407E_F1CA, 0x532E_023E, 0xA145_813D, 0x758F_E5D6, 0x87E4_66D5, 0x94B4_9521, 0x66DF_1622, - 0x38CC_2A06, 0xCAA7_A905, 0xD9F7_5AF1, 0x2B9C_D9F2, 0xFF56_BD19, 0x0D3D_3E1A, 0x1E6D_CDEE, 0xEC06_4EED, - 0xC38D_26C4, 0x31E6_A5C7, 0x22B6_5633, 0xD0DD_D530, 0x0417_B1DB, 0xF67C_32D8, 0xE52C_C12C, 0x1747_422F, - 0x4954_7E0B, 0xBB3F_FD08, 0xA86F_0EFC, 0x5A04_8DFF, 0x8ECE_E914, 0x7CA5_6A17, 0x6FF5_99E3, 0x9D9E_1AE0, - 0xD3D3_E1AB, 0x21B8_62A8, 0x32E8_915C, 0xC083_125F, 0x1449_76B4, 0xE622_F5B7, 0xF572_0643, 0x0719_8540, - 0x590A_B964, 0xAB61_3A67, 0xB831_C993, 0x4A5A_4A90, 0x9E90_2E7B, 0x6CFB_AD78, 0x7FAB_5E8C, 0x8DC0_DD8F, - 0xE330_A81A, 0x115B_2B19, 0x020B_D8ED, 0xF060_5BEE, 0x24AA_3F05, 0xD6C1_BC06, 0xC591_4FF2, 0x37FA_CCF1, - 0x69E9_F0D5, 0x9B82_73D6, 0x88D2_8022, 0x7AB9_0321, 0xAE73_67CA, 0x5C18_E4C9, 0x4F48_173D, 0xBD23_943E, - 0xF36E_6F75, 0x0105_EC76, 0x1255_1F82, 0xE03E_9C81, 0x34F4_F86A, 0xC69F_7B69, 0xD5CF_889D, 0x27A4_0B9E, - 0x79B7_37BA, 0x8BDC_B4B9, 0x988C_474D, 0x6AE7_C44E, 0xBE2D_A0A5, 0x4C46_23A6, 0x5F16_D052, 0xAD7D_5351 - ] - - @usableFromInline - static let table16: Array = [ - 0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241, - 0xC601, 0x06C0, 0x0780, 0xC741, 0x0500, 0xC5C1, 0xC481, 0x0440, - 0xCC01, 0x0CC0, 0x0D80, 0xCD41, 0x0F00, 0xCFC1, 0xCE81, 0x0E40, - 0x0A00, 0xCAC1, 0xCB81, 0x0B40, 0xC901, 0x09C0, 0x0880, 0xC841, - 0xD801, 0x18C0, 0x1980, 0xD941, 0x1B00, 0xDBC1, 0xDA81, 0x1A40, - 0x1E00, 0xDEC1, 0xDF81, 0x1F40, 0xDD01, 0x1DC0, 0x1C80, 0xDC41, - 0x1400, 0xD4C1, 0xD581, 0x1540, 0xD701, 0x17C0, 0x1680, 0xD641, - 0xD201, 0x12C0, 0x1380, 0xD341, 0x1100, 0xD1C1, 0xD081, 0x1040, - 0xF001, 0x30C0, 0x3180, 0xF141, 0x3300, 0xF3C1, 0xF281, 0x3240, - 0x3600, 0xF6C1, 0xF781, 0x3740, 0xF501, 0x35C0, 0x3480, 0xF441, - 0x3C00, 0xFCC1, 0xFD81, 0x3D40, 0xFF01, 0x3FC0, 0x3E80, 0xFE41, - 0xFA01, 0x3AC0, 0x3B80, 0xFB41, 0x3900, 0xF9C1, 0xF881, 0x3840, - 0x2800, 0xE8C1, 0xE981, 0x2940, 0xEB01, 0x2BC0, 0x2A80, 0xEA41, - 0xEE01, 0x2EC0, 0x2F80, 0xEF41, 0x2D00, 0xEDC1, 0xEC81, 0x2C40, - 0xE401, 0x24C0, 0x2580, 0xE541, 0x2700, 0xE7C1, 0xE681, 0x2640, - 0x2200, 0xE2C1, 0xE381, 0x2340, 0xE101, 0x21C0, 0x2080, 0xE041, - 0xA001, 0x60C0, 0x6180, 0xA141, 0x6300, 0xA3C1, 0xA281, 0x6240, - 0x6600, 0xA6C1, 0xA781, 0x6740, 0xA501, 0x65C0, 0x6480, 0xA441, - 0x6C00, 0xACC1, 0xAD81, 0x6D40, 0xAF01, 0x6FC0, 0x6E80, 0xAE41, - 0xAA01, 0x6AC0, 0x6B80, 0xAB41, 0x6900, 0xA9C1, 0xA881, 0x6840, - 0x7800, 0xB8C1, 0xB981, 0x7940, 0xBB01, 0x7BC0, 0x7A80, 0xBA41, - 0xBE01, 0x7EC0, 0x7F80, 0xBF41, 0x7D00, 0xBDC1, 0xBC81, 0x7C40, - 0xB401, 0x74C0, 0x7580, 0xB541, 0x7700, 0xB7C1, 0xB681, 0x7640, - 0x7200, 0xB2C1, 0xB381, 0x7340, 0xB101, 0x71C0, 0x7080, 0xB041, - 0x5000, 0x90C1, 0x9181, 0x5140, 0x9301, 0x53C0, 0x5280, 0x9241, - 0x9601, 0x56C0, 0x5780, 0x9741, 0x5500, 0x95C1, 0x9481, 0x5440, - 0x9C01, 0x5CC0, 0x5D80, 0x9D41, 0x5F00, 0x9FC1, 0x9E81, 0x5E40, - 0x5A00, 0x9AC1, 0x9B81, 0x5B40, 0x9901, 0x59C0, 0x5880, 0x9841, - 0x8801, 0x48C0, 0x4980, 0x8941, 0x4B00, 0x8BC1, 0x8A81, 0x4A40, - 0x4E00, 0x8EC1, 0x8F81, 0x4F40, 0x8D01, 0x4DC0, 0x4C80, 0x8C41, - 0x4400, 0x84C1, 0x8581, 0x4540, 0x8701, 0x47C0, 0x4680, 0x8641, - 0x8201, 0x42C0, 0x4380, 0x8341, 0x4100, 0x81C1, 0x8081, 0x4040 - ] - - @usableFromInline - init() { - // - } - - /// Polynomial: 0xEDB88320 (Reversed) - IEEE - @inlinable - func crc32(_ message: Array, seed: UInt32? = nil, reflect: Bool = true) -> UInt32 { - var crc: UInt32 = seed != nil ? seed! : 0xFFFF_FFFF - for chunk in message.batched(by: 256) { - for b in chunk { - let idx = Int((crc ^ UInt32(reflect ? b : reversed(b))) & 0xFF) - crc = (crc >> 8) ^ Checksum.table32[idx] - } - } - return (reflect ? crc : reversed(crc)) ^ 0xFFFF_FFFF - } - - /// Polynomial: 0x82F63B78 (Reversed) - Castagnoli - @inlinable - func crc32c(_ message: Array, seed: UInt32? = nil, reflect: Bool = true) -> UInt32 { - var crc: UInt32 = seed != nil ? seed! : 0xFFFF_FFFF - for chunk in message.batched(by: 256) { - for b in chunk { - let idx = Int((crc ^ UInt32(reflect ? b : reversed(b))) & 0xFF) - crc = (crc >> 8) ^ Checksum.table32c[idx] - } - } - return (reflect ? crc : reversed(crc)) ^ 0xFFFF_FFFF - } - - /// Polynomial: 0xA001 (Reversed) - IBM - @inlinable - func crc16(_ message: Array, seed: UInt16? = nil) -> UInt16 { - var crc: UInt16 = seed != nil ? seed! : 0x0000 - for chunk in message.batched(by: 256) { - for b in chunk { - crc = (crc >> 8) ^ Checksum.table16[Int((crc ^ UInt16(b)) & 0xFF)] - } - } - return crc - } -} - -// MARK: Public interface - -public extension Checksum { - /// Calculate CRC32. - /// - /// - parameter message: Message - /// - parameter seed: Seed value (Optional) - /// - parameter reflect: is reflect (default true) - /// - /// - returns: Calculated code - @inlinable - static func crc32(_ message: Array, seed: UInt32? = nil, reflect: Bool = true) -> UInt32 { - Checksum().crc32(message, seed: seed, reflect: reflect) - } - - /// Calculate CRC32C - /// - /// - parameter message: Message - /// - parameter seed: Seed value (Optional) - /// - parameter reflect: is reflect (default true) - /// - /// - returns: Calculated code - @inlinable - static func crc32c(_ message: Array, seed: UInt32? = nil, reflect: Bool = true) -> UInt32 { - Checksum().crc32c(message, seed: seed, reflect: reflect) - } - - /// Calculate CRC16 - /// - /// - parameter message: Message - /// - parameter seed: Seed value (Optional) - /// - /// - returns: Calculated code - @inlinable - static func crc16(_ message: Array, seed: UInt16? = nil) -> UInt16 { - Checksum().crc16(message, seed: seed) - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Cipher.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Cipher.swift deleted file mode 100644 index d7e669acb..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Cipher.swift +++ /dev/null @@ -1,47 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -public enum CipherError: Error { - case encrypt - case decrypt -} - -public protocol Cipher: AnyObject { - var keySize: Int { get } - - /// Encrypt given bytes at once - /// - /// - parameter bytes: Plaintext data - /// - returns: Encrypted data - func encrypt(_ bytes: ArraySlice) throws -> Array - func encrypt(_ bytes: Array) throws -> Array - - /// Decrypt given bytes at once - /// - /// - parameter bytes: Ciphertext data - /// - returns: Plaintext data - func decrypt(_ bytes: ArraySlice) throws -> Array - func decrypt(_ bytes: Array) throws -> Array -} - -extension Cipher { - public func encrypt(_ bytes: Array) throws -> Array { - try self.encrypt(bytes.slice) - } - - public func decrypt(_ bytes: Array) throws -> Array { - try self.decrypt(bytes.slice) - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Collection+Extension.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Collection+Extension.swift deleted file mode 100644 index a1b7d92d7..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Collection+Extension.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// -extension Collection where Self.Element == UInt8, Self.Index == Int { - // Big endian order - @inlinable - func toUInt32Array() -> Array { - guard !isEmpty else { - return [] - } - - let c = strideCount(from: startIndex, to: endIndex, by: 4) - return Array(unsafeUninitializedCapacity: c) { buf, count in - var counter = 0 - for idx in stride(from: startIndex, to: endIndex, by: 4) { - let val = UInt32(bytes: self, fromIndex: idx).bigEndian - buf[counter] = val - counter += 1 - } - count = counter - assert(counter == c) - } - } - - // Big endian order - @inlinable - func toUInt64Array() -> Array { - guard !isEmpty else { - return [] - } - - let c = strideCount(from: startIndex, to: endIndex, by: 8) - return Array(unsafeUninitializedCapacity: c) { buf, count in - var counter = 0 - for idx in stride(from: startIndex, to: endIndex, by: 8) { - let val = UInt64(bytes: self, fromIndex: idx).bigEndian - buf[counter] = val - counter += 1 - } - count = counter - assert(counter == c) - } - } -} - -@usableFromInline -func strideCount(from: Int, to: Int, by: Int) -> Int { - let count = to - from - return count / by + (count % by > 0 ? 1 : 0) -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/CompactMap.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/CompactMap.swift deleted file mode 100644 index 34a1a439e..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/CompactMap.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -#if swift(>=4.1) -// TODO: remove this file when Xcode 9.2 is no longer used -#else - extension Sequence { - @inlinable - public func compactMap(_ transform: (Element) throws -> ElementOfResult?) rethrows -> [ElementOfResult] { - try flatMap(transform) - } - } -#endif diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Cryptor.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Cryptor.swift deleted file mode 100644 index 25fd135cf..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Cryptor.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -/// Cryptor (Encryptor or Decryptor) -public protocol Cryptor { - /// Seek to position in file, if block mode allows random access. - /// - /// - parameter to: new value of counter - mutating func seek(to: Int) throws -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Cryptors.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Cryptors.swift deleted file mode 100644 index 2c22dde99..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Cryptors.swift +++ /dev/null @@ -1,44 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -#if canImport(Darwin) -import Darwin -#elseif canImport(Glibc) -import Glibc -#elseif canImport(ucrt) -import ucrt -#endif - -/// Worker cryptor/decryptor of `Updatable` types -public protocol Cryptors: AnyObject { - - /// Cryptor suitable for encryption - func makeEncryptor() throws -> Cryptor & Updatable - - /// Cryptor suitable for decryption - func makeDecryptor() throws -> Cryptor & Updatable - - /// Generate array of random bytes. Helper function. - static func randomIV(_ blockSize: Int) -> Array -} - -extension Cryptors { - /// Generate array of random values. - /// Convenience helper that uses `Swift.RandomNumberGenerator`. - /// - Parameter count: Length of array - public static func randomIV(_ count: Int) -> Array { - (0.. -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -@available(*, renamed: "Digest") -public typealias Hash = Digest - -/// Hash functions to calculate Digest. -public struct Digest { - /// Calculate MD5 Digest - /// - parameter bytes: input message - /// - returns: Digest bytes - public static func md5(_ bytes: Array) -> Array { - MD5().calculate(for: bytes) - } - - /// Calculate SHA1 Digest - /// - parameter bytes: input message - /// - returns: Digest bytes - public static func sha1(_ bytes: Array) -> Array { - SHA1().calculate(for: bytes) - } - - /// Calculate SHA2-224 Digest - /// - parameter bytes: input message - /// - returns: Digest bytes - public static func sha224(_ bytes: Array) -> Array { - self.sha2(bytes, variant: .sha224) - } - - /// Calculate SHA2-256 Digest - /// - parameter bytes: input message - /// - returns: Digest bytes - public static func sha256(_ bytes: Array) -> Array { - self.sha2(bytes, variant: .sha256) - } - - /// Calculate SHA2-384 Digest - /// - parameter bytes: input message - /// - returns: Digest bytes - public static func sha384(_ bytes: Array) -> Array { - self.sha2(bytes, variant: .sha384) - } - - /// Calculate SHA2-512 Digest - /// - parameter bytes: input message - /// - returns: Digest bytes - public static func sha512(_ bytes: Array) -> Array { - self.sha2(bytes, variant: .sha512) - } - - /// Calculate SHA2 Digest - /// - parameter bytes: input message - /// - parameter variant: SHA-2 variant - /// - returns: Digest bytes - public static func sha2(_ bytes: Array, variant: SHA2.Variant) -> Array { - SHA2(variant: variant).calculate(for: bytes) - } - - /// Calculate SHA3 Digest - /// - parameter bytes: input message - /// - parameter variant: SHA-3 variant - /// - returns: Digest bytes - public static func sha3(_ bytes: Array, variant: SHA3.Variant) -> Array { - SHA3(variant: variant).calculate(for: bytes) - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/DigestType.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/DigestType.swift deleted file mode 100644 index c99f081ff..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/DigestType.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -internal protocol DigestType { - func calculate(for bytes: Array) -> Array -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Foundation/AES+Foundation.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Foundation/AES+Foundation.swift deleted file mode 100644 index 3c6055c7b..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Foundation/AES+Foundation.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import Foundation - -extension AES { - /// Initialize with CBC block mode. - /// - /// - Parameters: - /// - key: Key as a String. - /// - iv: IV as a String. - /// - padding: Padding - /// - Throws: Error - /// - /// The input is a String, that is treat as sequence of bytes made directly out of String. - /// If input is Base64 encoded data (which is a String technically) it is not decoded automatically for you. - public convenience init(key: String, iv: String, padding: Padding = .pkcs7) throws { - try self.init(key: key.bytes, blockMode: CBC(iv: iv.bytes), padding: padding) - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Foundation/Array+Foundation.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Foundation/Array+Foundation.swift deleted file mode 100644 index 64f7f116e..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Foundation/Array+Foundation.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import Foundation - -public extension Array where Element == UInt8 { - func toBase64() -> String { - Data(self).base64EncodedString() - } - - init(base64: String) { - self.init() - - guard let decodedData = Data(base64Encoded: base64) else { - return - } - - append(contentsOf: decodedData.bytes) - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Foundation/Blowfish+Foundation.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Foundation/Blowfish+Foundation.swift deleted file mode 100644 index 57c1eea7b..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Foundation/Blowfish+Foundation.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import Foundation - -extension Blowfish { - /// Initialize with CBC block mode. - public convenience init(key: String, iv: String, padding: Padding = .pkcs7) throws { - try self.init(key: key.bytes, blockMode: CBC(iv: iv.bytes), padding: padding) - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Foundation/ChaCha20+Foundation.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Foundation/ChaCha20+Foundation.swift deleted file mode 100644 index 347f45887..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Foundation/ChaCha20+Foundation.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import Foundation - -extension ChaCha20 { - public convenience init(key: String, iv: String) throws { - try self.init(key: key.bytes, iv: iv.bytes) - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Foundation/Data+Extension.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Foundation/Data+Extension.swift deleted file mode 100644 index 3a9e2c951..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Foundation/Data+Extension.swift +++ /dev/null @@ -1,92 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import Foundation - -extension Data { - /// Two octet checksum as defined in RFC-4880. Sum of all octets, mod 65536 - public func checksum() -> UInt16 { - let s = self.withUnsafeBytes { buf in - return buf.lazy.map(UInt32.init).reduce(UInt32(0), +) - } - return UInt16(s % 65535) - } - - public func md5() -> Data { - Data( Digest.md5(bytes)) - } - - public func sha1() -> Data { - Data( Digest.sha1(bytes)) - } - - public func sha224() -> Data { - Data( Digest.sha224(bytes)) - } - - public func sha256() -> Data { - Data( Digest.sha256(bytes)) - } - - public func sha384() -> Data { - Data( Digest.sha384(bytes)) - } - - public func sha512() -> Data { - Data( Digest.sha512(bytes)) - } - - public func sha3(_ variant: SHA3.Variant) -> Data { - Data( Digest.sha3(bytes, variant: variant)) - } - - public func crc32(seed: UInt32? = nil, reflect: Bool = true) -> Data { - Data( Checksum.crc32(bytes, seed: seed, reflect: reflect).bytes()) - } - - public func crc32c(seed: UInt32? = nil, reflect: Bool = true) -> Data { - Data( Checksum.crc32c(bytes, seed: seed, reflect: reflect).bytes()) - } - - public func crc16(seed: UInt16? = nil) -> Data { - Data( Checksum.crc16(bytes, seed: seed).bytes()) - } - - public func encrypt(cipher: Cipher) throws -> Data { - Data( try cipher.encrypt(bytes.slice)) - } - - public func decrypt(cipher: Cipher) throws -> Data { - Data( try cipher.decrypt(bytes.slice)) - } - - public func authenticate(with authenticator: Authenticator) throws -> Data { - Data( try authenticator.authenticate(bytes)) - } -} - -extension Data { - public init(hex: String) { - self.init(Array(hex: hex)) - } - - public var bytes: Array { - Array(self) - } - - public func toHexString() -> String { - self.bytes.toHexString() - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Foundation/HMAC+Foundation.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Foundation/HMAC+Foundation.swift deleted file mode 100644 index 99b7b6270..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Foundation/HMAC+Foundation.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import Foundation - -extension HMAC { - public convenience init(key: String, variant: HMAC.Variant = .md5) throws { - self.init(key: key.bytes, variant: variant) - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Foundation/Rabbit+Foundation.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Foundation/Rabbit+Foundation.swift deleted file mode 100644 index d3543b2f6..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Foundation/Rabbit+Foundation.swift +++ /dev/null @@ -1,26 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import Foundation - -extension Rabbit { - public convenience init(key: String) throws { - try self.init(key: key.bytes) - } - - public convenience init(key: String, iv: String) throws { - try self.init(key: key.bytes, iv: iv.bytes) - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Foundation/String+FoundationExtension.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Foundation/String+FoundationExtension.swift deleted file mode 100644 index 89a846498..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Foundation/String+FoundationExtension.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import Foundation - -extension String { - /// Return Base64 back to String - public func decryptBase64ToString(cipher: Cipher) throws -> String { - guard let decodedData = Data(base64Encoded: self, options: []) else { - throw CipherError.decrypt - } - - let decrypted = try decodedData.decrypt(cipher: cipher) - - if let decryptedString = String(data: decrypted, encoding: String.Encoding.utf8) { - return decryptedString - } - - throw CipherError.decrypt - } - - public func decryptBase64(cipher: Cipher) throws -> Array { - guard let decodedData = Data(base64Encoded: self, options: []) else { - throw CipherError.decrypt - } - - return try decodedData.decrypt(cipher: cipher).bytes - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Foundation/Utils+Foundation.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Foundation/Utils+Foundation.swift deleted file mode 100644 index f146cf765..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Foundation/Utils+Foundation.swift +++ /dev/null @@ -1,27 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import Foundation - -func perf(_ text: String, closure: () -> Void) { - let measurementStart = Date() - - closure() - - let measurementStop = Date() - let executionTime = measurementStop.timeIntervalSince(measurementStart) - - print("\(text) \(executionTime)") -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Generics.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Generics.swift deleted file mode 100644 index dfd90bbe3..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Generics.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -/// Array of bytes. Caution: don't use directly because generic is slow. -/// -/// - parameter value: integer value -/// - parameter length: length of output array. By default size of value type -/// -/// - returns: Array of bytes -@_specialize(where T == Int) -@_specialize(where T == UInt) -@_specialize(where T == UInt8) -@_specialize(where T == UInt16) -@_specialize(where T == UInt32) -@_specialize(where T == UInt64) -@inlinable -func arrayOfBytes(value: T, length totalBytes: Int = MemoryLayout.size) -> Array { - let valuePointer = UnsafeMutablePointer.allocate(capacity: 1) - valuePointer.pointee = value - - let bytesPointer = UnsafeMutablePointer(OpaquePointer(valuePointer)) - var bytes = Array(repeating: 0, count: totalBytes) - for j in 0...size, totalBytes) { - bytes[totalBytes - 1 - j] = (bytesPointer + j).pointee - } - - valuePointer.deinitialize(count: 1) - valuePointer.deallocate() - - return bytes -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/HKDF.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/HKDF.swift deleted file mode 100644 index 5f48c0a6c..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/HKDF.swift +++ /dev/null @@ -1,86 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// https://www.ietf.org/rfc/rfc5869.txt -// - -#if canImport(Darwin) -import Darwin -#elseif canImport(Glibc) -import Glibc -#elseif canImport(ucrt) -import ucrt -#endif - -/// A key derivation function. -/// -/// HKDF - HMAC-based Extract-and-Expand Key Derivation Function. -public struct HKDF { - public enum Error: Swift.Error { - case invalidInput - case derivedKeyTooLong - } - - private let numBlocks: Int // l - private let dkLen: Int - private let info: Array - private let prk: Array - private let variant: HMAC.Variant - - /// - parameters: - /// - variant: hash variant - /// - salt: optional salt (if not provided, it is set to a sequence of variant.digestLength zeros) - /// - info: optional context and application specific information - /// - keyLength: intended length of derived key - public init(password: Array, salt: Array? = nil, info: Array? = nil, keyLength: Int? = nil /* dkLen */, variant: HMAC.Variant = .sha2(.sha256)) throws { - guard !password.isEmpty else { - throw Error.invalidInput - } - - let dkLen = keyLength ?? variant.digestLength - let keyLengthFinal = Double(dkLen) - let hLen = Double(variant.digestLength) - let numBlocks = Int(ceil(keyLengthFinal / hLen)) // l = ceil(keyLength / hLen) - guard numBlocks <= 255 else { - throw Error.derivedKeyTooLong - } - - /// HKDF-Extract(salt, password) -> PRK - /// - PRK - a pseudo-random key; it is used by calculate() - self.prk = try HMAC(key: salt ?? [], variant: variant).authenticate(password) - self.info = info ?? [] - self.variant = variant - self.dkLen = dkLen - self.numBlocks = numBlocks - } - - public func calculate() throws -> Array { - let hmac = HMAC(key: prk, variant: variant) - var ret = Array() - ret.reserveCapacity(self.numBlocks * self.variant.digestLength) - var value = Array() - for i in 1...self.numBlocks { - value.append(contentsOf: self.info) - value.append(UInt8(i)) - - let bytes = try hmac.authenticate(value) - ret.append(contentsOf: bytes) - - /// update value to use it as input for next iteration - value = bytes - } - return Array(ret.prefix(self.dkLen)) - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/HMAC.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/HMAC.swift deleted file mode 100644 index d86413133..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/HMAC.swift +++ /dev/null @@ -1,124 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -public final class HMAC: Authenticator { - public enum Error: Swift.Error { - case authenticateError - case invalidInput - } - - public enum Variant { - case md5 - case sha1 - case sha2(SHA2.Variant) - case sha3(SHA3.Variant) - - @available(*, deprecated, message: "Use sha2(variant) instead.") - case sha256, sha384, sha512 - - var digestLength: Int { - switch self { - case .sha1: - return SHA1.digestLength - case .sha256: - return SHA2.Variant.sha256.digestLength - case .sha384: - return SHA2.Variant.sha384.digestLength - case .sha512: - return SHA2.Variant.sha512.digestLength - case .sha2(let variant): - return variant.digestLength - case .sha3(let variant): - return variant.digestLength - case .md5: - return MD5.digestLength - } - } - - func calculateHash(_ bytes: Array) -> Array { - switch self { - case .sha1: - return Digest.sha1(bytes) - case .sha256: - return Digest.sha256(bytes) - case .sha384: - return Digest.sha384(bytes) - case .sha512: - return Digest.sha512(bytes) - case .sha2(let variant): - return Digest.sha2(bytes, variant: variant) - case .sha3(let variant): - return Digest.sha3(bytes, variant: variant) - case .md5: - return Digest.md5(bytes) - } - } - - func blockSize() -> Int { - switch self { - case .md5: - return MD5.blockSize - case .sha1: - return SHA1.blockSize - case .sha256: - return SHA2.Variant.sha256.blockSize - case .sha384: - return SHA2.Variant.sha384.blockSize - case .sha512: - return SHA2.Variant.sha512.blockSize - case .sha2(let variant): - return variant.blockSize - case .sha3(let variant): - return variant.blockSize - } - } - } - - var key: Array - let variant: Variant - - public init(key: Array, variant: HMAC.Variant = .md5) { - self.variant = variant - self.key = key - - if key.count > variant.blockSize() { - let hash = variant.calculateHash(key) - self.key = hash - } - - if key.count < variant.blockSize() { - self.key = ZeroPadding().add(to: key, blockSize: variant.blockSize()) - } - } - - // MARK: Authenticator - - public func authenticate(_ bytes: Array) throws -> Array { - var opad = Array(repeating: 0x5c, count: variant.blockSize()) - for idx in self.key.indices { - opad[idx] = self.key[idx] ^ opad[idx] - } - var ipad = Array(repeating: 0x36, count: variant.blockSize()) - for idx in self.key.indices { - ipad[idx] = self.key[idx] ^ ipad[idx] - } - - let ipadAndMessageHash = self.variant.calculateHash(ipad + bytes) - let result = self.variant.calculateHash(opad + ipadAndMessageHash) - - // return Array(result[0..<10]) // 80 bits - return result - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/ISO10126Padding.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/ISO10126Padding.swift deleted file mode 100644 index 8aebd1140..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/ISO10126Padding.swift +++ /dev/null @@ -1,56 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import Foundation - -/// Padding with random bytes, ending with the number of added bytes. -/// Read the [Wikipedia](https://en.wikipedia.org/wiki/Padding_(cryptography)#ISO_10126) -/// and [Crypto-IT](http://www.crypto-it.net/eng/theory/padding.html) articles for more info. -struct ISO10126Padding: PaddingProtocol { - init() { - } - - @inlinable - func add(to bytes: Array, blockSize: Int) -> Array { - let padding = UInt8(blockSize - (bytes.count % blockSize)) - var withPadding = bytes - if padding > 0 { - withPadding += (0..<(padding - 1)).map { _ in UInt8.random(in: 0...255) } + [padding] - } - return withPadding - } - - @inlinable - func remove(from bytes: Array, blockSize: Int?) -> Array { - guard !bytes.isEmpty, let lastByte = bytes.last else { - return bytes - } - - assert(!bytes.isEmpty, "Need bytes to remove padding") - - let padding = Int(lastByte) // last byte - let finalLength = bytes.count - padding - - if finalLength < 0 { - return bytes - } - - if padding >= 1 { - return Array(bytes[0.. -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import Foundation - -// First byte is 0x80, rest is zero padding -// http://www.crypto-it.net/eng/theory/padding.html -// http://www.embedx.com/pdfs/ISO_STD_7816/info_isoiec7816-4%7Bed21.0%7Den.pdf -struct ISO78164Padding: PaddingProtocol { - init() { - } - - @inlinable - func add(to bytes: Array, blockSize: Int) -> Array { - var padded = Array(bytes) - padded.append(0x80) - - while (padded.count % blockSize) != 0 { - padded.append(0x00) - } - return padded - } - - @inlinable - func remove(from bytes: Array, blockSize _: Int?) -> Array { - if let idx = bytes.lastIndex(of: 0x80) { - return Array(bytes[.. -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -#if canImport(Darwin) -import Darwin -#elseif canImport(Glibc) -import Glibc -#elseif canImport(ucrt) -import ucrt -#endif - -extension FixedWidthInteger { - @inlinable - func bytes(totalBytes: Int = MemoryLayout.size) -> Array { - arrayOfBytes(value: self.littleEndian, length: totalBytes) - // TODO: adjust bytes order - // var value = self.littleEndian - // return withUnsafeBytes(of: &value, Array.init).reversed() - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/MD5.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/MD5.swift deleted file mode 100644 index bd7925f1a..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/MD5.swift +++ /dev/null @@ -1,161 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -public final class MD5: DigestType { - static let blockSize: Int = 64 - static let digestLength: Int = 16 // 128 / 8 - fileprivate static let hashInitialValue: Array = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476] - - fileprivate var accumulated = Array() - fileprivate var processedBytesTotalCount: Int = 0 - fileprivate var accumulatedHash: Array = MD5.hashInitialValue - - /** specifies the per-round shift amounts */ - private let s: Array = [ - 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, - 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, - 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, - 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21 - ] - - /** binary integer part of the sines of integers (Radians) */ - private let k: Array = [ - 0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee, - 0xf57c0faf, 0x4787c62a, 0xa8304613, 0xfd469501, - 0x698098d8, 0x8b44f7af, 0xffff5bb1, 0x895cd7be, - 0x6b901122, 0xfd987193, 0xa679438e, 0x49b40821, - 0xf61e2562, 0xc040b340, 0x265e5a51, 0xe9b6c7aa, - 0xd62f105d, 0x2441453, 0xd8a1e681, 0xe7d3fbc8, - 0x21e1cde6, 0xc33707d6, 0xf4d50d87, 0x455a14ed, - 0xa9e3e905, 0xfcefa3f8, 0x676f02d9, 0x8d2a4c8a, - 0xfffa3942, 0x8771f681, 0x6d9d6122, 0xfde5380c, - 0xa4beea44, 0x4bdecfa9, 0xf6bb4b60, 0xbebfbc70, - 0x289b7ec6, 0xeaa127fa, 0xd4ef3085, 0x4881d05, - 0xd9d4d039, 0xe6db99e5, 0x1fa27cf8, 0xc4ac5665, - 0xf4292244, 0x432aff97, 0xab9423a7, 0xfc93a039, - 0x655b59c3, 0x8f0ccc92, 0xffeff47d, 0x85845dd1, - 0x6fa87e4f, 0xfe2ce6e0, 0xa3014314, 0x4e0811a1, - 0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391 - ] - - public init() { - } - - public func calculate(for bytes: Array) -> Array { - do { - return try update(withBytes: bytes.slice, isLast: true) - } catch { - fatalError() - } - } - - // mutating currentHash in place is way faster than returning new result - fileprivate func process(block chunk: ArraySlice, currentHash: inout Array) { - assert(chunk.count == 16 * 4) - - // Initialize hash value for this chunk: - var A: UInt32 = currentHash[0] - var B: UInt32 = currentHash[1] - var C: UInt32 = currentHash[2] - var D: UInt32 = currentHash[3] - - var dTemp: UInt32 = 0 - - // Main loop - for j in 0.., isLast: Bool = false) throws -> Array { - self.accumulated += bytes - - if isLast { - let lengthInBits = (processedBytesTotalCount + self.accumulated.count) * 8 - let lengthBytes = lengthInBits.bytes(totalBytes: 64 / 8) // A 64-bit representation of b - - // Step 1. Append padding - bitPadding(to: &self.accumulated, blockSize: MD5.blockSize, allowance: 64 / 8) - - // Step 2. Append Length a 64-bit representation of lengthInBits - self.accumulated += lengthBytes.reversed() - } - - var processedBytes = 0 - for chunk in self.accumulated.batched(by: MD5.blockSize) { - if isLast || (self.accumulated.count - processedBytes) >= MD5.blockSize { - self.process(block: chunk, currentHash: &self.accumulatedHash) - processedBytes += chunk.count - } - } - self.accumulated.removeFirst(processedBytes) - self.processedBytesTotalCount += processedBytes - - // output current hash - var result = Array() - result.reserveCapacity(MD5.digestLength) - - for hElement in self.accumulatedHash { - let hLE = hElement.littleEndian - result += Array(arrayLiteral: UInt8(hLE & 0xff), UInt8((hLE >> 8) & 0xff), UInt8((hLE >> 16) & 0xff), UInt8((hLE >> 24) & 0xff)) - } - - // reset hash value for instance - if isLast { - self.accumulatedHash = MD5.hashInitialValue - } - - return result - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/NoPadding.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/NoPadding.swift deleted file mode 100644 index 9c75f6f3a..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/NoPadding.swift +++ /dev/null @@ -1,27 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -struct NoPadding: PaddingProtocol { - init() { - } - - func add(to data: Array, blockSize _: Int) -> Array { - data - } - - func remove(from data: Array, blockSize _: Int?) -> Array { - data - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Operators.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Operators.swift deleted file mode 100644 index cee442d95..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Operators.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -/* - Bit shifting with overflow protection using overflow operator "&". - Approach is consistent with standard overflow operators &+, &-, &*, &/ - and introduce new overflow operators for shifting: &<<, &>> - - Note: Works with unsigned integers values only - - Usage - - var i = 1 // init - var j = i &<< 2 //shift left - j &<<= 2 //shift left and assign - - @see: https://medium.com/@krzyzanowskim/swiftly-shift-bits-and-protect-yourself-be33016ce071 - - This fuctonality is now implemented as part of Swift 3, SE-0104 https://github.com/apple/swift-evolution/blob/master/proposals/0104-improved-integers.md - */ diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/PKCS/PBKDF1.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/PKCS/PBKDF1.swift deleted file mode 100644 index b7e8e70bf..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/PKCS/PBKDF1.swift +++ /dev/null @@ -1,97 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -public extension PKCS5 { - /// A key derivation function. - /// - /// PBKDF1 is recommended only for compatibility with existing - /// applications since the keys it produces may not be large enough for - /// some applications. - struct PBKDF1 { - public enum Error: Swift.Error { - case invalidInput - case derivedKeyTooLong - } - - public enum Variant { - case md5, sha1 - - @usableFromInline - var size: Int { - switch self { - case .md5: - return MD5.digestLength - case .sha1: - return SHA1.digestLength - } - } - - @usableFromInline - func calculateHash(_ bytes: Array) -> Array { - switch self { - case .sha1: - return Digest.sha1(bytes) - case .md5: - return Digest.md5(bytes) - } - } - } - - @usableFromInline - let iterations: Int // c - - @usableFromInline - let variant: Variant - - @usableFromInline - let keyLength: Int - - @usableFromInline - let t1: Array - - /// - parameters: - /// - salt: salt, an eight-bytes - /// - variant: hash variant - /// - iterations: iteration count, a positive integer - /// - keyLength: intended length of derived key - public init(password: Array, salt: Array, variant: Variant = .sha1, iterations: Int = 4096 /* c */, keyLength: Int? = nil /* dkLen */ ) throws { - precondition(iterations > 0) - precondition(salt.count == 8) - - let keyLength = keyLength ?? variant.size - - if keyLength > variant.size { - throw Error.derivedKeyTooLong - } - - let t1 = variant.calculateHash(password + salt) - - self.iterations = iterations - self.variant = variant - self.keyLength = keyLength - self.t1 = t1 - } - - /// Apply the underlying hash function Hash for c iterations - @inlinable - public func calculate() -> Array { - var t = self.t1 - for _ in 2...self.iterations { - t = self.variant.calculateHash(t) - } - return Array(t[0.. -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// https://www.ietf.org/rfc/rfc2898.txt -// - -#if canImport(Darwin) -import Darwin -#elseif canImport(Glibc) -import Glibc -#elseif canImport(ucrt) -import ucrt -#endif - -public extension PKCS5 { - /// A key derivation function. - /// - /// PBKDF2 - Password-Based Key Derivation Function 2. Key stretching technique. - /// DK = PBKDF2(PRF, Password, Salt, c, dkLen) - struct PBKDF2 { - public enum Error: Swift.Error { - case invalidInput - case derivedKeyTooLong - } - - private let salt: Array // S - fileprivate let iterations: Int // c - private let numBlocks: Int // l - private let dkLen: Int - fileprivate let prf: HMAC - - /// - parameters: - /// - salt: salt - /// - variant: hash variant - /// - iterations: iteration count, a positive integer - /// - keyLength: intended length of derived key - /// - variant: MAC variant. Defaults to SHA256 - public init(password: Array, salt: Array, iterations: Int = 4096 /* c */, keyLength: Int? = nil /* dkLen */, variant: HMAC.Variant = .sha2(.sha256)) throws { - precondition(iterations > 0) - - let prf = HMAC(key: password, variant: variant) - - guard iterations > 0 && !salt.isEmpty else { - throw Error.invalidInput - } - - self.dkLen = keyLength ?? variant.digestLength - let keyLengthFinal = Double(dkLen) - let hLen = Double(prf.variant.digestLength) - if keyLengthFinal > (pow(2, 32) - 1) * hLen { - throw Error.derivedKeyTooLong - } - - self.salt = salt - self.iterations = iterations - self.prf = prf - - self.numBlocks = Int(ceil(Double(keyLengthFinal) / hLen)) // l = ceil(keyLength / hLen) - } - - public func calculate() throws -> Array { - var ret = Array() - ret.reserveCapacity(self.numBlocks * self.prf.variant.digestLength) - for i in 1...self.numBlocks { - // for each block T_i = U_1 ^ U_2 ^ ... ^ U_iter - if let value = try calculateBlock(self.salt, blockNum: i) { - ret.append(contentsOf: value) - } - } - return Array(ret.prefix(self.dkLen)) - } - } -} - -private extension PKCS5.PBKDF2 { - func ARR(_ i: Int) -> Array { - var inti = Array(repeating: 0, count: 4) - inti[0] = UInt8((i >> 24) & 0xff) - inti[1] = UInt8((i >> 16) & 0xff) - inti[2] = UInt8((i >> 8) & 0xff) - inti[3] = UInt8(i & 0xff) - return inti - } - - // F (P, S, c, i) = U_1 \xor U_2 \xor ... \xor U_c - // U_1 = PRF (P, S || INT (i)) - func calculateBlock(_ salt: Array, blockNum: Int) throws -> Array? { - guard let u1 = try? prf.authenticate(salt + ARR(blockNum)) else { // blockNum.bytes() is slower - return nil - } - - var u = u1 - var ret = u - if iterations > 1 { - // U_2 = PRF (P, U_1) , - // U_c = PRF (P, U_{c-1}) . - for _ in 2...iterations { - u = try prf.authenticate(u) - for x in 0.. -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// PKCS is a group of public-key cryptography standards devised -// and published by RSA Security Inc, starting in the early 1990s. -// - -public enum PKCS5 { - typealias Padding = PKCS7Padding -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS7.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS7.swift deleted file mode 100644 index 2831c3713..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS7.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -public enum PKCS7 { - typealias Padding = PKCS7Padding -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS7Padding.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS7Padding.swift deleted file mode 100644 index cb97917a3..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS7Padding.swift +++ /dev/null @@ -1,62 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// PKCS is a group of public-key cryptography standards devised -// and published by RSA Security Inc, starting in the early 1990s. -// - -struct PKCS7Padding: PaddingProtocol { - enum Error: Swift.Error { - case invalidPaddingValue - } - - init() { - } - - @inlinable - func add(to bytes: Array, blockSize: Int) -> Array { - let padding = UInt8(blockSize - (bytes.count % blockSize)) - var withPadding = bytes - if padding == 0 { - // If the original data is a multiple of N bytes, then an extra block of bytes with value N is added. - withPadding += Array(repeating: UInt8(blockSize), count: Int(blockSize)) - } else { - // The value of each added byte is the number of bytes that are added - withPadding += Array(repeating: padding, count: Int(padding)) - } - return withPadding - } - - @inlinable - func remove(from bytes: Array, blockSize _: Int?) -> Array { - guard !bytes.isEmpty, let lastByte = bytes.last else { - return bytes - } - - assert(!bytes.isEmpty, "Need bytes to remove padding") - - let padding = Int(lastByte) // last byte - let finalLength = bytes.count - padding - - if finalLength < 0 { - return bytes - } - - if padding >= 1 { - return Array(bytes[0.. -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -public protocol PaddingProtocol { - func add(to: Array, blockSize: Int) -> Array - func remove(from: Array, blockSize: Int?) -> Array -} - -public enum Padding: PaddingProtocol { - case noPadding, zeroPadding, pkcs7, pkcs5, iso78164, iso10126 - - public func add(to: Array, blockSize: Int) -> Array { - switch self { - case .noPadding: - return to // NoPadding().add(to: to, blockSize: blockSize) - case .zeroPadding: - return ZeroPadding().add(to: to, blockSize: blockSize) - case .pkcs7: - return PKCS7.Padding().add(to: to, blockSize: blockSize) - case .pkcs5: - return PKCS5.Padding().add(to: to, blockSize: blockSize) - case .iso78164: - return ISO78164Padding().add(to: to, blockSize: blockSize) - case .iso10126: - return ISO10126Padding().add(to: to, blockSize: blockSize) - } - } - - public func remove(from: Array, blockSize: Int?) -> Array { - switch self { - case .noPadding: - return from //NoPadding().remove(from: from, blockSize: blockSize) - case .zeroPadding: - return ZeroPadding().remove(from: from, blockSize: blockSize) - case .pkcs7: - return PKCS7.Padding().remove(from: from, blockSize: blockSize) - case .pkcs5: - return PKCS5.Padding().remove(from: from, blockSize: blockSize) - case .iso78164: - return ISO78164Padding().remove(from: from, blockSize: blockSize) - case .iso10126: - return ISO10126Padding().remove(from: from, blockSize: blockSize) - } - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Poly1305.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Poly1305.swift deleted file mode 100644 index 3e8f7a3d6..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Poly1305.swift +++ /dev/null @@ -1,165 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// http://tools.ietf.org/html/draft-agl-tls-chacha20poly1305-04#section-4 -// nacl/crypto_onetimeauth/poly1305/ref/auth.c -// -/// Poly1305 takes a 32-byte, one-time key and a message and produces a 16-byte tag that authenticates the -/// message such that an attacker has a negligible chance of producing a valid tag for an inauthentic message. - -public final class Poly1305: Authenticator { - public enum Error: Swift.Error { - case authenticateError - } - - public static let blockSize: Int = 16 - - private let key: SecureBytes - - /// - parameter key: 32-byte key - public init(key: Array) { - self.key = SecureBytes(bytes: key) - } - - private func squeeze(h: inout Array) { - assert(h.count == 17) - var u: UInt32 = 0 - for j in 0..<16 { - u = u &+ h[j] - h[j] = u & 255 - u = u >> 8 - } - - u = u &+ h[16] - h[16] = u & 3 - u = 5 * (u >> 2) - - for j in 0..<16 { - u = u &+ h[j] - h[j] = u & 255 - u = u >> 8 - } - - u = u &+ h[16] - h[16] = u - } - - private func add(h: inout Array, c: Array) { - assert(h.count == 17 && c.count == 17) - - var u: UInt32 = 0 - for j in 0..<17 { - u = u &+ (h[j] &+ c[j]) - h[j] = u & 255 - u = u >> 8 - } - } - - private func mulmod(h: inout Array, r: Array) { - var hr = Array(repeating: 0, count: 17) - var u: UInt32 = 0 - for i in 0..<17 { - u = 0 - for j in 0...i { - u = u &+ (h[j] * r[i &- j]) - } - for j in (i + 1)..<17 { - u = u &+ (320 * h[j] * r[i &+ 17 &- j]) - } - hr[i] = u - } - h = hr - self.squeeze(h: &h) - } - - private func freeze(h: inout Array) { - let horig = h - self.add(h: &h, c: [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 252]) - let negative = UInt32(bitPattern: -Int32(h[16] >> 7)) - for j in 0..<17 { - h[j] ^= negative & (horig[j] ^ h[j]) - } - } - - /// the key is partitioned into two parts, called "r" and "s" - fileprivate func onetimeauth(message input: Array, key k: Array) -> Array { - // clamp - var r = Array(repeating: 0, count: 17) - var h = Array(repeating: 0, count: 17) - var c = Array(repeating: 0, count: 17) - - r[0] = UInt32(k[0]) - r[1] = UInt32(k[1]) - r[2] = UInt32(k[2]) - r[3] = UInt32(k[3] & 15) - r[4] = UInt32(k[4] & 252) - r[5] = UInt32(k[5]) - r[6] = UInt32(k[6]) - r[7] = UInt32(k[7] & 15) - r[8] = UInt32(k[8] & 252) - r[9] = UInt32(k[9]) - r[10] = UInt32(k[10]) - r[11] = UInt32(k[11] & 15) - r[12] = UInt32(k[12] & 252) - r[13] = UInt32(k[13]) - r[14] = UInt32(k[14]) - r[15] = UInt32(k[15] & 15) - r[16] = 0 - - var inlen = input.count - var inpos = 0 - while inlen > 0 { - for j in 0..) throws -> Array { - self.onetimeauth(message: bytes, key: Array(self.key)) - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Rabbit.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Rabbit.swift deleted file mode 100644 index ad0303cb4..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Rabbit.swift +++ /dev/null @@ -1,221 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -public final class Rabbit: BlockCipher { - public enum Error: Swift.Error { - case invalidKeyOrInitializationVector - } - - /// Size of IV in bytes - public static let ivSize = 64 / 8 - - /// Size of key in bytes - public static let keySize = 128 / 8 - - /// Size of block in bytes - public static let blockSize = 128 / 8 - - public var keySize: Int { - self.key.count - } - - /// Key - private let key: Key - - /// IV (optional) - private let iv: Array? - - /// State variables - private var x = Array(repeating: 0, count: 8) - - /// Counter variables - private var c = Array(repeating: 0, count: 8) - - /// Counter carry - private var p7: UInt32 = 0 - - /// 'a' constants - private var a: Array = [ - 0x4d34d34d, - 0xd34d34d3, - 0x34d34d34, - 0x4d34d34d, - 0xd34d34d3, - 0x34d34d34, - 0x4d34d34d, - 0xd34d34d3 - ] - - // MARK: - Initializers - - public convenience init(key: Array) throws { - try self.init(key: key, iv: nil) - } - - public init(key: Array, iv: Array?) throws { - self.key = Key(bytes: key) - self.iv = iv - - guard key.count == Rabbit.keySize && (iv == nil || iv!.count == Rabbit.ivSize) else { - throw Error.invalidKeyOrInitializationVector - } - } - - // MARK: - - - fileprivate func setup() { - self.p7 = 0 - - // Key divided into 8 subkeys - let k = Array(unsafeUninitializedCapacity: 8) { buf, count in - for j in 0..<8 { - buf[j] = UInt32(self.key[Rabbit.blockSize - (2 * j + 1)]) | (UInt32(self.key[Rabbit.blockSize - (2 * j + 2)]) << 8) - } - count = 8 - } - - // Initialize state and counter variables from subkeys - for j in 0..<8 { - if j % 2 == 0 { - self.x[j] = (k[(j + 1) % 8] << 16) | k[j] - self.c[j] = (k[(j + 4) % 8] << 16) | k[(j + 5) % 8] - } else { - self.x[j] = (k[(j + 5) % 8] << 16) | k[(j + 4) % 8] - self.c[j] = (k[j] << 16) | k[(j + 1) % 8] - } - } - - // Iterate system four times - self.nextState() - self.nextState() - self.nextState() - self.nextState() - - // Reinitialize counter variables - for j in 0..<8 { - self.c[j] = self.c[j] ^ self.x[(j + 4) % 8] - } - - if let iv = iv { - self.setupIV(iv) - } - } - - private func setupIV(_ iv: Array) { - // 63...56 55...48 47...40 39...32 31...24 23...16 15...8 7...0 IV bits - // 0 1 2 3 4 5 6 7 IV bytes in array - let iv0 = UInt32(bytes: [iv[4], iv[5], iv[6], iv[7]]) - let iv1 = UInt32(bytes: [iv[0], iv[1], iv[4], iv[5]]) - let iv2 = UInt32(bytes: [iv[0], iv[1], iv[2], iv[3]]) - let iv3 = UInt32(bytes: [iv[2], iv[3], iv[6], iv[7]]) - - // Modify the counter state as function of the IV - c[0] = self.c[0] ^ iv0 - self.c[1] = self.c[1] ^ iv1 - self.c[2] = self.c[2] ^ iv2 - self.c[3] = self.c[3] ^ iv3 - self.c[4] = self.c[4] ^ iv0 - self.c[5] = self.c[5] ^ iv1 - self.c[6] = self.c[6] ^ iv2 - self.c[7] = self.c[7] ^ iv3 - - // Iterate system four times - self.nextState() - self.nextState() - self.nextState() - self.nextState() - } - - private func nextState() { - // Before an iteration the counters are incremented - var carry = self.p7 - for j in 0..<8 { - let prev = self.c[j] - self.c[j] = prev &+ self.a[j] &+ carry - carry = prev > self.c[j] ? 1 : 0 // detect overflow - } - self.p7 = carry // save last carry bit - - // Iteration of the system - self.x = Array(unsafeUninitializedCapacity: 8) { newX, count in - newX[0] = self.g(0) &+ rotateLeft(self.g(7), by: 16) &+ rotateLeft(self.g(6), by: 16) - newX[1] = self.g(1) &+ rotateLeft(self.g(0), by: 8) &+ self.g(7) - newX[2] = self.g(2) &+ rotateLeft(self.g(1), by: 16) &+ rotateLeft(self.g(0), by: 16) - newX[3] = self.g(3) &+ rotateLeft(self.g(2), by: 8) &+ self.g(1) - newX[4] = self.g(4) &+ rotateLeft(self.g(3), by: 16) &+ rotateLeft(self.g(2), by: 16) - newX[5] = self.g(5) &+ rotateLeft(self.g(4), by: 8) &+ self.g(3) - newX[6] = self.g(6) &+ rotateLeft(self.g(5), by: 16) &+ rotateLeft(self.g(4), by: 16) - newX[7] = self.g(7) &+ rotateLeft(self.g(6), by: 8) &+ self.g(5) - count = 8 - } - } - - private func g(_ j: Int) -> UInt32 { - let sum = self.x[j] &+ self.c[j] - let square = UInt64(sum) * UInt64(sum) - return UInt32(truncatingIfNeeded: square ^ (square >> 32)) - } - - fileprivate func nextOutput() -> Array { - self.nextState() - - var output16 = Array(repeating: 0, count: Rabbit.blockSize / 2) - output16[7] = UInt16(truncatingIfNeeded: self.x[0]) ^ UInt16(truncatingIfNeeded: self.x[5] >> 16) - output16[6] = UInt16(truncatingIfNeeded: self.x[0] >> 16) ^ UInt16(truncatingIfNeeded: self.x[3]) - output16[5] = UInt16(truncatingIfNeeded: self.x[2]) ^ UInt16(truncatingIfNeeded: self.x[7] >> 16) - output16[4] = UInt16(truncatingIfNeeded: self.x[2] >> 16) ^ UInt16(truncatingIfNeeded: self.x[5]) - output16[3] = UInt16(truncatingIfNeeded: self.x[4]) ^ UInt16(truncatingIfNeeded: self.x[1] >> 16) - output16[2] = UInt16(truncatingIfNeeded: self.x[4] >> 16) ^ UInt16(truncatingIfNeeded: self.x[7]) - output16[1] = UInt16(truncatingIfNeeded: self.x[6]) ^ UInt16(truncatingIfNeeded: self.x[3] >> 16) - output16[0] = UInt16(truncatingIfNeeded: self.x[6] >> 16) ^ UInt16(truncatingIfNeeded: self.x[1]) - - var output8 = Array(repeating: 0, count: Rabbit.blockSize) - for j in 0..> 8) - output8[j * 2 + 1] = UInt8(truncatingIfNeeded: output16[j]) - } - return output8 - } -} - -// MARK: Cipher - -extension Rabbit: Cipher { - public func encrypt(_ bytes: ArraySlice) throws -> Array { - self.setup() - - return Array(unsafeUninitializedCapacity: bytes.count) { result, count in - var output = self.nextOutput() - var byteIdx = 0 - var outputIdx = 0 - while byteIdx < bytes.count { - if outputIdx == Rabbit.blockSize { - output = self.nextOutput() - outputIdx = 0 - } - - result[byteIdx] = bytes[byteIdx] ^ output[outputIdx] - - byteIdx += 1 - outputIdx += 1 - } - count = bytes.count - } - } - - public func decrypt(_ bytes: ArraySlice) throws -> Array { - try self.encrypt(bytes) - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/SHA1.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/SHA1.swift deleted file mode 100644 index 59cabefcf..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/SHA1.swift +++ /dev/null @@ -1,158 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -public final class SHA1: DigestType { - - @usableFromInline - static let digestLength: Int = 20 // 160 / 8 - - @usableFromInline - static let blockSize: Int = 64 - - @usableFromInline - static let hashInitialValue: ContiguousArray = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0] - - @usableFromInline - var accumulated = Array() - - @usableFromInline - var processedBytesTotalCount: Int = 0 - - @usableFromInline - var accumulatedHash: ContiguousArray = SHA1.hashInitialValue - - public init() { - } - - @inlinable - public func calculate(for bytes: Array) -> Array { - do { - return try update(withBytes: bytes.slice, isLast: true) - } catch { - return [] - } - } - - @usableFromInline - func process(block chunk: ArraySlice, currentHash hh: inout ContiguousArray) { - // break chunk into sixteen 32-bit words M[j], 0 ≤ j ≤ 15, big-endian - // Extend the sixteen 32-bit words into eighty 32-bit words: - let M = UnsafeMutablePointer.allocate(capacity: 80) - M.initialize(repeating: 0, count: 80) - defer { - M.deinitialize(count: 80) - M.deallocate() - } - - for x in 0..<80 { - switch x { - case 0...15: - let start = chunk.startIndex.advanced(by: x * 4) // * MemoryLayout.size - M[x] = UInt32(bytes: chunk, fromIndex: start) - default: - M[x] = rotateLeft(M[x - 3] ^ M[x - 8] ^ M[x - 14] ^ M[x - 16], by: 1) - } - } - - var A = hh[0] - var B = hh[1] - var C = hh[2] - var D = hh[3] - var E = hh[4] - - // Main loop - for j in 0...79 { - var f: UInt32 = 0 - var k: UInt32 = 0 - - switch j { - case 0...19: - f = (B & C) | ((~B) & D) - k = 0x5a827999 - case 20...39: - f = B ^ C ^ D - k = 0x6ed9eba1 - case 40...59: - f = (B & C) | (B & D) | (C & D) - k = 0x8f1bbcdc - case 60...79: - f = B ^ C ^ D - k = 0xca62c1d6 - default: - break - } - - let temp = rotateLeft(A, by: 5) &+ f &+ E &+ M[j] &+ k - E = D - D = C - C = rotateLeft(B, by: 30) - B = A - A = temp - } - - hh[0] = hh[0] &+ A - hh[1] = hh[1] &+ B - hh[2] = hh[2] &+ C - hh[3] = hh[3] &+ D - hh[4] = hh[4] &+ E - } -} - -extension SHA1: Updatable { - @discardableResult @inlinable - public func update(withBytes bytes: ArraySlice, isLast: Bool = false) throws -> Array { - self.accumulated += bytes - - if isLast { - let lengthInBits = (processedBytesTotalCount + self.accumulated.count) * 8 - let lengthBytes = lengthInBits.bytes(totalBytes: 64 / 8) // A 64-bit representation of b - - // Step 1. Append padding - bitPadding(to: &self.accumulated, blockSize: SHA1.blockSize, allowance: 64 / 8) - - // Step 2. Append Length a 64-bit representation of lengthInBits - self.accumulated += lengthBytes - } - - var processedBytes = 0 - for chunk in self.accumulated.batched(by: SHA1.blockSize) { - if isLast || (self.accumulated.count - processedBytes) >= SHA1.blockSize { - self.process(block: chunk, currentHash: &self.accumulatedHash) - processedBytes += chunk.count - } - } - self.accumulated.removeFirst(processedBytes) - self.processedBytesTotalCount += processedBytes - - // output current hash - var result = Array(repeating: 0, count: SHA1.digestLength) - var pos = 0 - for idx in 0..> 24) & 0xff) - result[pos + 1] = UInt8((h >> 16) & 0xff) - result[pos + 2] = UInt8((h >> 8) & 0xff) - result[pos + 3] = UInt8(h & 0xff) - pos += 4 - } - - // reset hash value for instance - if isLast { - self.accumulatedHash = SHA1.hashInitialValue - } - - return result - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/SHA2.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/SHA2.swift deleted file mode 100644 index e5f84de95..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/SHA2.swift +++ /dev/null @@ -1,368 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// TODO: generic for process32/64 (UInt32/UInt64) -// - -public final class SHA2: DigestType { - @usableFromInline - let variant: Variant - - @usableFromInline - let size: Int - - @usableFromInline - let blockSize: Int - - @usableFromInline - let digestLength: Int - - private let k: Array - - @usableFromInline - var accumulated = Array() - - @usableFromInline - var processedBytesTotalCount: Int = 0 - - @usableFromInline - var accumulatedHash32 = Array() - - @usableFromInline - var accumulatedHash64 = Array() - - @frozen - public enum Variant: RawRepresentable { - case sha224, sha256, sha384, sha512 - - public var digestLength: Int { - self.rawValue / 8 - } - - public var blockSize: Int { - switch self { - case .sha224, .sha256: - return 64 - case .sha384, .sha512: - return 128 - } - } - - public typealias RawValue = Int - public var rawValue: RawValue { - switch self { - case .sha224: - return 224 - case .sha256: - return 256 - case .sha384: - return 384 - case .sha512: - return 512 - } - } - - public init?(rawValue: RawValue) { - switch rawValue { - case 224: - self = .sha224 - case 256: - self = .sha256 - case 384: - self = .sha384 - case 512: - self = .sha512 - default: - return nil - } - } - - @usableFromInline - var h: Array { - switch self { - case .sha224: - return [0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4] - case .sha256: - return [0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19] - case .sha384: - return [0xcbbb9d5dc1059ed8, 0x629a292a367cd507, 0x9159015a3070dd17, 0x152fecd8f70e5939, 0x67332667ffc00b31, 0x8eb44a8768581511, 0xdb0c2e0d64f98fa7, 0x47b5481dbefa4fa4] - case .sha512: - return [0x6a09e667f3bcc908, 0xbb67ae8584caa73b, 0x3c6ef372fe94f82b, 0xa54ff53a5f1d36f1, 0x510e527fade682d1, 0x9b05688c2b3e6c1f, 0x1f83d9abfb41bd6b, 0x5be0cd19137e2179] - } - } - - @usableFromInline - var finalLength: Int { - switch self { - case .sha224: - return 7 - case .sha384: - return 6 - default: - return Int.max - } - } - } - - public init(variant: SHA2.Variant) { - self.variant = variant - switch self.variant { - case .sha224, .sha256: - self.accumulatedHash32 = variant.h.map { UInt32($0) } // FIXME: UInt64 for process64 - self.blockSize = variant.blockSize - self.size = variant.rawValue - self.digestLength = variant.digestLength - self.k = [ - 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, - 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, - 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, - 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, - 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, - 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, - 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, - 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 - ] - case .sha384, .sha512: - self.accumulatedHash64 = variant.h - self.blockSize = variant.blockSize - self.size = variant.rawValue - self.digestLength = variant.digestLength - self.k = [ - 0x428a2f98d728ae22, 0x7137449123ef65cd, 0xb5c0fbcfec4d3b2f, 0xe9b5dba58189dbbc, 0x3956c25bf348b538, - 0x59f111f1b605d019, 0x923f82a4af194f9b, 0xab1c5ed5da6d8118, 0xd807aa98a3030242, 0x12835b0145706fbe, - 0x243185be4ee4b28c, 0x550c7dc3d5ffb4e2, 0x72be5d74f27b896f, 0x80deb1fe3b1696b1, 0x9bdc06a725c71235, - 0xc19bf174cf692694, 0xe49b69c19ef14ad2, 0xefbe4786384f25e3, 0x0fc19dc68b8cd5b5, 0x240ca1cc77ac9c65, - 0x2de92c6f592b0275, 0x4a7484aa6ea6e483, 0x5cb0a9dcbd41fbd4, 0x76f988da831153b5, 0x983e5152ee66dfab, - 0xa831c66d2db43210, 0xb00327c898fb213f, 0xbf597fc7beef0ee4, 0xc6e00bf33da88fc2, 0xd5a79147930aa725, - 0x06ca6351e003826f, 0x142929670a0e6e70, 0x27b70a8546d22ffc, 0x2e1b21385c26c926, 0x4d2c6dfc5ac42aed, - 0x53380d139d95b3df, 0x650a73548baf63de, 0x766a0abb3c77b2a8, 0x81c2c92e47edaee6, 0x92722c851482353b, - 0xa2bfe8a14cf10364, 0xa81a664bbc423001, 0xc24b8b70d0f89791, 0xc76c51a30654be30, 0xd192e819d6ef5218, - 0xd69906245565a910, 0xf40e35855771202a, 0x106aa07032bbd1b8, 0x19a4c116b8d2d0c8, 0x1e376c085141ab53, - 0x2748774cdf8eeb99, 0x34b0bcb5e19b48a8, 0x391c0cb3c5c95a63, 0x4ed8aa4ae3418acb, 0x5b9cca4f7763e373, - 0x682e6ff3d6b2b8a3, 0x748f82ee5defb2fc, 0x78a5636f43172f60, 0x84c87814a1f0ab72, 0x8cc702081a6439ec, - 0x90befffa23631e28, 0xa4506cebde82bde9, 0xbef9a3f7b2c67915, 0xc67178f2e372532b, 0xca273eceea26619c, - 0xd186b8c721c0c207, 0xeada7dd6cde0eb1e, 0xf57d4f7fee6ed178, 0x06f067aa72176fba, 0x0a637dc5a2c898a6, - 0x113f9804bef90dae, 0x1b710b35131c471b, 0x28db77f523047d84, 0x32caab7b40c72493, 0x3c9ebe0a15c9bebc, - 0x431d67c49c100d4c, 0x4cc5d4becb3e42b6, 0x597f299cfc657e2a, 0x5fcb6fab3ad6faec, 0x6c44198c4a475817 - ] - } - } - - @inlinable - public func calculate(for bytes: Array) -> Array { - do { - return try update(withBytes: bytes.slice, isLast: true) - } catch { - return [] - } - } - - @usableFromInline - func process64(block chunk: ArraySlice, currentHash hh: inout Array) { - // break chunk into sixteen 64-bit words M[j], 0 ≤ j ≤ 15, big-endian - // Extend the sixteen 64-bit words into eighty 64-bit words: - let M = UnsafeMutablePointer.allocate(capacity: self.k.count) - M.initialize(repeating: 0, count: self.k.count) - defer { - M.deinitialize(count: self.k.count) - M.deallocate() - } - for x in 0...size - M[x] = UInt64(bytes: chunk, fromIndex: start) - default: - let s0 = rotateRight(M[x - 15], by: 1) ^ rotateRight(M[x - 15], by: 8) ^ (M[x - 15] >> 7) - let s1 = rotateRight(M[x - 2], by: 19) ^ rotateRight(M[x - 2], by: 61) ^ (M[x - 2] >> 6) - M[x] = M[x - 16] &+ s0 &+ M[x - 7] &+ s1 - } - } - - var A = hh[0] - var B = hh[1] - var C = hh[2] - var D = hh[3] - var E = hh[4] - var F = hh[5] - var G = hh[6] - var H = hh[7] - - // Main loop - for j in 0.., currentHash hh: inout Array) { - // break chunk into sixteen 32-bit words M[j], 0 ≤ j ≤ 15, big-endian - // Extend the sixteen 32-bit words into sixty-four 32-bit words: - let M = UnsafeMutablePointer.allocate(capacity: self.k.count) - M.initialize(repeating: 0, count: self.k.count) - defer { - M.deinitialize(count: self.k.count) - M.deallocate() - } - - for x in 0...size - M[x] = UInt32(bytes: chunk, fromIndex: start) - default: - let s0 = rotateRight(M[x - 15], by: 7) ^ rotateRight(M[x - 15], by: 18) ^ (M[x - 15] >> 3) - let s1 = rotateRight(M[x - 2], by: 17) ^ rotateRight(M[x - 2], by: 19) ^ (M[x - 2] >> 10) - M[x] = M[x - 16] &+ s0 &+ M[x - 7] &+ s1 - } - } - - var A = hh[0] - var B = hh[1] - var C = hh[2] - var D = hh[3] - var E = hh[4] - var F = hh[5] - var G = hh[6] - var H = hh[7] - - // Main loop - for j in 0.., isLast: Bool = false) throws -> Array { - self.accumulated += bytes - - if isLast { - let lengthInBits = (processedBytesTotalCount + self.accumulated.count) * 8 - let lengthBytes = lengthInBits.bytes(totalBytes: self.blockSize / 8) // A 64-bit/128-bit representation of b. blockSize fit by accident. - - // Step 1. Append padding - bitPadding(to: &self.accumulated, blockSize: self.blockSize, allowance: self.blockSize / 8) - - // Step 2. Append Length a 64-bit representation of lengthInBits - self.accumulated += lengthBytes - } - - var processedBytes = 0 - for chunk in self.accumulated.batched(by: self.blockSize) { - if isLast || (self.accumulated.count - processedBytes) >= self.blockSize { - switch self.variant { - case .sha224, .sha256: - self.process32(block: chunk, currentHash: &self.accumulatedHash32) - case .sha384, .sha512: - self.process64(block: chunk, currentHash: &self.accumulatedHash64) - } - processedBytes += chunk.count - } - } - self.accumulated.removeFirst(processedBytes) - self.processedBytesTotalCount += processedBytes - - // output current hash - var result = Array(repeating: 0, count: variant.digestLength) - switch self.variant { - case .sha224, .sha256: - var pos = 0 - for idx in 0..> 24) & 0xff) - result[pos + 1] = UInt8((h >> 16) & 0xff) - result[pos + 2] = UInt8((h >> 8) & 0xff) - result[pos + 3] = UInt8(h & 0xff) - pos += 4 - } - case .sha384, .sha512: - var pos = 0 - for idx in 0..> 56) & 0xff) - result[pos + 1] = UInt8((h >> 48) & 0xff) - result[pos + 2] = UInt8((h >> 40) & 0xff) - result[pos + 3] = UInt8((h >> 32) & 0xff) - result[pos + 4] = UInt8((h >> 24) & 0xff) - result[pos + 5] = UInt8((h >> 16) & 0xff) - result[pos + 6] = UInt8((h >> 8) & 0xff) - result[pos + 7] = UInt8(h & 0xff) - pos += 8 - } - } - - // reset hash value for instance - if isLast { - switch self.variant { - case .sha224, .sha256: - self.accumulatedHash32 = self.variant.h.lazy.map { UInt32($0) } // FIXME: UInt64 for process64 - case .sha384, .sha512: - self.accumulatedHash64 = self.variant.h - } - } - - return result - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/SHA3.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/SHA3.swift deleted file mode 100644 index dc57504e6..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/SHA3.swift +++ /dev/null @@ -1,299 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf -// http://keccak.noekeon.org/specs_summary.html -// - -#if canImport(Darwin) -import Darwin -#elseif canImport(Glibc) -import Glibc -#elseif canImport(ucrt) -import ucrt -#endif - -public final class SHA3: DigestType { - let round_constants: Array = [ - 0x0000000000000001, 0x0000000000008082, 0x800000000000808a, 0x8000000080008000, - 0x000000000000808b, 0x0000000080000001, 0x8000000080008081, 0x8000000000008009, - 0x000000000000008a, 0x0000000000000088, 0x0000000080008009, 0x000000008000000a, - 0x000000008000808b, 0x800000000000008b, 0x8000000000008089, 0x8000000000008003, - 0x8000000000008002, 0x8000000000000080, 0x000000000000800a, 0x800000008000000a, - 0x8000000080008081, 0x8000000000008080, 0x0000000080000001, 0x8000000080008008 - ] - - public let blockSize: Int - public let digestLength: Int - public let markByte: UInt8 - - @usableFromInline - var accumulated = Array() - - - @usableFromInline - var accumulatedHash: Array - - public enum Variant { - case sha224, sha256, sha384, sha512, keccak224, keccak256, keccak384, keccak512 - - var digestLength: Int { - 100 - (self.blockSize / 2) - } - - var blockSize: Int { - (1600 - self.outputLength * 2) / 8 - } - - var markByte: UInt8 { - switch self { - case .sha224, .sha256, .sha384, .sha512: - return 0x06 // 0x1F for SHAKE - case .keccak224, .keccak256, .keccak384, .keccak512: - return 0x01 - } - } - - public var outputLength: Int { - switch self { - case .sha224, .keccak224: - return 224 - case .sha256, .keccak256: - return 256 - case .sha384, .keccak384: - return 384 - case .sha512, .keccak512: - return 512 - } - } - } - - public init(variant: SHA3.Variant) { - self.blockSize = variant.blockSize - self.digestLength = variant.digestLength - self.markByte = variant.markByte - self.accumulatedHash = Array(repeating: 0, count: self.digestLength) - } - - @inlinable - public func calculate(for bytes: Array) -> Array { - do { - return try update(withBytes: bytes.slice, isLast: true) - } catch { - return [] - } - } - - /// 1. For all pairs (x,z) such that 0≤x<5 and 0≤z) { - let c = UnsafeMutablePointer.allocate(capacity: 5) - c.initialize(repeating: 0, count: 5) - defer { - c.deinitialize(count: 5) - c.deallocate() - } - let d = UnsafeMutablePointer.allocate(capacity: 5) - d.initialize(repeating: 0, count: 5) - defer { - d.deinitialize(count: 5) - d.deallocate() - } - - for i in 0..<5 { - c[i] = a[i] ^ a[i &+ 5] ^ a[i &+ 10] ^ a[i &+ 15] ^ a[i &+ 20] - } - - d[0] = rotateLeft(c[1], by: 1) ^ c[4] - d[1] = rotateLeft(c[2], by: 1) ^ c[0] - d[2] = rotateLeft(c[3], by: 1) ^ c[1] - d[3] = rotateLeft(c[4], by: 1) ^ c[2] - d[4] = rotateLeft(c[0], by: 1) ^ c[3] - - for i in 0..<5 { - a[i] ^= d[i] - a[i &+ 5] ^= d[i] - a[i &+ 10] ^= d[i] - a[i &+ 15] ^= d[i] - a[i &+ 20] ^= d[i] - } - } - - /// A′[x, y, z]=A[(x &+ 3y) mod 5, x, z] - private func π(_ a: inout Array) { - let a1 = a[1] - a[1] = a[6] - a[6] = a[9] - a[9] = a[22] - a[22] = a[14] - a[14] = a[20] - a[20] = a[2] - a[2] = a[12] - a[12] = a[13] - a[13] = a[19] - a[19] = a[23] - a[23] = a[15] - a[15] = a[4] - a[4] = a[24] - a[24] = a[21] - a[21] = a[8] - a[8] = a[16] - a[16] = a[5] - a[5] = a[3] - a[3] = a[18] - a[18] = a[17] - a[17] = a[11] - a[11] = a[7] - a[7] = a[10] - a[10] = a1 - } - - /// For all triples (x, y, z) such that 0≤x<5, 0≤y<5, and 0≤z) { - for i in stride(from: 0, to: 25, by: 5) { - let a0 = a[0 &+ i] - let a1 = a[1 &+ i] - a[0 &+ i] ^= ~a1 & a[2 &+ i] - a[1 &+ i] ^= ~a[2 &+ i] & a[3 &+ i] - a[2 &+ i] ^= ~a[3 &+ i] & a[4 &+ i] - a[3 &+ i] ^= ~a[4 &+ i] & a0 - a[4 &+ i] ^= ~a0 & a1 - } - } - - private func ι(_ a: inout Array, round: Int) { - a[0] ^= self.round_constants[round] - } - - @usableFromInline - func process(block chunk: ArraySlice, currentHash hh: inout Array) { - // expand - hh[0] ^= chunk[0].littleEndian - hh[1] ^= chunk[1].littleEndian - hh[2] ^= chunk[2].littleEndian - hh[3] ^= chunk[3].littleEndian - hh[4] ^= chunk[4].littleEndian - hh[5] ^= chunk[5].littleEndian - hh[6] ^= chunk[6].littleEndian - hh[7] ^= chunk[7].littleEndian - hh[8] ^= chunk[8].littleEndian - if self.blockSize > 72 { // 72 / 8, sha-512 - hh[9] ^= chunk[9].littleEndian - hh[10] ^= chunk[10].littleEndian - hh[11] ^= chunk[11].littleEndian - hh[12] ^= chunk[12].littleEndian - if self.blockSize > 104 { // 104 / 8, sha-384 - hh[13] ^= chunk[13].littleEndian - hh[14] ^= chunk[14].littleEndian - hh[15] ^= chunk[15].littleEndian - hh[16] ^= chunk[16].littleEndian - if self.blockSize > 136 { // 136 / 8, sha-256 - hh[17] ^= chunk[17].littleEndian - // FULL_SHA3_FAMILY_SUPPORT - if self.blockSize > 144 { // 144 / 8, sha-224 - hh[18] ^= chunk[18].littleEndian - hh[19] ^= chunk[19].littleEndian - hh[20] ^= chunk[20].littleEndian - hh[21] ^= chunk[21].littleEndian - hh[22] ^= chunk[22].littleEndian - hh[23] ^= chunk[23].littleEndian - hh[24] ^= chunk[24].littleEndian - } - } - } - } - - // Keccak-f - for round in 0..<24 { - self.θ(&hh) - - hh[1] = rotateLeft(hh[1], by: 1) - hh[2] = rotateLeft(hh[2], by: 62) - hh[3] = rotateLeft(hh[3], by: 28) - hh[4] = rotateLeft(hh[4], by: 27) - hh[5] = rotateLeft(hh[5], by: 36) - hh[6] = rotateLeft(hh[6], by: 44) - hh[7] = rotateLeft(hh[7], by: 6) - hh[8] = rotateLeft(hh[8], by: 55) - hh[9] = rotateLeft(hh[9], by: 20) - hh[10] = rotateLeft(hh[10], by: 3) - hh[11] = rotateLeft(hh[11], by: 10) - hh[12] = rotateLeft(hh[12], by: 43) - hh[13] = rotateLeft(hh[13], by: 25) - hh[14] = rotateLeft(hh[14], by: 39) - hh[15] = rotateLeft(hh[15], by: 41) - hh[16] = rotateLeft(hh[16], by: 45) - hh[17] = rotateLeft(hh[17], by: 15) - hh[18] = rotateLeft(hh[18], by: 21) - hh[19] = rotateLeft(hh[19], by: 8) - hh[20] = rotateLeft(hh[20], by: 18) - hh[21] = rotateLeft(hh[21], by: 2) - hh[22] = rotateLeft(hh[22], by: 61) - hh[23] = rotateLeft(hh[23], by: 56) - hh[24] = rotateLeft(hh[24], by: 14) - - self.π(&hh) - self.χ(&hh) - self.ι(&hh, round: round) - } - } -} - -extension SHA3: Updatable { - - @inlinable - public func update(withBytes bytes: ArraySlice, isLast: Bool = false) throws -> Array { - self.accumulated += bytes - - if isLast { - // Add padding - let markByteIndex = self.accumulated.count - - // We need to always pad the input. Even if the input is a multiple of blockSize. - let r = self.blockSize * 8 - let q = (r / 8) - (accumulated.count % (r / 8)) - self.accumulated += Array(repeating: 0, count: q) - - self.accumulated[markByteIndex] |= self.markByte - self.accumulated[self.accumulated.count - 1] |= 0x80 - } - - var processedBytes = 0 - for chunk in self.accumulated.batched(by: self.blockSize) { - if isLast || (self.accumulated.count - processedBytes) >= self.blockSize { - self.process(block: chunk.toUInt64Array().slice, currentHash: &self.accumulatedHash) - processedBytes += chunk.count - } - } - self.accumulated.removeFirst(processedBytes) - - // TODO: verify performance, reduce vs for..in - let result = self.accumulatedHash.reduce(into: Array()) { (result, value) in - result += value.bigEndian.bytes() - } - - // reset hash value for instance - if isLast { - self.accumulatedHash = Array(repeating: 0, count: self.digestLength) - } - - return Array(result[0.. -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// -// https://tools.ietf.org/html/rfc7914 -// - -/// Implementation of the scrypt key derivation function. -public final class Scrypt { - enum Error: Swift.Error { - case nIsTooLarge - case rIsTooLarge - case nMustBeAPowerOf2GreaterThan1 - case invalidInput - } - - /// Configuration parameters. - private let salt: SecureBytes - private let password: SecureBytes - private let blocksize: Int // 128 * r - private let salsaBlock = UnsafeMutableRawPointer.allocate(byteCount: 64, alignment: 64) - private let dkLen: Int - private let N: Int - private let r: Int - private let p: Int - - /// - parameters: - /// - password: password - /// - salt: salt - /// - dkLen: output length - /// - N: determines extra memory used - /// - r: determines a block size - /// - p: determines parallelicity degree - public init(password: Array, salt: Array, dkLen: Int, N: Int, r: Int, p: Int) throws { - precondition(dkLen > 0) - precondition(N > 0) - precondition(r > 0) - precondition(p > 0) - - guard !(N < 2 || (N & (N - 1)) != 0) else { throw Error.nMustBeAPowerOf2GreaterThan1 } - - guard N <= .max / 128 / r else { throw Error.nIsTooLarge } - guard r <= .max / 128 / p else { throw Error.rIsTooLarge } - - guard !salt.isEmpty else { - throw Error.invalidInput - } - - self.blocksize = 128 * r - self.N = N - self.r = r - self.p = p - self.password = SecureBytes(bytes: password) - self.salt = SecureBytes(bytes: salt) - self.dkLen = dkLen - } - - /// Runs the key derivation function with a specific password. - public func calculate() throws -> [UInt8] { - // Allocate memory (as bytes for now) for further use in mixing steps - let B = UnsafeMutableRawPointer.allocate(byteCount: 128 * self.r * self.p, alignment: 64) - let XY = UnsafeMutableRawPointer.allocate(byteCount: 256 * self.r + 64, alignment: 64) - let V = UnsafeMutableRawPointer.allocate(byteCount: 128 * self.r * self.N, alignment: 64) - - // Deallocate memory when done - defer { - B.deallocate() - XY.deallocate() - V.deallocate() - } - - /* 1: (B_0 ... B_{p-1}) <-- PBKDF2(P, S, 1, p * MFLen) */ - // Expand the initial key - let barray = try PKCS5.PBKDF2(password: Array(self.password), salt: Array(self.salt), iterations: 1, keyLength: self.p * 128 * self.r, variant: .sha2(.sha256)).calculate() - barray.withUnsafeBytes { p in - B.copyMemory(from: p.baseAddress!, byteCount: barray.count) - } - - /* 2: for i = 0 to p - 1 do */ - // do the mixing - for i in 0 ..< self.p { - /* 3: B_i <-- MF(B_i, N) */ - smix(B + i * 128 * self.r, V.assumingMemoryBound(to: UInt32.self), XY.assumingMemoryBound(to: UInt32.self)) - } - - /* 5: DK <-- PBKDF2(P, B, 1, dkLen) */ - let pointer = B.assumingMemoryBound(to: UInt8.self) - let bufferPointer = UnsafeBufferPointer(start: pointer, count: p * 128 * self.r) - let block = [UInt8](bufferPointer) - return try PKCS5.PBKDF2(password: Array(self.password), salt: block, iterations: 1, keyLength: self.dkLen, variant: .sha2(.sha256)).calculate() - } -} - -private extension Scrypt { - /// Computes `B = SMix_r(B, N)`. - /// - /// The input `block` must be `128*r` bytes in length; the temporary storage `v` must be `128*r*n` bytes in length; - /// the temporary storage `xy` must be `256*r + 64` bytes in length. The arrays `block`, `v`, and `xy` must be - /// aligned to a multiple of 64 bytes. - @inline(__always) func smix(_ block: UnsafeMutableRawPointer, _ v: UnsafeMutablePointer, _ xy: UnsafeMutablePointer) { - let X = xy - let Y = xy + 32 * self.r - let Z = xy + 64 * self.r - - /* 1: X <-- B */ - let typedBlock = block.assumingMemoryBound(to: UInt32.self) - X.assign(from: typedBlock, count: 32 * self.r) - - /* 2: for i = 0 to N - 1 do */ - for i in stride(from: 0, to: self.N, by: 2) { - /* 3: V_i <-- X */ - UnsafeMutableRawPointer(v + i * (32 * self.r)).copyMemory(from: X, byteCount: 128 * self.r) - - /* 4: X <-- H(X) */ - self.blockMixSalsa8(X, Y, Z) - - /* 3: V_i <-- X */ - UnsafeMutableRawPointer(v + (i + 1) * (32 * self.r)).copyMemory(from: Y, byteCount: 128 * self.r) - - /* 4: X <-- H(X) */ - self.blockMixSalsa8(Y, X, Z) - } - - /* 6: for i = 0 to N - 1 do */ - for _ in stride(from: 0, to: self.N, by: 2) { - /* - 7: j <-- Integerify (X) mod N - where Integerify (B[0] ... B[2 * r - 1]) is defined - as the result of interpreting B[2 * r - 1] as a little-endian integer. - */ - var j = Int(integerify(X) & UInt64(self.N - 1)) - - /* 8: X <-- H(X \xor V_j) */ - self.blockXor(X, v + j * 32 * self.r, 128 * self.r) - self.blockMixSalsa8(X, Y, Z) - - /* 7: j <-- Integerify(X) mod N */ - j = Int(self.integerify(Y) & UInt64(self.N - 1)) - - /* 8: X <-- H(X \xor V_j) */ - self.blockXor(Y, v + j * 32 * self.r, 128 * self.r) - self.blockMixSalsa8(Y, X, Z) - } - - /* 10: B' <-- X */ - for k in 0 ..< 32 * self.r { - UnsafeMutableRawPointer(block + 4 * k).storeBytes(of: X[k], as: UInt32.self) - } - } - - /// Returns the result of parsing `B_{2r-1}` as a little-endian integer. - @inline(__always) func integerify(_ block: UnsafeRawPointer) -> UInt64 { - let bi = block + (2 * self.r - 1) * 64 - return bi.load(as: UInt64.self).littleEndian - } - - /// Compute `bout = BlockMix_{salsa20/8, r}(bin)`. - /// - /// The input `bin` must be `128*r` bytes in length; the output `bout` must also be the same size. The temporary - /// space `x` must be 64 bytes. - @inline(__always) func blockMixSalsa8(_ bin: UnsafePointer, _ bout: UnsafeMutablePointer, _ x: UnsafeMutablePointer) { - /* 1: X <-- B_{2r - 1} */ - UnsafeMutableRawPointer(x).copyMemory(from: bin + (2 * self.r - 1) * 16, byteCount: 64) - - /* 2: for i = 0 to 2r - 1 do */ - for i in stride(from: 0, to: 2 * self.r, by: 2) { - /* 3: X <-- H(X \xor B_i) */ - self.blockXor(x, bin + i * 16, 64) - self.salsa20_8_typed(x) - - /* 4: Y_i <-- X */ - /* 6: B' <-- (Y_0, Y_2 ... Y_{2r-2}, Y_1, Y_3 ... Y_{2r-1}) */ - UnsafeMutableRawPointer(bout + i * 8).copyMemory(from: x, byteCount: 64) - - /* 3: X <-- H(X \xor B_i) */ - self.blockXor(x, bin + i * 16 + 16, 64) - self.salsa20_8_typed(x) - - /* 4: Y_i <-- X */ - /* 6: B' <-- (Y_0, Y_2 ... Y_{2r-2}, Y_1, Y_3 ... Y_{2r-1}) */ - UnsafeMutableRawPointer(bout + i * 8 + self.r * 16).copyMemory(from: x, byteCount: 64) - } - } - - @inline(__always) func salsa20_8_typed(_ block: UnsafeMutablePointer) { - self.salsaBlock.copyMemory(from: UnsafeRawPointer(block), byteCount: 64) - let salsaBlockTyped = self.salsaBlock.assumingMemoryBound(to: UInt32.self) - - for _ in stride(from: 0, to: 8, by: 2) { - salsaBlockTyped[4] ^= rotateLeft(salsaBlockTyped[0] &+ salsaBlockTyped[12], by: 7) - salsaBlockTyped[8] ^= rotateLeft(salsaBlockTyped[4] &+ salsaBlockTyped[0], by: 9) - salsaBlockTyped[12] ^= rotateLeft(salsaBlockTyped[8] &+ salsaBlockTyped[4], by: 13) - salsaBlockTyped[0] ^= rotateLeft(salsaBlockTyped[12] &+ salsaBlockTyped[8], by: 18) - - salsaBlockTyped[9] ^= rotateLeft(salsaBlockTyped[5] &+ salsaBlockTyped[1], by: 7) - salsaBlockTyped[13] ^= rotateLeft(salsaBlockTyped[9] &+ salsaBlockTyped[5], by: 9) - salsaBlockTyped[1] ^= rotateLeft(salsaBlockTyped[13] &+ salsaBlockTyped[9], by: 13) - salsaBlockTyped[5] ^= rotateLeft(salsaBlockTyped[1] &+ salsaBlockTyped[13], by: 18) - - salsaBlockTyped[14] ^= rotateLeft(salsaBlockTyped[10] &+ salsaBlockTyped[6], by: 7) - salsaBlockTyped[2] ^= rotateLeft(salsaBlockTyped[14] &+ salsaBlockTyped[10], by: 9) - salsaBlockTyped[6] ^= rotateLeft(salsaBlockTyped[2] &+ salsaBlockTyped[14], by: 13) - salsaBlockTyped[10] ^= rotateLeft(salsaBlockTyped[6] &+ salsaBlockTyped[2], by: 18) - - salsaBlockTyped[3] ^= rotateLeft(salsaBlockTyped[15] &+ salsaBlockTyped[11], by: 7) - salsaBlockTyped[7] ^= rotateLeft(salsaBlockTyped[3] &+ salsaBlockTyped[15], by: 9) - salsaBlockTyped[11] ^= rotateLeft(salsaBlockTyped[7] &+ salsaBlockTyped[3], by: 13) - salsaBlockTyped[15] ^= rotateLeft(salsaBlockTyped[11] &+ salsaBlockTyped[7], by: 18) - - salsaBlockTyped[1] ^= rotateLeft(salsaBlockTyped[0] &+ salsaBlockTyped[3], by: 7) - salsaBlockTyped[2] ^= rotateLeft(salsaBlockTyped[1] &+ salsaBlockTyped[0], by: 9) - salsaBlockTyped[3] ^= rotateLeft(salsaBlockTyped[2] &+ salsaBlockTyped[1], by: 13) - salsaBlockTyped[0] ^= rotateLeft(salsaBlockTyped[3] &+ salsaBlockTyped[2], by: 18) - - salsaBlockTyped[6] ^= rotateLeft(salsaBlockTyped[5] &+ salsaBlockTyped[4], by: 7) - salsaBlockTyped[7] ^= rotateLeft(salsaBlockTyped[6] &+ salsaBlockTyped[5], by: 9) - salsaBlockTyped[4] ^= rotateLeft(salsaBlockTyped[7] &+ salsaBlockTyped[6], by: 13) - salsaBlockTyped[5] ^= rotateLeft(salsaBlockTyped[4] &+ salsaBlockTyped[7], by: 18) - - salsaBlockTyped[11] ^= rotateLeft(salsaBlockTyped[10] &+ salsaBlockTyped[9], by: 7) - salsaBlockTyped[8] ^= rotateLeft(salsaBlockTyped[11] &+ salsaBlockTyped[10], by: 9) - salsaBlockTyped[9] ^= rotateLeft(salsaBlockTyped[8] &+ salsaBlockTyped[11], by: 13) - salsaBlockTyped[10] ^= rotateLeft(salsaBlockTyped[9] &+ salsaBlockTyped[8], by: 18) - - salsaBlockTyped[12] ^= rotateLeft(salsaBlockTyped[15] &+ salsaBlockTyped[14], by: 7) - salsaBlockTyped[13] ^= rotateLeft(salsaBlockTyped[12] &+ salsaBlockTyped[15], by: 9) - salsaBlockTyped[14] ^= rotateLeft(salsaBlockTyped[13] &+ salsaBlockTyped[12], by: 13) - salsaBlockTyped[15] ^= rotateLeft(salsaBlockTyped[14] &+ salsaBlockTyped[13], by: 18) - } - for i in 0 ..< 16 { - block[i] = block[i] &+ salsaBlockTyped[i] - } - } - - @inline(__always) func blockXor(_ dest: UnsafeMutableRawPointer, _ src: UnsafeRawPointer, _ len: Int) { - let D = dest.assumingMemoryBound(to: UInt64.self) - let S = src.assumingMemoryBound(to: UInt64.self) - let L = len / MemoryLayout.size - - for i in 0 ..< L { - D[i] ^= S[i] - } - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/SecureBytes.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/SecureBytes.swift deleted file mode 100644 index 9d80fca8d..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/SecureBytes.swift +++ /dev/null @@ -1,87 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -#if canImport(Darwin) -import Darwin -#elseif canImport(Glibc) -import Glibc -#elseif canImport(WinSDK) -import WinSDK -#endif - -typealias Key = SecureBytes - -/// Keeps bytes in memory. Because this is class, bytes are not copied -/// and memory area is locked as long as referenced, then unlocked on deinit -final class SecureBytes { - private let bytes: Array - let count: Int - - init(bytes: Array) { - self.bytes = bytes - self.count = bytes.count - self.bytes.withUnsafeBufferPointer { (pointer) -> Void in - #if os(Windows) - VirtualLock(UnsafeMutableRawPointer(mutating: pointer.baseAddress), SIZE_T(pointer.count)) - #else - mlock(pointer.baseAddress, pointer.count) - #endif - } - } - - deinit { - self.bytes.withUnsafeBufferPointer { (pointer) -> Void in - #if os(Windows) - VirtualUnlock(UnsafeMutableRawPointer(mutating: pointer.baseAddress), SIZE_T(pointer.count)) - #else - munlock(pointer.baseAddress, pointer.count) - #endif - } - } -} - -extension SecureBytes: Collection { - typealias Index = Int - - var endIndex: Int { - self.bytes.endIndex - } - - var startIndex: Int { - self.bytes.startIndex - } - - subscript(position: Index) -> UInt8 { - self.bytes[position] - } - - subscript(bounds: Range) -> ArraySlice { - self.bytes[bounds] - } - - func formIndex(after i: inout Int) { - self.bytes.formIndex(after: &i) - } - - func index(after i: Int) -> Int { - self.bytes.index(after: i) - } -} - -extension SecureBytes: ExpressibleByArrayLiteral { - public convenience init(arrayLiteral elements: UInt8...) { - self.init(bytes: elements) - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/StreamDecryptor.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/StreamDecryptor.swift deleted file mode 100644 index 88802b56b..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/StreamDecryptor.swift +++ /dev/null @@ -1,92 +0,0 @@ -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -@usableFromInline -final class StreamDecryptor: Cryptor, Updatable { - - @usableFromInline - internal let blockSize: Int - - @usableFromInline - internal var worker: CipherModeWorker - - @usableFromInline - internal let padding: Padding - - @usableFromInline - internal var accumulated = Array() - - @usableFromInline - internal var lastBlockRemainder = 0 - - @usableFromInline - init(blockSize: Int, padding: Padding, _ worker: CipherModeWorker) throws { - self.blockSize = blockSize - self.padding = padding - self.worker = worker - } - - // MARK: Updatable - - @inlinable - public func update(withBytes bytes: ArraySlice, isLast: Bool) throws -> Array { - self.accumulated += bytes - - let toProcess = self.accumulated.prefix(max(self.accumulated.count - self.worker.additionalBufferSize, 0)) - - if var finalizingWorker = worker as? FinalizingDecryptModeWorker, isLast == true { - // will truncate suffix if needed - try finalizingWorker.willDecryptLast(bytes: self.accumulated.slice) - } - - var processedBytesCount = 0 - var plaintext = Array(reserveCapacity: bytes.count + self.worker.additionalBufferSize) - for chunk in toProcess.batched(by: self.blockSize) { - plaintext += self.worker.decrypt(block: chunk) - processedBytesCount += chunk.count - } - - if var finalizingWorker = worker as? FinalizingDecryptModeWorker, isLast == true { - plaintext = Array(try finalizingWorker.didDecryptLast(bytes: plaintext.slice)) - } - - // omit unecessary calculation if not needed - if self.padding != .noPadding { - self.lastBlockRemainder = plaintext.count.quotientAndRemainder(dividingBy: self.blockSize).remainder - } - - if isLast { - // CTR doesn't need padding. Really. Add padding to the last block if really want. but... don't. - plaintext = self.padding.remove(from: plaintext, blockSize: self.blockSize - self.lastBlockRemainder) - } - - self.accumulated.removeFirst(processedBytesCount) // super-slow - - if var finalizingWorker = worker as? FinalizingDecryptModeWorker, isLast == true { - plaintext = Array(try finalizingWorker.finalize(decrypt: plaintext.slice)) - } - - return plaintext - } - - @inlinable - public func seek(to position: Int) throws { - guard var worker = self.worker as? SeekableModeWorker else { - fatalError("Not supported") - } - - try worker.seek(to: position) - self.worker = worker - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/StreamEncryptor.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/StreamEncryptor.swift deleted file mode 100644 index 10ce7b1af..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/StreamEncryptor.swift +++ /dev/null @@ -1,68 +0,0 @@ -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -@usableFromInline -final class StreamEncryptor: Cryptor, Updatable { - - @usableFromInline - internal let blockSize: Int - - @usableFromInline - internal var worker: CipherModeWorker - - @usableFromInline - internal let padding: Padding - - @usableFromInline - internal var lastBlockRemainder = 0 - - @usableFromInline - init(blockSize: Int, padding: Padding, _ worker: CipherModeWorker) throws { - self.blockSize = blockSize - self.padding = padding - self.worker = worker - } - - // MARK: Updatable - - @inlinable - public func update(withBytes bytes: ArraySlice, isLast: Bool) throws -> Array { - var accumulated = Array(bytes) - if isLast { - // CTR doesn't need padding. Really. Add padding to the last block if really want. but... don't. - accumulated = self.padding.add(to: accumulated, blockSize: self.blockSize - self.lastBlockRemainder) - } - - var encrypted = Array(reserveCapacity: bytes.count) - for chunk in accumulated.batched(by: self.blockSize) { - encrypted += self.worker.encrypt(block: chunk) - } - - // omit unecessary calculation if not needed - if self.padding != .noPadding { - self.lastBlockRemainder = encrypted.count.quotientAndRemainder(dividingBy: self.blockSize).remainder - } - - if var finalizingWorker = worker as? FinalizingEncryptModeWorker, isLast == true { - encrypted = Array(try finalizingWorker.finalize(encrypt: encrypted.slice)) - } - - return encrypted - } - - @usableFromInline - func seek(to: Int) throws { - fatalError("Not supported") - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/String+Extension.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/String+Extension.swift deleted file mode 100644 index dc979ce3b..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/String+Extension.swift +++ /dev/null @@ -1,96 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -/** String extension */ -extension String { - - @inlinable - public var bytes: Array { - data(using: String.Encoding.utf8, allowLossyConversion: true)?.bytes ?? Array(utf8) - } - - @inlinable - public func md5() -> String { - self.bytes.md5().toHexString() - } - - @inlinable - public func sha1() -> String { - self.bytes.sha1().toHexString() - } - - @inlinable - public func sha224() -> String { - self.bytes.sha224().toHexString() - } - - @inlinable - public func sha256() -> String { - self.bytes.sha256().toHexString() - } - - @inlinable - public func sha384() -> String { - self.bytes.sha384().toHexString() - } - - @inlinable - public func sha512() -> String { - self.bytes.sha512().toHexString() - } - - @inlinable - public func sha3(_ variant: SHA3.Variant) -> String { - self.bytes.sha3(variant).toHexString() - } - - @inlinable - public func crc32(seed: UInt32? = nil, reflect: Bool = true) -> String { - self.bytes.crc32(seed: seed, reflect: reflect).bytes().toHexString() - } - - @inlinable - public func crc32c(seed: UInt32? = nil, reflect: Bool = true) -> String { - self.bytes.crc32c(seed: seed, reflect: reflect).bytes().toHexString() - } - - @inlinable - public func crc16(seed: UInt16? = nil) -> String { - self.bytes.crc16(seed: seed).bytes().toHexString() - } - - /// - parameter cipher: Instance of `Cipher` - /// - returns: hex string of bytes - @inlinable - public func encrypt(cipher: Cipher) throws -> String { - try self.bytes.encrypt(cipher: cipher).toHexString() - } - - /// - parameter cipher: Instance of `Cipher` - /// - returns: base64 encoded string of encrypted bytes - @inlinable - public func encryptToBase64(cipher: Cipher) throws -> String { - try self.bytes.encrypt(cipher: cipher).toBase64() - } - - // decrypt() does not make sense for String - - /// - parameter authenticator: Instance of `Authenticator` - /// - returns: hex string of string - @inlinable - public func authenticate(with authenticator: A) throws -> String { - try self.bytes.authenticate(with: authenticator).toHexString() - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/UInt128.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/UInt128.swift deleted file mode 100644 index abc249331..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/UInt128.swift +++ /dev/null @@ -1,90 +0,0 @@ -// -// UInt128.swift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import Foundation - -struct UInt128: Equatable, ExpressibleByIntegerLiteral { - let i: (a: UInt64, b: UInt64) - - typealias IntegerLiteralType = UInt64 - - init(integerLiteral value: IntegerLiteralType) { - self = UInt128(value) - } - - init(_ raw: Array) { - self = raw.prefix(MemoryLayout.stride).withUnsafeBytes({ (rawBufferPointer) -> UInt128 in - let arr = rawBufferPointer.bindMemory(to: UInt64.self) - return UInt128((arr[0].bigEndian, arr[1].bigEndian)) - }) - } - - init(_ raw: ArraySlice) { - self.init(Array(raw)) - } - - init(_ i: (a: UInt64, b: UInt64)) { - self.i = i - } - - init(a: UInt64, b: UInt64) { - self.init((a, b)) - } - - init(_ b: UInt64) { - self.init((0, b)) - } - - // Bytes - var bytes: Array { - var at = self.i.a.bigEndian - var bt = self.i.b.bigEndian - - let ar = Data(bytes: &at, count: MemoryLayout.size(ofValue: at)) - let br = Data(bytes: &bt, count: MemoryLayout.size(ofValue: bt)) - - var result = Data() - result.append(ar) - result.append(br) - return result.bytes - } - - static func ^ (n1: UInt128, n2: UInt128) -> UInt128 { - UInt128((n1.i.a ^ n2.i.a, n1.i.b ^ n2.i.b)) - } - - static func & (n1: UInt128, n2: UInt128) -> UInt128 { - UInt128((n1.i.a & n2.i.a, n1.i.b & n2.i.b)) - } - - static func >> (value: UInt128, by: Int) -> UInt128 { - var result = value - for _ in 0..> 1 - let b = result.i.b >> 1 + ((result.i.a & 1) << 63) - result = UInt128((a, b)) - } - return result - } - - // Equatable. - static func == (lhs: UInt128, rhs: UInt128) -> Bool { - lhs.i == rhs.i - } - - static func != (lhs: UInt128, rhs: UInt128) -> Bool { - !(lhs == rhs) - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/UInt16+Extension.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/UInt16+Extension.swift deleted file mode 100644 index 777bd980a..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/UInt16+Extension.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -/** array of bytes */ -extension UInt16 { - @_specialize(where T == ArraySlice) - init(bytes: T) where T.Element == UInt8, T.Index == Int { - self = UInt16(bytes: bytes, fromIndex: bytes.startIndex) - } - - @_specialize(where T == ArraySlice) - init(bytes: T, fromIndex index: T.Index) where T.Element == UInt8, T.Index == Int { - if bytes.isEmpty { - self = 0 - return - } - - let count = bytes.count - - let val0 = count > 0 ? UInt16(bytes[index.advanced(by: 0)]) << 8 : 0 - let val1 = count > 1 ? UInt16(bytes[index.advanced(by: 1)]) : 0 - - self = val0 | val1 - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/UInt32+Extension.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/UInt32+Extension.swift deleted file mode 100644 index 915586929..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/UInt32+Extension.swift +++ /dev/null @@ -1,51 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -#if canImport(Darwin) -import Darwin -#elseif canImport(Glibc) -import Glibc -#elseif canImport(ucrt) -import ucrt -#endif - -protocol _UInt32Type {} -extension UInt32: _UInt32Type {} - -/** array of bytes */ -extension UInt32 { - @_specialize(where T == ArraySlice) - init(bytes: T) where T.Element == UInt8, T.Index == Int { - self = UInt32(bytes: bytes, fromIndex: bytes.startIndex) - } - - @_specialize(where T == ArraySlice) - @inlinable - init(bytes: T, fromIndex index: T.Index) where T.Element == UInt8, T.Index == Int { - if bytes.isEmpty { - self = 0 - return - } - - let count = bytes.count - - let val0 = count > 0 ? UInt32(bytes[index.advanced(by: 0)]) << 24 : 0 - let val1 = count > 1 ? UInt32(bytes[index.advanced(by: 1)]) << 16 : 0 - let val2 = count > 2 ? UInt32(bytes[index.advanced(by: 2)]) << 8 : 0 - let val3 = count > 3 ? UInt32(bytes[index.advanced(by: 3)]) : 0 - - self = val0 | val1 | val2 | val3 - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/UInt64+Extension.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/UInt64+Extension.swift deleted file mode 100644 index 224f71730..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/UInt64+Extension.swift +++ /dev/null @@ -1,44 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -/** array of bytes */ -extension UInt64 { - @_specialize(where T == ArraySlice) - init(bytes: T) where T.Element == UInt8, T.Index == Int { - self = UInt64(bytes: bytes, fromIndex: bytes.startIndex) - } - - @_specialize(where T == ArraySlice) - @inlinable - init(bytes: T, fromIndex index: T.Index) where T.Element == UInt8, T.Index == Int { - if bytes.isEmpty { - self = 0 - return - } - - let count = bytes.count - - let val0 = count > 0 ? UInt64(bytes[index.advanced(by: 0)]) << 56 : 0 - let val1 = count > 1 ? UInt64(bytes[index.advanced(by: 1)]) << 48 : 0 - let val2 = count > 2 ? UInt64(bytes[index.advanced(by: 2)]) << 40 : 0 - let val3 = count > 3 ? UInt64(bytes[index.advanced(by: 3)]) << 32 : 0 - let val4 = count > 4 ? UInt64(bytes[index.advanced(by: 4)]) << 24 : 0 - let val5 = count > 5 ? UInt64(bytes[index.advanced(by: 5)]) << 16 : 0 - let val6 = count > 6 ? UInt64(bytes[index.advanced(by: 6)]) << 8 : 0 - let val7 = count > 7 ? UInt64(bytes[index.advanced(by: 7)]) : 0 - - self = val0 | val1 | val2 | val3 | val4 | val5 | val6 | val7 - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/UInt8+Extension.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/UInt8+Extension.swift deleted file mode 100644 index 906a9ded1..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/UInt8+Extension.swift +++ /dev/null @@ -1,74 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -#if canImport(Darwin) -import Darwin -#elseif canImport(Glibc) -import Glibc -#elseif canImport(ucrt) -import ucrt -#endif - -public protocol _UInt8Type {} -extension UInt8: _UInt8Type {} - -/** casting */ -extension UInt8 { - /** cast because UInt8() because std initializer crash if value is > byte */ - static func with(value: UInt64) -> UInt8 { - let tmp = value & 0xff - return UInt8(tmp) - } - - static func with(value: UInt32) -> UInt8 { - let tmp = value & 0xff - return UInt8(tmp) - } - - static func with(value: UInt16) -> UInt8 { - let tmp = value & 0xff - return UInt8(tmp) - } -} - -/** Bits */ -extension UInt8 { - /** array of bits */ - public func bits() -> [Bit] { - let totalBitsCount = MemoryLayout.size * 8 - - var bitsArray = [Bit](repeating: Bit.zero, count: totalBitsCount) - - for j in 0.. String { - var s = String() - let arr: [Bit] = self.bits() - for idx in arr.indices { - s += (arr[idx] == Bit.one ? "1" : "0") - if idx.advanced(by: 1) % 8 == 0 { s += " " } - } - return s - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Updatable.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Updatable.swift deleted file mode 100644 index 22031ad6e..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Updatable.swift +++ /dev/null @@ -1,107 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -/// A type that supports incremental updates. For example Digest or Cipher may be updatable -/// and calculate result incerementally. -public protocol Updatable { - /// Update given bytes in chunks. - /// - /// - parameter bytes: Bytes to process. - /// - parameter isLast: Indicate if given chunk is the last one. No more updates after this call. - /// - returns: Processed partial result data or empty array. - mutating func update(withBytes bytes: ArraySlice, isLast: Bool) throws -> Array - - /// Update given bytes in chunks. - /// - /// - Parameters: - /// - bytes: Bytes to process. - /// - isLast: Indicate if given chunk is the last one. No more updates after this call. - /// - output: Resulting bytes callback. - /// - Returns: Processed partial result data or empty array. - mutating func update(withBytes bytes: ArraySlice, isLast: Bool, output: (_ bytes: Array) -> Void) throws -} - -extension Updatable { - @inlinable - public mutating func update(withBytes bytes: ArraySlice, isLast: Bool = false, output: (_ bytes: Array) -> Void) throws { - let processed = try update(withBytes: bytes, isLast: isLast) - if !processed.isEmpty { - output(processed) - } - } - - @inlinable - public mutating func update(withBytes bytes: ArraySlice, isLast: Bool = false) throws -> Array { - try self.update(withBytes: bytes, isLast: isLast) - } - - @inlinable - public mutating func update(withBytes bytes: Array, isLast: Bool = false) throws -> Array { - try self.update(withBytes: bytes.slice, isLast: isLast) - } - - @inlinable - public mutating func update(withBytes bytes: Array, isLast: Bool = false, output: (_ bytes: Array) -> Void) throws { - try self.update(withBytes: bytes.slice, isLast: isLast, output: output) - } - - /// Finish updates. This may apply padding. - /// - parameter bytes: Bytes to process - /// - returns: Processed data. - @inlinable - public mutating func finish(withBytes bytes: ArraySlice) throws -> Array { - try self.update(withBytes: bytes, isLast: true) - } - - @inlinable - public mutating func finish(withBytes bytes: Array) throws -> Array { - try self.finish(withBytes: bytes.slice) - } - - /// Finish updates. May add padding. - /// - /// - Returns: Processed data - /// - Throws: Error - @inlinable - public mutating func finish() throws -> Array { - try self.update(withBytes: [], isLast: true) - } - - /// Finish updates. This may apply padding. - /// - parameter bytes: Bytes to process - /// - parameter output: Resulting data - /// - returns: Processed data. - @inlinable - public mutating func finish(withBytes bytes: ArraySlice, output: (_ bytes: Array) -> Void) throws { - let processed = try update(withBytes: bytes, isLast: true) - if !processed.isEmpty { - output(processed) - } - } - - @inlinable - public mutating func finish(withBytes bytes: Array, output: (_ bytes: Array) -> Void) throws { - try self.finish(withBytes: bytes.slice, output: output) - } - - /// Finish updates. May add padding. - /// - /// - Parameter output: Processed data - /// - Throws: Error - @inlinable - public mutating func finish(output: (Array) -> Void) throws { - try self.finish(withBytes: [], output: output) - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Utils.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Utils.swift deleted file mode 100644 index 7afca0b4d..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/Utils.swift +++ /dev/null @@ -1,117 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -@inlinable -func rotateLeft(_ value: UInt8, by: UInt8) -> UInt8 { - ((value << by) & 0xff) | (value >> (8 - by)) -} - -@inlinable -func rotateLeft(_ value: UInt16, by: UInt16) -> UInt16 { - ((value << by) & 0xffff) | (value >> (16 - by)) -} - -@inlinable -func rotateLeft(_ value: UInt32, by: UInt32) -> UInt32 { - ((value << by) & 0xffffffff) | (value >> (32 - by)) -} - -@inlinable -func rotateLeft(_ value: UInt64, by: UInt64) -> UInt64 { - (value << by) | (value >> (64 - by)) -} - -@inlinable -func rotateRight(_ value: UInt16, by: UInt16) -> UInt16 { - (value >> by) | (value << (16 - by)) -} - -@inlinable -func rotateRight(_ value: UInt32, by: UInt32) -> UInt32 { - (value >> by) | (value << (32 - by)) -} - -@inlinable -func rotateRight(_ value: UInt64, by: UInt64) -> UInt64 { - ((value >> by) | (value << (64 - by))) -} - -@inlinable -func reversed(_ uint8: UInt8) -> UInt8 { - var v = uint8 - v = (v & 0xf0) >> 4 | (v & 0x0f) << 4 - v = (v & 0xcc) >> 2 | (v & 0x33) << 2 - v = (v & 0xaa) >> 1 | (v & 0x55) << 1 - return v -} - -@inlinable -func reversed(_ uint32: UInt32) -> UInt32 { - var v = uint32 - v = ((v >> 1) & 0x55555555) | ((v & 0x55555555) << 1) - v = ((v >> 2) & 0x33333333) | ((v & 0x33333333) << 2) - v = ((v >> 4) & 0x0f0f0f0f) | ((v & 0x0f0f0f0f) << 4) - v = ((v >> 8) & 0x00ff00ff) | ((v & 0x00ff00ff) << 8) - v = ((v >> 16) & 0xffff) | ((v & 0xffff) << 16) - return v -} - -@inlinable -func xor(_ left: T, _ right: V) -> ArraySlice where T: RandomAccessCollection, V: RandomAccessCollection, T.Element == UInt8, T.Index == Int, V.Element == UInt8, V.Index == Int { - return xor(left, right).slice -} - -@inlinable -func xor(_ left: T, _ right: V) -> Array where T: RandomAccessCollection, V: RandomAccessCollection, T.Element == UInt8, T.Index == Int, V.Element == UInt8, V.Index == Int { - let length = Swift.min(left.count, right.count) - - let buf = UnsafeMutablePointer.allocate(capacity: length) - buf.initialize(repeating: 0, count: length) - defer { - buf.deinitialize(count: length) - buf.deallocate() - } - - // xor - for i in 0.., blockSize: Int, allowance: Int = 0) { - let msgLength = data.count - // Step 1. Append Padding Bits - // append one bit (UInt8 with one bit) to message - data.append(0x80) - - // Step 2. append "0" bit until message length in bits ≡ 448 (mod 512) - let max = blockSize - allowance // 448, 986 - if msgLength % blockSize < max { // 448 - data += Array(repeating: 0, count: max - 1 - (msgLength % blockSize)) - } else { - data += Array(repeating: 0, count: blockSize + max - 1 - (msgLength % blockSize)) - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/ZeroPadding.swift b/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/ZeroPadding.swift deleted file mode 100644 index b1b67dd45..000000000 --- a/Carthage/Checkouts/CryptoSwift/Sources/CryptoSwift/ZeroPadding.swift +++ /dev/null @@ -1,40 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -/// All the bytes that are required to be padded are padded with zero. -/// Zero padding may not be reversible if the original file ends with one or more zero bytes. -struct ZeroPadding: PaddingProtocol { - init() { - } - - @inlinable - func add(to bytes: Array, blockSize: Int) -> Array { - let paddingCount = blockSize - (bytes.count % blockSize) - if paddingCount > 0 { - return bytes + Array(repeating: 0, count: paddingCount) - } - return bytes - } - - @inlinable - func remove(from bytes: Array, blockSize _: Int?) -> Array { - for (idx, value) in bytes.reversed().enumerated() { - if value != 0 { - return Array(bytes[0.. -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import Foundation -import XCTest -@testable import CryptoSwift - -final class AESCCMTests: XCTestCase { - - struct TestFixture { - let tagLength: Int - let key: Array - let nonce: Array - let aad: Array - let plaintext: Array - let expected: Array - - init(_ tagLength: Int, _ key: String, _ nonce: String, _ plaintext: String, _ expected: String, _ aad: String) { - self.tagLength = tagLength - self.key = Array(hex: key) - self.nonce = Array(hex: nonce) - self.aad = Array(hex: aad) - self.plaintext = Array(hex: plaintext) - self.expected = Array(hex: expected) - } - } - - func testAESCCMTestDVPT256() { - let fixtures = [ - //NIST Test vectors for AES-CCM with 256bit Key, from DVPT256.txt - //(Integer macLength, String key, String nonce, String plain, String ciphered, String aData) { - TestFixture(4, "eda32f751456e33195f1f499cf2dc7c97ea127b6d488f211ccc5126fbb24afa6", "a544218dadd3c1", "", "469c90bb", ""), - TestFixture(4, "eda32f751456e33195f1f499cf2dc7c97ea127b6d488f211ccc5126fbb24afa6", "dbb3923156cfd6", "", "1302d515", ""), - TestFixture(4, "eda32f751456e33195f1f499cf2dc7c97ea127b6d488f211ccc5126fbb24afa6", "a259c114eaac89", "", "4fe06e92", ""), - TestFixture(4, "eda32f751456e33195f1f499cf2dc7c97ea127b6d488f211ccc5126fbb24afa6", "e1be89af98ffd7", "", "e5417f6b", ""), - TestFixture(4, "eda32f751456e33195f1f499cf2dc7c97ea127b6d488f211ccc5126fbb24afa6", "1aa758eb2f9a28", "", "f8fa8e71", ""), - TestFixture(16, "e1b8a927a95efe94656677b692662000278b441c79e879dd5c0ddc758bdc9ee8", "a544218dadd3c1", "", "8207eb14d33855a52acceed17dbcbf6e", ""), - TestFixture(16, "e1b8a927a95efe94656677b692662000278b441c79e879dd5c0ddc758bdc9ee8", "dbb3923156cfd6", "", "e4dc5e03aacea691262ee69cee8ffbbe", ""), - TestFixture(16, "e1b8a927a95efe94656677b692662000278b441c79e879dd5c0ddc758bdc9ee8", "a259c114eaac89", "", "f79c53fd5e69835b7e70496ea999718b", ""), - TestFixture(16, "e1b8a927a95efe94656677b692662000278b441c79e879dd5c0ddc758bdc9ee8", "e1be89af98ffd7", "", "10d3f6fe08280d45e67e58fe41a7f036", ""), - TestFixture(16, "e1b8a927a95efe94656677b692662000278b441c79e879dd5c0ddc758bdc9ee8", "1aa758eb2f9a28", "", "2590df2453cb94c304ba0a2bff3f3c71", ""), - TestFixture(4, "e1b8a927a95efe94656677b692662000278b441c79e879dd5c0ddc758bdc9ee8", "a544218dadd3c10583db49cf39", "", "8a19a133", ""), - TestFixture(4, "e1b8a927a95efe94656677b692662000278b441c79e879dd5c0ddc758bdc9ee8", "79ac204a26b9fee1132370c20f", "", "154024b2", ""), - TestFixture(4, "e1b8a927a95efe94656677b692662000278b441c79e879dd5c0ddc758bdc9ee8", "0545fd9ecbc73ccdbbbd4244fd", "", "5c349fb2", ""), - TestFixture(4, "e1b8a927a95efe94656677b692662000278b441c79e879dd5c0ddc758bdc9ee8", "0a37f2e7c66490e97285f1b09e", "", "c59bf14c", ""), - TestFixture(4, "e1b8a927a95efe94656677b692662000278b441c79e879dd5c0ddc758bdc9ee8", "c1ad812bf2bbb2cdaee4636ee7", "", "5b96f41d", ""), - TestFixture(16, "af063639e66c284083c5cf72b70d8bc277f5978e80d9322d99f2fdc718cda569", "a544218dadd3c10583db49cf39", "", "97e1a8dd4259ccd2e431e057b0397fcf", ""), - TestFixture(16, "af063639e66c284083c5cf72b70d8bc277f5978e80d9322d99f2fdc718cda569", "79ac204a26b9fee1132370c20f", "", "5c8c9a5b97be8c7bc01ca8d693b809f9", ""), - TestFixture(16, "af063639e66c284083c5cf72b70d8bc277f5978e80d9322d99f2fdc718cda569", "0545fd9ecbc73ccdbbbd4244fd", "", "84201662b213c7a1ff0c1b3c25e4ec45", ""), - TestFixture(16, "af063639e66c284083c5cf72b70d8bc277f5978e80d9322d99f2fdc718cda569", "0a37f2e7c66490e97285f1b09e", "", "586e728193ce6db9a926b03b2d77dd6e", ""), - TestFixture(16, "af063639e66c284083c5cf72b70d8bc277f5978e80d9322d99f2fdc718cda569", "c1ad812bf2bbb2cdaee4636ee7", "", "64864d21b6ee3fca13f07fc0486e232d", ""), - TestFixture(4, "af063639e66c284083c5cf72b70d8bc277f5978e80d9322d99f2fdc718cda569", "a544218dadd3c1", "d3d5424e20fbec43ae495353ed830271515ab104f8860c98", "64a1341679972dc5869fcf69b19d5c5ea50aa0b5e985f5b722aa8d59", ""), - TestFixture(4, "af063639e66c284083c5cf72b70d8bc277f5978e80d9322d99f2fdc718cda569", "9d773a31fe2ec7", "839d8cfa2c921c3cceb7d1f46bd2eaad706e53f64523d8c0", "5acfbe5e488976d8b9b77e69a736e8c919053f9415551209dce2d25e", ""), - TestFixture(4, "af063639e66c284083c5cf72b70d8bc277f5978e80d9322d99f2fdc718cda569", "24b7a65391f88b", "3bed52236182c19418867d468dbf47c8aac46c02445f99bb", "f00628e10e8e0115b4a4532a1212a23aade4090832c1972d750125f3", ""), - TestFixture(4, "af063639e66c284083c5cf72b70d8bc277f5978e80d9322d99f2fdc718cda569", "b672c91376f533", "4f7a561e61b7861719e4445057ac9b74a9be953b772b09ec", "758aa03dc72c362c43b5f85bfaa3db4a74860887a8c29e47d5642830", ""), - TestFixture(4, "af063639e66c284083c5cf72b70d8bc277f5978e80d9322d99f2fdc718cda569", "a6d01fb88ca547", "a36155de477364236591e453008114075b4872120ef17264", "615cbeabbe163ba8bc9c073df9ad40833fcf3f424644ccc37aa999d7", ""), - TestFixture(16, "f7079dfa3b5c7b056347d7e437bcded683abd6e2c9e069d333284082cbb5d453", "a544218dadd3c1", "d3d5424e20fbec43ae495353ed830271515ab104f8860c98", "bc51c3925a960e7732533e4ef3a4f69ee6826de952bcb0fd374f3bb6db8377ebfc79674858c4f305", ""), - TestFixture(16, "f7079dfa3b5c7b056347d7e437bcded683abd6e2c9e069d333284082cbb5d453", "9d773a31fe2ec7", "839d8cfa2c921c3cceb7d1f46bd2eaad706e53f64523d8c0", "4539bb13382b034ddb16a3329148f9243a4eee998fe444aff2870ce198af11f4fb698a67af6c89ad", ""), - TestFixture(16, "f7079dfa3b5c7b056347d7e437bcded683abd6e2c9e069d333284082cbb5d453", "24b7a65391f88b", "3bed52236182c19418867d468dbf47c8aac46c02445f99bb", "6d0f928352a17d63aca1899cbd305e1f831f1638d27c1e24432704eff9b6830476db3d30d4c103e4", ""), - TestFixture(16, "f7079dfa3b5c7b056347d7e437bcded683abd6e2c9e069d333284082cbb5d453", "b672c91376f533", "4f7a561e61b7861719e4445057ac9b74a9be953b772b09ec", "f23ac1426cb1130c9a0913b347d8efafb6ed125913aa678a9dc42d22a5436bc12eff5505edb25e19", ""), - TestFixture(16, "f7079dfa3b5c7b056347d7e437bcded683abd6e2c9e069d333284082cbb5d453", "a6d01fb88ca547", "a36155de477364236591e453008114075b4872120ef17264", "773b8eea2e9830297ac11d3c1f6ea4008c96040e83d76d55789d2043179fdd8fdcbd52313b7b15cb", ""), - TestFixture(4, "f7079dfa3b5c7b056347d7e437bcded683abd6e2c9e069d333284082cbb5d453", "a544218dadd3c10583db49cf39", "3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e", "63e00d30e4b08fd2a1cc8d70fab327b2368e77a93be4f4123d14fb3f", ""), - TestFixture(4, "f7079dfa3b5c7b056347d7e437bcded683abd6e2c9e069d333284082cbb5d453", "1501a243bf60b2cb40d5aa20ca", "f5730a05fec31a11662e2e14e362ccc75c7c30cdfccbf994", "377b2f1e7bd9e3d1077038e084f61950761361095f7eeebbf1a72afc", ""), - TestFixture(4, "f7079dfa3b5c7b056347d7e437bcded683abd6e2c9e069d333284082cbb5d453", "d65e0e53f765f9d5e6795c0c5e", "20e394c7cc90bdfa6186fc1ba6fff158dfc690e24ba4c9fb", "6cab3060bf3b33b163b933c2ed0ba51406810b54d0edcf5c9d0ef4f7", ""), - TestFixture(4, "f7079dfa3b5c7b056347d7e437bcded683abd6e2c9e069d333284082cbb5d453", "a6b2371acf8321864c08ddb4d8", "1a43ca628026219c5a430c54021a5a3152ae517167399635", "c5aa500d1f7c09a590e9d15d6860c4433684e04dd6bc5c8f94f223f0", ""), - TestFixture(4, "f7079dfa3b5c7b056347d7e437bcded683abd6e2c9e069d333284082cbb5d453", "c2b60f14c894ec6178fe79919f", "3e707d98f19972a63d913e6ea7533af2f41ff98aee2b2a36", "852cca903d7fdf899807bd14642057534c8a0ccacb8c7b8fb4d35d44", ""), - TestFixture(16, "1b0e8df63c57f05d9ac457575ea764524b8610ae5164e6215f426f5a7ae6ede4", "a544218dadd3c10583db49cf39", "3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e", "f0050ad16392021a3f40207bed3521fb1e9f808f49830c423a578d179902f912f9ea1afbce1120b3", ""), - TestFixture(16, "1b0e8df63c57f05d9ac457575ea764524b8610ae5164e6215f426f5a7ae6ede4", "1501a243bf60b2cb40d5aa20ca", "f5730a05fec31a11662e2e14e362ccc75c7c30cdfccbf994", "254b847d4175bbb44a82b4e805514fa444c224710933f3ec8aaa3f0133234c0cd91609982adc034b", ""), - TestFixture(16, "1b0e8df63c57f05d9ac457575ea764524b8610ae5164e6215f426f5a7ae6ede4", "d65e0e53f765f9d5e6795c0c5e", "20e394c7cc90bdfa6186fc1ba6fff158dfc690e24ba4c9fb", "c3618c991b15de641d291419ff6957e8b9ae5046dd8c6f08fafb76adf12f36740347e3edae62bca4", ""), - TestFixture(16, "1b0e8df63c57f05d9ac457575ea764524b8610ae5164e6215f426f5a7ae6ede4", "a6b2371acf8321864c08ddb4d8", "1a43ca628026219c5a430c54021a5a3152ae517167399635", "bd37326da18e5ac79a1a9512f724bb539530868576b79c67acb5a51d10a58d6584fbe73f1063c31b", ""), - TestFixture(16, "1b0e8df63c57f05d9ac457575ea764524b8610ae5164e6215f426f5a7ae6ede4", "c2b60f14c894ec6178fe79919f", "3e707d98f19972a63d913e6ea7533af2f41ff98aee2b2a36", "ecd337640022635ce1ed273756d02b7feeb2515614c1fadc95c66d3f411b478853886afd177d88c3", ""), - TestFixture(4, "1b0e8df63c57f05d9ac457575ea764524b8610ae5164e6215f426f5a7ae6ede4", "a544218dadd3c1", "", "92d00fbe", "d3d5424e20fbec43ae495353ed830271515ab104f8860c988d15b6d36c038eab"), - TestFixture(4, "1b0e8df63c57f05d9ac457575ea764524b8610ae5164e6215f426f5a7ae6ede4", "3fcb328bc96404", "", "11250056", "10b2ffed4f95af0f98ed4f77c677b5786ad01b31c095bbc6e1c99cf13977abba"), - TestFixture(4, "1b0e8df63c57f05d9ac457575ea764524b8610ae5164e6215f426f5a7ae6ede4", "c42ac63de6f12a", "", "4eed80fd", "7ff8d06c5abcc50d3820de34b03089e6c5b202bcbaabca892825553d4d30020a"), - TestFixture(4, "1b0e8df63c57f05d9ac457575ea764524b8610ae5164e6215f426f5a7ae6ede4", "3a1701b185d33a", "", "9a5382c3", "e5d54df8ed9f89b98c5ebb1bc5d5279c2e182784ff4cd9c869ae152e29d7a2b2"), - TestFixture(4, "1b0e8df63c57f05d9ac457575ea764524b8610ae5164e6215f426f5a7ae6ede4", "4f490ce07e0150", "", "e1842c46", "3e12d09632c644c540077c6f90726d4167423a679322b2000a3f19cfcea02b33"), - TestFixture(16, "a4bc10b1a62c96d459fbaf3a5aa3face7313bb9e1253e696f96a7a8e36801088", "a544218dadd3c1", "", "93af11a08379eb37a16aa2837f09d69d", "d3d5424e20fbec43ae495353ed830271515ab104f8860c988d15b6d36c038eab"), - TestFixture(16, "a4bc10b1a62c96d459fbaf3a5aa3face7313bb9e1253e696f96a7a8e36801088", "3fcb328bc96404", "", "b3884b69d117146cfa5529901753ddc0", "10b2ffed4f95af0f98ed4f77c677b5786ad01b31c095bbc6e1c99cf13977abba"), - TestFixture(16, "a4bc10b1a62c96d459fbaf3a5aa3face7313bb9e1253e696f96a7a8e36801088", "c42ac63de6f12a", "", "b53d93cbfd3d5cf3720cef5080bc7224", "7ff8d06c5abcc50d3820de34b03089e6c5b202bcbaabca892825553d4d30020a"), - TestFixture(16, "a4bc10b1a62c96d459fbaf3a5aa3face7313bb9e1253e696f96a7a8e36801088", "3a1701b185d33a", "", "0a5d1bc02c5fe096a8b9d94d1267c49a", "e5d54df8ed9f89b98c5ebb1bc5d5279c2e182784ff4cd9c869ae152e29d7a2b2"), - TestFixture(16, "a4bc10b1a62c96d459fbaf3a5aa3face7313bb9e1253e696f96a7a8e36801088", "4f490ce07e0150", "", "1eda43bf07f2bf003107f3a0ba3a4c18", "3e12d09632c644c540077c6f90726d4167423a679322b2000a3f19cfcea02b33"), - TestFixture(4, "a4bc10b1a62c96d459fbaf3a5aa3face7313bb9e1253e696f96a7a8e36801088", "a544218dadd3c10583db49cf39", "", "866d4227", "3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e09a1005e024f6907"), - TestFixture(4, "a4bc10b1a62c96d459fbaf3a5aa3face7313bb9e1253e696f96a7a8e36801088", "dfdcbdff329f7af70731d8e276", "", "c4ac0952", "2ae56ddde2876d70b3b34eda8c2b1d096c836d5225d53ec460b724b6e16aa5a3"), - TestFixture(4, "a4bc10b1a62c96d459fbaf3a5aa3face7313bb9e1253e696f96a7a8e36801088", "60f2490ba0c658848859fcbea8", "", "27c3953d", "3ad743283064929bf4fe4e0807f710f5e6a273e22614c728c3280a27b6c614a0"), - TestFixture(4, "a4bc10b1a62c96d459fbaf3a5aa3face7313bb9e1253e696f96a7a8e36801088", "db113f38f0504615c5c9347c3d", "", "c38fbdff", "3b71bc84e48c6dadf6ead14621d22468a3d4c9c103ac96970269730bcfce239b"), - TestFixture(4, "a4bc10b1a62c96d459fbaf3a5aa3face7313bb9e1253e696f96a7a8e36801088", "d35f531f714694b5e49303a980", "", "d34e90bb", "55b791ee495299916ff3c2327b4990952bebd0a2da9acfc553c6c996e354a4b5"), - TestFixture(16, "8c5cf3457ff22228c39c051c4e05ed4093657eb303f859a9d4b0f8be0127d88a", "a544218dadd3c10583db49cf39", "", "867b0d87cf6e0f718200a97b4f6d5ad5", "3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e09a1005e024f6907"), - TestFixture(16, "8c5cf3457ff22228c39c051c4e05ed4093657eb303f859a9d4b0f8be0127d88a", "dfdcbdff329f7af70731d8e276", "", "ad879c64425e6c1ec4841bbb0f99aa8b", "2ae56ddde2876d70b3b34eda8c2b1d096c836d5225d53ec460b724b6e16aa5a3"), - TestFixture(16, "8c5cf3457ff22228c39c051c4e05ed4093657eb303f859a9d4b0f8be0127d88a", "60f2490ba0c658848859fcbea8", "", "e2751f153fc76c0dec5e0cf2d30c1a28", "3ad743283064929bf4fe4e0807f710f5e6a273e22614c728c3280a27b6c614a0"), - TestFixture(16, "8c5cf3457ff22228c39c051c4e05ed4093657eb303f859a9d4b0f8be0127d88a", "db113f38f0504615c5c9347c3d", "", "fc85464a81fe372c12c9e4f0f3bf9c37", "3b71bc84e48c6dadf6ead14621d22468a3d4c9c103ac96970269730bcfce239b"), - TestFixture(16, "8c5cf3457ff22228c39c051c4e05ed4093657eb303f859a9d4b0f8be0127d88a", "d35f531f714694b5e49303a980", "", "b1c09b093788da19e33c5a6e82ed9627", "55b791ee495299916ff3c2327b4990952bebd0a2da9acfc553c6c996e354a4b5"), - TestFixture(4, "8c5cf3457ff22228c39c051c4e05ed4093657eb303f859a9d4b0f8be0127d88a", "a544218dadd3c1", "78c46e3249ca28e1ef0531d80fd37c124d9aecb7be6668e3", "c2fe12658139f5d0dd22cadf2e901695b579302a72fc56083ebc7720", "d3d5424e20fbec43ae495353ed830271515ab104f8860c988d15b6d36c038eab"), - TestFixture(4, "8c5cf3457ff22228c39c051c4e05ed4093657eb303f859a9d4b0f8be0127d88a", "57b940550a383b", "6fb5ce32a851676753ba3523edc5ca82af1843ffc08f1ef0", "e1b4ec4279bb62902c12521e6b874171695c5da46c647cc03b91ff03", "33c2c3a57bf8393b126982c96d87daeacd5eadad1519073ad8c84cb9b760296f"), - TestFixture(4, "8c5cf3457ff22228c39c051c4e05ed4093657eb303f859a9d4b0f8be0127d88a", "f32222e9eec4bd", "2c29d4e2bb9294e90cb04ec697e663a1f7385a39f90c8ccf", "224db21beb8cd0069007660e783c3f85706b014128368aab2a4e56a7", "684595e36eda1db5f586941c9f34c9f8d477970d5ccc14632d1f0cec8190ae68"), - TestFixture(4, "8c5cf3457ff22228c39c051c4e05ed4093657eb303f859a9d4b0f8be0127d88a", "14c9bd561c47c1", "c22524a1ea444be3412b0d773d4ea2ff0af4c1ad2383cba8", "61b46c9024eed3989064a52df90349c18e14e4b552779d3f8f9d6814", "141ae365f8e65ab9196c4e8cd4e62189b304d67de38f2117e84ec0ec8f260ebd"), - TestFixture(4, "8c5cf3457ff22228c39c051c4e05ed4093657eb303f859a9d4b0f8be0127d88a", "1ccec9923aa6e8", "518a7fb11c463bf23798982118f3cfe4d7ddde9184f37d4f", "52f8205534447d722be2b9377f7395938cc88af081a11ccb0d83fa19", "88a6d037009a1c1756f72bb4589d6d940bd514ed55386baefacc6ac3ca6f8795"), - TestFixture(16, "705334e30f53dd2f92d190d2c1437c8772f940c55aa35e562214ed45bd458ffe", "a544218dadd3c1", "78c46e3249ca28e1ef0531d80fd37c124d9aecb7be6668e3", "3341168eb8c48468c414347fb08f71d2086f7c2d1bd581ce1ac68bd42f5ec7fa7e068cc0ecd79c2a", "d3d5424e20fbec43ae495353ed830271515ab104f8860c988d15b6d36c038eab"), - TestFixture(16, "705334e30f53dd2f92d190d2c1437c8772f940c55aa35e562214ed45bd458ffe", "57b940550a383b", "6fb5ce32a851676753ba3523edc5ca82af1843ffc08f1ef0", "fbfed2c94f50ca10466da9903ef85833ad48ca00556e66d14d8b30df941f3536ffb42083ef0e1c30", "33c2c3a57bf8393b126982c96d87daeacd5eadad1519073ad8c84cb9b760296f"), - TestFixture(16, "705334e30f53dd2f92d190d2c1437c8772f940c55aa35e562214ed45bd458ffe", "f32222e9eec4bd", "2c29d4e2bb9294e90cb04ec697e663a1f7385a39f90c8ccf", "dae13e6967c8b1ee0dd2d5ba1dd1de69f22c95da39528f9ef78e9e5e9faa058112af57f4ac78db2c", "684595e36eda1db5f586941c9f34c9f8d477970d5ccc14632d1f0cec8190ae68"), - TestFixture(16, "705334e30f53dd2f92d190d2c1437c8772f940c55aa35e562214ed45bd458ffe", "14c9bd561c47c1", "c22524a1ea444be3412b0d773d4ea2ff0af4c1ad2383cba8", "a654238fb8b05e293dba07f9d68d75a7f0fbf40fe20edaeba1586bf922412e73ce338e372615c3bc", "141ae365f8e65ab9196c4e8cd4e62189b304d67de38f2117e84ec0ec8f260ebd"), - TestFixture(16, "705334e30f53dd2f92d190d2c1437c8772f940c55aa35e562214ed45bd458ffe", "1ccec9923aa6e8", "518a7fb11c463bf23798982118f3cfe4d7ddde9184f37d4f", "765067ef768908d91ee4c3923943e0c7be70e2e06db99a4b3e3f51ee37fdcc5d81dd85d9e9d4f44e", "88a6d037009a1c1756f72bb4589d6d940bd514ed55386baefacc6ac3ca6f8795"), - TestFixture(4, "705334e30f53dd2f92d190d2c1437c8772f940c55aa35e562214ed45bd458ffe", "a544218dadd3c10583db49cf39", "e8de970f6ee8e80ede933581b5bcf4d837e2b72baa8b00c3", "c0ea400b599561e7905b99262b4565d5c3dc49fad84d7c69ef891339", "3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e09a1005e024f6907"), - TestFixture(4, "705334e30f53dd2f92d190d2c1437c8772f940c55aa35e562214ed45bd458ffe", "0dd613c0fe28e913c0edbb8404", "9522fb1f1aa58493cba682d788186d902cfc93e80fd6b998", "fabe11c9629e598228f5209f3dbcc641fe4b1a22cadb0821d2898c3b", "2ad306575b577c2f61da7212ab63e3db3941f1f751f2356c7443531a90b9d141"), - TestFixture(4, "705334e30f53dd2f92d190d2c1437c8772f940c55aa35e562214ed45bd458ffe", "3e0fe3427eeda80f02dda4fed5", "38333ce78110bf53a2c2abc7db99e133ad218ca43ff7a7bc", "d88f8fcd772125212ce09c2a6e5b5693dd35073f992004f0d18fc889", "ae0d1c9c834d60ff0ecfb3c0d78c72ddb789e58adfc166c81d5fc6395b31ec33"), - TestFixture(4, "705334e30f53dd2f92d190d2c1437c8772f940c55aa35e562214ed45bd458ffe", "60122cbd219e5cf17415e8bc09", "794e734966e6d0001699aec3f8ab8f194de7653d3091b1b9", "76bdd9a7b34bf14ae121a87fdfa144f71b848744af6a2f0b1c0d067c", "895a45ddbe0c80793eccbf820de13a233b6aa7045cfd5313388e7184c392b216"), - TestFixture(4, "705334e30f53dd2f92d190d2c1437c8772f940c55aa35e562214ed45bd458ffe", "3542fbe0f59a6d5f3abf619b7d", "c5b3d71312ea14f2f8fae5bd1a453192b6604a45db75c5ed", "617d8036e2039d516709062379e0550cbd71ebb90fea967c79018ad5", "dd4531f158a2fa3bc8a339f770595048f4a42bc1b03f2e824efc6ba4985119d8"), - TestFixture(16, "314a202f836f9f257e22d8c11757832ae5131d357a72df88f3eff0ffcee0da4e", "a544218dadd3c10583db49cf39", "e8de970f6ee8e80ede933581b5bcf4d837e2b72baa8b00c3", "8d34cdca37ce77be68f65baf3382e31efa693e63f914a781367f30f2eaad8c063ca50795acd90203", "3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e09a1005e024f6907"), - TestFixture(16, "314a202f836f9f257e22d8c11757832ae5131d357a72df88f3eff0ffcee0da4e", "0dd613c0fe28e913c0edbb8404", "9522fb1f1aa58493cba682d788186d902cfc93e80fd6b998", "6df09613ea986c2d91a57a45a0942cbf20e0dfca12fbda8c945ee6db24aea5f5098952f1203339ce", "2ad306575b577c2f61da7212ab63e3db3941f1f751f2356c7443531a90b9d141"), - TestFixture(16, "314a202f836f9f257e22d8c11757832ae5131d357a72df88f3eff0ffcee0da4e", "3e0fe3427eeda80f02dda4fed5", "38333ce78110bf53a2c2abc7db99e133ad218ca43ff7a7bc", "2bfe51f1f43b982d47f76ea8206ddbf585d6f30cec0d4ef16b1556631d3b52bf24154afec1448ef6", "ae0d1c9c834d60ff0ecfb3c0d78c72ddb789e58adfc166c81d5fc6395b31ec33"), - TestFixture(16, "314a202f836f9f257e22d8c11757832ae5131d357a72df88f3eff0ffcee0da4e", "60122cbd219e5cf17415e8bc09", "794e734966e6d0001699aec3f8ab8f194de7653d3091b1b9", "bf0d219bb50fcc1d51f654bb0fd8b44efa25aef39e2f11afe47d00f2eebb544e6ba7559ac2f34edb", "895a45ddbe0c80793eccbf820de13a233b6aa7045cfd5313388e7184c392b216"), - TestFixture(16, "314a202f836f9f257e22d8c11757832ae5131d357a72df88f3eff0ffcee0da4e", "3542fbe0f59a6d5f3abf619b7d", "c5b3d71312ea14f2f8fae5bd1a453192b6604a45db75c5ed", "39c2e8f6edfe663b90963b98eb79e2d4f7f28a5053ae8881567a6b4426f1667136bed4a5e32a2bc1", "dd4531f158a2fa3bc8a339f770595048f4a42bc1b03f2e824efc6ba4985119d8"), - TestFixture(16, "c6c14c655e52c8a4c7e8d54e974d698e1f21ee3ba717a0adfa6136d02668c476", "291e91b19de518cd7806de44f6", "", "ca482c674b599046cc7d7ee0d00eec1e", "b4f8326944a45d95f91887c2a6ac36b60eea5edef84c1c358146a666b6878335"), - TestFixture(16, "c6c14c655e52c8a4c7e8d54e974d698e1f21ee3ba717a0adfa6136d02668c476", "291e91b19de518cd7806de44f6", "", "67747defe5da5fecc00b9bf3b249f434", "36c17fd901169e5b144fdb2c4bea8cd65ad8acf7b4d3dd39acf2ad83da7b1971"), - TestFixture(16, "c6c14c655e52c8a4c7e8d54e974d698e1f21ee3ba717a0adfa6136d02668c476", "291e91b19de518cd7806de44f6", "", "c57ef5d0faf49149c311707493a4cfd4", "9a37c654ab8e5a0c6bdfff9793457197d206ed207d768cbc8318cfb39f077b89"), - TestFixture(16, "c6c14c655e52c8a4c7e8d54e974d698e1f21ee3ba717a0adfa6136d02668c476", "291e91b19de518cd7806de44f6", "", "bc2fb5571a7563bb90689a229d2f63a7", "5ab80169184541393a6975f442ee583cd432d71a6d1568fa51159df7c5b8f959"), - TestFixture(16, "c6c14c655e52c8a4c7e8d54e974d698e1f21ee3ba717a0adfa6136d02668c476", "291e91b19de518cd7806de44f6", "", "428888c6420c56806f465b415a66e65a", "c78a22a667aafab0c94047e03837d51b11490693d5c57ea27b901ff80b6a38f9"), - TestFixture(16, "c6c14c655e52c8a4c7e8d54e974d698e1f21ee3ba717a0adfa6136d02668c476", "291e91b19de518cd7806de44f6", "", "9f1b7520025e1075731adc946b80121d", "e11e30cbf63623816379f578788b0c8e6b59ee3c9c50aa6e1dcd749172d48fed"), - TestFixture(16, "c6c14c655e52c8a4c7e8d54e974d698e1f21ee3ba717a0adfa6136d02668c476", "291e91b19de518cd7806de44f6", "", "bd36b053b6a90f19e3b6622cba93105d", "05716168829276ff7ab23b7dd373db361e6d9e1f11d0028d374a0d3fe62be19f"), - TestFixture(16, "c6c14c655e52c8a4c7e8d54e974d698e1f21ee3ba717a0adfa6136d02668c476", "291e91b19de518cd7806de44f6", "", "458595a3413b965b189de46703760aa0", "3e915389639435629fcc01e1b7022d3574e2848e9151261ad801d03387425dd7"), - TestFixture(16, "c6c14c655e52c8a4c7e8d54e974d698e1f21ee3ba717a0adfa6136d02668c476", "291e91b19de518cd7806de44f6", "", "8b259b84a6ee5669e175affca8ba3b1a", "2f496be73a9a5d9db5927e622e166c6ec946150687b21c51c8ca7e680f9775ac"), - TestFixture(16, "c6c14c655e52c8a4c7e8d54e974d698e1f21ee3ba717a0adfa6136d02668c476", "291e91b19de518cd7806de44f6", "", "c5f35fdf2b63e77a18d154f0ddcfedbf", "0a8725bd8c8eab9ed52ca47835837b9f00a6c8d834ab17105b01eb4eb30402e7"), - TestFixture(16, "cc49d4a397887cb57bc92c8a8c26a7aac205c653ef4011c1f48390ad35f5df14", "6df8c5c28d1728975a0b766cd7", "1a", "a5f24e87a11a95374d4c190945bf08ef2f", "080f82469505118842e5fa70df5323de175a37609904ee5e76288f94ca84b3c5"), - TestFixture(16, "cc49d4a397887cb57bc92c8a8c26a7aac205c653ef4011c1f48390ad35f5df14", "6df8c5c28d1728975a0b766cd7", "40", "ffd43c5f39be92778fdce3c832d2d3a019", "f6cfb81373f1cbb0574dda514747d0099635b48cb809c6f1fa30cbb671baa505"), - TestFixture(16, "cc49d4a397887cb57bc92c8a8c26a7aac205c653ef4011c1f48390ad35f5df14", "6df8c5c28d1728975a0b766cd7", "41", "fe753b7b661f1aad57c24c889b1c4fe513", "5a88b14bada16b513d4aa349b11ce4a77d4cda6f6322ff4939ad77d8ecb63748"), - TestFixture(16, "cc49d4a397887cb57bc92c8a8c26a7aac205c653ef4011c1f48390ad35f5df14", "6df8c5c28d1728975a0b766cd7", "06", "b91c5ac66e89bf2769ef5f38a3f1738b24", "a92b95b997cf9efded9ff5e1bff2e49d32e65f6283552ded4b05485b011f853f"), - TestFixture(16, "cc49d4a397887cb57bc92c8a8c26a7aac205c653ef4011c1f48390ad35f5df14", "6df8c5c28d1728975a0b766cd7", "c8", "773fe64379cea1a8ae3627418dd3e489a2", "a206a1eb70a9d24bb5e72f314e7d91de074f59055653bdd24aab5f2bbe112436"), - TestFixture(16, "cc49d4a397887cb57bc92c8a8c26a7aac205c653ef4011c1f48390ad35f5df14", "6df8c5c28d1728975a0b766cd7", "e2", "5dabc529442ff93005551b7689bcb748f7", "d3029f384fd7859c287e38c61a9475d5ddbfd64af93746b1dc86b8842a8c194c"), - TestFixture(16, "cc49d4a397887cb57bc92c8a8c26a7aac205c653ef4011c1f48390ad35f5df14", "6df8c5c28d1728975a0b766cd7", "1a", "a5ee68e416617ac974b3d1af7320cd51f6", "51ca3d3b70b5e354451a5177d7acfd8e7b44eae55e29d88b5e8eb8fc1e5c62fc"), - TestFixture(16, "cc49d4a397887cb57bc92c8a8c26a7aac205c653ef4011c1f48390ad35f5df14", "6df8c5c28d1728975a0b766cd7", "dd", "6243883d93d7066991e0fac453400b4fbf", "8c6c6791f1ac957b18bf008e260a0af4a5b7bfdb1e0008d6eaaa227f45cf4f62"), - TestFixture(16, "cc49d4a397887cb57bc92c8a8c26a7aac205c653ef4011c1f48390ad35f5df14", "6df8c5c28d1728975a0b766cd7", "4c", "f3b940d416f3435812f9d1b18f441b7721", "b0a1af969a95025385b251afd1e89f353426ed6e5d71019cd73366aa31d5b464"), - TestFixture(16, "cc49d4a397887cb57bc92c8a8c26a7aac205c653ef4011c1f48390ad35f5df14", "6df8c5c28d1728975a0b766cd7", "88", "371d27e9a32feea28a6a7e7da2d27e1cc4", "7e72b2ca698a18cb0bf625f5daddb0d40643009db938340a9e4fe164a052fee1"), - TestFixture(16, "36b0175379e7ae19c277fe656a2252a82796309be0f0d4e1c07fdde88aca4510", "021bd8b551947be4c18cf1a455", "be80", "ecacc3152e43d9efea26e16c1d1793e2a8c4", "b5c6e8313b9c68e6bb84bffd65fa4108d243f580eab99bb80563ed1050c8266b"), - TestFixture(16, "36b0175379e7ae19c277fe656a2252a82796309be0f0d4e1c07fdde88aca4510", "021bd8b551947be4c18cf1a455", "82c9", "d0e5d06bf4b50ccce0b2acfd16ce90a8854d", "38e5032c5949c2668191ef1af5bb17eddc28abdb4e5bb41eaffec2523b2525d6"), - TestFixture(16, "36b0175379e7ae19c277fe656a2252a82796309be0f0d4e1c07fdde88aca4510", "021bd8b551947be4c18cf1a455", "8239", "d0158d784f486c1dc4a2bafd5b02ca1e1c05", "0b50f5173249fb7118f80d25874d6745d88e4ce265fa0dd141ad67ae26c31122"), - TestFixture(16, "36b0175379e7ae19c277fe656a2252a82796309be0f0d4e1c07fdde88aca4510", "021bd8b551947be4c18cf1a455", "16c1", "44eda3377002a48f9fe306d157358e6df37d", "0296743a3125b103a2b2a78a109e825ea10834bd684215ab2e85cc4172e37348"), - TestFixture(16, "36b0175379e7ae19c277fe656a2252a82796309be0f0d4e1c07fdde88aca4510", "021bd8b551947be4c18cf1a455", "2801", "7a2df6c09bf1dcb1c82bd98c6e2c13a8d7a5", "a94e64becb803e211785ba51db7f3db042fbf44a7a821509156a6828b0f207e9"), - TestFixture(16, "36b0175379e7ae19c277fe656a2252a82796309be0f0d4e1c07fdde88aca4510", "021bd8b551947be4c18cf1a455", "65e7", "37cb2ea363c0d8864363056467570959ba03", "105358cc17b12107e023a23d57b44c66a2c58d8db05100311575e1ea152fc350"), - TestFixture(16, "36b0175379e7ae19c277fe656a2252a82796309be0f0d4e1c07fdde88aca4510", "021bd8b551947be4c18cf1a455", "819d", "d3b16519377e6d0252b5f80cdf3d0253eccf", "669f9a63cf638a202dca1965c4116273249813ce0b39703887d89bdf5b3b12d6"), - TestFixture(16, "36b0175379e7ae19c277fe656a2252a82796309be0f0d4e1c07fdde88aca4510", "021bd8b551947be4c18cf1a455", "761e", "24329a4dee6ca2cde473f08f76f779856c3c", "e288590a3eba28ac6847a50b0294ab6bd0a548716ff5102c44a5b656b2d9ddd6"), - TestFixture(16, "36b0175379e7ae19c277fe656a2252a82796309be0f0d4e1c07fdde88aca4510", "021bd8b551947be4c18cf1a455", "56de", "04f29e65c0f01e644e74092253b470cd5511", "5b222aae3c7786c3b9021ba672f9136190ec931cf055f84c85706127f74c6d5b"), - TestFixture(16, "36b0175379e7ae19c277fe656a2252a82796309be0f0d4e1c07fdde88aca4510", "021bd8b551947be4c18cf1a455", "b275", "e059809fa107f379957b52ac29fe0bc8a1e2", "2082f96c7e36b204ad076d8b2f796cccf5cbc80b8384b53a504e07706b07f596"), - TestFixture(16, "ddb739acda6c56ec9aefc4f4cbc258587f443da4e76ddfa85dbe0813a8784944", "0bddf342121b82f906368b0d7b", "db457c", "54473c3f65d6be431e79700378049ac06f2599", "887486fff7922768186363ef17eb78e5cf2fab8f47a4eb327de8b16d63b02acb"), - TestFixture(16, "ddb739acda6c56ec9aefc4f4cbc258587f443da4e76ddfa85dbe0813a8784944", "0bddf342121b82f906368b0d7b", "62a6c5", "eda4853b186edc15c22ba24e470eb5a072da9f", "0683c20e82d3c66787cb047f0b1eb1c58cdde9fb99ee4e4494bbf27eb62777d1"), - TestFixture(16, "ddb739acda6c56ec9aefc4f4cbc258587f443da4e76ddfa85dbe0813a8784944", "0bddf342121b82f906368b0d7b", "cc67bc", "4365fc52a1fb5a58bd51931230c1a7dfb1a8c1", "413074619b598f8bed34cab51ddf59941861ba0169ebe7570a5ed01d790c08e5"), - TestFixture(16, "ddb739acda6c56ec9aefc4f4cbc258587f443da4e76ddfa85dbe0813a8784944", "0bddf342121b82f906368b0d7b", "33800b", "bc824b7d3810f59176cb108c7e969da51d4d79", "2d65a5175c29a095dc082dab9cfcf4b895efbfa715c57614589d4db159543ce9"), - TestFixture(16, "ddb739acda6c56ec9aefc4f4cbc258587f443da4e76ddfa85dbe0813a8784944", "0bddf342121b82f906368b0d7b", "b2c826", "3dca6646ffea832595c9c86e6517215541ddbd", "6a831b6059456be98e6fce608d8c71cb8efb04a96b45c2dfbdaeabf5420a1482"), - TestFixture(16, "ddb739acda6c56ec9aefc4f4cbc258587f443da4e76ddfa85dbe0813a8784944", "0bddf342121b82f906368b0d7b", "d7e620", "58e460e89a6725f0fc35622d89d2f3e34be90a", "3a04a01160402bf36f33337c340883597207972728c5014213980cd7744e9e41"), - TestFixture(16, "ddb739acda6c56ec9aefc4f4cbc258587f443da4e76ddfa85dbe0813a8784944", "0bddf342121b82f906368b0d7b", "795af4", "f658b4b1bd7ad5d81686aeb44caa6025d488bd", "64d8bd3c646f76dc6ce89defd40777fe17316729e22ba90f6a2443ee03f6390b"), - TestFixture(16, "ddb739acda6c56ec9aefc4f4cbc258587f443da4e76ddfa85dbe0813a8784944", "0bddf342121b82f906368b0d7b", "66efcd", "e9ed8d0553c801f37c2b6f82861a3cd68a75e3", "7bef8d35616108922aab78936967204980b8a4945b31602f5ef2feec9b144841"), - TestFixture(16, "ddb739acda6c56ec9aefc4f4cbc258587f443da4e76ddfa85dbe0813a8784944", "0bddf342121b82f906368b0d7b", "78b00d", "f7b24de3eeb8ea6c08b466baf246b3667feb3f", "92f7dc22dcbbe6420aca303bd586e5a24f4c3ed923a6ebe01ec1b66eee216341"), - TestFixture(16, "ddb739acda6c56ec9aefc4f4cbc258587f443da4e76ddfa85dbe0813a8784944", "0bddf342121b82f906368b0d7b", "9dd5e1", "12d7a11db811640c533794bfec6eeb977233ec", "71bf573cf63b0022d8143780fc2d9c7dbd0505ac31e9dce0ad68c2428b0878a0"), - TestFixture(16, "62b82637e567ad27c3066d533ed76e314522ac5c53851a8c958ce6c64b82ffd0", "5bc2896d8b81999546f88232ab", "87294078", "2bc22735ab21dfdcfe95bd83592fb6b4168d9a23", "fffb40b0d18cb23018aac109bf62d849adca42629d8a9ad1299b83fe274f9a63"), - TestFixture(16, "62b82637e567ad27c3066d533ed76e314522ac5c53851a8c958ce6c64b82ffd0", "5bc2896d8b81999546f88232ab", "0f28ee1c", "a3c38951b5de3331078aa13bd3742b59df4f661a", "75c3b3059e59032067e9cd94d872e66f168e503bcf46bc78d82a4d4a15a29f6e"), - TestFixture(16, "62b82637e567ad27c3066d533ed76e314522ac5c53851a8c958ce6c64b82ffd0", "5bc2896d8b81999546f88232ab", "d41c9c87", "78f7fbcae52afe7326a12a9aaf22255a38d4bd0d", "8fb9569f18a256aff71601d8412d22863e5a6e6f639214d180b095fa3b18d60e"), - TestFixture(16, "62b82637e567ad27c3066d533ed76e314522ac5c53851a8c958ce6c64b82ffd0", "5bc2896d8b81999546f88232ab", "046bc0d8", "a880a7957543692a72f0d599de48b5e5f5a9413f", "8b62d9adf6819c46c870df8a1486f0a329672f7d137bb7d8659f419c361a466c"), - TestFixture(16, "62b82637e567ad27c3066d533ed76e314522ac5c53851a8c958ce6c64b82ffd0", "5bc2896d8b81999546f88232ab", "39bd4db8", "95562af530fc357f5482b9004d466bf858586acb", "fd98f8f39dfa46ea5926e0ffacbabbe8c34205aade08aa0df82e1d4eaaf95515"), - TestFixture(16, "62b82637e567ad27c3066d533ed76e314522ac5c53851a8c958ce6c64b82ffd0", "5bc2896d8b81999546f88232ab", "b43cdd3a", "18d7ba77a9e8db046fdd548b52d40375c1e9a448", "09bf4f77a9883733590a3cc7ee97f3c9b70f4db255620e88cd5080badc73684c"), - TestFixture(16, "62b82637e567ad27c3066d533ed76e314522ac5c53851a8c958ce6c64b82ffd0", "5bc2896d8b81999546f88232ab", "e0052e9b", "4cee49d64efbdd4ad8d3e863172d9372fca07c20", "40326d765e0f6cf4b4deccb128bebf65a7b3c3e5bcf1d58f6158e1e9153b7e85"), - TestFixture(16, "62b82637e567ad27c3066d533ed76e314522ac5c53851a8c958ce6c64b82ffd0", "5bc2896d8b81999546f88232ab", "696825f6", "c58342bb95bd661b32bc18025808f8b4035acad6", "aa5ae6dcdc21b5446489bdabf5c6747bdf3bbfdb3de2c03170efefe5ccb06d69"), - TestFixture(16, "62b82637e567ad27c3066d533ed76e314522ac5c53851a8c958ce6c64b82ffd0", "5bc2896d8b81999546f88232ab", "7eb07739", "d25b1074ac05b072264e31a4b2801a6d790512d7", "d3d34f140a856e55b29471fde4c0e5f7306b76d03faab26db79c10f95ffb3122"), - TestFixture(16, "62b82637e567ad27c3066d533ed76e314522ac5c53851a8c958ce6c64b82ffd0", "5bc2896d8b81999546f88232ab", "9cad70b1", "304617fcc00514d260e1d211de361c254369e93a", "648a84813ca97aef4ab7e143ee29acb946388660f18eb671194646e0b0136432"), - TestFixture(16, "bc29a16e19cfbe32bf4948e8e4484159bc819b7eec504e4441a1a98ca210e576", "4f18bcc8ee0bbb80de30a9e086", "3e8c6d1b12", "45f3795fcf9c66e1a43103d9a18f5fba5fab83f994", "574931ae4b24bdf7e9217eca6ce2a07287999e529f6e106e3721c42dacf00f5d"), - TestFixture(16, "bc29a16e19cfbe32bf4948e8e4484159bc819b7eec504e4441a1a98ca210e576", "4f18bcc8ee0bbb80de30a9e086", "76fc98ec66", "0d838ca8bb6f3cd579294f706213ed0f0bf32f00c5", "99cd9d15630a55e166114f04093bd1bb6dbb94ecaad126fe5c408dee5f012d9f"), - TestFixture(16, "bc29a16e19cfbe32bf4948e8e4484159bc819b7eec504e4441a1a98ca210e576", "4f18bcc8ee0bbb80de30a9e086", "6564c247cc", "1e1bd603117d38e026f706c9273dbcb6dc982751d0", "1516fdf7a7a99f3c9acc7fff686203dec794c3e52272985449ddf5a268a47bc3"), - TestFixture(16, "bc29a16e19cfbe32bf4948e8e4484159bc819b7eec504e4441a1a98ca210e576", "4f18bcc8ee0bbb80de30a9e086", "c11b9c9d76", "ba6488d9abc3e46166767c6ad2aeffb347168b1b55", "0c9c35be98591bf6737fc8d5624dcdba1a3523c6029013363b9153f0de77725b"), - TestFixture(16, "bc29a16e19cfbe32bf4948e8e4484159bc819b7eec504e4441a1a98ca210e576", "4f18bcc8ee0bbb80de30a9e086", "45a4e0d7dd", "3edbf4930033a7dca78bcbf4d75d651ee5fadff31b", "e74afe3ba960e6409dba78ecb9457e2a4ce2e09792b1d2e3858f4c79f7ddba62"), - TestFixture(16, "bc29a16e19cfbe32bf4948e8e4484159bc819b7eec504e4441a1a98ca210e576", "4f18bcc8ee0bbb80de30a9e086", "e5861b2327", "9ef90f67fa11585167c83105ee16828a574c84ac86", "96cbe9cd193513599c81f5a520fabaff51ee8cbdb81063c8311b1a57a0b8c8fd"), - TestFixture(16, "bc29a16e19cfbe32bf4948e8e4484159bc819b7eec504e4441a1a98ca210e576", "4f18bcc8ee0bbb80de30a9e086", "f5b5bcc38e", "8ecaa88753ffaba456f78e431f4baa5665f14e1845", "2e7ea84da4bc4d7cfb463e3f2c8647057afff3fbececa1d20024dac29e41e2cf"), - TestFixture(16, "bc29a16e19cfbe32bf4948e8e4484159bc819b7eec504e4441a1a98ca210e576", "4f18bcc8ee0bbb80de30a9e086", "b6cc89c75d", "cdb39d838034714731f9503993df357954ecb19cd3", "be125386f5be9532e36786d2e4011f1149abd227b9841150d1c00f7d0efbca4a"), - TestFixture(16, "bc29a16e19cfbe32bf4948e8e4484159bc819b7eec504e4441a1a98ca210e576", "4f18bcc8ee0bbb80de30a9e086", "3802f2aa9e", "437de6ee436c1b008b7572752f04362b2bfdc296bb", "3fa8628594b2645bc35530203dca640838037daeaf9cf8acaa0fb76abf27a733"), - TestFixture(16, "bc29a16e19cfbe32bf4948e8e4484159bc819b7eec504e4441a1a98ca210e576", "4f18bcc8ee0bbb80de30a9e086", "e082b8741c", "9bfdac30c1a3f7c3c29dc312c1f51a675400500e32", "642ae3466661ce1f51783deece86c38e986b8c0adea9e410e976f8a2fe0fe10f"), - TestFixture(16, "5f4b4f97b6aa48adb3336c451aac377fde4adf47897fd9ccdf139f33be76b18c", "7a76eac44486afdb112fc4aab9", "1b62ad19dcac", "4ad1fcf57c12b14e0e659a6305b4aeffae82f8a66c94", "a66c980f6621e03ff93b55d5a148615c4ad36d6cbdd0b22b173b4b1479fb8ff7"), - TestFixture(16, "5f4b4f97b6aa48adb3336c451aac377fde4adf47897fd9ccdf139f33be76b18c", "7a76eac44486afdb112fc4aab9", "3ef0faaa9b79", "6f43ab463bc779fa7932d365e2da9b05c00a7318384a", "c13f65bd491cb172a0f7bbc4a056c579484b62695e90383358d605307d5be0a5"), - TestFixture(16, "5f4b4f97b6aa48adb3336c451aac377fde4adf47897fd9ccdf139f33be76b18c", "7a76eac44486afdb112fc4aab9", "1a98ddbf35f1", "4b2b8c53954f813229912137b7a4945dc07cea24a974", "59dcca8fc50740831f8f259eb55d4db11f763a83187d93758d78d166f4d73cd5"), - TestFixture(16, "5f4b4f97b6aa48adb3336c451aac377fde4adf47897fd9ccdf139f33be76b18c", "7a76eac44486afdb112fc4aab9", "f46a7b1c28ea", "a5d92af088546e045f19f737a24c8addf832ed3f7a42", "578509ca4f57aadb78056794bf18b0714090970db786e2e838105e672165761c"), - TestFixture(16, "5f4b4f97b6aa48adb3336c451aac377fde4adf47897fd9ccdf139f33be76b18c", "7a76eac44486afdb112fc4aab9", "e98f5e5a20d0", "b83c0fb6806edaae8a7dcd3b0fbb59438f88743ec6e8", "696c0c6427273cf06be79f2206c43af9cbda0b884efaf04deba0c4bf0a25cb26"), - TestFixture(16, "5f4b4f97b6aa48adb3336c451aac377fde4adf47897fd9ccdf139f33be76b18c", "7a76eac44486afdb112fc4aab9", "06319c0480e2", "5782cde8205cd9cb636ca6543c4e35964f47341f2814", "95a66b60249ed086eecaeb9bc449afcee9de212619e87516ca947351b25120df"), - TestFixture(16, "5f4b4f97b6aa48adb3336c451aac377fde4adf47897fd9ccdf139f33be76b18c", "7a76eac44486afdb112fc4aab9", "f4c723433b7c", "a57472af9bc2ec82eadf4eb1f055da1a92a82052ab8b", "2b411bea57b51d10a4d2fb17ef0f204aa53cf112e1130c21d411cdf16a84176d"), - TestFixture(16, "5f4b4f97b6aa48adb3336c451aac377fde4adf47897fd9ccdf139f33be76b18c", "7a76eac44486afdb112fc4aab9", "02f809b01ce3", "534b585cbc5d01b10a7ae24a4ca2bfb07ea2a3b31a97", "ff3bff3a26fc5a91252d795f7e1b06f352314eb676bff50dc9fbe881c446941e"), - TestFixture(16, "5f4b4f97b6aa48adb3336c451aac377fde4adf47897fd9ccdf139f33be76b18c", "7a76eac44486afdb112fc4aab9", "2b6004823a29", "7ad3556e9a97231323a4b88af5d7d0b07c0e73ddce1d", "f6be4aad63d33a96c0b5e9c4be62323c9e2308b29961fff980ba0dbda0549274"), - TestFixture(16, "5f4b4f97b6aa48adb3336c451aac377fde4adf47897fd9ccdf139f33be76b18c", "7a76eac44486afdb112fc4aab9", "236c60cba4fa", "72df31270444db30eb33d2ede33abbe22f37704fe68b", "c3706a28d7420b41e072dcecc06b6b13116cca110bde8faea8e51f5107352d71"), - TestFixture(16, "f7aaeff3a1dc0cc5ecf220c67ad9f6dda060b4f1be3cc609cb4f18b2342a88a2", "d0d6871b9adc8623ac63faf00f", "d48daa2919348d", "eb32ab153a8e092fa325bafc176a07c31e6cc0a852d288", "e97175c23c5b47da8ce67811c6d60a7499b3b7e1347ad860519285b67201fe38"), - TestFixture(16, "f7aaeff3a1dc0cc5ecf220c67ad9f6dda060b4f1be3cc609cb4f18b2342a88a2", "d0d6871b9adc8623ac63faf00f", "f95b716bfe3475", "c6e47057dd8ef1a24840f4f40a7963becde3a85968b29c", "ba45e1859efae362a44a0116a14e488ba369da6c76c3913b6df8e69e5e1111fa"), - TestFixture(16, "f7aaeff3a1dc0cc5ecf220c67ad9f6dda060b4f1be3cc609cb4f18b2342a88a2", "d0d6871b9adc8623ac63faf00f", "4862e3677083f0", "77dde25b5339748f2a4a5c276727e0a210fc2efb5aeabe", "efcaa6f6cda3036b0b52ff9f36bc38ca74049c32c6b7cdfb8a46ca4144bacd64"), - TestFixture(16, "f7aaeff3a1dc0cc5ecf220c67ad9f6dda060b4f1be3cc609cb4f18b2342a88a2", "d0d6871b9adc8623ac63faf00f", "7f1ca0728f6d65", "40a3a14eacd7e1051734fc31232ab2ab63474020ab4dc9", "360bcb407603fe92f856bf677625b9882521e6dae8f35fdfc3dc737f9398f609"), - TestFixture(16, "f7aaeff3a1dc0cc5ecf220c67ad9f6dda060b4f1be3cc609cb4f18b2342a88a2", "d0d6871b9adc8623ac63faf00f", "67478ef73290fa", "58f88fcb112a7ec715244f307609ffa253e4e3659b0ece", "f12ee9d37946cfd88516cbe4a046f08c9bbba76a3973ff1e2cb14493405bd384"), - TestFixture(16, "f7aaeff3a1dc0cc5ecf220c67ad9f6dda060b4f1be3cc609cb4f18b2342a88a2", "d0d6871b9adc8623ac63faf00f", "36bb9e511276c5", "09049f6d31cc41f11047da612d2987fa2e50ada5ae7f9d", "5833dde0c577b2be4eb4b3d01d7b0042fa8441ad7043ea462bbbbd56a59790ea"), - TestFixture(16, "f7aaeff3a1dc0cc5ecf220c67ad9f6dda060b4f1be3cc609cb4f18b2342a88a2", "d0d6871b9adc8623ac63faf00f", "d68d6556c5a5b1", "e932646ae61f35382f7648718127ebae7eb7443ebd2c2c", "1e103c63d8ead36b985f921044cd32b8f9f04a2ba9fa154a09e676ffaa093970"), - TestFixture(16, "f7aaeff3a1dc0cc5ecf220c67ad9f6dda060b4f1be3cc609cb4f18b2342a88a2", "d0d6871b9adc8623ac63faf00f", "0568cca4ff79dc", "3ad7cd98dcc358cc40a5e7fffb1fb9a5dd9d6ba91bede1", "a1cfb61d45a140bdea6329ba0fe80429ff9aa4624a1d31bc752f7c97f1d390a0"), - TestFixture(16, "f7aaeff3a1dc0cc5ecf220c67ad9f6dda060b4f1be3cc609cb4f18b2342a88a2", "d0d6871b9adc8623ac63faf00f", "bd93d08eea4263", "822cd1b2c9f8e7468d2b70c311732f11ed72b57d83e500", "116b5b015e44ceef0061b2d2e73fa0b386d5c1e187782beebdfc6efb5a1c6935"), - TestFixture(16, "f7aaeff3a1dc0cc5ecf220c67ad9f6dda060b4f1be3cc609cb4f18b2342a88a2", "d0d6871b9adc8623ac63faf00f", "4fb62753024e92", "7009266f21f416b41a70f548e359add30c0e5746fbeb2b", "3d55882e6f3f89309b6940a3b408e573458eedd10fc3d0e1f3170eb313367475"), - TestFixture(16, "493e14623cd250058a7fc66a3fee0c24b6e363b966c2314aff53b276b6c2ea7b", "fe2d8ae8da94a6df563f89ce00", "e5653e512d8b0b70", "75d31f8d47bee5c4e2ba537355ae8ab25cc9ed3511ff5053", "579a637e37a0974cd2fc3b735d9ed088e8e488ffe210f043e0f9d2079a015ad6"), - TestFixture(16, "493e14623cd250058a7fc66a3fee0c24b6e363b966c2314aff53b276b6c2ea7b", "fe2d8ae8da94a6df563f89ce00", "2c4ba9ce52e01645", "bcfd881238d5f8f1781a9e359804831f31a1efb1ae1cb71d", "1583138aa307401dddc40804ac0f414d338fc3ffb2946f09aaaa7079426fc1ee"), - TestFixture(16, "493e14623cd250058a7fc66a3fee0c24b6e363b966c2314aff53b276b6c2ea7b", "fe2d8ae8da94a6df563f89ce00", "5eb2d054a0e58c62", "ce04f188cad062d62dcc77c4e1fe2bafd477598977835f0c", "78d3dda40e433bba7a330ca3e5bd5170f0895f2e3e438402344ced79fcb0c719"), - TestFixture(16, "493e14623cd250058a7fc66a3fee0c24b6e363b966c2314aff53b276b6c2ea7b", "fe2d8ae8da94a6df563f89ce00", "bbbf7830d04ab907", "2b0959ecba7f57b308946723baf0dbf613359b6e040f9bd5", "dfc762466fa84c27326e0ee4320aa71103d1e9c8a5cf7d9fab5f27d79df94bd6"), - TestFixture(16, "493e14623cd250058a7fc66a3fee0c24b6e363b966c2314aff53b276b6c2ea7b", "fe2d8ae8da94a6df563f89ce00", "10c654c78a9e3c06", "8070751be0abd2b2003bd62ca51f74088bbbd33e54ac9dd4", "7e8ea82d1137c1e233522da12626e90a5f66a988e70664cb014c12790d2ab520"), - TestFixture(16, "493e14623cd250058a7fc66a3fee0c24b6e363b966c2314aff53b276b6c2ea7b", "fe2d8ae8da94a6df563f89ce00", "668d32e322e1da3e", "f63b133f48d4348a67e65e7f2cdedf6ef8cc0ee7a6dcfb02", "873da112557935b3929f713d80744ed08b4b276b86331dbc386fba361726d565"), - TestFixture(16, "493e14623cd250058a7fc66a3fee0c24b6e363b966c2314aff53b276b6c2ea7b", "fe2d8ae8da94a6df563f89ce00", "e39f6225e8eab6cc", "732943f982df58780532f8c6639e5d6c7b755fcf516724e3", "cfba97919f703d864efc11eac5f260a5d920d780c52899e5d76f8fe66936ff82"), - TestFixture(16, "493e14623cd250058a7fc66a3fee0c24b6e363b966c2314aff53b276b6c2ea7b", "fe2d8ae8da94a6df563f89ce00", "6021a00f6d0610a4", "f09781d30733fe107fd7a33828413ebc252dd9d015773524", "01abcfee196f9d74fcaa7b69ae24a275485c25af93cc2306d56e41e1eb7f5702"), - TestFixture(16, "493e14623cd250058a7fc66a3fee0c24b6e363b966c2314aff53b276b6c2ea7b", "fe2d8ae8da94a6df563f89ce00", "bbaf0ac4e77ee78d", "2b192b188d4b0939d3d51368799325ad1c8233fa071bade0", "ce1c31e7121c071d89afab5a9676c9e96cac3d89dcae83136bbb6f5ca8f81e5d"), - TestFixture(16, "493e14623cd250058a7fc66a3fee0c24b6e363b966c2314aff53b276b6c2ea7b", "fe2d8ae8da94a6df563f89ce00", "98a2336549a23a76", "081412b92397d4c25d1ea568637f773174a7f920a51b1fe1", "bb210ca5bc07e3c5b06f1d0084a5a72125f177d3e56c151221115ae020177739"), - TestFixture(16, "b23255372455c69244a0210e6a9e13b155a5ec9d6d0900e54a8f4d9f7a255e3a", "274846196d78f0af2df5860231", "615d724ae94a5daf8d", "f019ae51063239287d896e7127f17d13f98013b420219eb877", "69adcae8a1e9a3f2fe9e62591f7b4c5b19d3b50e769521f67e7ea8d7b58d9fc8"), - TestFixture(16, "b23255372455c69244a0210e6a9e13b155a5ec9d6d0900e54a8f4d9f7a255e3a", "274846196d78f0af2df5860231", "0d9168eeab3b27ba69", "9cd5b4f54443433d997cc2cd61da9358b4045fef32f8192cbf", "162d0033c9ea8d8334d485b29eef727302135a07a934eea5fee6041e9f1f47c1"), - TestFixture(16, "b23255372455c69244a0210e6a9e13b155a5ec9d6d0900e54a8f4d9f7a255e3a", "274846196d78f0af2df5860231", "6287dcffdd5fb97885", "f3c300e43227ddff75d280f0ffdd560fb8915978e3bd6205bb", "3f4ab57efa32f51a4c00790280e77c0e55b85bbda4f854e242368e9a289b5a81"), - TestFixture(16, "b23255372455c69244a0210e6a9e13b155a5ec9d6d0900e54a8f4d9f7a255e3a", "274846196d78f0af2df5860231", "6e5e01b3fd71d16b9c", "ff1adda81209b5ec6c7dbf90420a1ff2e24bd6303b80cfc199", "945d18134c148f164b39fd7c4aef0335045553f6ea690a3b1726418d86f0de00"), - TestFixture(16, "b23255372455c69244a0210e6a9e13b155a5ec9d6d0900e54a8f4d9f7a255e3a", "274846196d78f0af2df5860231", "b51521e689b5247362", "2451fdfd66cd40f492d741f4329ae7cc77d42bf7e5f2ec5ab6", "23af12893431b07c2922ab623aed901c0eaaeb9a24efc55273e96aea4dab7038"), - TestFixture(16, "b23255372455c69244a0210e6a9e13b155a5ec9d6d0900e54a8f4d9f7a255e3a", "274846196d78f0af2df5860231", "7f973617e710fb76fe", "eed3ea0c08689ff10ec9ffdcc2f36edac14613b1d85baf25a9", "b15a118b3132c20c31e6c9d09acdee0e15fcc59d6f18306442682512d22eb10f"), - TestFixture(16, "b23255372455c69244a0210e6a9e13b155a5ec9d6d0900e54a8f4d9f7a255e3a", "274846196d78f0af2df5860231", "7e909b6727ac3fd02f", "efd4477cc8d45b57df5a61a28bb10265b26043d7a8dd357713", "dcfbeb6490f5fa7eaf917462473a6cec98bebf8f17493fe9b994119a6d5a5457"), - TestFixture(16, "b23255372455c69244a0210e6a9e13b155a5ec9d6d0900e54a8f4d9f7a255e3a", "274846196d78f0af2df5860231", "a5075638932b5632f8", "34438a237c5332b508d321c371ae1fd01bdf3b6c75a597da6e", "77e9317294f046f315a0d79e3423f29f7d9ebcd36d6eaa2a3fb2f4500309478c"), - TestFixture(16, "b23255372455c69244a0210e6a9e13b155a5ec9d6d0900e54a8f4d9f7a255e3a", "274846196d78f0af2df5860231", "c10f15a0de78db8aa3", "504bc9bb3100bf0d539393d1635bc40ac62405a39155406c47", "3aa8f204eb127b547e13873ed0238018394e13686c8734e49e3e629deb352c77"), - TestFixture(16, "b23255372455c69244a0210e6a9e13b155a5ec9d6d0900e54a8f4d9f7a255e3a", "274846196d78f0af2df5860231", "8294f830cfca42cfbe", "13d0242b20b226484eff89641e1bd5ad6cc827441b17c45ecf", "7f67e6f97c6c258f014d721a4edaaa0ddb3f9f09993276ab7b714ea9356c231d"), - TestFixture(16, "dbf06366f766e2811ecd5d4384d6d08336adc37e0824d620cf0d9e7fd1e7afa9", "b3503ed4e277ed9769b20c10c0", "2e3cf0af8c96c7b22719", "e317df43ab46eb31be7e76f2730d771d56099a0c8d2703d7a24e", "9ae5a04baa9d02c8854e609899c6240851cbc83f81f752bc04c71affa4eed385"), - TestFixture(16, "dbf06366f766e2811ecd5d4384d6d08336adc37e0824d620cf0d9e7fd1e7afa9", "b3503ed4e277ed9769b20c10c0", "e081c43a07450ce0dfa2", "2daaebd62095206346c5bcc7a8260ef361dc39fdb776d041f0d4", "da77c6d5627a2aa34911bd1f7cc5f8aa68a2c6546adc96a186b9af8e5baac4cf"), - TestFixture(16, "dbf06366f766e2811ecd5d4384d6d08336adc37e0824d620cf0d9e7fd1e7afa9", "b3503ed4e277ed9769b20c10c0", "c381d2ae5e72fc82324a", "0eaafd4279a2d001ab2d19f0cbb0899f221aac9762f2650f8058", "134d2d9726400d09dd3521326f96fbef993ddc0c4088770057b0f8d70356456f"), - TestFixture(16, "dbf06366f766e2811ecd5d4384d6d08336adc37e0824d620cf0d9e7fd1e7afa9", "b3503ed4e277ed9769b20c10c0", "737f4d00c54ddca80eec", "be5462ece29df02b978b3dc92a9bd26b9653e5917359c331fcff", "0d065dfde1de1f21784c7869eb566c977f807cfbd53578f4616995b51d7dc045"), - TestFixture(16, "dbf06366f766e2811ecd5d4384d6d08336adc37e0824d620cf0d9e7fd1e7afa9", "b3503ed4e277ed9769b20c10c0", "4e9e251ebbbbe5dbc8ff", "83b50af29c6bc958519891dda72c27d272561e00f7041845d998", "95c54d187f2415535451cbb9cb35869749b171f7043216ce6886dd77baeecf60"), - TestFixture(16, "dbf06366f766e2811ecd5d4384d6d08336adc37e0824d620cf0d9e7fd1e7afa9", "b3503ed4e277ed9769b20c10c0", "0db72b281ab4046d15a6", "c09c04c43d6428ee8cc1928ac628758ad58fc1b5a768d4722848", "0f98039e6a9fe360373b48c7850ce113a0ff7b2ae5ce773dd4c67ca967cd691b"), - TestFixture(16, "dbf06366f766e2811ecd5d4384d6d08336adc37e0824d620cf0d9e7fd1e7afa9", "b3503ed4e277ed9769b20c10c0", "4f7b4f38ff1ba4df5a59", "825060d4d8cb885cc33ed11dad4dc8b265a53cf0bdd85c5f15f4", "ad840bc55654762e5eba0e4a9e7998992d990a06d70da1b1ca922ef193dab19a"), - TestFixture(16, "dbf06366f766e2811ecd5d4384d6d08336adc37e0824d620cf0d9e7fd1e7afa9", "b3503ed4e277ed9769b20c10c0", "58ce55379ef24b72d6d6", "95e57adbb92267f14fb18eb659a5a7084be48d099467da4395df", "911e9876ea98e1bcf710d8fd05b5bf000ea317d926b41b6015998ee1462ab615"), - TestFixture(16, "dbf06366f766e2811ecd5d4384d6d08336adc37e0824d620cf0d9e7fd1e7afa9", "b3503ed4e277ed9769b20c10c0", "a219028a953ce1544835", "6f322d66b2eccdd7d1523b2b2583fd117cec47b1c84d3863159e", "3f68a4fb4043bcf9b6d277c97e11365d949c705bd6679c6f0aaf52e62330ad79"), - TestFixture(16, "dbf06366f766e2811ecd5d4384d6d08336adc37e0824d620cf0d9e7fd1e7afa9", "b3503ed4e277ed9769b20c10c0", "83b0ee9a52252c456105", "4e9bc17675f500c6f8625456eb2b6a2d35c649a84051f843153c", "02f32242cba6204319075ea8ce806a57845355ae73e6b875955df510096ebff9"), - TestFixture(16, "4dd555bd3a5253a90b68b5d4d46bd050340ee07ddad3a72048c657b5d76bb207", "bdb1b82ba864893c2ee8f7426c", "8015c0f07a7acd4b1cbdd2", "8e9f80c726980b3d42e43a6512a0481255b729a10f9edb5f07c60c", "9bcc5848e928ba0068f7a867e79e83a6f93593354a8bfcfc306aeeb9821c1da1"), - TestFixture(16, "4dd555bd3a5253a90b68b5d4d46bd050340ee07ddad3a72048c657b5d76bb207", "bdb1b82ba864893c2ee8f7426c", "c97b62a719720b44b7779c", "c7f122904590cd32e92e748c514444f00ffdb80a4bb7e9eb651946", "c2e75952ab49216f305e3776865791ce877cef8c0229ca97561787093fddf1d8"), - TestFixture(16, "4dd555bd3a5253a90b68b5d4d46bd050340ee07ddad3a72048c657b5d76bb207", "bdb1b82ba864893c2ee8f7426c", "cb7c17ef62464ecc8008f6", "c5f657d83ea488bade511edb609dfc1929ac1ba5753fc83bf945b7", "c76a3ff4e6d1f742dd845be2d74c1a9b08e418909b15077deb20373ef55caf91"), - TestFixture(16, "4dd555bd3a5253a90b68b5d4d46bd050340ee07ddad3a72048c657b5d76bb207", "bdb1b82ba864893c2ee8f7426c", "893a690cc5221de597d0e8", "87b0293b99c0db93c9890053b74283296d0fca83b262915289163c", "bdb69f99f9a144b9ad88c6cfd8ffb8304c201de9b2818552ce6379e6042c1951"), - TestFixture(16, "4dd555bd3a5253a90b68b5d4d46bd050340ee07ddad3a72048c657b5d76bb207", "bdb1b82ba864893c2ee8f7426c", "80f3e4245c3eab16ef8bf0", "8e79a41300dc6d60b1d21888a34955893059d66549795b3ac2105c", "01815f599d6ba0d1c09f6f673bb6cca4c2a7a74f4e985be4c0f37842c7bbc5a4"), - TestFixture(16, "4dd555bd3a5253a90b68b5d4d46bd050340ee07ddad3a72048c657b5d76bb207", "bdb1b82ba864893c2ee8f7426c", "641c6914920a79943dca39", "6a962923cee8bfe26393d1377c4e2f20aaa872a9a0b1d1d7f56df0", "a9db62e9ab53c4a805c43838ce36b587d29b75b43fb34c17a22d3981120f3bc5"), - TestFixture(16, "4dd555bd3a5253a90b68b5d4d46bd050340ee07ddad3a72048c657b5d76bb207", "bdb1b82ba864893c2ee8f7426c", "2286a1eddd80737a724ca9", "2c0ce1da8162b50c2c15415545aa0c1dd11551891ae553d3a91908", "f0c2cc5a1b4c4cbe839338fa0d7a343514801302aef2403530605cf4f44d2811"), - TestFixture(16, "4dd555bd3a5253a90b68b5d4d46bd050340ee07ddad3a72048c657b5d76bb207", "bdb1b82ba864893c2ee8f7426c", "d8c63e7d7d332198249c0c", "d64c7e4a21d1e7ee7ac5e4d9e07ec5806360843676ef27d811b246", "9842922499ad4d487488b3731f48765efe0b4eb59e7b491ba5f6636f09ed564d"), - TestFixture(16, "4dd555bd3a5253a90b68b5d4d46bd050340ee07ddad3a72048c657b5d76bb207", "bdb1b82ba864893c2ee8f7426c", "4b81804d777a59b6a107cf", "450bc07a2b989fc0ff5e27483b8727c5753ede25e1fab0d86963be", "399b71ecb41f4590abda79045cdf6495f27daaa559c1b34f513b5c4ac105ec10"), - TestFixture(16, "4dd555bd3a5253a90b68b5d4d46bd050340ee07ddad3a72048c657b5d76bb207", "bdb1b82ba864893c2ee8f7426c", "dfc762466fa84c27326e0e", "d14d2271334a8a516c37e64b5c3c1dc577ee8fcf6ef3ebc0783430", "2c186c5c3463a4a8bad771feb71e2973c4f6dede2529827707bf4fa40672660f"), - TestFixture(16, "d3ad8cda9a0d91a205c4c05665728bb255d50a83403c9ab9243fcbbe95ae7906", "0b5f69697eb1af24e8e6fcb605", "a203aeb635e195bc33fd42fa", "62666297a809c982b50722bd56bc555899345e0404b2938edf33168e", "ea26ea68facdac3c75ba0cdf7b1ad703c9474af83b3fbfc58e548d776b2529b9"), - TestFixture(16, "d3ad8cda9a0d91a205c4c05665728bb255d50a83403c9ab9243fcbbe95ae7906", "0b5f69697eb1af24e8e6fcb605", "aac414fbad945a49ae178103", "6aa1d8da307c067728ede1449b15447c904b671824c2ca24c4fc7ad4", "0b32069fc7e676f229f1037d3026c93eef199913e426efd786b524ce1dbde543"), - TestFixture(16, "d3ad8cda9a0d91a205c4c05665728bb255d50a83403c9ab9243fcbbe95ae7906", "0b5f69697eb1af24e8e6fcb605", "7ee0ce371329192618e3cda0", "be8502168ec145189e19ade7ea13850e99ef9300c65f5abc9419d13a", "7a8658302e5181552292aa56e8209de63b5d86934167549b0d936202681757e1"), - TestFixture(16, "d3ad8cda9a0d91a205c4c05665728bb255d50a83403c9ab9243fcbbe95ae7906", "0b5f69697eb1af24e8e6fcb605", "b0a1af969a95025385b251af", "70c463b7077d5e6d034831e8486c93c31bbedc9e5ffa2f4154bceea9", "4f05600950664d5190a2ebc29c9edb89c20079a4d3e6bc3b27d75e34e2fa3d02"), - TestFixture(16, "d3ad8cda9a0d91a205c4c05665728bb255d50a83403c9ab9243fcbbe95ae7906", "0b5f69697eb1af24e8e6fcb605", "9f6c6d60110fd3782bdf49b0", "5f09a1418ce78f46ad2529f7f18b556e7da59fd2549dc57a17bf64f8", "4530e4dc6a4c3733b8ab7e77e384223cc1a8c179fb66818c08aca47e5c705d89"), - TestFixture(16, "d3ad8cda9a0d91a205c4c05665728bb255d50a83403c9ab9243fcbbe95ae7906", "0b5f69697eb1af24e8e6fcb605", "90958d7f458d98c48cbb464c", "50f0415ed865c4fa0a41260b30aad3a838680cbd313004685a5510c5", "f179353aef342f0f691caf1fcb811e3f6504e14d6d9381c5439b098ff978b01b"), - TestFixture(16, "d3ad8cda9a0d91a205c4c05665728bb255d50a83403c9ab9243fcbbe95ae7906", "0b5f69697eb1af24e8e6fcb605", "9f7ae892e5662803408d4d06", "5f1f24b3788e743dc6772d411d57b89ed0c91251aed37a6ca68a50c7", "f6df267e5cbc9d2a67b1c0fd762f891ee3b7c435884cb87d8228091b34aeddae"), - TestFixture(16, "d3ad8cda9a0d91a205c4c05665728bb255d50a83403c9ab9243fcbbe95ae7906", "0b5f69697eb1af24e8e6fcb605", "817074e351455f23cb67883d", "4115b8c2ccad031d4d9de87ad79a3b0feea16ff5fbca16211ea6fdd9", "4372e152b1afd99c7f87c8a51dbc3a5c14c49d04ea1c482a45dfbcda54972912"), - TestFixture(16, "d3ad8cda9a0d91a205c4c05665728bb255d50a83403c9ab9243fcbbe95ae7906", "0b5f69697eb1af24e8e6fcb605", "1b7da3835e074fdf62f1eb3c", "db186fa2c3ef13e1e40b8b7b49f22737c4b2f9fa0a7e3dd4b067fbaa", "82b6cd1c6618c42ba74e746075dc28700333578131ca6fde6971d2f0c6e31e6a"), - TestFixture(16, "d3ad8cda9a0d91a205c4c05665728bb255d50a83403c9ab9243fcbbe95ae7906", "0b5f69697eb1af24e8e6fcb605", "57473e7a105c806867379194", "9722f25b8db4dc56e1cdf1d3ef43a48dbea8c1547455ad0197af88a2", "a5422e53975e43168726677930f6d3e13281bdbd13c67c168340ed67e45d15b0"), - TestFixture(16, "e300fc7a5b96806382c35af5b2c2e8e26382751b59010d4b1cfc90a4a9cb06df", "55b59eb434dd1ba3723ee0dc72", "8714eb9ecf8bdb13e919de40f9", "ba6063824d314aa3cbab14b8c54c6520dac0f073856d9b9010b7857736", "9b1d85384cb6f47c0b13514a303d4e1d95af4c6442691f314a401135f07829ec"), - TestFixture(16, "e300fc7a5b96806382c35af5b2c2e8e26382751b59010d4b1cfc90a4a9cb06df", "55b59eb434dd1ba3723ee0dc72", "a0837676e091213890dc6e0a34", "9df7fe6a622bb088b26ea4f20820a423dd30796b6016baff106aaef206", "fa17c693d0997140fbc521d39e042d8e08388106874207ca81c85f45c035d6e6"), - TestFixture(16, "e300fc7a5b96806382c35af5b2c2e8e26382751b59010d4b1cfc90a4a9cb06df", "55b59eb434dd1ba3723ee0dc72", "b8a2ce7e051b8d094ec43f2a7f", "85d6466287a11cb96c76f5d2436032bc79c4aef1f74da25e92b0aa7f8a", "27663597b389b78e96c785ca2f5510c8963a5561d2b0b24c4dcdf8e58562c12c"), - TestFixture(16, "e300fc7a5b96806382c35af5b2c2e8e26382751b59010d4b1cfc90a4a9cb06df", "55b59eb434dd1ba3723ee0dc72", "9e4103ab1dfb77ae3494507332", "a3358bb79f41e61e16269a8b0e658123d2e5bb324c7ead8897f8e32b0a", "d8f1a83371487d611ce704e0a6731f97a933c43569690022fce33cb5aecdc0a7"), - TestFixture(16, "e300fc7a5b96806382c35af5b2c2e8e26382751b59010d4b1cfc90a4a9cb06df", "55b59eb434dd1ba3723ee0dc72", "fb3e3d1b6394d2daebf121f8ac", "c64ab507e12e436ac943eb0090270758ab09f93fa3ba7d7a2aa8eac789", "05c57aab99f94b315cf8bdd2d6b54440c097fe33c62a96b98b1568cdee4ce62c"), - TestFixture(16, "e300fc7a5b96806382c35af5b2c2e8e26382751b59010d4b1cfc90a4a9cb06df", "55b59eb434dd1ba3723ee0dc72", "549ba26a299391538b56ce4bd7", "69ef2a76ab2900e3a9e404b3eb2293813f1bcb96564f772e9308e42b2d", "1c1b0933c508c6a8a20846ebd0d0377e24f4abc0c900d3a92bc409ba14ef1434"), - TestFixture(16, "e300fc7a5b96806382c35af5b2c2e8e26382751b59010d4b1cfc90a4a9cb06df", "55b59eb434dd1ba3723ee0dc72", "287f31e69880823df7798c7970", "150bb9fa1a3a138dd5cb46814c81877380d5cf097c2fb5177750f8b53a", "9f5cf9149f556124d6bb4e3e243cca1502c02682709392cc2ec7eb262fd4d479"), - TestFixture(16, "e300fc7a5b96806382c35af5b2c2e8e26382751b59010d4b1cfc90a4a9cb06df", "55b59eb434dd1ba3723ee0dc72", "040d18b128ae4a1935f9509266", "397990adaa14dba9174b9a6a5acf42c75787edc62a180568c6ef56545d", "1a49aaea6fc6fae01a57d2fc207ef9f623dfd0bc2cf736c4a70aaaa0af5dafd3"), - TestFixture(16, "e300fc7a5b96806382c35af5b2c2e8e26382751b59010d4b1cfc90a4a9cb06df", "55b59eb434dd1ba3723ee0dc72", "92441cbe8d70820870bb01ad63", "af3094a20fca13b85209cb555f56d47a0631f2038103e3904b556ba7a5", "f29a0b2c602ff2cacb587292db301182e6c76c5110b97ca8b706198f0e1dbc26"), - TestFixture(16, "e300fc7a5b96806382c35af5b2c2e8e26382751b59010d4b1cfc90a4a9cb06df", "55b59eb434dd1ba3723ee0dc72", "f11d814df217de96333dee1cbf", "cc69095170ad4f26118f24e4835be15b7ae24edccd0b0934e3af513ed3", "01fcf5fef50e36175b0510874ea50a4d2005ad5e40e5889b61417700d827251e"), - TestFixture(16, "3ae5be5904bae62609ac525e2d1cad90133447573d7b608975a6a2b16cb2efc0", "61bf06b9fa5a450d094f3ddcb5", "959403e0771c21a416bd03f38983", "37a346bc4909965c5497838251826385a52c68914e9d1f63fd297ee6e7ed", "0245484bcd987787fe97fda6c8ffb6e7058d7b8f7064f27514afaac4048767fd"), - TestFixture(16, "3ae5be5904bae62609ac525e2d1cad90133447573d7b608975a6a2b16cb2efc0", "61bf06b9fa5a450d094f3ddcb5", "23fe445efa5bcb318cc85e2ad1ac", "81c90102c44e7cc9cee2de5b09ad364b603de6afbc2d96d00510894ccbe7", "52f6a10a022e5ee57eda3fcf53dcf0d922e9a3785b39fad9498327744f2852e4"), - TestFixture(16, "3ae5be5904bae62609ac525e2d1cad90133447573d7b608975a6a2b16cb2efc0", "61bf06b9fa5a450d094f3ddcb5", "762fdc3e0c30c7ecf2ec8808bb79", "d418996232257014b0c6087963781a4321c2ddbc35ce4864457d611219e9", "d236e3841b9556b32dbd02886724d053a9b8488c5ad1b466b06482a62b79ebb6"), - TestFixture(16, "3ae5be5904bae62609ac525e2d1cad90133447573d7b608975a6a2b16cb2efc0", "61bf06b9fa5a450d094f3ddcb5", "b6813d5fe8afa68d646c197337a2", "14b67803d6ba117526469902efa3296e55efebb17fe145cdca9b31ea7bcc", "0d2739cfdac782b61f484fa1a423c478c414397ec420327963d79112b2d70a7e"), - TestFixture(16, "3ae5be5904bae62609ac525e2d1cad90133447573d7b608975a6a2b16cb2efc0", "61bf06b9fa5a450d094f3ddcb5", "4ce8b6578537215224eb9398c011", "eedff30bbb2296aa66c113e9181059270a0510e7cc1b599705853af2144d", "7f291aa463c4babc76b4a6faf2e27e9401586b1ac83e4b06a4090e94b3ef5fd4"), - TestFixture(16, "3ae5be5904bae62609ac525e2d1cad90133447573d7b608975a6a2b16cb2efc0", "61bf06b9fa5a450d094f3ddcb5", "9ebf93643854ea5c97a4f38f50bd", "3c88d63806415da4d58e73fe88bcb55847573bf21e946ce9bdc5f569e3ff", "06bca7ef6f91355d19f90bf25590a44a24e5a782f92bc693c031e6de1e948008"), - TestFixture(16, "3ae5be5904bae62609ac525e2d1cad90133447573d7b608975a6a2b16cb2efc0", "61bf06b9fa5a450d094f3ddcb5", "da989cc7d375ed5fac4d7f938d74", "78afd99bed605aa7ee67ffe25575b8a61c5687ea02f0276824b8316b76f1", "5a44ff94f817c7c028a8f3db35a4d01364d2598432469f09ded86e5127d42d35"), - TestFixture(16, "3ae5be5904bae62609ac525e2d1cad90133447573d7b608975a6a2b16cb2efc0", "61bf06b9fa5a450d094f3ddcb5", "6fbab5a0f98e21e4d15904af5948", "cd8df0fcc79b961c937384de8149a07ee02791011129fcacffcfb1bf4145", "2a755e362373ef27a911c4d93ca07bc97135645442ad7ad6a8ef98146c71e9d7"), - TestFixture(16, "3ae5be5904bae62609ac525e2d1cad90133447573d7b608975a6a2b16cb2efc0", "61bf06b9fa5a450d094f3ddcb5", "b610349e8b370a7c195598573637", "142771c2b522bd845b7f1826ee36d34204b1ce23f5f58a8eb7cf1fa8cfa7", "f7988873f45a5de314e5381d3f14d8f8c48c9b649bf3e745ed5dc882d507da58"), - TestFixture(16, "3ae5be5904bae62609ac525e2d1cad90133447573d7b608975a6a2b16cb2efc0", "61bf06b9fa5a450d094f3ddcb5", "1d969fd81dab5ced3e6ee70be3bf", "bfa1da8423beeb157c44677a3bbe9c618bb88bbcefb008a5ea6bed4ff949", "95d2c8502e28ab3ee2cac52e975c3e7bccb1a93acc33d9c32786f66d6268d198"), - TestFixture(16, "fab62b3e5deda7a9c1128663cc81c44b74ab1bfe70bc1c9dec7c7fd08173b80a", "a5c1b146c82c34b2e6ebeceb58", "54be71705e453177b53c92bbf2ab13", "788db949697b8cd9abbc74ed9aa40cd6852dc829469368491149d6bb140071", "5e60b02b26e2d5f752eb55ea5f50bb354a6f01b800cea5c815ff0030b8c7d475"), - TestFixture(16, "fab62b3e5deda7a9c1128663cc81c44b74ab1bfe70bc1c9dec7c7fd08173b80a", "a5c1b146c82c34b2e6ebeceb58", "22197f9ad14591e7a6d5f8b18c969a", "0e2ab7a3e67b2c49b8551ee7e4998556940dc5a7e44bf10234806d00a012b5", "210c04632341fbfc185bfe3cbf6fe272bbe971104173bcb11419b35ab3aaf200"), - TestFixture(16, "fab62b3e5deda7a9c1128663cc81c44b74ab1bfe70bc1c9dec7c7fd08173b80a", "a5c1b146c82c34b2e6ebeceb58", "096b2f530933c1273304a6ad423726", "2558e76a3e0d7c892d8440fb2a38390898f7dbde25b0b70d335df71a06987b", "d3a205dd017e79a67400a937a20ef049f4c40d73311731f03ab857a3f93bd458"), - TestFixture(16, "fab62b3e5deda7a9c1128663cc81c44b74ab1bfe70bc1c9dec7c7fd08173b80a", "a5c1b146c82c34b2e6ebeceb58", "d44fdfd9da3a63c1083afe574e91bf", "f87c17e0ed04de6f16ba1801269ea02fd10d1f21b6b963c05aeda8eb09e272", "0c9b3ba4faf5fc2f310ad1bab06c4ca13474b714feeffb6ad615c1b850bbd6a3"), - TestFixture(16, "fab62b3e5deda7a9c1128663cc81c44b74ab1bfe70bc1c9dec7c7fd08173b80a", "a5c1b146c82c34b2e6ebeceb58", "8d836acc13ed83c2b2c706415c9679", "a1b0a2f524d33e6cac47e0173499664491d23d90ff55abca17e9d943b98c7f", "d9bb71ad90152d5c1af358c8501fa89ebd4b17bf4ff43841528cccb79fd791b3"), - TestFixture(16, "fab62b3e5deda7a9c1128663cc81c44b74ab1bfe70bc1c9dec7c7fd08173b80a", "a5c1b146c82c34b2e6ebeceb58", "2a68e3fe746f593c1b97cb637079c3", "065b2bc74351e49205172d351876dc9616886c6b2adc97db5a673846b6662c", "69dc21eb6f295b12ba493ee8fe6c40d78af946067ce772db316a3cbf00d3c521"), - TestFixture(16, "fab62b3e5deda7a9c1128663cc81c44b74ab1bfe70bc1c9dec7c7fd08173b80a", "a5c1b146c82c34b2e6ebeceb58", "39799b001ed2c334c269acb0f2328c", "154a533929ec7e9adce94ae69a3d932441dcae1760db90379bd354fa99164e", "095eb52135dc6d9c1f56a2571c1389852482e7aa3edc245a3904a0449db24a70"), - TestFixture(16, "fab62b3e5deda7a9c1128663cc81c44b74ab1bfe70bc1c9dec7c7fd08173b80a", "a5c1b146c82c34b2e6ebeceb58", "42143a2b9e1d0b354df3264d08f7b6", "6e27f212a923b69b5373c01b60f8a9c7c7deb28bdcf84886ef843216b94449", "efd7270e0396392fde8b0ddaab00544cbbd504f4d97d4e90d749d1946de90dcb"), - TestFixture(16, "fab62b3e5deda7a9c1128663cc81c44b74ab1bfe70bc1c9dec7c7fd08173b80a", "a5c1b146c82c34b2e6ebeceb58", "a3dcf26327059a4245b79a38bb8db6", "8fef3a5a103b27ec5b377c6ed382a935061ae3cd892ba63c44b809d6d29421", "8bc181ce2e66294e803a8dc3834958b5f173bc2123c0726e31f3fca25b622ed6"), - TestFixture(16, "fab62b3e5deda7a9c1128663cc81c44b74ab1bfe70bc1c9dec7c7fd08173b80a", "a5c1b146c82c34b2e6ebeceb58", "3d54883449ecca8f153436c25a0a01", "1167400d7ed277210bb4d09432051e3c9ae69a4c59ff8e251c2fe022d065a9", "c39ec70c2c71633ae0dccc41477ac32e47638c885cf59f34ebd4a096d32f91f9"), - TestFixture(16, "ee8ce187169779d13e443d6428e38b38b55dfb90f0228a8a4e62f8f535806e62", "121642c4218b391c98e6269c8a", "d15f98f2c6d670f55c78a06648332bc9", "cc17bf8794c843457d899391898ed22a6f9d28fcb64234e1cd793c4144f1da50", "718d13e47522ac4cdf3f828063980b6d452fcdcd6e1a1904bf87f548a5fd5a05"), - TestFixture(16, "ee8ce187169779d13e443d6428e38b38b55dfb90f0228a8a4e62f8f535806e62", "121642c4218b391c98e6269c8a", "60d55a8d5ab591a51e87fdf6aaa2ad25", "7d9d7df808aba2153f76ce016b1f54c68b55bbe42d8c97504b97c34a5f16e6a6", "a371ca29b92ed676bab5dfc4d78631bb6d9bb23a29f822907084a1f0fe17721f"), - TestFixture(16, "ee8ce187169779d13e443d6428e38b38b55dfb90f0228a8a4e62f8f535806e62", "121642c4218b391c98e6269c8a", "cbf112e4fb85276c4e09649f3de225b2", "d6b93591a99b14dc6ff85768fc5fdc51017d8706acd676ae99e93d5312a4113c", "01ec87920b42639d4ba22adb1fbe5138d2849db670a2960fd94a399c1532ed75"), - TestFixture(16, "ee8ce187169779d13e443d6428e38b38b55dfb90f0228a8a4e62f8f535806e62", "121642c4218b391c98e6269c8a", "865b89aa38ee1b5a3ce56620307e8937", "9b13aedf6af028ea1d1455d7f1c370d45982f0fe5d951a8c62c87894657301e4", "eebd2bbf1e9f6d817cd8062a6a9680e7f10464eefeb50b07cb46b14b9b3fcb2c"), - TestFixture(16, "ee8ce187169779d13e443d6428e38b38b55dfb90f0228a8a4e62f8f535806e62", "121642c4218b391c98e6269c8a", "a8efc37d1b8b51f2a47b21dd14da383d", "b5a7e40849956242858a122ad567c1de5addfddbb59f4985947fb3a9ab56333e", "72863362612f146699f6b2f6ec3688f2ca6cb1505af7a309c91c1933e34d516a"), - TestFixture(16, "ee8ce187169779d13e443d6428e38b38b55dfb90f0228a8a4e62f8f535806e62", "121642c4218b391c98e6269c8a", "d9b0eaaff786165f882f41a98dbc0c35", "c4f8cddaa59825efa9de725e4c01f5d6b651053516673402a57538db1a9ce7e9", "9c9efc6593f96207678db813608f2b8bc33ed1bef974ed77ed7b6e74b621b819"), - TestFixture(16, "ee8ce187169779d13e443d6428e38b38b55dfb90f0228a8a4e62f8f535806e62", "121642c4218b391c98e6269c8a", "df49d972b6ebbbb18ee975ac635d847e", "c201fe07e4f58801af18465ba2e07d9d86d772b1a1991b7be6589bbccad36171", "dc482a051b58d8a3904d3af37c37b51983f634a504451bbba6f77d71337f8e78"), - TestFixture(16, "ee8ce187169779d13e443d6428e38b38b55dfb90f0228a8a4e62f8f535806e62", "121642c4218b391c98e6269c8a", "78318aa5cd16699b77bdcea2fc9d1d20", "6579add09f085a2b564cfd553d20e4c3569387a1a6bcc826e94012670820576e", "51ef065a43caa23faf750b02a41ad6ba701aeb8058f6d8738d6f6b005bec7f60"), - TestFixture(16, "ee8ce187169779d13e443d6428e38b38b55dfb90f0228a8a4e62f8f535806e62", "121642c4218b391c98e6269c8a", "8e20d65d02dd9a64379f75b6d8328f2d", "9368f12850c3a9d4166e4641198f76cee9c788b4aae9b2c6caf0c44aa9bd2ed0", "88e2a74d2920c89c6a101f5f06d0624a6d5eabd9bdb51395ee3983934c55c73d"), - TestFixture(16, "ee8ce187169779d13e443d6428e38b38b55dfb90f0228a8a4e62f8f535806e62", "121642c4218b391c98e6269c8a", "97e8d8513af41b97801de98cc4269096", "8aa0ff2468ea2827a1ecda7b059b6975f1df0f01944641a1b04d753e6ab8d3cc", "ada3ed7db2dabbfbc441ef68a5656e628d6d5bd6c1574369688497179a77601a"), - TestFixture(16, "7da6ef35ad594a09cb74daf27e50a6b30d6b4160cf0de41ee32bbf2a208b911d", "98a32d7fe606583e2906420297", "b0053d1f490809794250d856062d0aaa92", "a6341ee3d60eb34a8a8bc2806d50dd57a3f628ee49a8c2005c7d07d354bf80994d", "217d130408a738e6a833931e69f8696960c817407301560bbe5fbd92361488b4"), - TestFixture(16, "7da6ef35ad594a09cb74daf27e50a6b30d6b4160cf0de41ee32bbf2a208b911d", "98a32d7fe606583e2906420297", "51eb190c6a9f46e8ec1628b090795470c0", "47da3af0f599fcdb24cd3266fb04838df13c1c5755a5a240c33b2b890a486aac8b", "4ae414bc888a42141d3060c71c2dbbffd425b6a952806982271a8e756b3c9e24"), - TestFixture(16, "7da6ef35ad594a09cb74daf27e50a6b30d6b4160cf0de41ee32bbf2a208b911d", "98a32d7fe606583e2906420297", "25144e807e389bb0e45b6dc25558caf61a", "33256d7ce13e21832c8077143e251d0b2b4cfca1c19abf447d7bc0898d61885144", "7b7f78ae1a5ee96fdc49dacd71be1a6ac09a6a162d44dea0172886eca5674e46"), - TestFixture(16, "7da6ef35ad594a09cb74daf27e50a6b30d6b4160cf0de41ee32bbf2a208b911d", "98a32d7fe606583e2906420297", "dbe1ee14abfe2ecf4edf6db206cf9886ce", "cdd0cde834f894fc860477646db24f7bff229cc7a390867a245dcb7c434f1db347", "03f31c6143b77f6ad44749e2256306b8bf82242f2821fad4075b09b388ba81ca"), - TestFixture(16, "7da6ef35ad594a09cb74daf27e50a6b30d6b4160cf0de41ee32bbf2a208b911d", "98a32d7fe606583e2906420297", "db6df31f12bf552f81deff5fa2a373fc22", "cd5cd0e38db9ef1c4905e589c9dea401135361b539f9fe0fb7842907c2326aef63", "030390adb572f2bd2a6a4454fd68236cd1d465574328aa001d553375cc63f8a2"), - TestFixture(16, "7da6ef35ad594a09cb74daf27e50a6b30d6b4160cf0de41ee32bbf2a208b911d", "98a32d7fe606583e2906420297", "ff2a97b49fcc6a50d4549c979d53ccc51f", "e91bb44800cad0631c8f8641f62e1b382e8ed10943929e7d7bf798b2ae8371aae5", "7294ae94358669f2ada4b64c125b248df7fe86c6715e3b6a7b9bb2bd99392c8a"), - TestFixture(16, "7da6ef35ad594a09cb74daf27e50a6b30d6b4160cf0de41ee32bbf2a208b911d", "98a32d7fe606583e2906420297", "73ddfa0185200a890b7690a7e3986d8818", "65ecd9fd1a26b0bac3ad8a7188e5ba7529f92b9e49ab83f113f8949dc9e4a36e0d", "4d1513478fc1fb0a18eb6d2a9324fefbd975ecd1b409025de826bc397462acc1"), - TestFixture(16, "7da6ef35ad594a09cb74daf27e50a6b30d6b4160cf0de41ee32bbf2a208b911d", "98a32d7fe606583e2906420297", "5c7604f9ac8fdf30ee5820e5aeb75b65d7", "4a4727053389650326833a33c5ca8c98e6d0e53223adff22a08e3dddf66fff23e3", "b26a7ff61bfe94864249af7cc9b4a723627dd4463f5a22f0ca6063769522eab7"), - TestFixture(16, "7da6ef35ad594a09cb74daf27e50a6b30d6b4160cf0de41ee32bbf2a208b911d", "98a32d7fe606583e2906420297", "d44fdfd9da3a63c1083afe574e91bf01c9", "c27efc25453cd9f2c0e1e48125ec68fcf833f49a42521a7a2367f91bfcc2180b7c", "960f9a85cfbfb6eab223a4139c72ce926a680ea8e8ecc3088cf123de659ad310"), - TestFixture(16, "7da6ef35ad594a09cb74daf27e50a6b30d6b4160cf0de41ee32bbf2a208b911d", "98a32d7fe606583e2906420297", "bb515dc227abb9acad8fefaa14771bb77b", "ad607e3eb8ad039f6554f57c7f0acc4a4ac08bd395c6807223311070659f550934", "3718467effb5d5dc009aaefce84d8cb4fe8f80eb608f4c678f5d0de02ea11e59"), - TestFixture(16, "0786706f680c27b792d054faa63f499a8e6b5ddb90502946235bf74c022d772c", "f61ef1c8c10a863efeb4a1de86", "6a26677836d65bd0d35a027d278b2534e7df", "d1c1f3c60603359c7d6a707f05ecb2296f8e52f2210b7a798ad5c778ee7cfd7fe6e0", "67874c808600a27fcab34d6f69cc5c730831ad4589075dd82479823cb9b41dc3"), - TestFixture(16, "0786706f680c27b792d054faa63f499a8e6b5ddb90502946235bf74c022d772c", "f61ef1c8c10a863efeb4a1de86", "4021ff104ff1dbd91e46db249fd82198b0a1", "fbc66bae7f24b595b076a926bdbfb68538f00923bb5a347af13df12f234fca5f03ef", "e0c27cddf919d3092d9a34766c89a5ae6dcf39fe954d1e6f1a70ddf96805def4"), - TestFixture(16, "0786706f680c27b792d054faa63f499a8e6b5ddb90502946235bf74c022d772c", "f61ef1c8c10a863efeb4a1de86", "6a681f164efce199a787bccff223b8ae1a98", "d18f8ba87e298fd509b7cecdd0442fb392c9d03ed7bffac83e890caceb6903d9cab5", "7ae9eca03f616ab39ebb3be26b848842b4aa584e5c8e5695065ad5af34951175"), - TestFixture(16, "0786706f680c27b792d054faa63f499a8e6b5ddb90502946235bf74c022d772c", "f61ef1c8c10a863efeb4a1de86", "7861dac338ba3f8274dca04c8c6f92b6d44c", "c3864e7d086f51cedaecd24eae0805ab5c1d4dd8f30870025b2bd1e2a2511574d3e7", "b47c9bc4eb01c74f5db2e6a293bef80db18c58cf06feef7ee0f8a7a9a51c22bb"), - TestFixture(16, "0786706f680c27b792d054faa63f499a8e6b5ddb90502946235bf74c022d772c", "f61ef1c8c10a863efeb4a1de86", "a3f0473c620d2739d5ba4f7156f88d0fb669", "1817d38252d849757b8a3d73749f1a123e386046d17f337f3cb49884d94995edbdc9", "f6afd661f218c7426b92ee53e65d14898cd0c78a7e594fcc6ac0e3fb5cab1c9c"), - TestFixture(16, "0786706f680c27b792d054faa63f499a8e6b5ddb90502946235bf74c022d772c", "f61ef1c8c10a863efeb4a1de86", "07c535d9456a6ff1e41321150d16dae3f7a3", "bc22a16775bf01bd4a2353172f714dfe7ff25fdc77b43bca254d6459263cdfed8fbb", "d3802911e341577046cfc61d9043b4af059fb4bef3c6a2ff46ccdcb05670af37"), - TestFixture(16, "0786706f680c27b792d054faa63f499a8e6b5ddb90502946235bf74c022d772c", "f61ef1c8c10a863efeb4a1de86", "5ee220720a896249efdab2ce418318bb5ebf", "e505b4cc3a5c0c0541eac0cc63e48fa6d6eedd1a1d36c8164c55d55dbf0ff1e9517a", "db60720db67a60ca286fe744d46173c231fbcc7deb4c9b0d87d52a2247e06b74"), - TestFixture(16, "0786706f680c27b792d054faa63f499a8e6b5ddb90502946235bf74c022d772c", "f61ef1c8c10a863efeb4a1de86", "98e4eb0361c8bf40bcbe0539b0850e4c35ff", "23037fbd511dd10c128e773b92e29951bdaeb476e2ca48fd52bec0539b00744a8a07", "57f70ba5493265b30491decc726354e2065e7971a2efd56db9cf0f79b1d76859"), - TestFixture(16, "0786706f680c27b792d054faa63f499a8e6b5ddb90502946235bf74c022d772c", "f61ef1c8c10a863efeb4a1de86", "7f0745bea62479c0080ecec52e37c1e32d72", "c4e0d10096f1178ca63ebcc70c5056fea523fad68c62b81d62f2d490ae74f5bb1465", "4a29b9ad548964942f87f28ba267ec0d0e8f72c73b3823ee57693dd63c2605c1"), - TestFixture(16, "0786706f680c27b792d054faa63f499a8e6b5ddb90502946235bf74c022d772c", "f61ef1c8c10a863efeb4a1de86", "e99ed2ac6c38e033061b5d85f3e77dd72518", "527946125ced8e7fa82b2f87d180eacaad4913b15d8000266c61ba5aec898eb35b52", "acbd2e9911b3218a230d9db5086d91dccac3fc93fc64b0f4a15d56954906b2b7"), - TestFixture(16, "bac55f9847d93325bf5071c220c0a3dfeb38f214292d47b4acb7b0a597fe056f", "05b50c458adbba16c55fcc454d", "c1a994dc198f5676ea85801cd27cc8f47267ec", "7c9b138177590edaafec4728c4663e77458ffbe3243faec177de4a2e4a293952073e43", "89ad6ae1e550975eaa916a62615e6b6a66366a17a7e06380a95ea5cdcc1d3302"), - TestFixture(16, "bac55f9847d93325bf5071c220c0a3dfeb38f214292d47b4acb7b0a597fe056f", "05b50c458adbba16c55fcc454d", "791e232bfb42fb18197adc1967da1a83f70168", "c42ca4769594a3b45c131b2d71c0ec00c0e97f8422f736fc435687634d42254b22fd99", "dfddb719d00398bf48a6cefd27736389e654a93b8595cd5ac446af1996e0f161"), - TestFixture(16, "bac55f9847d93325bf5071c220c0a3dfeb38f214292d47b4acb7b0a597fe056f", "05b50c458adbba16c55fcc454d", "3d4127942459bb8682e662dfc862467582fa68", "8073a0c94a8fe32ac78fa5ebde78b0f6b5127f38a96e68ef7dbaef1b460cc0980eacd4", "58ef310997dcaf067dd217274921504da6dbf0428a2b48a65fe8a02c616ac306"), - TestFixture(16, "bac55f9847d93325bf5071c220c0a3dfeb38f214292d47b4acb7b0a597fe056f", "05b50c458adbba16c55fcc454d", "0e71863c2962244c7d1a28fc755f0c73e5cbd6", "b343016147b47ce03873efc86345faf0d223c15c5c702a82d468929227502e4e35796f", "511e5d5e100b595f6b20e791830bca37e23f7b785e482a58405bffe7a632a5b8"), - TestFixture(16, "bac55f9847d93325bf5071c220c0a3dfeb38f214292d47b4acb7b0a597fe056f", "05b50c458adbba16c55fcc454d", "e0f1cd013e6aea4fa484fc3fa35d348b1a2399", "5dc34a5c50bcb2e3e1ed3b0bb547c2082dcb8e89188c0940182dd99a902d158c5b0810", "e48dfaa53b6807ea6f01d8dca67960b9f321f7851f324459a9bf61fe0be73abb"), - TestFixture(16, "bac55f9847d93325bf5071c220c0a3dfeb38f214292d47b4acb7b0a597fe056f", "05b50c458adbba16c55fcc454d", "b1cc1946b4fc1dbd033254cdf536f61e9f9cd7", "0cfe9e1bda2a4511465b93f9e32c009da874c015849acbb7af1892790300bb84fb0558", "c12c0423fe36e4c88775dd00b4af267b85b7dd2a37a742a3156923c8917c97a3"), - TestFixture(16, "bac55f9847d93325bf5071c220c0a3dfeb38f214292d47b4acb7b0a597fe056f", "05b50c458adbba16c55fcc454d", "87284658928208e3bddca83e3ceb13708d88d4", "3a1ac105fc54504ff8b56f0a2af1e5f3ba60c3e75aaf3077ac6dfb5454851ec3910de6", "4255f8af18df7237e0abe98421aec9634443561752d893aaffe76380e829ef32"), - TestFixture(16, "bac55f9847d93325bf5071c220c0a3dfeb38f214292d47b4acb7b0a597fe056f", "05b50c458adbba16c55fcc454d", "bdb79f931ef3035a33bdd1b032fd9de8f6b2ba", "008518ce70255bf676d4168424e76b6bc15aade70f42e3e1f2b5bb58433bd11f5dea1f", "ab83567833d2f3461b5fbecc0e366694bb5ea00933b2b3e792ec3aefe20325df"), - TestFixture(16, "bac55f9847d93325bf5071c220c0a3dfeb38f214292d47b4acb7b0a597fe056f", "05b50c458adbba16c55fcc454d", "1f9c3a8eb8bc59f3869e10f73883aa8f8990cb", "a2aebdd3d66a015fc3f7d7c32e995c0cbe78dc564f6248cefe5fc7cfb547c90a558925", "bd1446ba3185d1c16551730947c22142142caa8cc1c540e89ab734ec297401bc"), - TestFixture(16, "bac55f9847d93325bf5071c220c0a3dfeb38f214292d47b4acb7b0a597fe056f", "05b50c458adbba16c55fcc454d", "5f28809181f9a889894da8d6fe1fde6cce354a", "e21a07ccef2ff025cc246fe2e80528eff9dd5db52249d812f7f235afa0732e984e91b2", "b87577755d2d9489194f6f7cfabf267dc3433a9c91954e81beb72c5e06870922"), - TestFixture(16, "8beedeb85d42c2a7fa6f7237b05acb197dd8e1672471ac878064fe5319eab876", "8479bdfad28ebe781e9c01a3f6", "7b125c3b9612a8b554913d0384f4795c90cd387c", "6cc611d816b18c6847b348e46a4119465104254a04e2dfeeeac9c3255f6227704848d5b2", "7aebdfd955d6e8a19a701d387447a4bdd59a9382156ab0c0dcd37b89419d6eff"), - TestFixture(16, "8beedeb85d42c2a7fa6f7237b05acb197dd8e1672471ac878064fe5319eab876", "8479bdfad28ebe781e9c01a3f6", "8b013f5782d5d1af8dbd451a4202866095dac975", "9cd572b40276f5729e9f30fdacb7e67a5413d44338d48329997c5981d678b5e24a6f01b0", "d119f300fbd74e754a200ea2c3f9fabc1466d02078c84245db693eef3f5672a6"), - TestFixture(16, "8beedeb85d42c2a7fa6f7237b05acb197dd8e1672471ac878064fe5319eab876", "8479bdfad28ebe781e9c01a3f6", "b2b1d82a5523b72ea366a680922ed3a4624536c4", "a56595c9d58093f3b044d3677c9bb3bea38c2bf2a77e3ab68e0a73519591a33ed098b758", "d6204303b86acf62d5ab860ca70161288ede56e3cf017c08dca56fd2d6f8f6fe"), - TestFixture(16, "8beedeb85d42c2a7fa6f7237b05acb197dd8e1672471ac878064fe5319eab876", "8479bdfad28ebe781e9c01a3f6", "f8c4eb4285d3d7744da52775bb44ca436a3154f7", "ef10a6a10570f3a95e87529255f1aa59abf849c1cff6c24251c2fb7b8604dfa10c60ef4a", "8557e22eb4529b43f16b1f8ae47c714ac8a2c827c1408a47704778b4c5b52601"), - TestFixture(16, "8beedeb85d42c2a7fa6f7237b05acb197dd8e1672471ac878064fe5319eab876", "8479bdfad28ebe781e9c01a3f6", "6e7fe35fa39c937a0e6b3a8c072e218650f42b8d", "79abaebc233fb7a71d494f6be99b419c913d36bb6c3c39f915d081d34559179869b32d81", "8c1a4187efbb3d38332f608f2c8bbe64247d9afa2281ced56c586ecb4ab7a85e"), - TestFixture(16, "8beedeb85d42c2a7fa6f7237b05acb197dd8e1672471ac878064fe5319eab876", "8479bdfad28ebe781e9c01a3f6", "917b467d841850fc6e648f1bc298a7f9f1ee38ca", "86af0b9e04bb74217d46fafc2c2dc7e3302725fc9389a6a6a74c6eb0e1f87562469f2082", "a41bb1f256228302cd0548ae2148ff42774d18c2d6d3e38b36bc4938da13bac3"), - TestFixture(16, "8beedeb85d42c2a7fa6f7237b05acb197dd8e1672471ac878064fe5319eab876", "8479bdfad28ebe781e9c01a3f6", "2b4314fe1a6bfa786b7cfc13fbee861b348efbf6", "3c97591d9ac8dea5785e89f4155be601f547e6c03bed3a2f5dfdbfcc0d7ac26c88d1962c", "b0b024e20c4f75a6dad54c21a9edbce846792e957878b1c8ed2d916c757e2b3c"), - TestFixture(16, "8beedeb85d42c2a7fa6f7237b05acb197dd8e1672471ac878064fe5319eab876", "8479bdfad28ebe781e9c01a3f6", "e19fa7f83c79920cbff45c41a9dee8fc99e97396", "f64bea1bbcdab6d1acd629a6476b88e658206ea035ea1d99be344fa1467ee91c73bbca67", "42153925c46fc9d5d328312d62f59bb99fdc4ac479a3386d5f88fefd4b32f577"), - TestFixture(16, "8beedeb85d42c2a7fa6f7237b05acb197dd8e1672471ac878064fe5319eab876", "8479bdfad28ebe781e9c01a3f6", "53e0475cf492b3d39dad600f5c58eb0bd0021554", "44340abf7431970e8e8f15e8b2ed8b1111cb08627936ec10a81b36768b606e9a38b2f4c5", "37ab2a0b7b69942278e21032fc83eba6cdc34f5285a8b711a08da6acd42299fe"), - TestFixture(16, "8beedeb85d42c2a7fa6f7237b05acb197dd8e1672471ac878064fe5319eab876", "8479bdfad28ebe781e9c01a3f6", "c119a383d9a3d4bff4270a1d22076b346db5f61c", "d6cdee605900f062e7057ffaccb20b2eac7ceb2a11575ae03ea8a57bbe4a67c060367b74", "4a17522da707b4b2587a0ae367a2cd2831bb593a18ef442a7977eda6de045878"), - TestFixture(16, "c3a0c126cad581012151c25cf85a44472c23f83b6095b6004f4f32cd60ec2db2", "94ab51ce75db8b046d6ab92830", "73b09d18554471309141aa33b687f9248b50fe3154", "b7e8264ca70fd2a4fb76f20a8ad5da3c37f5893fb12abeeaef1187f815ca481ed8ddd3dd37", "2a243246bfe5b5ab05f51bf5f401af52d5bbaa2549cf57a18e197597fe15dd8c"), - TestFixture(16, "c3a0c126cad581012151c25cf85a44472c23f83b6095b6004f4f32cd60ec2db2", "94ab51ce75db8b046d6ab92830", "b64d00f3a4df754fa4ee6376922fb67ccce0c6209f", "7215bba75694d6dbced93b4fae7d95647045b12e7accc2b55011dbe92ce7619e0ad48b4ccf", "0595306eb7441622a49800edee0134492d82320707fceba902af2e0c95fe634a"), - TestFixture(16, "c3a0c126cad581012151c25cf85a44472c23f83b6095b6004f4f32cd60ec2db2", "94ab51ce75db8b046d6ab92830", "2b11d1ac74ffe701ec733d32085b1054132726e622", "ef496af886b444958644650b3409334caf8251e8c71e8b1f4d70d8f4c7df4f22847d36b394", "bd439dbefec589e120fb4f9825b315bf86523b85c61791cd4da4c8d474ba2714"), - TestFixture(16, "c3a0c126cad581012151c25cf85a44472c23f83b6095b6004f4f32cd60ec2db2", "94ab51ce75db8b046d6ab92830", "a88f22424643a523aa3d7d88f4364f1290f49dd0a2", "6cd79916b40806b7c00a25b1c8646c0a2c51eade47a85e76a9d07b7b361ca56d53c34cda50", "cfebe1cf82267394065bcecfada6709c6c35a3ac835644f560d4c9a8c1848364"), - TestFixture(16, "c3a0c126cad581012151c25cf85a44472c23f83b6095b6004f4f32cd60ec2db2", "94ab51ce75db8b046d6ab92830", "c81427bc84c6a3cfefd4c4cb210fe82212977e1947", "0c4c9ce8768d005b85e39cf21d5dcb3aae320917a2fddb010e7508ad03ad287068ecee6020", "7a37255b682766a0bfecf78e5162528885a339174c2a49325739d2bd8877e64f"), - TestFixture(16, "c3a0c126cad581012151c25cf85a44472c23f83b6095b6004f4f32cd60ec2db2", "94ab51ce75db8b046d6ab92830", "28c4d6de3e2ce51b849b135d9cfd3084f0e3155447", "ec9c6d8acc67468feeac4b64a0af139c4c46625aa2ddea785e6c470c52c4fdf432fd78b66e", "619f2ae80070e278615466a3fd6c9acb7b510c5679bed7038889c77e78d8bd32"), - TestFixture(16, "c3a0c126cad581012151c25cf85a44472c23f83b6095b6004f4f32cd60ec2db2", "94ab51ce75db8b046d6ab92830", "4c88151cafef75832bacef43a06e862349d56b67ee", "88d0ae485da4d617419bb77a9c3ca53bf5701c690b91232cfbd7ffff252498b35274fb2995", "b2571e56f66a857daffbdc99370ceddd4a7bed3867d600cc797000a3b7b57a9d"), - TestFixture(16, "c3a0c126cad581012151c25cf85a44472c23f83b6095b6004f4f32cd60ec2db2", "94ab51ce75db8b046d6ab92830", "572855e22ce89bc2bcf09cb15a1765d99973449d61", "9370eeb6dea33856d6c7c488664546c125d633938472b2c50e5e391ad104f9ee33b94f2872", "db409636e3e3bcd606a91aeb7592009896f9ad2c4cc6b7f578e6ad59c0f8fa22"), - TestFixture(16, "c3a0c126cad581012151c25cf85a44472c23f83b6095b6004f4f32cd60ec2db2", "94ab51ce75db8b046d6ab92830", "89ce46b3de3afaf2518d419b1a2ac24cabca269a96", "4d96fde72c7159663bba19a22678e154176f5194732d69c5d6db1b130102af3dae0690673b", "62c89a835721207a182968c516dc8be45774ec846e8dcab9ab8611888f2a76a8"), - TestFixture(16, "c3a0c126cad581012151c25cf85a44472c23f83b6095b6004f4f32cd60ec2db2", "94ab51ce75db8b046d6ab92830", "edf1682a626e9fbf3d57bb260e0876c6f92ba5b114", "29a9d37e90253c2b5760e31f325a55de458ed2bff1489903365970c2673c9fd457e1077aad", "33f30ddd83002eea50fd4a8fae39d0980a04160a22ac88b755ac050f1d1f8639"), - TestFixture(16, "9cdebaeee8690b68751070691f49593668a6de12d3a948b38ddbd3f75218b2d4", "af1a97d43151f5ea9c48ad36a3", "3cbb08f133270e4454bcaaa0f20f6d63c38b6572e766", "3966930a2ae8fdd8f40e7007f3fde0bd6eb48a46e6d26eef83da9f6384b1a2bda10790dadb3f", "f5353fb6bfc8f09d556158132d6cbb97d9045eacdc71f782bcef62d258b1950a"), - TestFixture(16, "9cdebaeee8690b68751070691f49593668a6de12d3a948b38ddbd3f75218b2d4", "af1a97d43151f5ea9c48ad36a3", "946e86795c332031e2d1ee09d3d4a101fb6800d00911", "91b31d8245fcd3ad426334aed2262cdf5657efe408a5587bdd120a7d08cd3841cb117af444fb", "e3a1555ffe5f34bb43c4a2dae9019b19f1e44a45fb577d495d2a57097612448d"), - TestFixture(16, "9cdebaeee8690b68751070691f49593668a6de12d3a948b38ddbd3f75218b2d4", "af1a97d43151f5ea9c48ad36a3", "b76ce2ab0065ba1c0a754494991c8c452cb416f18ab1", "b2b1795019aa4980aac79e3398ee019b818bf9c58b0545b32f81dcf03e2bcc2aaf62ad366e97", "9c5d43c1a1269cde199509a1eff67cc83a1759b71c9e7a6ee99f76b98c6e23a6"), - TestFixture(16, "9cdebaeee8690b68751070691f49593668a6de12d3a948b38ddbd3f75218b2d4", "af1a97d43151f5ea9c48ad36a3", "a3e0d8d0784155bfc45769c52711d4fa68e8bc390c20", "a63d432b618ea62364e5b36226e35924c5d7530d0d94fea17d78533bc9e022dbfb460afdf499", "b07452a7900a289b91b2771dfdd5108852536659aa259def7b41e38f80bd03ab"), - TestFixture(16, "9cdebaeee8690b68751070691f49593668a6de12d3a948b38ddbd3f75218b2d4", "af1a97d43151f5ea9c48ad36a3", "6e6a88abbb52a709b47365ad6aa8016fa9a03a9bd834", "6bb71350a29d549514c1bf0a6b5a8cb1049fd5afd98056defc6dcaeec80b1c639350ab6f1fde", "6b30f55c3101540523a92380390f3f84632f42962061b2724cde78ac39809397"), - TestFixture(16, "9cdebaeee8690b68751070691f49593668a6de12d3a948b38ddbd3f75218b2d4", "af1a97d43151f5ea9c48ad36a3", "eba1810d537041821121aeff8e0914ac26a550072c8c", "ee7c1af64abfb21eb19374588ffb99728b9abf332d389d37b7251fb8c0ef2b37c36d51219d0f", "9fc62d14f8b7a6026509275cff80312ff1ade2b5d9c274cb72a506a571439fc1"), - TestFixture(16, "9cdebaeee8690b68751070691f49593668a6de12d3a948b38ddbd3f75218b2d4", "af1a97d43151f5ea9c48ad36a3", "dfc6692cd2442e5ff1f918c8812a27f81d107d16a12f", "da1bf2d7cb8bddc3514bc26f80d8aa26b02f9222a09bd279d9da4437c8a2a252436508134c56", "6b9389cc42113d639fd2b40cbc732ae0dc7c14513b88b36b45a6ea5a06fe4d2b"), - TestFixture(16, "9cdebaeee8690b68751070691f49593668a6de12d3a948b38ddbd3f75218b2d4", "af1a97d43151f5ea9c48ad36a3", "9ad338cbfd1b52e6ae4178f05e00062274f8b0b25eae", "9f0ea330e4d4a17a0ef3a2575ff28bfcd9c75f865f1a63943543bc1c5f5991ecc5964a288f79", "db72d98d63fc10acff7dceec0e2691a80ecee50a0e957ad166c77952a50318bd"), - TestFixture(16, "9cdebaeee8690b68751070691f49593668a6de12d3a948b38ddbd3f75218b2d4", "af1a97d43151f5ea9c48ad36a3", "9f5a05db89e0e336da066ce81b79ad9be1d0ec4fb7b8", "9a879e20902f10aa7ab4b64f1a8b20454cef037bb60c0a49ee2b7ceddcbd28abb24b77d5edee", "e98b710c47a4d12a73cd8aa2613fc2910c16f4195ea7f15650132493521d19be"), - TestFixture(16, "9cdebaeee8690b68751070691f49593668a6de12d3a948b38ddbd3f75218b2d4", "af1a97d43151f5ea9c48ad36a3", "58f31e5770070a5d4031fb795dc2d298561d3559960d", "5d2e85ac69c8f9c1e08321de5c305f46fb22da6d97b9b099a68cfa3572d974e03232e09f37fb", "527817316fc48b105f8ab178dd2db1fefa09c50461aa9d8bdf3c03482343bbf9"), - TestFixture(16, "d34264a12c35cdd67ac105e2826b071e46f8131d1e325f8e0ae80a6447375135", "3891e308b9f44c5b5a8b59004a", "79ac1a6a9eca5e07ce635bfd666ef72b16f3f2e140d56c", "1abcc9b1649deaa0bfa7dcd23508282d9c50ca7fee72486950608d7bcb39dcf03a2cab01587f61", "0cda000ed754456a844c9ed61843deea9dadf5e723ea1448057712996d660f8c"), - TestFixture(16, "d34264a12c35cdd67ac105e2826b071e46f8131d1e325f8e0ae80a6447375135", "3891e308b9f44c5b5a8b59004a", "76d12e3c4c5d990bf563c60aa4999e52998d887f97477f", "15c1fde7b60a2dac84a74125f7ff4154132eb0e139e05b1c4fb40e5c8bc37152a173d4bbb18c3e", "3fb6ddb76809b8e6d703347664ef00a365955124c603900d5c8d4ff476138252"), - TestFixture(16, "d34264a12c35cdd67ac105e2826b071e46f8131d1e325f8e0ae80a6447375135", "3891e308b9f44c5b5a8b59004a", "a027c28fbe22111fd4c8a226cfe8531c16d7790d561eca", "c33711544475a5b8a50c25099c8e8c1a9c744193f8b9ee019c359008adae3070b5a543ead0effb", "d9fc295082e8f48569eb073ac1b9566246728fc62ccaab4a5667c472c98b2626"), - TestFixture(16, "d34264a12c35cdd67ac105e2826b071e46f8131d1e325f8e0ae80a6447375135", "3891e308b9f44c5b5a8b59004a", "fa597e37c26c38694abdcf450f9edc529160fa0d651979", "9949adec383b8cce3b79486a5cf803541bc3c293cbbe5dbd099ab134756b90746762a92a4a9f7f", "7a459aadb48f1a528edae71fcf698b84ed64dc0e18cc23f27ab47eeabeaf833f"), - TestFixture(16, "d34264a12c35cdd67ac105e2826b071e46f8131d1e325f8e0ae80a6447375135", "3891e308b9f44c5b5a8b59004a", "9e4c8aa9b58a8eabc5586892f5541000b43f17d9a051a0", "fd5c59724fdd3a0cb49cefbda632cf063e9c2f470ef684fa4f6adfec85d055310107ba89198afa", "484207909dec4c35929ebe82fcacf20d2af6d850bd69364ebac9557adeadfbd4"), - TestFixture(16, "d34264a12c35cdd67ac105e2826b071e46f8131d1e325f8e0ae80a6447375135", "3891e308b9f44c5b5a8b59004a", "7d9582cf9e3bb9ee34dce965f56b08e716589486b0641c", "1e855114646c0d4945186e4aa60dd7e19cfbac181ec338915d23eb2e952afcc89fbddb567d9d75", "88b5448372548e6aab1b262630a28a471d285514703f1bdb10c695850e18fe6d"), - TestFixture(16, "d34264a12c35cdd67ac105e2826b071e46f8131d1e325f8e0ae80a6447375135", "3891e308b9f44c5b5a8b59004a", "5a387e7cc22491fc556fe6a0c060b4911d01f0c11f801e", "3928ada73873255b24ab618f93066b9797a2c85fb1273aaad6c31828314e24198f005955ca8f5e", "0e71863c2962244c7d1a28fc755f0c73e5cbd630a8dbdeb38842d7795d830d2e"), - TestFixture(16, "d34264a12c35cdd67ac105e2826b071e46f8131d1e325f8e0ae80a6447375135", "3891e308b9f44c5b5a8b59004a", "87946e910059cbaf48df63b220f397049c65ca10cd1920", "e484bd4afa0e7f08391be49d7395480216c6f28e63be04e531ebbadccfe47182b41904bbfebcfe", "2aa7a28da38c42fda2e578d9d6340cd8e80b9b32047c3db296d0640d517b0872"), - TestFixture(16, "d34264a12c35cdd67ac105e2826b071e46f8131d1e325f8e0ae80a6447375135", "3891e308b9f44c5b5a8b59004a", "c62f67d208f1c8ffd5d57df9de15ef54f97fbc07d1630a", "a53fb409f2a67c58a411fad68d73305273dc84997fc42e7c582414154236c09ee704cf4a5de411", "3382051c268891da04e6ca73adcead4029f6a1593be4acfe3968e7351a6a2fb5"), - TestFixture(16, "d34264a12c35cdd67ac105e2826b071e46f8131d1e325f8e0ae80a6447375135", "3891e308b9f44c5b5a8b59004a", "697e73eaaf562d31bdbf7ce9e78c7426fe1c87e421def9", "0a6ea03155019996cc7bfbc6b4eaab2074bfbf7a8f79dd57c9990029c89d1b37988745fa5737a3", "c352828b1920e53bbb60f2ea6a5f15639659e6f3243405c26f6e48628d5519a9"), - TestFixture(16, "4ad98dbef0fb2a188b6c49a859c920967214b998435a00b93d931b5acecaf976", "00d772b07788536b688ff2b84a", "9cea3b061e5c402d48497ea4948d75b8af7746d4e570c848", "f28ec535c2d834963c85814ec4173c0b8983dff8dc4a2d4e0f73bfb28ad42aa8f75f549a93594dd4", "5f8b1400920891e8057639618183c9c847821c1aae79f2a90d75f114db21e975"), - TestFixture(16, "4ad98dbef0fb2a188b6c49a859c920967214b998435a00b93d931b5acecaf976", "00d772b07788536b688ff2b84a", "2b223932fb2fd8433e4b1af9e8234a824569a141f6c96a69", "4546c70127abacf84a87e513b8b90331639d386dcff38f6f4de907a59c5e4d3f21e1348d7cdf92b6", "1ae8108f216defea65d9426da8f8746a3ae408e563d62203063d49bf7e0d6bdf"), - TestFixture(16, "4ad98dbef0fb2a188b6c49a859c920967214b998435a00b93d931b5acecaf976", "00d772b07788536b688ff2b84a", "4d57cbe4a7e780d4ed17267d5ebc91750c2f0209e0444bd2", "233335d77b63f46f99dbd9970e26d8c62adb9b25d97eaed4ff4239544e2f354d6c6837cd9c23b884", "460f08114b1015fe8b7a9b5dd1b9e6a3d28367c4bd15f29b13c02a8cb9a53968"), - TestFixture(16, "4ad98dbef0fb2a188b6c49a859c920967214b998435a00b93d931b5acecaf976", "00d772b07788536b688ff2b84a", "fda8665f87c618646a89c7abdca275fd10c31453ad4b9c99", "93cc986c5b426cdf1e4538418c383c4e36378d7f9471799f3f6c6f7cc494201069344e2d6d41bd9b", "860f4428259d9c5b17698cc95363db6cfee603258582e3a3e8feb886599d4ac4"), - TestFixture(16, "4ad98dbef0fb2a188b6c49a859c920967214b998435a00b93d931b5acecaf976", "00d772b07788536b688ff2b84a", "98104fd3f3413ad1f57ef4912cb50097dca379a58c47b0d2", "f674b1e02fc54e6a81b20b7b7c2f4924fa57e089b57d55d43787a15352cfceb028202c8730beaa7a", "1b43c482f83780c21583f88e5afcf6938edd20f21b74d895161b60c27a6a42f0"), - TestFixture(16, "4ad98dbef0fb2a188b6c49a859c920967214b998435a00b93d931b5acecaf976", "00d772b07788536b688ff2b84a", "b46b343e64d2d70e0bd909dbb3f6bedf7e4adc74321be526", "da0fca0db856a3b57f15f631e36cf76c58be45580b210020f3a0ca3da647eb31893e867956097983", "b082ccd964617c27a5607b7324faad237ee53acfc18c35502dbf7c1937a9dfcb"), - TestFixture(16, "4ad98dbef0fb2a188b6c49a859c920967214b998435a00b93d931b5acecaf976", "00d772b07788536b688ff2b84a", "8e12620bb575e6b167b085255b2b5631ff28e04cbef8826d", "e0769c3869f1920a137c7acf0bb11f82d9dc796087c2676be663fbbebbc251b9f1760afa49e89e71", "b8539ba93ef17254ec1d8d62e8f4eae4d41ee1e75345bf90c9cbb26c63bce501"), - TestFixture(16, "4ad98dbef0fb2a188b6c49a859c920967214b998435a00b93d931b5acecaf976", "00d772b07788536b688ff2b84a", "792aaa23b923d1b53173fe19853b9aa402a301d48529873e", "174e541065a7a50e45bf01f3d5a1d317245798f8bc136238da90cd87e9d9ca5d85430a150e682752", "b6b09463b5ef5ead1f17f4021693a0d8452e98dcbb8e7590f9fde6394970a6f8"), - TestFixture(16, "4ad98dbef0fb2a188b6c49a859c920967214b998435a00b93d931b5acecaf976", "00d772b07788536b688ff2b84a", "ddc5b4e48970ebd72869be6998e9103c014475e8ae6ea29c", "b3a14ad755f49f6c5ca54183c873598f27b0ecc49754479afc0cc4601afb61efa7059cfe49ec9dde", "390f6de14d5e1f2f78dbe757c00b89209d0cf8bc48cbbea035779f93de357905"), - TestFixture(16, "4ad98dbef0fb2a188b6c49a859c920967214b998435a00b93d931b5acecaf976", "00d772b07788536b688ff2b84a", "d2b66096c475a77648c27235e6972ba8f18761330d3c6adf", "bcd29ea518f1d3cd3c0e8ddfb60d621bd773f81f34068fd9cf7474962c3602dcfcb50039f43e3d6f", "1d75c9e7acb09932db332498d30f82e4009025cb1827047c59a8f97812b568a4") - ] - - func testEncrypt(fixture: TestFixture) -> Bool { - let aes = try! AES(key: fixture.key, blockMode: CCM(iv: fixture.nonce, tagLength: fixture.tagLength, messageLength: fixture.plaintext.count, additionalAuthenticatedData: fixture.aad), padding: .noPadding) - let encrypted = try! aes.encrypt(fixture.plaintext) - if encrypted != fixture.expected { - return false - } - return true - } - - func testDecrypt(fixture: TestFixture) -> Bool { - let aes = try! AES(key: fixture.key, blockMode: CCM(iv: fixture.nonce, tagLength: fixture.tagLength, messageLength: fixture.plaintext.count /*- fixture.tagLength*/, additionalAuthenticatedData: fixture.aad), padding: .noPadding) - let plaintext = try! aes.decrypt(fixture.expected) - if plaintext != fixture.plaintext { - return false - } - return true - } - - for (i, fixture) in fixtures.enumerated() { - XCTAssertTrue(testEncrypt(fixture: fixture), "Encryption failed") - XCTAssertTrue(testDecrypt(fixture: fixture), "(\(i) - Decryption failed.") - } - } - - func testAESCCMTestCase1() { - let key: Array = [0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f] - let nonce: Array = [0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16] - let aad: Array = [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07] - let plaintext: Array = [0x20, 0x21, 0x22, 0x23] - let expected: Array = [0x71, 0x62, 0x01, 0x5b, 0x4d, 0xac, 0x25, 0x5d] - - let aes = try! AES(key: key, blockMode: CCM(iv: nonce, tagLength: 4, messageLength: plaintext.count, additionalAuthenticatedData: aad), padding: .noPadding) - let encrypted = try! aes.encrypt(plaintext) - XCTAssertEqual(encrypted, expected, "encryption failed") - } - - func testAESCCMTestCase1Decrypt() { - let key: Array = [0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f] - let nonce: Array = [0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16] - let aad: Array = [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07] - let ciphertext: Array = [0x71, 0x62, 0x01, 0x5b, 0x4d, 0xac, 0x25, 0x5d] - let expected: Array = [0x20, 0x21, 0x22, 0x23] - - let aes = try! AES(key: key, blockMode: CCM(iv: nonce, tagLength: 4, messageLength: ciphertext.count - 4, additionalAuthenticatedData: aad), padding: .noPadding) - let decrypted = try! aes.decrypt(ciphertext) - XCTAssertEqual(decrypted, expected, "decryption failed") - } - - func testAESCCMTestCase2() { - let key: Array = [0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f] - let nonce: Array = [0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17] - let aad: Array = [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f] - let plaintext: Array = [0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f] - let expected: Array = [0xd2, 0xa1, 0xf0, 0xe0, 0x51, 0xea, 0x5f, 0x62, 0x08, 0x1a, 0x77, 0x92, 0x07, 0x3d, 0x59, 0x3d, 0x1f, 0xc6, 0x4f, 0xbf, 0xac, 0xcd] - - let aes = try! AES(key: key, blockMode: CCM(iv: nonce, tagLength: 6, messageLength: plaintext.count, additionalAuthenticatedData: aad), padding: .noPadding) - let encrypted = try! aes.encrypt(plaintext) - XCTAssertEqual(encrypted, expected, "encryption failed") - } - - func testAESCCMTestCase2Decrypt() { - let key: Array = [0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f] - let nonce: Array = [0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17] - let aad: Array = [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f] - let ciphertext: Array = [0xd2, 0xa1, 0xf0, 0xe0, 0x51, 0xea, 0x5f, 0x62, 0x08, 0x1a, 0x77, 0x92, 0x07, 0x3d, 0x59, 0x3d, 0x1f, 0xc6, 0x4f, 0xbf, 0xac, 0xcd] - let expected: Array = [0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f] - - let aes = try! AES(key: key, blockMode: CCM(iv: nonce, tagLength: 6, messageLength: ciphertext.count - 6, additionalAuthenticatedData: aad), padding: .noPadding) - let plaintext = try! aes.decrypt(ciphertext) - XCTAssertEqual(plaintext, expected, "encryption failed") - } - - func testAESCCMTestCase3() { - let key: Array = [0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f] - let nonce: Array = [0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b] - let aad: Array = [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13] - let plaintext: Array = [0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37] - let expected: Array = [0xe3, 0xb2, 0x01, 0xa9, 0xf5, 0xb7, 0x1a, 0x7a, 0x9b, 0x1c, 0xea, 0xec, 0xcd, 0x97, 0xe7, 0x0b, 0x61, 0x76, 0xaa, 0xd9, 0xa4, 0x42, 0x8a, 0xa5, 0x48, 0x43, 0x92, 0xfb, 0xc1, 0xb0, 0x99, 0x51] - - let aes = try! AES(key: key, blockMode: CCM(iv: nonce, tagLength: 8, messageLength: plaintext.count, additionalAuthenticatedData: aad), padding: .noPadding) - let encrypted = try! aes.encrypt(plaintext) - XCTAssertEqual(encrypted, expected, "encryption failed") - } - - func testAESCCMTestCase3Decrypt() { - let key: Array = [0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f] - let nonce: Array = [0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b] - let aad: Array = [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13] - let ciphertext: Array = [0xe3, 0xb2, 0x01, 0xa9, 0xf5, 0xb7, 0x1a, 0x7a, 0x9b, 0x1c, 0xea, 0xec, 0xcd, 0x97, 0xe7, 0x0b, 0x61, 0x76, 0xaa, 0xd9, 0xa4, 0x42, 0x8a, 0xa5, 0x48, 0x43, 0x92, 0xfb, 0xc1, 0xb0, 0x99, 0x51] - let expected: Array = [0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37] - - let aes = try! AES(key: key, blockMode: CCM(iv: nonce, tagLength: 8, messageLength: ciphertext.count - 8, additionalAuthenticatedData: aad), padding: .noPadding) - let plaintext = try! aes.decrypt(ciphertext) - XCTAssertEqual(plaintext, expected, "encryption failed") - } - - func testAESCCMTestCase3DecryptPartial() { - let key: Array = [0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f] - let nonce: Array = [0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b] - let aad: Array = [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13] - let ciphertext: Array = [0xe3, 0xb2, 0x01, 0xa9, 0xf5, 0xb7, 0x1a, 0x7a, 0x9b, 0x1c, 0xea, 0xec, 0xcd, 0x97, 0xe7, 0x0b, 0x61, 0x76, 0xaa, 0xd9, 0xa4, 0x42, 0x8a, 0xa5, 0x48, 0x43, 0x92, 0xfb, 0xc1, 0xb0, 0x99, 0x51] - let expected: Array = [0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37] - - let aes = try! AES(key: key, blockMode: CCM(iv: nonce, tagLength: 8, messageLength: ciphertext.count - 8, additionalAuthenticatedData: aad), padding: .noPadding) - var decryptor = try! aes.makeDecryptor() - - var plaintext = [UInt8]() - plaintext += try! decryptor.update(withBytes: Array(ciphertext[0..<2])) - plaintext += try! decryptor.update(withBytes: Array(ciphertext[2..<6])) - plaintext += try! decryptor.update(withBytes: Array(ciphertext[6..<32]), isLast: true) - XCTAssertEqual(plaintext, expected, "encryption failed") - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/AESOCBTests.swift b/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/AESOCBTests.swift deleted file mode 100644 index 30a651ccd..000000000 --- a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/AESOCBTests.swift +++ /dev/null @@ -1,154 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import Foundation -import XCTest -@testable import CryptoSwift - -final class OCBTests: XCTestCase { - - struct TestFixture { - let N: Array - let A: Array - let P: Array - let C: Array - } - - func testAESOCBWithRFC7253Tests() { - - let K = Array(hex: "000102030405060708090A0B0C0D0E0F") - - let fixtures = [ - TestFixture(N: Array(hex: "BBAA99887766554433221100"), - A: Array(hex: ""), - P: Array(hex: ""), - C: Array(hex: "785407BFFFC8AD9EDCC5520AC9111EE6")), - - TestFixture(N: Array(hex: "BBAA99887766554433221101"), - A: Array(hex: "0001020304050607"), - P: Array(hex: "0001020304050607"), - C: Array(hex: "6820B3657B6F615A5725BDA0D3B4EB3A257C9AF1F8F03009")), - - TestFixture(N: Array(hex: "BBAA99887766554433221102"), - A: Array(hex: "0001020304050607"), - P: Array(hex: ""), - C: Array(hex: "81017F8203F081277152FADE694A0A00")), - - TestFixture(N: Array(hex: "BBAA99887766554433221103"), - A: Array(hex: ""), - P: Array(hex: "0001020304050607"), - C: Array(hex: "45DD69F8F5AAE72414054CD1F35D82760B2CD00D2F99BFA9")), - - TestFixture(N: Array(hex: "BBAA99887766554433221104"), - A: Array(hex: "000102030405060708090A0B0C0D0E0F"), - P: Array(hex: "000102030405060708090A0B0C0D0E0F"), - C: Array(hex: "571D535B60B277188BE5147170A9A22C3AD7A4FF3835B8C5701C1CCEC8FC3358")), - - TestFixture(N: Array(hex: "BBAA99887766554433221105"), - A: Array(hex: "000102030405060708090A0B0C0D0E0F"), - P: Array(hex: ""), - C: Array(hex: "8CF761B6902EF764462AD86498CA6B97")), - - TestFixture(N: Array(hex: "BBAA99887766554433221106"), - A: Array(hex: ""), - P: Array(hex: "000102030405060708090A0B0C0D0E0F"), - C: Array(hex: "5CE88EC2E0692706A915C00AEB8B2396F40E1C743F52436BDF06D8FA1ECA343D")), - - TestFixture(N: Array(hex: "BBAA99887766554433221107"), - A: Array(hex: "000102030405060708090A0B0C0D0E0F1011121314151617"), - P: Array(hex: "000102030405060708090A0B0C0D0E0F1011121314151617"), - C: Array(hex: "1CA2207308C87C010756104D8840CE1952F09673A448A122C92C62241051F57356D7F3C90BB0E07F")), - - TestFixture(N: Array(hex: "BBAA99887766554433221108"), - A: Array(hex: "000102030405060708090A0B0C0D0E0F1011121314151617"), - P: Array(hex: ""), - C: Array(hex: "6DC225A071FC1B9F7C69F93B0F1E10DE")), - - TestFixture(N: Array(hex: "BBAA99887766554433221109"), - A: Array(hex: ""), - P: Array(hex: "000102030405060708090A0B0C0D0E0F1011121314151617"), - C: Array(hex: "221BD0DE7FA6FE993ECCD769460A0AF2D6CDED0C395B1C3CE725F32494B9F914D85C0B1EB38357FF")), - - TestFixture(N: Array(hex: "BBAA9988776655443322110A"), - A: Array(hex: "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F"), - P: Array(hex: "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F"), - C: Array(hex: "BD6F6C496201C69296C11EFD138A467ABD3C707924B964DEAFFC40319AF5A48540FBBA186C5553C68AD9F592A79A4240")), - - TestFixture(N: Array(hex: "BBAA9988776655443322110B"), - A: Array(hex: "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F"), - P: Array(hex: ""), - C: Array(hex: "FE80690BEE8A485D11F32965BC9D2A32")), - - TestFixture(N: Array(hex: "BBAA9988776655443322110C"), - A: Array(hex: ""), - P: Array(hex: "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F"), - C: Array(hex: "2942BFC773BDA23CABC6ACFD9BFD5835BD300F0973792EF46040C53F1432BCDFB5E1DDE3BC18A5F840B52E653444D5DF")), - - TestFixture(N: Array(hex: "BBAA9988776655443322110D"), - A: Array(hex: "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627"), - P: Array(hex: "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627"), - C: Array(hex: "D5CA91748410C1751FF8A2F618255B68A0A12E093FF454606E59F9C1D0DDC54B65E8628E568BAD7AED07BA06A4A69483A7035490C5769E60")), - - TestFixture(N: Array(hex: "BBAA9988776655443322110E"), - A: Array(hex: "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627"), - P: Array(hex: ""), - C: Array(hex: "C5CD9D1850C141E358649994EE701B68")), - - TestFixture(N: Array(hex: "BBAA9988776655443322110F"), - A: Array(hex: ""), - P: Array(hex: "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627"), - C: Array(hex: "4412923493C57D5DE0D700F753CCE0D1D2D95060122E9F15A5DDBFC5787E50B5CC55EE507BCB084E479AD363AC366B95A98CA5F3000B1479")), - ] - - func testEncrypt(fixture: TestFixture) -> Bool { - let ocb = OCB(nonce: fixture.N, additionalAuthenticatedData: fixture.A, mode: .combined) - let aes = try! AES(key: K, blockMode: ocb, padding: .noPadding) - let encrypted = try! aes.encrypt(fixture.P) - if encrypted != fixture.C { - return false - } - return true - } - - func testDecrypt(fixture: TestFixture) -> Bool { - let ocb = OCB(nonce: fixture.N, additionalAuthenticatedData: fixture.A, mode: .combined) - let aes = try! AES(key: K, blockMode: ocb, padding: .noPadding) - let plaintext = try! aes.decrypt(fixture.C) - if plaintext != fixture.P { - return false - } - return true - } - - func testInvalidTag(fixture: TestFixture) -> Bool { - let ocb = OCB(nonce: fixture.N, additionalAuthenticatedData: fixture.A, mode: .combined) - let aes = try! AES(key: K, blockMode: ocb, padding: .noPadding) - var C_ = fixture.C.slice - C_[C_.count - 1] ^= 0x01 - let plaintext = try? aes.decrypt(C_) - return plaintext == nil - } - - for (i, fixture) in fixtures.enumerated() { - XCTAssertTrue(testEncrypt(fixture: fixture), "Encryption failed") - XCTAssertTrue(testDecrypt(fixture: fixture), "(\(i) - Decryption failed.") - XCTAssertTrue(testInvalidTag(fixture: fixture), "(\(i) - Invalid Tag verification failed.") - } - } - - static let allTests = [ - ("testAESOCBWithRFC7253Tests", testAESOCBWithRFC7253Tests), - ] -} diff --git a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/AESTests.swift b/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/AESTests.swift deleted file mode 100644 index eb1e1cd85..000000000 --- a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/AESTests.swift +++ /dev/null @@ -1,700 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import Foundation -import XCTest -@testable import CryptoSwift - -final class AESTests: XCTestCase { - // 128 bit key - let aesKey: Array = [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f] - - func testAESEncrypt() { - let input: Array = [0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff] - let expected: Array = [0x69, 0xc4, 0xe0, 0xd8, 0x6a, 0x7b, 0x4, 0x30, 0xd8, 0xcd, 0xb7, 0x80, 0x70, 0xb4, 0xc5, 0x5a] - - let aes = try! AES(key: self.aesKey, blockMode: ECB(), padding: .noPadding) - let encrypted = try! aes.encrypt(input) - XCTAssertEqual(encrypted, expected, "encryption failed") - let decrypted = try! aes.decrypt(encrypted) - XCTAssertEqual(decrypted, input, "decryption failed") - } - - func testAESEncrypt2() { - let key: Array = [0x36, 0x37, 0x39, 0x66, 0x62, 0x31, 0x64, 0x64, 0x66, 0x37, 0x64, 0x38, 0x31, 0x62, 0x65, 0x65] - let iv: Array = [0x6b, 0x64, 0x66, 0x36, 0x37, 0x33, 0x39, 0x38, 0x44, 0x46, 0x37, 0x33, 0x38, 0x33, 0x66, 0x64] - let input: Array = [0x62, 0x72, 0x61, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00] - - let expected: Array = [0xae, 0x8c, 0x59, 0x95, 0xb2, 0x6f, 0x8e, 0x3d, 0xb0, 0x6f, 0x0a, 0xa5, 0xfe, 0xc4, 0xf0, 0xc2] - - let aes = try! AES(key: key, blockMode: CBC(iv: iv), padding: .noPadding) - do { - let encrypted = try aes.encrypt(input) - XCTAssertEqual(encrypted, expected, "encryption failed") - let decrypted = try aes.decrypt(encrypted) - XCTAssertEqual(decrypted, input, "decryption failed") - } catch { - XCTFail("\(error)") - } - } - - func testAESEncrypt3() { - let key = "679fb1ddf7d81bee" - let iv = "kdf67398DF7383fd" - let input: Array = [0x62, 0x72, 0x61, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00] - let expected: Array = [0xae, 0x8c, 0x59, 0x95, 0xb2, 0x6f, 0x8e, 0x3d, 0xb0, 0x6f, 0x0a, 0xa5, 0xfe, 0xc4, 0xf0, 0xc2] - - do { - let aes = try AES(key: key, iv: iv, padding: .noPadding) - let encrypted = try aes.encrypt(input) - XCTAssertEqual(encrypted, expected, "encryption failed") - let decrypted = try aes.decrypt(encrypted) - XCTAssertEqual(decrypted, input, "decryption failed") - } catch { - XCTFail("\(error)") - } - } - - func testAESEncryptCBCNoPadding() { - let key: Array = [0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c] - let iv: Array = [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f] - let plaintext: Array = [0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a] - let expected: Array = [0x76, 0x49, 0xab, 0xac, 0x81, 0x19, 0xb2, 0x46, 0xce, 0xe9, 0x8e, 0x9b, 0x12, 0xe9, 0x19, 0x7d] - - let aes = try! AES(key: key, blockMode: CBC(iv: iv), padding: .noPadding) - let encrypted = try! aes.encrypt(plaintext) - XCTAssertEqual(encrypted, expected, "encryption failed") - let decrypted = try! aes.decrypt(encrypted) - XCTAssertEqual(decrypted, plaintext, "decryption failed") - } - - func testAESEncryptCBCWithPadding() { - let key: Array = [0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c] - let iv: Array = [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f] - let plaintext: Array = [0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a] - let expected: Array = [0x76, 0x49, 0xab, 0xac, 0x81, 0x19, 0xb2, 0x46, 0xce, 0xe9, 0x8e, 0x9b, 0x12, 0xe9, 0x19, 0x7d, 0x89, 0x64, 0xe0, 0xb1, 0x49, 0xc1, 0x0b, 0x7b, 0x68, 0x2e, 0x6e, 0x39, 0xaa, 0xeb, 0x73, 0x1c] - - let aes = try! AES(key: key, blockMode: CBC(iv: iv), padding: .pkcs7) - let encrypted = try! aes.encrypt(plaintext) - XCTAssertEqual(encrypted, expected, "encryption failed") - let decrypted = try! aes.decrypt(encrypted) - XCTAssertEqual(decrypted, plaintext, "decryption failed") - } - - func testAESEncryptCBCWithPaddingPartial() { - let key: Array = [0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c] - let iv: Array = [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f] - let plaintext: Array = [0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a, 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a] - - let aes = try! AES(key: key, blockMode: CBC(iv: iv), padding: .pkcs7) - - var ciphertext = Array() - var encryptor = try! aes.makeEncryptor() - ciphertext += try! encryptor.update(withBytes: plaintext[0..<8]) - ciphertext += try! encryptor.update(withBytes: plaintext[8..<16]) - ciphertext += try! encryptor.update(withBytes: plaintext[16..<32]) - ciphertext += try! encryptor.finish() - XCTAssertEqual(try! aes.encrypt(plaintext), ciphertext, "encryption failed") - } - - func testAESEncryptIncremental() { - do { - var ciphertext = Array() - let plaintext = "Today Apple launched the open source Swift community, as well as amazing new tools and resources." - let aes = try AES(key: "passwordpassword".bytes, blockMode: CBC(iv: "drowssapdrowssap".bytes)) - var encryptor = try! aes.makeEncryptor() - - ciphertext += try encryptor.update(withBytes: plaintext.bytes) - ciphertext += try encryptor.finish() - XCTAssertEqual(try aes.encrypt(plaintext.bytes), ciphertext, "encryption failed") - } catch { - XCTFail("\(error)") - } - } - - func testAESDecryptCBCWithPaddingPartial() { - let key: Array = [0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c] - let iv: Array = [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f] - let ciphertext: Array = [118, 73, 171, 172, 129, 25, 178, 70, 206, 233, 142, 155, 18, 233, 25, 125, 76, 187, 200, 88, 117, 107, 53, 129, 37, 82, 158, 150, 152, 163, 143, 68, 169, 105, 137, 234, 93, 98, 239, 215, 41, 45, 51, 254, 138, 92, 251, 17] - - let aes = try! AES(key: key, blockMode: CBC(iv: iv), padding: .pkcs7) - var plaintext = Array() - var decryptor = try! aes.makeDecryptor() - plaintext += try! decryptor.update(withBytes: ciphertext[0..<8]) - plaintext += try! decryptor.update(withBytes: ciphertext[8..<16]) - plaintext += try! decryptor.update(withBytes: ciphertext[16..<32]) - plaintext += try! decryptor.finish() - XCTAssertEqual(try! aes.decrypt(ciphertext), plaintext, "encryption failed") - } - - func testAESEncryptCFB() { - let key: Array = [0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c] - let iv: Array = [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f] - let plaintext: Array = [0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a] - let expected: Array = [0x3b, 0x3f, 0xd9, 0x2e, 0xb7, 0x2d, 0xad, 0x20, 0x33, 0x34, 0x49, 0xf8, 0xe8, 0x3c, 0xfb, 0x4a] - - let aes = try! AES(key: key, blockMode: CFB(iv: iv), padding: .noPadding) - let encrypted = try! aes.encrypt(plaintext) - XCTAssertEqual(encrypted, expected, "encryption failed") - let decrypted = try! aes.decrypt(encrypted) - XCTAssertEqual(decrypted, plaintext, "decryption failed") - } - - // https://github.com/krzyzanowskim/CryptoSwift/issues/142 - func testAESEncryptCFBLong() { - let key: Array = [56, 118, 37, 51, 125, 78, 103, 107, 119, 40, 74, 88, 117, 112, 123, 75, 122, 89, 72, 36, 46, 91, 106, 60, 54, 110, 34, 126, 69, 126, 61, 87] - let iv: Array = [69, 122, 99, 87, 83, 112, 110, 65, 54, 109, 107, 89, 73, 122, 74, 49] - let plaintext: Array = [123, 10, 32, 32, 34, 67, 111, 110, 102, 105, 114, 109, 34, 32, 58, 32, 34, 116, 101, 115, 116, 105, 110, 103, 34, 44, 10, 32, 32, 34, 70, 105, 114, 115, 116, 78, 97, 109, 101, 34, 32, 58, 32, 34, 84, 101, 115, 116, 34, 44, 10, 32, 32, 34, 69, 109, 97, 105, 108, 34, 32, 58, 32, 34, 116, 101, 115, 116, 64, 116, 101, 115, 116, 46, 99, 111, 109, 34, 44, 10, 32, 32, 34, 76, 97, 115, 116, 78, 97, 109, 101, 34, 32, 58, 32, 34, 84, 101, 115, 116, 101, 114, 34, 44, 10, 32, 32, 34, 80, 97, 115, 115, 119, 111, 114, 100, 34, 32, 58, 32, 34, 116, 101, 115, 116, 105, 110, 103, 34, 44, 10, 32, 32, 34, 85, 115, 101, 114, 110, 97, 109, 101, 34, 32, 58, 32, 34, 84, 101, 115, 116, 34, 10, 125] - let encrypted: Array = try! AES(key: key, blockMode: CFB(iv: iv)).encrypt(plaintext) - let decrypted: Array = try! AES(key: key, blockMode: CFB(iv: iv)).decrypt(encrypted) - XCTAssert(decrypted == plaintext, "decryption failed") - } - - // https://github.com/krzyzanowskim/CryptoSwift/issues/500 - func testAESEncryptCFB8() { - let key: Array = [0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c] - let iv: Array = [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f] - let plaintext: Array = [0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a, 0xae, 0x2d] - let expected: Array = [0x3b, 0x79, 0x42, 0x4c, 0x9c, 0x0d, 0xd4, 0x36, 0xba, 0xce, 0x9e, 0x0e, 0xd4, 0x58, 0x6a, 0x4f, 0x32, 0xb9] - - let aes = try! AES(key: key, blockMode: CFB(iv: iv, segmentSize: .cfb8), padding: .noPadding) - let encrypted = try! aes.encrypt(plaintext) - XCTAssertEqual(encrypted, expected, "encryption failed") - let decrypted = try! aes.decrypt(encrypted) - XCTAssertEqual(decrypted, plaintext, "decryption failed") - } - - func testAESEncryptOFB128() { - let key: Array = [0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c] - let iv: Array = [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f] - let plaintext: Array = [0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a] - let expected: Array = [0x3b, 0x3f, 0xd9, 0x2e, 0xb7, 0x2d, 0xad, 0x20, 0x33, 0x34, 0x49, 0xf8, 0xe8, 0x3c, 0xfb, 0x4a] - - let aes = try! AES(key: key, blockMode: OFB(iv: iv), padding: .noPadding) - let encrypted = try! aes.encrypt(plaintext) - XCTAssertEqual(encrypted, expected, "encryption failed") - let decrypted = try! aes.decrypt(encrypted) - XCTAssertEqual(decrypted, plaintext, "decryption failed") - } - - func testAESEncryptOFB256() { - let key: Array = [0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe, 0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81, 0x1f, 0x35, 0x2c, 0x07, 0x3b, 0x61, 0x08, 0xd7, 0x2d, 0x98, 0x10, 0xa3, 0x09, 0x14, 0xdf, 0xf4] - let iv: Array = [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f] - let plaintext: Array = [0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a] - let expected: Array = [0xdc, 0x7e, 0x84, 0xbf, 0xda, 0x79, 0x16, 0x4b, 0x7e, 0xcd, 0x84, 0x86, 0x98, 0x5d, 0x38, 0x60] - - let aes = try! AES(key: key, blockMode: OFB(iv: iv), padding: .noPadding) - let encrypted = try! aes.encrypt(plaintext) - XCTAssertEqual(encrypted, expected, "encryption failed") - let decrypted = try! aes.decrypt(encrypted) - XCTAssertEqual(decrypted, plaintext, "decryption failed") - } - - func testAESEncryptPCBC256() { - let key: Array = [0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe, 0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81, 0x1f, 0x35, 0x2c, 0x07, 0x3b, 0x61, 0x08, 0xd7, 0x2d, 0x98, 0x10, 0xa3, 0x09, 0x14, 0xdf, 0xf4] - let iv: Array = [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f] - let plaintext: Array = [0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a] - let expected: Array = [0xf5, 0x8c, 0x4c, 0x04, 0xd6, 0xe5, 0xf1, 0xba, 0x77, 0x9e, 0xab, 0xfb, 0x5f, 0x7b, 0xfb, 0xd6] - - let aes = try! AES(key: key, blockMode: PCBC(iv: iv), padding: .noPadding) - let encrypted = try! aes.encrypt(plaintext) - print(encrypted.toHexString()) - XCTAssertEqual(encrypted, expected, "encryption failed") - let decrypted = try! aes.decrypt(encrypted) - XCTAssertEqual(decrypted, plaintext, "decryption failed") - } - - func testAESEncryptCTR() { - let key: Array = [0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c] - let iv: Array = [0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff] - let plaintext: Array = [0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a] - let expected: Array = [0x87, 0x4d, 0x61, 0x91, 0xb6, 0x20, 0xe3, 0x26, 0x1b, 0xef, 0x68, 0x64, 0x99, 0x0d, 0xb6, 0xce] - - let aes = try! AES(key: key, blockMode: CTR(iv: iv), padding: .noPadding) - let encrypted = try! aes.encrypt(plaintext) - XCTAssertEqual(encrypted.count, plaintext.count) - XCTAssertEqual(encrypted, expected, "encryption failed") - let decrypted = try! aes.decrypt(encrypted) - XCTAssertEqual(decrypted.count, plaintext.count) - XCTAssertEqual(decrypted, plaintext, "decryption failed") - } - - // https://github.com/krzyzanowskim/CryptoSwift/issues/424 - func testAESEncryptCTRZeroPadding() { - let key: Array = [0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c] - let iv: Array = [0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff] - let plaintext: Array = [0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a, 0x01] - let expected: Array = [0x87, 0x4d, 0x61, 0x91, 0xb6, 0x20, 0xe3, 0x26, 0x1b, 0xef, 0x68, 0x64, 0x99, 0x0d, 0xb6, 0xce, 0x37, 0x2b, 0x7c, 0x3c, 0x67, 0x73, 0x51, 0x63, 0x18, 0xa0, 0x77, 0xd7, 0xfc, 0x50, 0x73, 0xae] - - let aes = try! AES(key: key, blockMode: CTR(iv: iv), padding: .zeroPadding) - let encrypted = try! aes.encrypt(plaintext) - - XCTAssertEqual(plaintext.count, 17) - XCTAssertEqual(encrypted.count, 32, "padding failed") - XCTAssertEqual(encrypted, expected, "encryption failed") - } - - func testAESEncryptCTRIrregularLength() { - let key: Array = [0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c] - let iv: Array = [0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff] - let plaintext: Array = [0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a, 0x01] - let expected: Array = [0x87, 0x4d, 0x61, 0x91, 0xb6, 0x20, 0xe3, 0x26, 0x1b, 0xef, 0x68, 0x64, 0x99, 0x0d, 0xb6, 0xce, 0x37] - - let aes = try! AES(key: key, blockMode: CTR(iv: iv), padding: .noPadding) - let encrypted = try! aes.encrypt(plaintext) - XCTAssertEqual(encrypted, expected, "encryption failed") - let decrypted = try! aes.decrypt(encrypted) - XCTAssertEqual(decrypted, plaintext, "decryption failed") - } - - // https://github.com/krzyzanowskim/CryptoSwift/pull/290 - func testAESDecryptCTRSeek() { - let key: Array = [0x52, 0x72, 0xb5, 0x9c, 0xab, 0x07, 0xc5, 0x01, 0x11, 0x7a, 0x39, 0xb6, 0x10, 0x35, 0x87, 0x02] - let iv: Array = [0x00, 0x01, 0x02, 0x03, 0x00, 0x01, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01] - var plaintext: Array = Array(repeating: 0, count: 6000) - - for i in 0.. = [0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c] - let iv: Array = [0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff] - let plaintext: Array = [0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a, 0x01, 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a, 0x01] - let expected: Array = [0x87, 0x4d, 0x61, 0x91, 0xb6, 0x20, 0xe3, 0x26, 0x1b, 0xef, 0x68, 0x64, 0x99, 0xd, 0xb6, 0xce, 0x37, 0x40, 0xbd, 0x82, 0x85, 0x5d, 0x11, 0xfc, 0x8e, 0x49, 0x4a, 0xa9, 0xed, 0x23, 0xe0, 0xb9, 0x40, 0x2d] - - let aes = try! AES(key: key, blockMode: CTR(iv: iv), padding: .noPadding) - var encryptor = try! aes.makeEncryptor() - var encrypted = Array() - encrypted += try! encryptor.update(withBytes: plaintext[0..<5]) - encrypted += try! encryptor.update(withBytes: plaintext[5..<15]) - encrypted += try! encryptor.update(withBytes: plaintext[15...]) - encrypted += try! encryptor.finish() - XCTAssertEqual(encrypted, expected, "encryption failed") - - var decryptor = try! aes.makeDecryptor() - var decrypted = Array() - decrypted += try! decryptor.update(withBytes: expected[0..<5]) - decrypted += try! decryptor.update(withBytes: expected[5..<15]) - decrypted += try! decryptor.update(withBytes: expected[15...]) - decrypted += try! decryptor.finish() - XCTAssertEqual(decrypted, plaintext, "decryption failed") - } - - func testAESEncryptCTRStream() { - let key = Array(hex: "0xbe3e9020816eb838782e2d9f4a2f40d4") - let iv = Array(hex: "0x0000000000000000a9bbd681ded0c0c8") - - do { - let aes = try AES(key: key, blockMode: CTR(iv: iv), padding: .noPadding) - var encryptor = try aes.makeEncryptor() - - let encrypted1 = try encryptor.update(withBytes: [0x00, 0x01, 0x02, 0x03] as [UInt8]) - XCTAssertEqual(encrypted1, Array(hex: "d79d0344")) - let encrypted2 = try encryptor.update(withBytes: [0x04, 0x05, 0x06, 0x07] as [UInt8]) - XCTAssertEqual(encrypted2, Array(hex: "b2a08879")) - let encrypted3 = try encryptor.update(withBytes: [0x08] as [UInt8]) - XCTAssertEqual(encrypted3, Array(hex: "db")) - } catch { - XCTFail(error.localizedDescription) - } - } - - func testAESWithWrongKey() { - let key: Array = [0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c] - let key2: Array = [0x22, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x33] - let iv: Array = [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f] - let plaintext: Array = [49, 46, 50, 50, 50, 51, 51, 51, 51] - - let aes = try! AES(key: key, blockMode: CBC(iv: iv), padding: .pkcs7) - let aes2 = try! AES(key: key2, blockMode: CBC(iv: iv), padding: .pkcs7) - let encrypted = try! aes.encrypt(plaintext) - let decrypted = try? aes2.decrypt(encrypted) - XCTAssertTrue(decrypted! != plaintext, "failed") - } - - // https://github.com/krzyzanowskim/CryptoSwift/issues/298 - func testIssue298() { - let encryptedValue = "47595cfa90f7b0b0e0d9d7240a2e035f7f4acde27d7ca778a7d8b05add32a0a92d945c0a59f7f0e029d7f2fbb258b2f0" - let expected: Array = [55, 52, 98, 54, 53, 51, 101, 51, 54, 52, 51, 48, 100, 55, 97, 57, 99, 100, 57, 49, 97, 50, 52, 100, 57, 57, 52, 52, 98, 48, 51, 50, 79, 114, 70, 101, 99, 107, 114, 87, 111, 0, 0, 0, 0, 0, 0, 0] - let key = "0123456789abcdef" - let iv = "fedcba9876543210" - - do { - let aes = try AES(key: key, iv: iv, padding: .noPadding) - let ciphertext = try aes.decrypt(Array(hex: encryptedValue)) - XCTAssertEqual(ciphertext, expected) - } catch { - XCTFail("failed") - } - } - - // https://github.com/krzyzanowskim/CryptoSwift/issues/394 - func testIssue394() { - let plaintext = "Nullam quis risus eget urna mollis ornare vel eu leo.".bytes - let key = "passwordpassword".bytes.md5() // -md md5 - let iv = "drowssapdrowssap".bytes // -iv 64726f777373617064726f7773736170 - let aes = try! AES(key: key, blockMode: CBC(iv: iv), padding: .pkcs7) // -aes-128-cbc - let ciphertext = try! aes.encrypt(plaintext) // enc - - // $ echo -n "Nullam quis risus eget urna mollis ornare vel eu leo." | openssl enc -aes-128-cbc -md md5 -nosalt -iv 64726f777373617064726f7773736170 -pass pass:passwordpassword -base64 - // cij+965z2Xqoj9tIHgtA72ZPfv5sxnt76vwkIt1CodYY313oa7mr0pSc5o++g0CX - // YczxK2fGIa84xtwDtRMwBQ== - XCTAssertEqual(ciphertext.toBase64(), "cij+965z2Xqoj9tIHgtA72ZPfv5sxnt76vwkIt1CodYY313oa7mr0pSc5o++g0CXYczxK2fGIa84xtwDtRMwBQ==") - } - - // https://github.com/krzyzanowskim/CryptoSwift/issues/411 - func testIssue411() { - let ciphertext: Array = [0x2a, 0x3a, 0x80, 0x05, 0xaf, 0x46, 0x58, 0x2d, 0x66, 0x52, 0x10, 0xae, 0x86, 0xd3, 0x8e, 0x8f] // test - let key = "passwordpassword".bytes.md5() // -md md5 - let iv = "drowssapdrowssap".bytes // -iv 64726f777373617064726f7773736170 - let aes = try! AES(key: key, blockMode: CBC(iv: iv), padding: .pkcs7) // -aes-128-cbc - let plaintext = try! ciphertext.decrypt(cipher: aes) - XCTAssertEqual("74657374", plaintext.toHexString()) - } -} - -// MARK: - GCM - -extension AESTests { - func testAESGCMTestCase1() { - // Test Case 1 - let key = Array(hex: "0x00000000000000000000000000000000") - let iv = Array(hex: "0x000000000000000000000000") - - let gcm = GCM(iv: iv, mode: .detached) - let aes = try! AES(key: key, blockMode: gcm, padding: .noPadding) - let encrypted = try! aes.encrypt([UInt8]()) - XCTAssertEqual(Array(encrypted), [UInt8](hex: "")) // C - XCTAssertEqual(gcm.authenticationTag, [UInt8](hex: "58e2fccefa7e3061367f1d57a4e7455a")) // T (128-bit) - } - - func testAESGCMTestCase2() { - // Test Case 2 - let key = Array(hex: "0x00000000000000000000000000000000") - let plaintext = Array(hex: "0x00000000000000000000000000000000") - let iv = Array(hex: "0x000000000000000000000000") - - let gcm = GCM(iv: iv, mode: .detached) - let aes = try! AES(key: key, blockMode: gcm, padding: .noPadding) - let encrypted = try! aes.encrypt(plaintext) - XCTAssertEqual(Array(encrypted), [UInt8](hex: "0388dace60b6a392f328c2b971b2fe78")) // C - XCTAssertEqual(gcm.authenticationTag, [UInt8](hex: "ab6e47d42cec13bdf53a67b21257bddf")) // T (128-bit) - } - - func testAESGCMTestCase3() { - // Test Case 3 - let key = Array(hex: "0xfeffe9928665731c6d6a8f9467308308") - let plaintext = Array(hex: "0xd9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b391aafd255") - let iv = Array(hex: "0xcafebabefacedbaddecaf888") - - let encGCM = GCM(iv: iv, mode: .detached) - let aes = try! AES(key: key, blockMode: encGCM, padding: .noPadding) - let encrypted = try! aes.encrypt(plaintext) - - XCTAssertNotNil(encGCM.authenticationTag) - XCTAssertEqual(Array(encrypted), [UInt8](hex: "0x42831ec2217774244b7221b784d0d49ce3aa212f2c02a4e035c17e2329aca12e21d514b25466931c7d8f6a5aac84aa051ba30b396a0aac973d58e091473f5985")) // C - XCTAssertEqual(encGCM.authenticationTag, [UInt8](hex: "0x4d5c2af327cd64a62cf35abd2ba6fab4")) // T (128-bit) - - // decrypt - func decrypt(_ encrypted: Array, tag: Array) -> Array { - let decGCM = GCM(iv: iv, authenticationTag: tag, mode: .detached) - let aes = try! AES(key: key, blockMode: decGCM, padding: .noPadding) - return try! aes.decrypt(encrypted) - } - - let decrypted = decrypt(encrypted, tag: encGCM.authenticationTag!) - XCTAssertEqual(decrypted, plaintext) - } - - func testAESGCMTestCase3Combined() { - // Test Case 3 - let key = Array(hex: "0xfeffe9928665731c6d6a8f9467308308") - let plaintext = Array(hex: "0xd9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b391aafd255") - let iv = Array(hex: "0xcafebabefacedbaddecaf888") - - let encGCM = GCM(iv: iv, mode: .combined) - let aes = try! AES(key: key, blockMode: encGCM, padding: .noPadding) - let encrypted = try! aes.encrypt(plaintext) - - XCTAssertNotNil(encGCM.authenticationTag) - XCTAssertEqual(Array(encrypted), [UInt8](hex: "0x42831ec2217774244b7221b784d0d49ce3aa212f2c02a4e035c17e2329aca12e21d514b25466931c7d8f6a5aac84aa051ba30b396a0aac973d58e091473f59854d5c2af327cd64a62cf35abd2ba6fab4")) // C - XCTAssertEqual(encGCM.authenticationTag, [UInt8](hex: "0x4d5c2af327cd64a62cf35abd2ba6fab4")) // T (128-bit) - - // decrypt - func decrypt(_ encrypted: Array) -> Array { - let decGCM = GCM(iv: iv, mode: .combined) - let aes = try! AES(key: key, blockMode: decGCM, padding: .noPadding) - return try! aes.decrypt(encrypted) - } - - let decrypted = decrypt(encrypted) - XCTAssertEqual(decrypted, plaintext) - } - - func testAESGCMTestCase4() { - // Test Case 4 - let key = Array(hex: "0xfeffe9928665731c6d6a8f9467308308") - let plaintext = Array(hex: "0xd9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39") - let iv = Array(hex: "0xcafebabefacedbaddecaf888") - let auth = Array(hex: "0xfeedfacedeadbeeffeedfacedeadbeefabaddad2") - - let gcm = GCM(iv: iv, additionalAuthenticatedData: auth, mode: .detached) - let aes = try! AES(key: key, blockMode: gcm, padding: .noPadding) - let encrypted = try! aes.encrypt(plaintext) - - XCTAssertEqual(Array(encrypted), [UInt8](hex: "0x42831ec2217774244b7221b784d0d49ce3aa212f2c02a4e035c17e2329aca12e21d514b25466931c7d8f6a5aac84aa051ba30b396a0aac973d58e091")) // C - XCTAssertEqual(gcm.authenticationTag, [UInt8](hex: "0x5bc94fbc3221a5db94fae95ae7121a47")) // T (128-bit) - } - - func testAESGCMTestCase5() { - // Test Case 5 - let key = Array(hex: "0xfeffe9928665731c6d6a8f9467308308") - let plaintext = Array(hex: "0xd9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39") - let iv = Array(hex: "0xcafebabefacedbad") - let auth = Array(hex: "0xfeedfacedeadbeeffeedfacedeadbeefabaddad2") - - let gcm = GCM(iv: iv, additionalAuthenticatedData: auth, mode: .detached) - let aes = try! AES(key: key, blockMode: gcm, padding: .noPadding) - let encrypted = try! aes.encrypt(plaintext) - - XCTAssertEqual(Array(encrypted), [UInt8](hex: "0x61353b4c2806934a777ff51fa22a4755699b2a714fcdc6f83766e5f97b6c742373806900e49f24b22b097544d4896b424989b5e1ebac0f07c23f4598")) // C - XCTAssertEqual(gcm.authenticationTag, [UInt8](hex: "0x3612d2e79e3b0785561be14aaca2fccb")) // T (128-bit) - } - - func testAESGCMTestCase6() { - // Test Case 6 - let key = Array(hex: "0xfeffe9928665731c6d6a8f9467308308") - let plaintext = Array(hex: "0xd9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39") - let iv = Array(hex: "0x9313225df88406e555909c5aff5269aa6a7a9538534f7da1e4c303d2a318a728c3c0c95156809539fcf0e2429a6b525416aedbf5a0de6a57a637b39b") - let auth = Array(hex: "0xfeedfacedeadbeeffeedfacedeadbeefabaddad2") - - let gcm = GCM(iv: iv, additionalAuthenticatedData: auth, mode: .detached) - let aes = try! AES(key: key, blockMode: gcm, padding: .noPadding) - let encrypted = try! aes.encrypt(plaintext) - - XCTAssertEqual(Array(encrypted), [UInt8](hex: "0x8ce24998625615b603a033aca13fb894be9112a5c3a211a8ba262a3cca7e2ca701e4a9a4fba43c90ccdcb281d48c7c6fd62875d2aca417034c34aee5")) // C - XCTAssertEqual(gcm.authenticationTag, [UInt8](hex: "0x619cc5aefffe0bfa462af43c1699d050")) // T (128-bit) - } - - func testAESGCMTestCase7() { - // Test Case 7 - let key = Array(hex: "0x000000000000000000000000000000000000000000000000") - let plaintext = Array(hex: "") - let iv = Array(hex: "0x000000000000000000000000") - - let gcm = GCM(iv: iv, mode: .detached) - let aes = try! AES(key: key, blockMode: gcm, padding: .noPadding) - let encrypted = try! aes.encrypt(plaintext) - - XCTAssertEqual(Array(encrypted), [UInt8](hex: "")) // C - XCTAssertEqual(gcm.authenticationTag, [UInt8](hex: "0xcd33b28ac773f74ba00ed1f312572435")) // T (128-bit) - } - - func testAESGCMTagLengthDetached() { - // Test Case 2 - let key = Array(hex: "0x00000000000000000000000000000000") - let plaintext = Array(hex: "0x00000000000000000000000000000000") - let iv = Array(hex: "0x000000000000000000000000") - - let gcm = GCM(iv: iv, tagLength: 12, mode: .detached) - let aes = try! AES(key: key, blockMode: gcm, padding: .noPadding) - let encrypted = try! aes.encrypt(plaintext) - XCTAssertEqual(Array(encrypted), [UInt8](hex: "0388dace60b6a392f328c2b971b2fe78")) // C - XCTAssertEqual(gcm.authenticationTag, [UInt8](hex: "ab6e47d42cec13bdf53a67b2")) // T (96-bit) - - // decrypt - func decrypt(_ encrypted: Array) -> Array { - let decGCM = GCM(iv: iv, authenticationTag: gcm.authenticationTag!, mode: .detached) - let aes = try! AES(key: key, blockMode: decGCM, padding: .noPadding) - return try! aes.decrypt(encrypted) - } - - let decrypted = decrypt(encrypted) - XCTAssertEqual(decrypted, plaintext) - } - - func testAESGCMTagLengthCombined() { - // Test Case 2 - let key = Array(hex: "0x00000000000000000000000000000000") - let plaintext = Array(hex: "0x00000000000000000000000000000000") - let iv = Array(hex: "0x000000000000000000000000") - - let gcm = GCM(iv: iv, tagLength: 12, mode: .combined) - let aes = try! AES(key: key, blockMode: gcm, padding: .noPadding) - let encrypted = try! aes.encrypt(plaintext) - XCTAssertEqual(Array(encrypted), [UInt8](hex: "0388dace60b6a392f328c2b971b2fe78ab6e47d42cec13bdf53a67b2")) // C - XCTAssertEqual(gcm.authenticationTag, [UInt8](hex: "ab6e47d42cec13bdf53a67b2")) // T (96-bit) - - // decrypt - func decrypt(_ encrypted: Array) -> Array { - let decGCM = GCM(iv: iv, authenticationTag: gcm.authenticationTag!, mode: .combined) - let aes = try! AES(key: key, blockMode: decGCM, padding: .noPadding) - return try! aes.decrypt(encrypted) - } - - let decrypted = decrypt(encrypted) - XCTAssertEqual(decrypted, plaintext) - } - - func testAESGCMTagLengthCombined2() { - let key = Array(hex: "0x00000000000000000000000000000000") - let plaintext = Array(hex: "0x0000000000000000000000000000000000000000") - let iv = Array(hex: "0x000000000000") - - let gcm = GCM(iv: iv, tagLength: 12, mode: .combined) - let aes = try! AES(key: key, blockMode: gcm, padding: .noPadding) - let encrypted = try! aes.encrypt(plaintext) - - // decrypt - func decrypt(_ encrypted: Array) -> Array { - let decGCM = GCM(iv: iv, authenticationTag: gcm.authenticationTag!, mode: .combined) - let aes = try! AES(key: key, blockMode: decGCM, padding: .noPadding) - return try! aes.decrypt(encrypted) - } - - let decrypted = decrypt(encrypted) - XCTAssertEqual(decrypted, plaintext) - } - - func testAESGCMTestCaseIrregularCombined1() { - // echo -n "0123456789010123456789012345" | openssl enc -aes-128-gcm -K feffe9928665731c6d6a8f9467308308 -iv cafebabefacedbaddecaf888 -nopad -nosalt - // openssl note: The enc program does not support authenticated encryption modes like CCM and GCM. The utility does not store or retrieve the authentication tag - let key = Array(hex: "0xfeffe9928665731c6d6a8f9467308308") - let plaintext = "0123456789010123456789012345".bytes - let iv = Array(hex: "0xcafebabefacedbaddecaf888") - - let encGCM = GCM(iv: iv, mode: .combined) - let aes = try! AES(key: key, blockMode: encGCM, padding: .noPadding) - let encrypted = try! aes.encrypt(plaintext) - - XCTAssertNotNil(encGCM.authenticationTag) - XCTAssertEqual(Array(encrypted), [UInt8](hex: "0xab831ed4edc644f6d61218431b14c0355138be4b010f630b29be7a2b9793b9fbecc7b44cc86dfd697a50c1c6")) // C - XCTAssertEqual(encGCM.authenticationTag, [UInt8](hex: "0x9793b9fbecc7b44cc86dfd697a50c1c6")) // T (128-bit) - - // decrypt - func decrypt(_ encrypted: Array) -> Array { - let decGCM = GCM(iv: iv, mode: .combined) - let aes = try! AES(key: key, blockMode: decGCM, padding: .noPadding) - return try! aes.decrypt(encrypted) - } - - let decrypted = decrypt(encrypted) - XCTAssertEqual(decrypted, plaintext) - } - - func testAESGCMTestCaseIrregularCombined2() { - // echo -n "0123456789010123456789012345012345678901012345678901234567" | openssl enc -aes-128-gcm -K feffe9928665731c6d6a8f9467308308 -iv cafebabefacedbaddecaf888 -nopad -nosalt - // openssl note: The enc program does not support authenticated encryption modes like CCM and GCM. The utility does not store or retrieve the authentication tag - let key = Array(hex: "0xfeffe9928665731c6d6a8f9467308308") - let plaintext = "0123456789010123456789012345012345678901012345678901234567".bytes - let iv = Array(hex: "0xcafebabefacedbaddecaf888") - - let encGCM = GCM(iv: iv, mode: .combined) - let aes = try! AES(key: key, blockMode: encGCM, padding: .noPadding) - let encrypted = try! aes.encrypt(plaintext) - - XCTAssertNotNil(encGCM.authenticationTag) - XCTAssertEqual(Array(encrypted), [UInt8](hex: "0xab831ed4edc644f6d61218431b14c0355138be4b010f630b29be7a2b93ac196f09dc2e10f937aa7e6271564dd117291792f0d6fdf2347ef5b10c86a7f414f0c91a8e59fd2405b850527e")) // C - XCTAssertEqual(encGCM.authenticationTag, [UInt8](hex: "0x86a7f414f0c91a8e59fd2405b850527e")) // T (128-bit) - - // decrypt - func decrypt(_ encrypted: Array) -> Array { - let decGCM = GCM(iv: iv, mode: .combined) - let aes = try! AES(key: key, blockMode: decGCM, padding: .noPadding) - return try! aes.decrypt(encrypted) - } - - let decrypted = decrypt(encrypted) - XCTAssertEqual(decrypted, plaintext) - } -} - -extension AESTests { - static func allTests() -> [(String, (AESTests) -> () -> Void)] { - let tests = [ - ("testAESEncrypt", testAESEncrypt), - ("testAESEncrypt2", testAESEncrypt2), - ("testAESEncrypt3", testAESEncrypt3), - ("testAESEncryptCBCNoPadding", testAESEncryptCBCNoPadding), - ("testAESEncryptCBCWithPadding", testAESEncryptCBCWithPadding), - ("testAESEncryptCBCWithPaddingPartial", testAESEncryptCBCWithPaddingPartial), - ("testAESEncryptIncremental", testAESEncryptIncremental), - ("testAESDecryptCBCWithPaddingPartial", testAESDecryptCBCWithPaddingPartial), - ("testAESEncryptCFB", testAESEncryptCFB), - ("testAESEncryptCFBLong", testAESEncryptCFBLong), - ("testAESEncryptCFB8", testAESEncryptCFB8), - ("testAESEncryptOFB128", testAESEncryptOFB128), - ("testAESEncryptOFB256", testAESEncryptOFB256), - ("testAESEncryptPCBC256", testAESEncryptPCBC256), - ("testAESEncryptCTR", testAESEncryptCTR), - ("testAESEncryptCTRZeroPadding", testAESEncryptCTRZeroPadding), - ("testAESEncryptCTRIrregularLength", testAESEncryptCTRIrregularLength), - ("testAESDecryptCTRSeek", testAESDecryptCTRSeek), - ("testAESEncryptCTRIrregularLengthIncrementalUpdate", testAESEncryptCTRIrregularLengthIncrementalUpdate), - ("testAESEncryptCTRStream", testAESEncryptCTRStream), - ("testIssue298", testIssue298), - ("testIssue394", testIssue394), - ("testIssue411", testIssue411), - ("testAESWithWrongKey", testAESWithWrongKey), - ("testAESGCMTestCase1", testAESGCMTestCase1), - ("testAESGCMTestCase2", testAESGCMTestCase2), - ("testAESGCMTestCase3", testAESGCMTestCase3), - ("testAESGCMTestCase3Combined", testAESGCMTestCase3Combined), - ("testAESGCMTestCase4", testAESGCMTestCase4), - ("testAESGCMTestCase5", testAESGCMTestCase5), - ("testAESGCMTestCase6", testAESGCMTestCase6), - ("testAESGCMTestCase7", testAESGCMTestCase7), - ("testAESGCMTestTagLengthDetached", testAESGCMTagLengthDetached), - ("testAESGCMTestTagLengthCombined", testAESGCMTagLengthCombined), - ("testAESGCMTestCaseIrregularCombined1", testAESGCMTestCaseIrregularCombined1), - ("testAESGCMTestCaseIrregularCombined2", testAESGCMTestCaseIrregularCombined2) - ] - return tests - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/AESTestsPerf.swift b/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/AESTestsPerf.swift deleted file mode 100644 index 9bc0bee37..000000000 --- a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/AESTestsPerf.swift +++ /dev/null @@ -1,50 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import Foundation -import XCTest -@testable import CryptoSwift - -final class AESTestsPerf: XCTestCase { - func testAESEncryptPerformance() { - let key: Array = [0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c] - let iv: Array = [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f] - let message = Array(repeating: 7, count: 1024 * 1024) - let aes = try! AES(key: key, blockMode: CBC(iv: iv), padding: .pkcs7) - measure { - _ = try! aes.encrypt(message) - } - } - - func testAESDecryptPerformance() { - let key: Array = [0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c] - let iv: Array = [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f] - let message = Array(repeating: 7, count: 1024 * 1024) - let aes = try! AES(key: key, blockMode: CBC(iv: iv), padding: .pkcs7) - measure { - _ = try! aes.decrypt(message) - } - } -} - -extension AESTestsPerf { - static func allTests() -> [(String, (AESTestsPerf) -> () -> Void)] { - let tests = [ - ("testAESEncryptPerformance", testAESEncryptPerformance), - ("testAESDecryptPerformance", testAESDecryptPerformance) - ] - return tests - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/Access.swift b/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/Access.swift deleted file mode 100644 index 1d767f942..000000000 --- a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/Access.swift +++ /dev/null @@ -1,294 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// import without @testable to test public API -import CryptoSwift -import Foundation -import XCTest - -class Access: XCTestCase { - let cipher = try! AES(key: "secret0key000000", iv: "0123456789012345") - let authenticator = HMAC(key: Array(hex: "b1b2b3b3b3b3b3b3b1b2b3b3b3b3b3b3"), variant: .sha1) - - func testChecksum() { - _ = Checksum.crc32([1, 2, 3]) - _ = Checksum.crc32c([1, 2, 3]) - _ = Checksum.crc16([1, 2, 3]) - } - - func testRandomIV() { - _ = AES.randomIV(AES.blockSize) - _ = ChaCha20.randomIV(ChaCha20.blockSize) - } - - func testDigest() { - _ = Digest.md5([1, 2, 3]) - _ = Digest.sha1([1, 2, 3]) - _ = Digest.sha224([1, 2, 3]) - _ = Digest.sha256([1, 2, 3]) - _ = Digest.sha384([1, 2, 3]) - _ = Digest.sha512([1, 2, 3]) - _ = Digest.sha3([1, 2, 3], variant: .sha224) - - _ = SHA1().calculate(for: [0]) - _ = SHA2(variant: .sha224).calculate(for: [0]) - _ = SHA3(variant: .sha256).calculate(for: [0]) - - _ = MD5().calculate(for: [0]) - } - - func testArrayExtension() { - let array = Array(hex: "b1b2b3b3b3b3b3b3b1b2b3b3b3b3b3b3") - _ = array.toHexString() - - _ = array.md5() - _ = array.sha1() - _ = array.sha256() - _ = array.sha384() - _ = array.sha512() - _ = array.sha2(.sha224) - _ = array.sha3(.sha224) - _ = array.crc32() - _ = array.crc32c() - _ = array.crc16() - - do { - _ = try array.encrypt(cipher: self.cipher) - _ = try array.decrypt(cipher: self.cipher) - _ = try array.authenticate(with: self.authenticator) - } catch { - XCTFail(error.localizedDescription) - } - } - - func testCollectionExtension() { - // nothing public - } - - func testStringExtension() { - let string = "foofoobarbar" - _ = string.md5() - _ = string.sha1() - _ = string.sha224() - _ = string.sha256() - _ = string.sha384() - _ = string.sha512() - _ = string.sha3(.sha224) - _ = string.crc16() - _ = string.crc32() - _ = string.crc32c() - - do { - _ = try string.encrypt(cipher: self.cipher) - _ = try string.authenticate(with: self.authenticator) - } catch { - XCTFail(error.localizedDescription) - } - } - - func testStringFoundationExtension() { - let string = "aPf/i9th9iX+vf49eR7PYk2q7S5xmm3jkRLejgzHNJs=" - do { - _ = try string.decryptBase64ToString(cipher: self.cipher) - _ = try string.decryptBase64(cipher: self.cipher) - } catch { - XCTFail(error.localizedDescription) - } - } - - func testIntExtension() { - // nothing public - } - - func testUInt16Extension() { - // nothing public - } - - func testUInt32Extension() { - // nothing public - } - - func testUInt64Extension() { - // nothing public - } - - func testUInt8Extension() { - // nothing public - } - - func testDataExtension() { - let data = Data( [1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8]) - _ = data.checksum() - _ = data.md5() - _ = data.sha1() - _ = data.sha224() - _ = data.sha256() - _ = data.sha384() - _ = data.sha512() - _ = data.sha3(.sha224) - _ = data.crc16() - _ = data.crc32() - _ = data.crc32c() - - _ = data.bytes - _ = data.toHexString() - - do { - _ = try data.encrypt(cipher: self.cipher) - _ = try data.decrypt(cipher: self.cipher) - _ = try data.authenticate(with: self.authenticator) - } catch { - XCTFail(error.localizedDescription) - } - } - - func testPadding() { - // PKCS7 - _ = Padding.pkcs7.add(to: [1, 2, 3], blockSize: 16) - _ = Padding.pkcs7.remove(from: [1, 2, 3], blockSize: 16) - - // PKCS5 - _ = Padding.pkcs5.add(to: [1, 2, 3], blockSize: 16) - _ = Padding.pkcs5.remove(from: [1, 2, 3], blockSize: 16) - - // NoPadding - _ = Padding.noPadding.add(to: [1, 2, 3], blockSize: 16) - _ = Padding.noPadding.remove(from: [1, 2, 3], blockSize: 16) - - // ZeroPadding - _ = Padding.zeroPadding.add(to: [1, 2, 3], blockSize: 16) - _ = Padding.zeroPadding.remove(from: [1, 2, 3], blockSize: 16) - } - - func testPBKDF() { - do { - _ = PKCS5.PBKDF1.Variant.md5 - _ = try PKCS5.PBKDF1(password: [1, 2, 3, 4, 5, 6, 7], salt: [1, 2, 3, 4, 5, 6, 7, 8]).calculate() - _ = try PKCS5.PBKDF2(password: [1, 2, 3, 4, 5, 6, 7], salt: [1, 2, 3, 4]).calculate() - } catch { - XCTFail(error.localizedDescription) - } - } - - func testAuthenticators() { - do { - _ = try HMAC(key: Array(hex: "b1b2b3b3b3b3b3b3b1b2b3b3b3b3b3b3"), variant: .sha1).authenticate([1, 2, 3]) - _ = try Poly1305(key: [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2]).authenticate([1, 2, 3]) - } catch { - XCTFail(error.localizedDescription) - } - } - - func testAES() { - do { - let cipher = try AES(key: "secret0key000000", iv: "0123456789012345") - var encryptor = try cipher.makeEncryptor() - _ = try encryptor.update(withBytes: [1, 2, 3]) - _ = try encryptor.finish() - - var decryptor = try cipher.makeDecryptor() - _ = try decryptor.update(withBytes: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]) - _ = try decryptor.finish() - - let enc = try cipher.encrypt([1, 2, 3]) - _ = try cipher.decrypt(enc) - - _ = try AES(key: [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6], blockMode: CBC(iv: [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6]), padding: .noPadding) - - _ = AES.Variant.aes128 - _ = AES.blockSize - } catch { - XCTFail("\(error)") - } - } - - func testBlowfish() { - do { - let cipher = try Blowfish(key: "secret0key000000", iv: "01234567") - let enc = try cipher.encrypt([1, 2, 3]) - _ = try cipher.decrypt(enc) - - _ = try Blowfish(key: [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6], padding: .noPadding) - - _ = Blowfish.blockSize - } catch { - XCTFail(error.localizedDescription) - } - } - - func testRabbit() { - do { - let rabbit = try Rabbit(key: [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]) - let enc = try rabbit.encrypt([1, 2, 3]) - _ = try rabbit.decrypt(enc) - - XCTAssertThrowsError(try Rabbit(key: "123")) - - _ = Rabbit.blockSize - _ = Rabbit.keySize - _ = Rabbit.ivSize - } catch { - XCTFail(error.localizedDescription) - } - } - - func testChaCha20() { - let key: Array = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00] - let iv: Array = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00] - - do { - _ = ChaCha20.blockSize - let chacha20 = try ChaCha20(key: key, iv: iv) - let enc = try chacha20.encrypt([1, 3, 4]) - _ = try chacha20.decrypt(enc) - - XCTAssertThrowsError(try ChaCha20(key: "123", iv: "12345678")) - - _ = chacha20.makeEncryptor() - _ = chacha20.makeDecryptor() - - } catch { - XCTFail(error.localizedDescription) - } - } - - func testUpdatable() { - // TODO: - } - - static let allTests = [ - ("testChecksum", testChecksum), - ("testDigest", testDigest), - ("testArrayExtension", testArrayExtension), - ("testCollectionExtension", testCollectionExtension), - ("testStringExtension", testStringExtension), - ("testStringFoundationExtension", testStringFoundationExtension), - ("testIntExtension", testIntExtension), - ("testUInt16Extension", testUInt16Extension), - ("testUInt32Extension", testUInt32Extension), - ("testUInt64Extension", testUInt64Extension), - ("testUInt8Extension", testUInt8Extension), - ("testDataExtension", testDataExtension), - ("testPadding", testPadding), - ("testPBKDF", testPBKDF), - ("testAuthenticators", testAuthenticators), - ("testAES", testAES), - ("testBlowfish", testBlowfish), - ("testRabbit", testRabbit), - ("testChaCha20", testChaCha20), - ("testUpdatable", testUpdatable), - ("testRandomIV", testRandomIV) - ] -} diff --git a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/BlowfishTests.swift b/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/BlowfishTests.swift deleted file mode 100644 index 5257e515a..000000000 --- a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/BlowfishTests.swift +++ /dev/null @@ -1,223 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// Test vector from http://www.schneier.com/code/vectors.txt - -import XCTest -@testable import CryptoSwift - -class BlowfishTests: XCTestCase { - struct TestData { - let key: Array - let input: Array - let output: Array - } - - let tests = [ - TestData(key: [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], - input: [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], - output: [0x4e, 0xf9, 0x97, 0x45, 0x61, 0x98, 0xdd, 0x78]), - TestData(key: [0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff], - input: [0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff], - output: [0x51, 0x86, 0x6f, 0xd5, 0xb8, 0x5e, 0xcb, 0x8a]), - TestData(key: [0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], - input: [0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01], - output: [0x7d, 0x85, 0x6f, 0x9a, 0x61, 0x30, 0x63, 0xf2]), - TestData(key: [0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11], - input: [0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11], - output: [0x24, 0x66, 0xdd, 0x87, 0x8b, 0x96, 0x3c, 0x9d]), - - TestData(key: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef], - input: [0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11], - output: [0x61, 0xf9, 0xc3, 0x80, 0x22, 0x81, 0xb0, 0x96]), - - TestData(key: [0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11], - input: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef], - output: [0x7d, 0x0c, 0xc6, 0x30, 0xaf, 0xda, 0x1e, 0xc7]), - - TestData(key: [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], - input: [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], - output: [0x4e, 0xf9, 0x97, 0x45, 0x61, 0x98, 0xdd, 0x78]), - - TestData(key: [0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10], - input: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef], - output: [0x0a, 0xce, 0xab, 0x0f, 0xc6, 0xa0, 0xa2, 0x8d]), - - TestData(key: [0x7c, 0xa1, 0x10, 0x45, 0x4a, 0x1a, 0x6e, 0x57], - input: [0x01, 0xa1, 0xd6, 0xd0, 0x39, 0x77, 0x67, 0x42], - output: [0x59, 0xc6, 0x82, 0x45, 0xeb, 0x05, 0x28, 0x2b]), - - TestData(key: [0x01, 0x31, 0xd9, 0x61, 0x9d, 0xc1, 0x37, 0x6e], - input: [0x5c, 0xd5, 0x4c, 0xa8, 0x3d, 0xef, 0x57, 0xda], - output: [0xb1, 0xb8, 0xcc, 0x0b, 0x25, 0x0f, 0x09, 0xa0]), - - TestData(key: [0x07, 0xa1, 0x13, 0x3e, 0x4a, 0x0b, 0x26, 0x86], - input: [0x02, 0x48, 0xd4, 0x38, 0x06, 0xf6, 0x71, 0x72], - output: [0x17, 0x30, 0xe5, 0x77, 0x8b, 0xea, 0x1d, 0xa4]), - - TestData(key: [0x38, 0x49, 0x67, 0x4c, 0x26, 0x02, 0x31, 0x9e], - input: [0x51, 0x45, 0x4b, 0x58, 0x2d, 0xdf, 0x44, 0x0a], - output: [0xa2, 0x5e, 0x78, 0x56, 0xcf, 0x26, 0x51, 0xeb]), - - TestData(key: [0x04, 0xb9, 0x15, 0xba, 0x43, 0xfe, 0xb5, 0xb6], - input: [0x42, 0xfd, 0x44, 0x30, 0x59, 0x57, 0x7f, 0xa2], - output: [0x35, 0x38, 0x82, 0xb1, 0x09, 0xce, 0x8f, 0x1a]), - - TestData(key: [0x01, 0x13, 0xb9, 0x70, 0xfd, 0x34, 0xf2, 0xce], - input: [0x05, 0x9b, 0x5e, 0x08, 0x51, 0xcf, 0x14, 0x3a], - output: [0x48, 0xf4, 0xd0, 0x88, 0x4c, 0x37, 0x99, 0x18]), - - TestData(key: [0x01, 0x70, 0xf1, 0x75, 0x46, 0x8f, 0xb5, 0xe6], - input: [0x07, 0x56, 0xd8, 0xe0, 0x77, 0x47, 0x61, 0xd2], - output: [0x43, 0x21, 0x93, 0xb7, 0x89, 0x51, 0xfc, 0x98]), - - TestData(key: [0x43, 0x29, 0x7f, 0xad, 0x38, 0xe3, 0x73, 0xfe], - input: [0x76, 0x25, 0x14, 0xb8, 0x29, 0xbf, 0x48, 0x6a], - output: [0x13, 0xf0, 0x41, 0x54, 0xd6, 0x9d, 0x1a, 0xe5]), - - TestData(key: [0x07, 0xa7, 0x13, 0x70, 0x45, 0xda, 0x2a, 0x16], - input: [0x3b, 0xdd, 0x11, 0x90, 0x49, 0x37, 0x28, 0x02], - output: [0x2e, 0xed, 0xda, 0x93, 0xff, 0xd3, 0x9c, 0x79]), - - TestData(key: [0x04, 0x68, 0x91, 0x04, 0xc2, 0xfd, 0x3b, 0x2f], - input: [0x26, 0x95, 0x5f, 0x68, 0x35, 0xaf, 0x60, 0x9a], - output: [0xd8, 0x87, 0xe0, 0x39, 0x3c, 0x2d, 0xa6, 0xe3]), - - TestData(key: [0x37, 0xd0, 0x6b, 0xb5, 0x16, 0xcb, 0x75, 0x46], - input: [0x16, 0x4d, 0x5e, 0x40, 0x4f, 0x27, 0x52, 0x32], - output: [0x5f, 0x99, 0xd0, 0x4f, 0x5b, 0x16, 0x39, 0x69]), - - TestData(key: [0x1f, 0x08, 0x26, 0x0d, 0x1a, 0xc2, 0x46, 0x5e], - input: [0x6b, 0x05, 0x6e, 0x18, 0x75, 0x9f, 0x5c, 0xca], - output: [0x4a, 0x05, 0x7a, 0x3b, 0x24, 0xd3, 0x97, 0x7b]), - - TestData(key: [0x58, 0x40, 0x23, 0x64, 0x1a, 0xba, 0x61, 0x76], - input: [0x00, 0x4b, 0xd6, 0xef, 0x09, 0x17, 0x60, 0x62], - output: [0x45, 0x20, 0x31, 0xc1, 0xe4, 0xfa, 0xda, 0x8e]), - - TestData(key: [0x02, 0x58, 0x16, 0x16, 0x46, 0x29, 0xb0, 0x07], - input: [0x48, 0x0d, 0x39, 0x00, 0x6e, 0xe7, 0x62, 0xf2], - output: [0x75, 0x55, 0xae, 0x39, 0xf5, 0x9b, 0x87, 0xbd]), - - TestData(key: [0x49, 0x79, 0x3e, 0xbc, 0x79, 0xb3, 0x25, 0x8f], - input: [0x43, 0x75, 0x40, 0xc8, 0x69, 0x8f, 0x3c, 0xfa], - output: [0x53, 0xc5, 0x5f, 0x9c, 0xb4, 0x9f, 0xc0, 0x19]), - - TestData(key: [0x4f, 0xb0, 0x5e, 0x15, 0x15, 0xab, 0x73, 0xa7], - input: [0x07, 0x2d, 0x43, 0xa0, 0x77, 0x07, 0x52, 0x92], - output: [0x7a, 0x8e, 0x7b, 0xfa, 0x93, 0x7e, 0x89, 0xa3]), - - TestData(key: [0x49, 0xe9, 0x5d, 0x6d, 0x4c, 0xa2, 0x29, 0xbf], - input: [0x02, 0xfe, 0x55, 0x77, 0x81, 0x17, 0xf1, 0x2a], - output: [0xcf, 0x9c, 0x5d, 0x7a, 0x49, 0x86, 0xad, 0xb5]), - - TestData(key: [0x01, 0x83, 0x10, 0xdc, 0x40, 0x9b, 0x26, 0xd6], - input: [0x1d, 0x9d, 0x5c, 0x50, 0x18, 0xf7, 0x28, 0xc2], - output: [0xd1, 0xab, 0xb2, 0x90, 0x65, 0x8b, 0xc7, 0x78]), - - TestData(key: [0x1c, 0x58, 0x7f, 0x1c, 0x13, 0x92, 0x4f, 0xef], - input: [0x30, 0x55, 0x32, 0x28, 0x6d, 0x6f, 0x29, 0x5a], - output: [0x55, 0xcb, 0x37, 0x74, 0xd1, 0x3e, 0xf2, 0x01]), - - TestData(key: [0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01], - input: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef], - output: [0xfa, 0x34, 0xec, 0x48, 0x47, 0xb2, 0x68, 0xb2]), - - TestData(key: [0x1f, 0x1f, 0x1f, 0x1f, 0x0e, 0x0e, 0x0e, 0x0e], - input: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef], - output: [0xa7, 0x90, 0x79, 0x51, 0x08, 0xea, 0x3c, 0xae]), - - TestData(key: [0xe0, 0xfe, 0xe0, 0xfe, 0xf1, 0xfe, 0xf1, 0xfe], - input: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef], - output: [0xc3, 0x9e, 0x07, 0x2d, 0x9f, 0xac, 0x63, 0x1d]), - - TestData(key: [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], - input: [0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff], - output: [0x01, 0x49, 0x33, 0xe0, 0xcd, 0xaf, 0xf6, 0xe4]), - - TestData(key: [0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff], - input: [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], - output: [0xf2, 0x1e, 0x9a, 0x77, 0xb7, 0x1c, 0x49, 0xbc]), - - TestData(key: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef], - input: [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], - output: [0x24, 0x59, 0x46, 0x88, 0x57, 0x54, 0x36, 0x9a]), - - TestData(key: [0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10], - input: [0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff], - output: [0x6b, 0x5c, 0x5a, 0x9c, 0x5d, 0x9e, 0x0a, 0x5a]) - ] - - func testEncrypt() { - for test in self.tests { - XCTAssertEqual(try Blowfish(key: test.key, blockMode: ECB(), padding: .noPadding).encrypt(test.input), test.output) - } - } - - func testDecrypt() { - for test in self.tests { - XCTAssertEqual(try Blowfish(key: test.key, blockMode: ECB(), padding: .noPadding).decrypt(test.output), test.input) - } - } - - func testCBCZeroPadding() { - let key = Array(hex: "0123456789ABCDEFF0E1D2C3B4A59687") - let iv = Array(hex: "FEDCBA9876543210") - let input = Array(hex: "37363534333231204E6F77206973207468652074696D6520666F722000") - XCTAssertEqual(try Blowfish(key: key, blockMode: CBC(iv: iv), padding: .zeroPadding).encrypt(input), Array(hex: "6B77B4D63006DEE605B156E27403979358DEB9E7154616D959F1652BD5FF92CC")) - } - - func testEncryptDecrypt() { - let key = Array.init(hex: "0123456789ABCDEFF0E1D2C3B4A59687") - let iv = Array.init(hex: "FEDCBA9876543210") - let input = Array.init(hex: "37363534333231204E6F77206973207468652074696D6520666F722000") - - do { - let cipher = try Blowfish(key: key, blockMode: CBC(iv: iv), padding: .pkcs7) - let ciphertext = try cipher.encrypt(input) - let plaintext = try cipher.decrypt(ciphertext) - XCTAssertEqual(plaintext, input) - } catch { - XCTFail(error.localizedDescription) - } - } - - // https://github.com/krzyzanowskim/CryptoSwift/issues/415 - func testDecryptCFB415() { - do { - let plaintext = "secret12".bytes - let key = "passwordpassword".bytes - let iv = "12345678".bytes - let encrypted = try Blowfish(key: key, blockMode: CFB(iv: iv), padding: .noPadding).encrypt(plaintext) - let decrypted = try Blowfish(key: key, blockMode: CFB(iv: iv), padding: .noPadding).decrypt(encrypted) - XCTAssertEqual(plaintext, decrypted) - } catch { - XCTFail(error.localizedDescription) - } - } -} - -extension BlowfishTests { - static func allTests() -> [(String, (BlowfishTests) -> () -> Void)] { - let tests = [ - ("testEncrypt", testEncrypt), - ("testDecrypt", testDecrypt), - ("testCBCZeroPadding", testCBCZeroPadding), - ("testEncryptDecrypt", testEncryptDecrypt), - ("testDecryptCFB415", testDecryptCFB415) - ] - return tests - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/Bridging.h b/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/Bridging.h deleted file mode 100644 index 160b7b65d..000000000 --- a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/Bridging.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -#ifndef CryptoSwift_Bridging_h -#define CryptoSwift_Bridging_h - -#import - -#endif diff --git a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/CBCMacTests.swift b/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/CBCMacTests.swift deleted file mode 100644 index 2fe5afb9b..000000000 --- a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/CBCMacTests.swift +++ /dev/null @@ -1,61 +0,0 @@ -//// CryptoSwift -// -// Copyright (C) 2014-__YEAR__ Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import XCTest -@testable import CryptoSwift - -class CBCMacTests: XCTestCase { - func testMessageLength0() { - let key: Array = [0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c] - let msg: Array = [] - let expectedMac: Array = [0xf6, 0xc7, 0x1e, 0xed, 0xc3, 0xd9, 0x9b, 0xb1, 0x83, 0xcb, 0x5b, 0x8d, 0x15, 0x68, 0xe6, 0x06] - - let cbcmac = try! CBCMAC(key: key).authenticate(msg) - XCTAssertEqual(cbcmac, expectedMac, "Invalid authentication result") - } - - func testMessageLength16() { - let key: Array = [0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c] - let msg: Array = [0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a] - let expectedMac: Array = [0x05, 0x39, 0xbd, 0xa3, 0x0b, 0x3f, 0x76, 0x34, 0x46, 0x6a, 0x75, 0xd9, 0x84, 0x18, 0xbf, 0x65] - - let cbcmac = try! CBCMAC(key: key).authenticate(msg) - XCTAssertEqual(cbcmac, expectedMac, "Invalid authentication result") - } - - func testMessageLength40() { - let key: Array = [0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c] - let msg: Array = [0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a, 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c, 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51, 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11] - let expectedMac: Array = [0xa5, 0x26, 0x0f, 0x98, 0xf1, 0xab, 0xf2, 0xb2, 0x75, 0x62, 0xed, 0x5f, 0xc1, 0xfb, 0xeb, 0x8d] - - let cbcmac = try! CBCMAC(key: key).authenticate(msg) - XCTAssertEqual(cbcmac, expectedMac, "Invalid authentication result") - } - - func testMessageLength64() { - let key: Array = [0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c] - let msg: Array = [0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a, 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c, 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51, 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11, 0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef, 0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17, 0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10] - let expectedMac: Array = [0x5b, 0xf8, 0x2f, 0x1f, 0xe7, 0x48, 0x3b, 0x9a, 0x87, 0x5c, 0xaf, 0x3d, 0xed, 0x3a, 0x01, 0x71] - - let cbcmac = try! CBCMAC(key: key).authenticate(msg) - XCTAssertEqual(cbcmac, expectedMac, "Invalid authentication result") - } - - static let allTests = [ - ("testMessageLength0", testMessageLength0), - ("testMessageLength16", testMessageLength16), - ("testMessageLength40", testMessageLength40), - ("testMessageLength64", testMessageLength64) - ] -} diff --git a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/CMACTests.swift b/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/CMACTests.swift deleted file mode 100644 index 746c61834..000000000 --- a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/CMACTests.swift +++ /dev/null @@ -1,103 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// Test vectors from https://tools.ietf.org/html/rfc4493 -// Text vectors from http://www.nuee.nagoya-u.ac.jp/labs/tiwata/omac/tv/omac1-tv.txt - -import XCTest -@testable import CryptoSwift - -final class CMACTests: XCTestCase { - func testMessageLength0() { - let key: Array = [0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c] - let msg: Array = [] - let expectedMac: Array = [0xbb, 0x1d, 0x69, 0x29, 0xe9, 0x59, 0x37, 0x28, 0x7f, 0xa3, 0x7d, 0x12, 0x9b, 0x75, 0x67, 0x46] - - let cmac = try! CMAC(key: key).authenticate(msg) - XCTAssertEqual(cmac, expectedMac, "Invalid authentication result") - } - - func testMessageLength16() { - let key: Array = [0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c] - let msg: Array = [0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a] - let expectedMac: Array = [0x07, 0x0a, 0x16, 0xb4, 0x6b, 0x4d, 0x41, 0x44, 0xf7, 0x9b, 0xdd, 0x9d, 0xd0, 0x4a, 0x28, 0x7c] - - let cmac = try! CMAC(key: key).authenticate(msg) - XCTAssertEqual(cmac, expectedMac, "Invalid authentication result") - } - - func testMessageLength40() { - let key: Array = [0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c] - let msg: Array = [0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a, 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c, 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51, 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11] - let expectedMac: Array = [0xdf, 0xa6, 0x67, 0x47, 0xde, 0x9a, 0xe6, 0x30, 0x30, 0xca, 0x32, 0x61, 0x14, 0x97, 0xc8, 0x27] - - let cmac = try! CMAC(key: key).authenticate(msg) - XCTAssertEqual(cmac, expectedMac, "Invalid authentication result") - } - - func testMessageLength64() { - let key: Array = [0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c] - let msg: Array = [0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a, 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c, 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51, 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11, 0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef, 0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17, 0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10] - let expectedMac: Array = [0x51, 0xf0, 0xbe, 0xbf, 0x7e, 0x3b, 0x9d, 0x92, 0xfc, 0x49, 0x74, 0x17, 0x79, 0x36, 0x3c, 0xfe] - - let cmac = try! CMAC(key: key).authenticate(msg) - XCTAssertEqual(cmac, expectedMac, "Invalid authentication result") - } - - func testOMACTextVectors() { - // Test vectors: http://www.nuee.nagoya-u.ac.jp/labs/tiwata/omac/tv/omac1-tv.txt - let vectors: [(key: [UInt8], msg: [UInt8], cmac: [UInt8])] = [ - // AES-192 - (key: [0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52, 0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5, 0x62, 0xf8, 0xea, 0xd2, 0x52, 0x2c, 0x6b, 0x7b], - msg: [], - cmac: [0xd1, 0x7d, 0xdf, 0x46, 0xad, 0xaa, 0xcd, 0xe5, 0x31, 0xca, 0xc4, 0x83, 0xde, 0x7a, 0x93, 0x67]), - (key: [0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52, 0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5, 0x62, 0xf8, 0xea, 0xd2, 0x52, 0x2c, 0x6b, 0x7b], - msg: [0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a], - cmac: [0x9e, 0x99, 0xa7, 0xbf, 0x31, 0xe7, 0x10, 0x90, 0x06, 0x62, 0xf6, 0x5e, 0x61, 0x7c, 0x51, 0x84]), - (key: [0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52, 0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5, 0x62, 0xf8, 0xea, 0xd2, 0x52, 0x2c, 0x6b, 0x7b], - msg: [0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a, 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c, 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51, 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11], - cmac: [0x8a, 0x1d, 0xe5, 0xbe, 0x2e, 0xb3, 0x1a, 0xad, 0x08, 0x9a, 0x82, 0xe6, 0xee, 0x90, 0x8b, 0x0e]), - (key: [0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52, 0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5, 0x62, 0xf8, 0xea, 0xd2, 0x52, 0x2c, 0x6b, 0x7b], - msg: [0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a, 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c, 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51, 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11, 0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef, 0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17, 0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10], - cmac: [0xa1, 0xd5, 0xdf, 0x0e, 0xed, 0x79, 0x0f, 0x79, 0x4d, 0x77, 0x58, 0x96, 0x59, 0xf3, 0x9a, 0x11]), - // AES-256 - (key: [0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe, 0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81, 0x1f, 0x35, 0x2c, 0x07, 0x3b, 0x61, 0x08, 0xd7, 0x2d, 0x98, 0x10, 0xa3, 0x09, 0x14, 0xdf, 0xf4], - msg: [], - cmac: [0x02, 0x89, 0x62, 0xf6, 0x1b, 0x7b, 0xf8, 0x9e, 0xfc, 0x6b, 0x55, 0x1f, 0x46, 0x67, 0xd9, 0x83]), - (key: [0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe, 0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81, 0x1f, 0x35, 0x2c, 0x07, 0x3b, 0x61, 0x08, 0xd7, 0x2d, 0x98, 0x10, 0xa3, 0x09, 0x14, 0xdf, 0xf4], - msg: [0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a], - cmac: [0x28, 0xa7, 0x02, 0x3f, 0x45, 0x2e, 0x8f, 0x82, 0xbd, 0x4b, 0xf2, 0x8d, 0x8c, 0x37, 0xc3, 0x5c]), - (key: [0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe, 0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81, 0x1f, 0x35, 0x2c, 0x07, 0x3b, 0x61, 0x08, 0xd7, 0x2d, 0x98, 0x10, 0xa3, 0x09, 0x14, 0xdf, 0xf4], - msg: [0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a, 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c, 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51, 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11], - cmac: [0xaa, 0xf3, 0xd8, 0xf1, 0xde, 0x56, 0x40, 0xc2, 0x32, 0xf5, 0xb1, 0x69, 0xb9, 0xc9, 0x11, 0xe6]), - (key: [0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe, 0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81, 0x1f, 0x35, 0x2c, 0x07, 0x3b, 0x61, 0x08, 0xd7, 0x2d, 0x98, 0x10, 0xa3, 0x09, 0x14, 0xdf, 0xf4], - msg: [0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a, 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c, 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51, 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11, 0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef, 0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17, 0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10], - cmac: [0xe1, 0x99, 0x21, 0x90, 0x54, 0x9f, 0x6e, 0xd5, 0x69, 0x6a, 0x2c, 0x05, 0x6c, 0x31, 0x54, 0x10]), - ] - - for v in vectors { - let cmac = try! CMAC(key: v.key).authenticate(v.msg) - XCTAssertEqual(cmac, v.cmac, "Failed \(v)") - } - } - - static let allTests = [ - ("testMessageLength0", testMessageLength0), - ("testMessageLength16", testMessageLength16), - ("testMessageLength40", testMessageLength40), - ("testMessageLength64", testMessageLength64), - ("testOMACTextVectors", testOMACTextVectors) - ] -} diff --git a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/ChaCha20Poly1305Tests.swift b/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/ChaCha20Poly1305Tests.swift deleted file mode 100644 index 93201a246..000000000 --- a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/ChaCha20Poly1305Tests.swift +++ /dev/null @@ -1,84 +0,0 @@ -// -// ChaCha20Poly1305Tests.swift -// CryptoSwiftTests -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// -// -// https://tools.ietf.org/html/rfc7539#section-2.8.1 - -import XCTest -@testable import CryptoSwift - -class ChaCha20Poly1305Tests: XCTestCase { - static let allTests = [ - ("testCCPoly1", test1), - ("testCCPoly2", test2), - ("testCCPoly3", test3) - ] - - func test1() { - self.executeTestCase("6b65792e6b65792e6b65792e6b65792e6b65792e6b65792e6b65792e6b65792e", - "6e6f6e63652e6e6f6e63652e", - "", - "6d657373616765", - "5d9c0a9fe7d5e5", - "c93aa61fc3cc66a819ac96f6ce365aee") - } - - func test2() { - /* Test vector from section 2.8.2. */ - self.executeTestCase("808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f", - "070000004041424344454647", - "50515253c0c1c2c3c4c5c6c7", - "4c616469657320616e642047656e746c656d656e206f662074686520636c617373206f66202739393a204966204920636f756c64206f6666657220796f75206f6e6c79206f6e652074697020666f7220746865206675747572652c2073756e73637265656e20776f756c642062652069742e", - "d31a8d34648e60db7b86afbc53ef7ec2a4aded51296e08fea9e2b5a736ee62d63dbea45e8ca9671282fafb69da92728b1a71de0a9e060b2905d6a5b67ecd3b3692ddbd7f2d778b8c9803aee328091b58fab324e4fad675945585808b4831d7bc3ff4def08e4b7a9de576d26586cec64b6116", - "1ae10b594f09e26a7e902ecbd0600691") - } - - func test3() { - /* Test vector from A.5. */ - self.executeTestCase("1c9240a5eb55d38af333888604f6b5f0473917c1402b80099dca5cbc207075c0", - "000000000102030405060708", - "f33388860000000000004e91", - "496e7465726e65742d4472616674732061726520647261667420646f63756d656e74732076616c696420666f722061206d6178696d756d206f6620736978206d6f6e74687320616e64206d617920626520757064617465642c207265706c616365642c206f72206f62736f6c65746564206279206f7468657220646f63756d656e747320617420616e792074696d652e20497420697320696e617070726f70726961746520746f2075736520496e7465726e65742d447261667473206173207265666572656e6365206d6174657269616c206f7220746f2063697465207468656d206f74686572207468616e206173202fe2809c776f726b20696e2070726f67726573732e2fe2809d", - "64a0861575861af460f062c79be643bd5e805cfd345cf389f108670ac76c8cb24c6cfc18755d43eea09ee94e382d26b0bdb7b73c321b0100d4f03b7f355894cf332f830e710b97ce98c8a84abd0b948114ad176e008d33bd60f982b1ff37c8559797a06ef4f0ef61c186324e2b3506383606907b6a7c02b0f9f6157b53c867e4b9166c767b804d46a59b5216cde7a4e99040c5a40433225ee282a1b0a06c523eaf4534d7f83fa1155b0047718cbc546a0d072b04b3564eea1b422273f548271a0bb2316053fa76991955ebd63159434ecebb4e466dae5a1073a6727627097a1049e617d91d361094fa68f0ff77987130305beaba2eda04df997b714d6c6f2c29a6ad5cb4022b02709b", - "eead9d67890cbb22392336fea1851f38") - } - - func executeTestCase(_ key: String, _ nonce: String, _ header: String, _ message: String, _ cipher: String, _ tag: String) { - let keyArr = Array(hex: key) - let nonceArr = Array(hex: nonce) - let headerArr = Array(hex: header) - let messageArr = Array(hex: message) - let cipherArr = Array(hex: cipher) - let tagArr = Array(hex: tag) - - do { - let encryptResult = try AEADChaCha20Poly1305.encrypt(messageArr, key: keyArr, iv: nonceArr, authenticationHeader: headerArr) - - XCTAssertEqual(encryptResult.cipherText, cipherArr, "cipher not equal") - XCTAssertEqual(encryptResult.authenticationTag, tagArr, "tag not equal") - } catch { - XCTAssert(false, "Encryption Failed with error: \(error.localizedDescription)") - } - - do { - let decryptResult = try AEADChaCha20Poly1305.decrypt(cipherArr, key: keyArr, iv: nonceArr, authenticationHeader: headerArr, authenticationTag: tagArr) - - XCTAssertEqual(decryptResult.success, true, "decrypt mac check failed") - XCTAssertEqual(decryptResult.plainText, messageArr, "message not equal") - } catch { - XCTAssert(false, "Encryption Failed with error: \(error.localizedDescription)") - } - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/ChaCha20Tests.swift b/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/ChaCha20Tests.swift deleted file mode 100644 index aa9a01fdb..000000000 --- a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/ChaCha20Tests.swift +++ /dev/null @@ -1,122 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import Foundation -import XCTest -@testable import CryptoSwift - -final class ChaCha20Tests: XCTestCase { - func testChaCha20() { - let keys: [Array] = [ - [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], - [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01], - [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], - [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], - [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f] - ] - - let ivs: [Array] = [ - [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], - [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], - [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01], - [0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], - [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07] - ] - - let expectedHexes = [ - "76B8E0ADA0F13D90405D6AE55386BD28BDD219B8A08DED1AA836EFCC8B770DC7DA41597C5157488D7724E03FB8D84A376A43B8F41518A11CC387B669B2EE6586", - "4540F05A9F1FB296D7736E7B208E3C96EB4FE1834688D2604F450952ED432D41BBE2A0B6EA7566D2A5D1E7E20D42AF2C53D792B1C43FEA817E9AD275AE546963", - "DE9CBA7BF3D69EF5E786DC63973F653A0B49E015ADBFF7134FCB7DF137821031E85A050278A7084527214F73EFC7FA5B5277062EB7A0433E445F41E3", - "EF3FDFD6C61578FBF5CF35BD3DD33B8009631634D21E42AC33960BD138E50D32111E4CAF237EE53CA8AD6426194A88545DDC497A0B466E7D6BBDB0041B2F586B", - "F798A189F195E66982105FFB640BB7757F579DA31602FC93EC01AC56F85AC3C134A4547B733B46413042C9440049176905D3BE59EA1C53F15916155C2BE8241A38008B9A26BC35941E2444177C8ADE6689DE95264986D95889FB60E84629C9BD9A5ACB1CC118BE563EB9B3A4A472F82E09A7E778492B562EF7130E88DFE031C79DB9D4F7C7A899151B9A475032B63FC385245FE054E3DD5A97A5F576FE064025D3CE042C566AB2C507B138DB853E3D6959660996546CC9C4A6EAFDC777C040D70EAF46F76DAD3979E5C5360C3317166A1C894C94A371876A94DF7628FE4EAAF2CCB27D5AAAE0AD7AD0F9D4B6AD3B54098746D4524D38407A6DEB3AB78FAB78C9" - ] - - for idx in 0..(repeating: 0, count: expectedHex.count / 2) - - do { - let encrypted = try message.encrypt(cipher: ChaCha20(key: keys[idx], iv: ivs[idx])) - let decrypted = try encrypted.decrypt(cipher: ChaCha20(key: keys[idx], iv: ivs[idx])) - XCTAssertEqual(message, decrypted, "ChaCha20 decryption failed") - XCTAssertEqual(encrypted, Array(hex: expectedHex)) - } catch CipherError.encrypt { - XCTAssert(false, "Encryption failed") - } catch CipherError.decrypt { - XCTAssert(false, "Decryption failed") - } catch { - XCTAssert(false, "Failed") - } - } - } - - func testCore() { - let key: Array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31] - var counter: Array = [1, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 74, 0, 0, 0, 0] - let input = Array.init(repeating: 0, count: 129) - let chacha = try! ChaCha20(key: key, iv: Array(key[4..<16])) - let result = chacha.process(bytes: input.slice, counter: &counter, key: key) - XCTAssertEqual(result.toHexString(), "10f1e7e4d13b5915500fdd1fa32071c4c7d1f4c733c068030422aa9ac3d46c4ed2826446079faa0914c2d705d98b02a2b5129cd1de164eb9cbd083e8a2503c4e0a88837739d7bf4ef8ccacb0ea2bb9d69d56c394aa351dfda5bf459f0a2e9fe8e721f89255f9c486bf21679c683d4f9c5cf2fa27865526005b06ca374c86af3bdc") - } - - func testVector1Py() { - let key: Array = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00] - let iv: Array = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00] - let expected: Array = [0x76, 0xb8, 0xe0, 0xad, 0xa0, 0xf1, 0x3d, 0x90, 0x40, 0x5d, 0x6a, 0xe5, 0x53, 0x86, 0xbd, 0x28, 0xbd, 0xd2, 0x19, 0xb8, 0xa0, 0x8d, 0xed, 0x1a, 0xa8, 0x36, 0xef, 0xcc, 0x8b, 0x77, 0x0d, 0xc7, 0xda, 0x41, 0x59, 0x7c, 0x51, 0x57, 0x48, 0x8d, 0x77, 0x24, 0xe0, 0x3f, 0xb8, 0xd8, 0x4a, 0x37, 0x6a, 0x43, 0xb8, 0xf4, 0x15, 0x18, 0xa1, 0x1c, 0xc3, 0x87, 0xb6, 0x69, 0xb2, 0xee, 0x65, 0x86] - let message = Array(repeating: 0, count: expected.count) - - do { - let encrypted = try ChaCha20(key: key, iv: iv).encrypt(message) - XCTAssertEqual(encrypted, expected, "Ciphertext failed") - } catch { - XCTFail() - } - } - - func testChaCha20EncryptPartial() { - let key: Array = [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f] - let iv: Array = [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07] - let expectedHex = "F798A189F195E66982105FFB640BB7757F579DA31602FC93EC01AC56F85AC3C134A4547B733B46413042C9440049176905D3BE59EA1C53F15916155C2BE8241A38008B9A26BC35941E2444177C8ADE6689DE95264986D95889FB60E84629C9BD9A5ACB1CC118BE563EB9B3A4A472F82E09A7E778492B562EF7130E88DFE031C79DB9D4F7C7A899151B9A475032B63FC385245FE054E3DD5A97A5F576FE064025D3CE042C566AB2C507B138DB853E3D6959660996546CC9C4A6EAFDC777C040D70EAF46F76DAD3979E5C5360C3317166A1C894C94A371876A94DF7628FE4EAAF2CCB27D5AAAE0AD7AD0F9D4B6AD3B54098746D4524D38407A6DEB3AB78FAB78C9" - let plaintext: Array = Array(repeating: 0, count: expectedHex.count / 2) - - do { - let cipher = try ChaCha20(key: key, iv: iv) - - var ciphertext = Array() - var encryptor = cipher.makeEncryptor() - ciphertext += try encryptor.update(withBytes: Array(plaintext[0..<8])) - ciphertext += try encryptor.update(withBytes: Array(plaintext[8..<16])) - ciphertext += try encryptor.update(withBytes: Array(plaintext[16..<80])) - ciphertext += try encryptor.update(withBytes: Array(plaintext[80..<256])) - ciphertext += try encryptor.finish() - XCTAssertEqual(Array(hex: expectedHex), ciphertext) - } catch { - XCTFail() - } - } -} - -extension ChaCha20Tests { - static func allTests() -> [(String, (ChaCha20Tests) -> () -> Void)] { - let tests = [ - ("testChaCha20", testChaCha20), - ("testCore", testCore), - ("testVector1Py", testVector1Py), - ("testChaCha20EncryptPartial", testChaCha20EncryptPartial) - ] - - return tests - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/ChaCha20TestsPerf.swift b/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/ChaCha20TestsPerf.swift deleted file mode 100644 index cddde8cc5..000000000 --- a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/ChaCha20TestsPerf.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import Foundation -import XCTest -@testable import CryptoSwift - -final class ChaCha20TestsPerf: XCTestCase { - func testChaCha20Performance() { - let key: Array = [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f] - let iv: Array = [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07] - let message = Array(repeating: 7, count: 1024 * 1024) - measureMetrics([XCTPerformanceMetric.wallClockTime], automaticallyStartMeasuring: true) { () -> Void in - do { - _ = try ChaCha20(key: key, iv: iv).encrypt(message) - } catch { - XCTFail() - } - self.stopMeasuring() - } - } -} - -extension ChaCha20TestsPerf { - static func allTests() -> [(String, (ChaCha20TestsPerf) -> () -> Void)] { - let tests = [("testChaCha20Performance", testChaCha20Performance)] - return tests - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/DigestTests.swift b/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/DigestTests.swift deleted file mode 100644 index 14062618a..000000000 --- a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/DigestTests.swift +++ /dev/null @@ -1,299 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// http://www.di-mgt.com.au/sha_testvectors.html (http://csrc.nist.gov/groups/ST/toolkit/documents/Examples/SHA_All.pdf) -// - -import Foundation -import XCTest -@testable import CryptoSwift - -final class DigestTests: XCTestCase { - func testMD5() { - XCTAssertEqual("123".md5(), "202cb962ac59075b964b07152d234b70", "MD5 calculation failed") - XCTAssertEqual("".md5(), "d41d8cd98f00b204e9800998ecf8427e", "MD5 calculation failed") - XCTAssertEqual("a".md5(), "0cc175b9c0f1b6a831c399e269772661", "MD5 calculation failed") - XCTAssertEqual("abc".md5(), "900150983cd24fb0d6963f7d28e17f72", "MD5 calculation failed") - XCTAssertEqual("message digest".md5(), "f96b697d7cb7938d525a2f31aaf161d0", "MD5 calculation failed") - XCTAssertEqual("abcdefghijklmnopqrstuvwxyz".md5(), "c3fcd3d76192e4007dfb496cca67e13b", "MD5 calculation failed") - XCTAssertEqual("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".md5(), "d174ab98d277d9f5a5611c2c9f419d9f", "MD5 calculation failed") - XCTAssertEqual("12345678901234567890123456789012345678901234567890123456789012345678901234567890".md5(), "57edf4a22be3c955ac49da2e2107b67a", "MD5 calculation failed") - } - - func testSHA1() { - XCTAssertEqual(SHA1().calculate(for: Array(hex: "616263")).toHexString(), "a9993e364706816aba3e25717850c26c9cd0d89d") - XCTAssertEqual(SHA1().calculate(for: Array(hex: "")).toHexString(), "da39a3ee5e6b4b0d3255bfef95601890afd80709") - XCTAssertEqual("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq".sha1(), "84983e441c3bd26ebaae4aa1f95129e5e54670f1") - XCTAssertEqual("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu".sha1(), "a49b2446a02c645bf419f995b67091253a04a259") - XCTAssertEqual(Array(repeating: 0x61, count: 1_000_000).sha1(), Array(hex: "34aa973cd4c4daa4f61eeb2bdbad27316534016f"), "One million (1,000,000) repetitions of the character 'a' (0x61)") - - // https://github.com/krzyzanowskim/CryptoSwift/issues/363 - XCTAssertEqual("1477304791&1XpnGSRhOlZz2etXMeOdfNaHILTjW16U&8mpBBbzwsgs".sha1(), "0809bbf8489c594131c2030a84be364a0851a635", "Failed") - XCTAssertEqual("1477304791&1XpnGSRhOlZz2etXMeOdfNaHILTjW16U&8mpBBbzwsgsa".sha1(), "d345b525ebada7becc8107c54e07fa88644471f5", "Failed") - XCTAssertEqual("1477304791&1XpnGSRhOlZz2etXMeOdfNaHILTjW16U&8mpBBbzwsg".sha1(), "c106aa0a98606294ee35fd2d937e928ebb5339e0", "Failed") - } - - func testSHA2() { - XCTAssertEqual(SHA2(variant: .sha224).calculate(for: Array(hex: "616263")).toHexString(), "23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7") - XCTAssertEqual(SHA2(variant: .sha256).calculate(for: Array(hex: "616263")).toHexString(), "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad") - XCTAssertEqual(SHA2(variant: .sha384).calculate(for: Array(hex: "616263")).toHexString(), "cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed8086072ba1e7cc2358baeca134c825a7") - XCTAssertEqual(SHA2(variant: .sha512).calculate(for: Array(hex: "616263")).toHexString(), "ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f") - - XCTAssertEqual(SHA2(variant: .sha224).calculate(for: Array(hex: "")).toHexString(), "d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f") - XCTAssertEqual(SHA2(variant: .sha256).calculate(for: Array(hex: "")).toHexString(), "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855") - XCTAssertEqual(SHA2(variant: .sha384).calculate(for: Array(hex: "")).toHexString(), "38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b") - XCTAssertEqual(SHA2(variant: .sha512).calculate(for: Array(hex: "")).toHexString(), "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e") - - XCTAssertEqual("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq".sha224(), "75388b16512776cc5dba5da1fd890150b0c6455cb4f58b1952522525") - XCTAssertEqual("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq".sha256(), "248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1") - XCTAssertEqual("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq".sha384(), "3391fdddfc8dc7393707a65b1b4709397cf8b1d162af05abfe8f450de5f36bc6b0455a8520bc4e6f5fe95b1fe3c8452b") - XCTAssertEqual("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq".sha512(), "204a8fc6dda82f0a0ced7beb8e08a41657c16ef468b228a8279be331a703c33596fd15c13b1b07f9aa1d3bea57789ca031ad85c7a71dd70354ec631238ca3445") - - XCTAssertEqual("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu".sha224(), "c97ca9a559850ce97a04a96def6d99a9e0e0e2ab14e6b8df265fc0b3") - XCTAssertEqual("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu".sha256(), "cf5b16a778af8380036ce59e7b0492370b249b11e8f07a51afac45037afee9d1") - XCTAssertEqual("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu".sha384(), "09330c33f71147e83d192fc782cd1b4753111b173b3b05d22fa08086e3b0f712fcc7c71a557e2db966c3e9fa91746039") - XCTAssertEqual("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu".sha512(), "8e959b75dae313da8cf4f72814fc143f8f7779c6eb9f7fa17299aeadb6889018501d289e4900f7e4331b99dec4b5433ac7d329eeb6dd26545e96e55b874be909") - - XCTAssertEqual(Array(repeating: 0x61, count: 1_000_000).sha224(), Array(hex: "20794655980c91d8bbb4c1ea97618a4bf03f42581948b2ee4ee7ad67"), "One million (1,000,000) repetitions of the character 'a' (0x61)") - XCTAssertEqual(Array(repeating: 0x61, count: 1_000_000).sha256(), Array(hex: "cdc76e5c9914fb9281a1c7e284d73e67f1809a48a497200e046d39ccc7112cd0"), "One million (1,000,000) repetitions of the character 'a' (0x61)") - XCTAssertEqual(Array(repeating: 0x61, count: 1_000_000).sha384(), Array(hex: "9d0e1809716474cb086e834e310a4a1ced149e9c00f248527972cec5704c2a5b07b8b3dc38ecc4ebae97ddd87f3d8985"), "One million (1,000,000) repetitions of the character 'a' (0x61)") - XCTAssertEqual(Array(repeating: 0x61, count: 1_000_000).sha512(), Array(hex: "e718483d0ce769644e2e42c7bc15b4638e1f98b13b2044285632a803afa973ebde0ff244877ea60a4cb0432ce577c31beb009c5c2c49aa2e4eadb217ad8cc09b"), "One million (1,000,000) repetitions of the character 'a' (0x61)") - - XCTAssertEqual("Rosetta code".sha256(), "764faf5c61ac315f1497f9dfa542713965b785e5cc2f707d6468d7d1124cdfcf", "SHA256 calculation failed") - XCTAssertEqual("The quick brown fox jumps over the lazy dog.".sha384(), "ed892481d8272ca6df370bf706e4d7bc1b5739fa2177aae6c50e946678718fc67a7af2819a021c2fc34e91bdb63409d7", "SHA384 calculation failed") - } - - func testSHA3() { - XCTAssertEqual(SHA3(variant: .sha224).calculate(for: Array(hex: "616263")).toHexString(), "e642824c3f8cf24ad09234ee7d3c766fc9a3a5168d0c94ad73b46fdf") - XCTAssertEqual(SHA3(variant: .sha256).calculate(for: Array(hex: "616263")).toHexString(), "3a985da74fe225b2045c172d6bd390bd855f086e3e9d525b46bfe24511431532") - XCTAssertEqual(SHA3(variant: .sha384).calculate(for: Array(hex: "616263")).toHexString(), "ec01498288516fc926459f58e2c6ad8df9b473cb0fc08c2596da7cf0e49be4b298d88cea927ac7f539f1edf228376d25") - XCTAssertEqual(SHA3(variant: .sha512).calculate(for: Array(hex: "616263")).toHexString(), "b751850b1a57168a5693cd924b6b096e08f621827444f70d884f5d0240d2712e10e116e9192af3c91a7ec57647e3934057340b4cf408d5a56592f8274eec53f0") - XCTAssertEqual(SHA3(variant: .keccak224).calculate(for: Array(hex: "616263")).toHexString(), "c30411768506ebe1c2871b1ee2e87d38df342317300a9b97a95ec6a8") - XCTAssertEqual(SHA3(variant: .keccak256).calculate(for: Array(hex: "616263")).toHexString(), "4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45") - XCTAssertEqual(SHA3(variant: .keccak384).calculate(for: Array(hex: "616263")).toHexString(), "f7df1165f033337be098e7d288ad6a2f74409d7a60b49c36642218de161b1f99f8c681e4afaf31a34db29fb763e3c28e") - XCTAssertEqual(SHA3(variant: .keccak512).calculate(for: Array(hex: "616263")).toHexString(), "18587dc2ea106b9a1563e32b3312421ca164c7f1f07bc922a9c83d77cea3a1e5d0c69910739025372dc14ac9642629379540c17e2a65b19d77aa511a9d00bb96") - - XCTAssertEqual(SHA3(variant: .sha224).calculate(for: Array(hex: "")).toHexString(), "6b4e03423667dbb73b6e15454f0eb1abd4597f9a1b078e3f5b5a6bc7") - XCTAssertEqual(SHA3(variant: .sha256).calculate(for: Array(hex: "")).toHexString(), "a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a") - XCTAssertEqual(SHA3(variant: .sha384).calculate(for: Array(hex: "")).toHexString(), "0c63a75b845e4f7d01107d852e4c2485c51a50aaaa94fc61995e71bbee983a2ac3713831264adb47fb6bd1e058d5f004") - XCTAssertEqual(SHA3(variant: .sha512).calculate(for: Array(hex: "")).toHexString(), "a69f73cca23a9ac5c8b567dc185a756e97c982164fe25859e0d1dcc1475c80a615b2123af1f5f94c11e3e9402c3ac558f500199d95b6d3e301758586281dcd26") - XCTAssertEqual(SHA3(variant: .keccak224).calculate(for: Array(hex: "")).toHexString(), "f71837502ba8e10837bdd8d365adb85591895602fc552b48b7390abd") - XCTAssertEqual(SHA3(variant: .keccak256).calculate(for: Array(hex: "")).toHexString(), "c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470") - XCTAssertEqual(SHA3(variant: .keccak384).calculate(for: Array(hex: "")).toHexString(), "2c23146a63a29acf99e73b88f8c24eaa7dc60aa771780ccc006afbfa8fe2479b2dd2b21362337441ac12b515911957ff") - XCTAssertEqual(SHA3(variant: .keccak512).calculate(for: Array(hex: "")).toHexString(), "0eab42de4c3ceb9235fc91acffe746b29c29a8c366b7c60e4e67c466f36a4304c00fa9caf9d87976ba469bcbe06713b435f091ef2769fb160cdab33d3670680e") - - XCTAssertEqual("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq".sha3(.sha224), "8a24108b154ada21c9fd5574494479ba5c7e7ab76ef264ead0fcce33") - XCTAssertEqual("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq".sha3(.sha256), "41c0dba2a9d6240849100376a8235e2c82e1b9998a999e21db32dd97496d3376") - XCTAssertEqual("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq".sha3(.sha384), "991c665755eb3a4b6bbdfb75c78a492e8c56a22c5c4d7e429bfdbc32b9d4ad5aa04a1f076e62fea19eef51acd0657c22") - XCTAssertEqual("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq".sha3(.sha512), "04a371e84ecfb5b8b77cb48610fca8182dd457ce6f326a0fd3d7ec2f1e91636dee691fbe0c985302ba1b0d8dc78c086346b533b49c030d99a27daf1139d6e75e") - XCTAssertEqual("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq".sha3(.keccak224), "e51faa2b4655150b931ee8d700dc202f763ca5f962c529eae55012b6") - XCTAssertEqual("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq".sha3(.keccak256), "45d3b367a6904e6e8d502ee04999a7c27647f91fa845d456525fd352ae3d7371") - XCTAssertEqual("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq".sha3(.keccak384), "b41e8896428f1bcbb51e17abd6acc98052a3502e0d5bf7fa1af949b4d3c855e7c4dc2c390326b3f3e74c7b1e2b9a3657") - XCTAssertEqual("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq".sha3(.keccak512), "6aa6d3669597df6d5a007b00d09c20795b5c4218234e1698a944757a488ecdc09965435d97ca32c3cfed7201ff30e070cd947f1fc12b9d9214c467d342bcba5d") - - XCTAssertEqual("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu".sha3(.sha224), "543e6868e1666c1a643630df77367ae5a62a85070a51c14cbf665cbc") - XCTAssertEqual("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu".sha3(.sha256), "916f6061fe879741ca6469b43971dfdb28b1a32dc36cb3254e812be27aad1d18") - XCTAssertEqual("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu".sha3(.sha384), "79407d3b5916b59c3e30b09822974791c313fb9ecc849e406f23592d04f625dc8c709b98b43b3852b337216179aa7fc7") - XCTAssertEqual("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu".sha3(.sha512), "afebb2ef542e6579c50cad06d2e578f9f8dd6881d7dc824d26360feebf18a4fa73e3261122948efcfd492e74e82e2189ed0fb440d187f382270cb455f21dd185") - XCTAssertEqual("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu".sha3(.keccak224), "344298994b1b06873eae2ce739c425c47291a2e24189e01b524f88dc") - XCTAssertEqual("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu".sha3(.keccak256), "f519747ed599024f3882238e5ab43960132572b7345fbeb9a90769dafd21ad67") - XCTAssertEqual("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu".sha3(.keccak384), "cc063f34685135368b34f7449108f6d10fa727b09d696ec5331771da46a923b6c34dbd1d4f77e595689c1f3800681c28") - XCTAssertEqual("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu".sha3(.keccak512), "ac2fb35251825d3aa48468a9948c0a91b8256f6d97d8fa4160faff2dd9dfcc24f3f1db7a983dad13d53439ccac0b37e24037e7b95f80f59f37a2f683c4ba4682") - - XCTAssertEqual(Array(repeating: 0x61, count: 1_000_000).sha3(.sha224), Array(hex: "d69335b93325192e516a912e6d19a15cb51c6ed5c15243e7a7fd653c"), "One million (1,000,000) repetitions of the character 'a' (0x61)") - XCTAssertEqual(Array(repeating: 0x61, count: 1_000_000).sha3(.sha256), Array(hex: "5c8875ae474a3634ba4fd55ec85bffd661f32aca75c6d699d0cdcb6c115891c1"), "One million (1,000,000) repetitions of the character 'a' (0x61)") - XCTAssertEqual(Array(repeating: 0x61, count: 1_000_000).sha3(.sha384), Array(hex: "eee9e24d78c1855337983451df97c8ad9eedf256c6334f8e948d252d5e0e76847aa0774ddb90a842190d2c558b4b8340"), "One million (1,000,000) repetitions of the character 'a' (0x61)") - XCTAssertEqual(Array(repeating: 0x61, count: 1_000_000).sha3(.sha512), Array(hex: "3c3a876da14034ab60627c077bb98f7e120a2a5370212dffb3385a18d4f38859ed311d0a9d5141ce9cc5c66ee689b266a8aa18ace8282a0e0db596c90b0a7b87"), "One million (1,000,000) repetitions of the character 'a' (0x61)") - XCTAssertEqual(Array(repeating: 0x61, count: 1_000_000).sha3(.keccak224), Array(hex: "19f9167be2a04c43abd0ed554788101b9c339031acc8e1468531303f"), "One million (1,000,000) repetitions of the character 'a' (0x61)") - XCTAssertEqual(Array(repeating: 0x61, count: 1_000_000).sha3(.keccak256), Array(hex: "fadae6b49f129bbb812be8407b7b2894f34aecf6dbd1f9b0f0c7e9853098fc96"), "One million (1,000,000) repetitions of the character 'a' (0x61)") - XCTAssertEqual(Array(repeating: 0x61, count: 1_000_000).sha3(.keccak384), Array(hex: "0c8324e1ebc182822c5e2a086cac07c2fe00e3bce61d01ba8ad6b71780e2dec5fb89e5ae90cb593e57bc6258fdd94e17"), "One million (1,000,000) repetitions of the character 'a' (0x61)") - XCTAssertEqual(Array(repeating: 0x61, count: 1_000_000).sha3(.keccak512), Array(hex: "5cf53f2e556be5a624425ede23d0e8b2c7814b4ba0e4e09cbbf3c2fac7056f61e048fc341262875ebc58a5183fea651447124370c1ebf4d6c89bc9a7731063bb"), "One million (1,000,000) repetitions of the character 'a' (0x61)") - - // *** Multiple of block size *** - - // keccak block size bytes - XCTAssertEqual(Array(repeating: 0x00, count: 144).sha3(.keccak224), Array(hex: "a50976d8ed54c961a052bfd01a64cd79b11928a9d5b75146a0828888"), "Block size bytes for keccak224") - XCTAssertEqual(Array(repeating: 0x00, count: 136).sha3(.keccak256), Array(hex: "3a5912a7c5faa06ee4fe906253e339467a9ce87d533c65be3c15cb231cdb25f9"), "Block size bytes for keccak256") - XCTAssertEqual(Array(repeating: 0x00, count: 104).sha3(.keccak384), Array(hex: "768e10c2eb9903fba6bf290669bf98bd03ce42e7492da9abb88cbbe2212ed153c857e4e883fb1b03a498391935ec6112"), "Block size bytes for keccak384") - XCTAssertEqual(Array(repeating: 0x00, count: 72).sha3(.keccak512), Array(hex: "bcf38e5b375422155b4d8eb150682a14778b0695d709cec479d013a772497bc8d7050ef2a23d69609d609b15e5001f275c4619270ffbd6e8c06a7a5bf72334b3"), "Block size bytes for keccak512") - - // keccak two times block size bytes - XCTAssertEqual(Array(repeating: 0x00, count: 288).sha3(.keccak224), Array(hex: "846f930bf21e7ec2175a635379adbdbce9ed9de6a34396c4a11aaf3c"), "Two times block size bytes for keccak224") - XCTAssertEqual(Array(repeating: 0x00, count: 272).sha3(.keccak256), Array(hex: "a8005c7a3125b6c3629b4181eca54d18721e41fef639718d205beb00b366ed7d"), "Two times block size bytes for keccak256") - XCTAssertEqual(Array(repeating: 0x00, count: 208).sha3(.keccak384), Array(hex: "db6451e6fb59ca16c9ba896de2967b07ca331e9558e21257cb6b26f126ed480c841d37788907f77ef71f8258218b0203"), "Two times block size bytes for keccak384") - XCTAssertEqual(Array(repeating: 0x00, count: 144).sha3(.keccak512), Array(hex: "04ddaacd88ce54a4acb468b792d5177ace573e9871dc10b33d02be637b674373601ba5f433b67cc6ba8dc3a1707052f1f6bffc55ef1580aca021ead8bc8e1f22"), "Two times block size bytes for keccak512") - - // nist sha3 block size bytes - XCTAssertEqual(Array(repeating: 0x00, count: 144).sha3(.sha224), Array(hex: "f2b8486fceee2c6a11a604ce4efe217da854829c2c2dcc9a23758b4d"), "Block size bytes for sha3 sha224") - XCTAssertEqual(Array(repeating: 0x00, count: 136).sha3(.sha256), Array(hex: "e772c9cf9eb9c991cdfcf125001b454fdbc0a95f188d1b4c844aa032ad6e075e"), "Block size bytes for sha3 sha256") - XCTAssertEqual(Array(repeating: 0x00, count: 104).sha3(.sha384), Array(hex: "aaed6beb61b1f9a9b469d38a27a35edde7f676f4603e67f5424c7588043b869ebbfcfc3ecee2ae6f5ecfaf7f706c49e3"), "Block size bytes for sha3 sha384") - XCTAssertEqual(Array(repeating: 0x00, count: 72).sha3(.sha512), Array(hex: "f8d76fdd8a082a67eaab47b5518ac486cb9a90dcb9f3c9efcfd86d5c8b3f1831601d3c8435f84b9e56da91283d5b98040e6e7b2c8dd9aa5bd4ebdf1823a7cf29"), "Block size bytes for sha3 sha512") - - // nist sha3 two times block size bytes - XCTAssertEqual(Array(repeating: 0x00, count: 288).sha3(.sha224), Array(hex: "920370d3fec17c0ecbc2b5b7cd64f551860fb93384e0dc4fcaf2e1ba"), "Two times block size bytes for sha3 sha224") - XCTAssertEqual(Array(repeating: 0x00, count: 272).sha3(.sha256), Array(hex: "5d86a8cc4aa8f0d98146a747281865a625a19f9580eef32e38905920bc532c5c"), "Two times block size bytes for sha3 sha256") - XCTAssertEqual(Array(repeating: 0x00, count: 208).sha3(.sha384), Array(hex: "e741867850b8753bf7fa714b11c1ca9904d0494adaf5e2db43cca42f39637bd67685279d9dfcc45d56e8c288273904af"), "Two times block size bytes for sha3 sha384") - XCTAssertEqual(Array(repeating: 0x00, count: 144).sha3(.sha512), Array(hex: "07625da1770011d59b0a71a8dec551f0ddf1917e4117fc860bd7e0a0e42f3e012284f86d509e2f22a8682aea5930197fc1f3c353d0141665c9ac2643278c3821"), "Two times block size bytes for sha3 sha512") - // *** End Multiple of block size *** - } - - func testMD5Data() { - let data = [0x31, 0x32, 0x33] as Array // "1", "2", "3" - XCTAssertEqual(Digest.md5(data), [0x20, 0x2C, 0xB9, 0x62, 0xAC, 0x59, 0x07, 0x5B, 0x96, 0x4B, 0x07, 0x15, 0x2D, 0x23, 0x4B, 0x70], "MD5 calculation failed") - } - - func testMD5Updates() { - do { - var hash = MD5() - _ = try hash.update(withBytes: [0x31, 0x32]) - _ = try hash.update(withBytes: [0x33]) - let result = try hash.finish() - XCTAssertEqual(result, [0x20, 0x2C, 0xB9, 0x62, 0xAC, 0x59, 0x07, 0x5B, 0x96, 0x4B, 0x07, 0x15, 0x2D, 0x23, 0x4B, 0x70]) - } catch { - XCTFail() - } - } - - func testSHA1Updatable1() { - do { - var hash = SHA1() - _ = try hash.update(withBytes: [0x31, 0x32]) - _ = try hash.update(withBytes: [0x33]) - XCTAssertEqual(try hash.finish().toHexString(), "40bd001563085fc35165329ea1ff5c5ecbdbbeef", "Failed") - } catch { - XCTFail() - } - } - - func testSHA1Updatable2() { - do { - var hash = SHA1() - _ = try hash.update(withBytes: [0x31, 0x32]) - _ = try hash.update(withBytes: [0x33]) - _ = try hash.update(withBytes: Array(repeating: 0x33, count: 64)) - XCTAssertEqual(try hash.finish().toHexString(), "0e659367eff83a6b868a35b96ac305b270025e86", "Failed") - } catch { - XCTFail() - } - } - - func testCRC32() { - let data: Data = Data(bytes: [49, 50, 51] as Array, count: 3) - XCTAssertEqual(data.crc32(seed: nil).toHexString(), "884863d2", "CRC32 calculation failed") - - XCTAssertEqual("".crc32(seed: nil), "00000000", "CRC32 calculation failed") - } - - func testCRC32C() { - let data: Data = Data(bytes: [0x32, 0, 0, 0] as Array, count: 4) - XCTAssertEqual(data.crc32c(seed: nil).toHexString(), "c941cdf0", "CRC32C calculation failed") - XCTAssertEqual("".crc32c(seed: nil), "00000000", "CRC32 calculation failed") - } - - func testCRC32NotReflected() { - let bytes: Array = [0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39] - let data: Data = Data(bytes: bytes, count: bytes.count) - XCTAssertEqual(data.crc32(seed: nil, reflect: false).toHexString(), "fc891918", "CRC32 (with reflection) calculation failed") - - XCTAssertEqual("".crc32(seed: nil, reflect: false), "00000000", "CRC32 (with reflection) calculation failed") - } - - func testCRC16() { - let result = Checksum.crc16([49, 50, 51, 52, 53, 54, 55, 56, 57] as Array) - XCTAssert(result == 0xBB3D, "CRC16 failed") - } - - func testChecksum() { - let data: Data = Data(bytes: [49, 50, 51] as Array, count: 3) - XCTAssert(data.checksum() == 0x96, "Invalid checksum") - } - - func testChecksumPerformance() { - let len = 1_000_000 - let a = [UInt8](unsafeUninitializedCapacity: len) { buf, count in - for i in 0.. [(String, (DigestTests) -> () -> Void)] { - let tests = [ - ("testMD5", testMD5), - ("testSHA1", testSHA1), - ("testSHA2", testSHA2), - ("testSHA3", testSHA3), - ("testMD5Data", testMD5Data), - ("testMD5Updates", testMD5Updates), - ("testSHA1Updatable1", testSHA1Updatable1), - ("testSHA1Updatable2", testSHA1Updatable2), - ("testCRC32", testCRC32), - ("testCRC32NotReflected", testCRC32NotReflected), - ("testCRC16", testCRC16), - ("testChecksum", testChecksum), - ("testSHAPartialUpdates", testSHAPartialUpdates) - ] - - return tests - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/DigestTestsPerf.swift b/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/DigestTestsPerf.swift deleted file mode 100644 index eb3fe814d..000000000 --- a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/DigestTestsPerf.swift +++ /dev/null @@ -1,63 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// http://www.di-mgt.com.au/sha_testvectors.html (http://csrc.nist.gov/groups/ST/toolkit/documents/Examples/SHA_All.pdf) -// - -import Foundation -import XCTest -@testable import CryptoSwift - -final class DigestTestsPerf: XCTestCase { - func testMD5Performance() { - measureMetrics([XCTPerformanceMetric.wallClockTime], automaticallyStartMeasuring: false) { - let arr = Array(repeating: 200, count: 1024 * 1024) - self.startMeasuring() - _ = Digest.md5(arr) - self.stopMeasuring() - } - } - - func testSHA1Performance() { - measureMetrics([XCTPerformanceMetric.wallClockTime], automaticallyStartMeasuring: false) { - let arr = Array(repeating: 200, count: 1024 * 1024) - self.startMeasuring() - _ = Digest.sha1(arr) - self.stopMeasuring() - } - } - - // Keep it to compare - /* - func testSHA1PerformanceCC() { - measureMetrics([XCTPerformanceMetric.wallClockTime], automaticallyStartMeasuring: false) { - let arr = Array(repeating: 200, count: 1024 * 1024) - self.startMeasuring() - var digest = Array(repeating: 0, count: Int(CC_SHA1_DIGEST_LENGTH)) - CC_SHA1(arr, CC_LONG(arr.count), &digest) - self.stopMeasuring() - } - } - */ -} - -extension DigestTestsPerf { - static func allTests() -> [(String, (DigestTestsPerf) -> () -> Void)] { - [ - ("testMD5Performance", testMD5Performance), - ("testSHA1Performance", testSHA1Performance) - ] - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/Error+Extension.swift b/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/Error+Extension.swift deleted file mode 100644 index 7627874c1..000000000 --- a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/Error+Extension.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import Foundation - -#if !_runtime(_ObjC) - - extension Error { - var localizedDescription: String { - "\(self)" - } - } -#endif diff --git a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/ExtensionsTest.swift b/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/ExtensionsTest.swift deleted file mode 100644 index 11a905cea..000000000 --- a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/ExtensionsTest.swift +++ /dev/null @@ -1,140 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import Foundation -import XCTest -@testable import CryptoSwift - -final class ExtensionsTest: XCTestCase { - func testBytes() { - let size = MemoryLayout.size // 32 or 64 bit - - let i: UInt32 = 1024 - var bytes = i.bytes() - XCTAssertTrue(bytes.count == size, "Invalid bytes length = \(bytes.count)") - - // test padding - bytes = i.bytes(totalBytes: 16) - XCTAssertTrue(bytes.count == 16, "Invalid return type \(bytes.count)") - XCTAssertTrue(bytes[14] == 4, "Invalid return type \(bytes.count)") - } - - func testToUInt32Array() { - let chunk: ArraySlice = [0x8, 0x7, 0x6, 0x5, 0x4, 0x3, 0x2, 0x1] - let result = chunk.toUInt32Array() - - XCTAssert(result.count == 2, "Invalid conversion") - XCTAssertEqual(result[0], 0x5060708) - XCTAssertEqual(result[1], 0x1020304) - } - - func testToUInt32Performance() { - let len = 1_000_000 - let a = [UInt8](unsafeUninitializedCapacity: len) { buf, count in - for i in 0..(hex: "0xb1b1b2b2") - XCTAssertEqual(bytes, [177, 177, 178, 178]) - - let str = "b1b2b3b3b3b3b3b3b1b2b3b3b3b3b3b3" - let array = Array(hex: str) - let hex = array.toHexString() - XCTAssertEqual(str, hex) - } - - func testToHexStringPerformance() { - let len = 100000 - let a = [UInt8](unsafeUninitializedCapacity: len) { buf, count in - for i in 0.. [(String, (ExtensionsTest) -> () -> Void)] { - let tests = [ - ("testBytes", testBytes), - ("testToUInt32Array", testToUInt32Array), - ("testDataInit", testDataInit), - ("testStringEncrypt", testStringEncrypt), - ("testStringDecryptBase64", testStringDecryptBase64), - ("testEmptyStringEncrypt", testEmptyStringEncrypt), - ("testArrayInitHex", testArrayInitHex) - ] - - return tests - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/ExtensionsTestPerf.swift b/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/ExtensionsTestPerf.swift deleted file mode 100644 index 6c3b02548..000000000 --- a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/ExtensionsTestPerf.swift +++ /dev/null @@ -1,39 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import Foundation -import XCTest -@testable import CryptoSwift - -final class ExtensionsTestPerf: XCTestCase { - func testArrayInitHexPerformance() { - var str = "b1b2b3b3b3b3b3b3b1b2b3b3b3b3b3b3" - for _ in 0...12 { - str += str - } - measure { - _ = Array(hex: str) - } - } -} - -extension ExtensionsTestPerf { - static func allTests() -> [(String, (ExtensionsTestPerf) -> () -> Void)] { - let tests = [ - ("testArrayInitHexPerformance", testArrayInitHexPerformance) - ] - return tests - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/HKDFTests.swift b/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/HKDFTests.swift deleted file mode 100644 index 471aa5c76..000000000 --- a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/HKDFTests.swift +++ /dev/null @@ -1,97 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import XCTest -@testable import CryptoSwift - -class HKDFTests: XCTestCase { - /// All test cases are implemented with regard to RFC 5869 - /// https://www.ietf.org/rfc/rfc5869.txt - - func testHKDF1() { - let password = Array(hex: "0x0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b") - let salt = Array(hex: "0x000102030405060708090a0b0c") - let info = Array(hex: "0xf0f1f2f3f4f5f6f7f8f9") - let keyLength = 42 - let variant = HMAC.Variant.sha2(.sha256) - let reference = Array(hex: "0x3cb25f25faacd57a90434f64d0362f2a2d2d0a90cf1a5a4c5db02d56ecc4c5bf34007208d5b887185865") - - XCTAssertEqual(reference, try HKDF(password: password, salt: salt, info: info, keyLength: keyLength, variant: variant).calculate()) - } - - func testHKDF2() { - let password = Array(hex: "0x000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f") - let salt = Array(hex: "0x606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeaf") - let info = Array(hex: "0xb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff") - let keyLength = 82 - let variant = HMAC.Variant.sha2(.sha256) - let reference = Array(hex: "0xb11e398dc80327a1c8e7f78c596a49344f012eda2d4efad8a050cc4c19afa97c59045a99cac7827271cb41c65e590e09da3275600c2f09b8367793a9aca3db71cc30c58179ec3e87c14c01d5c1f3434f1d87") - - XCTAssertEqual(reference, try HKDF(password: password, salt: salt, info: info, keyLength: keyLength, variant: variant).calculate()) - } - - func testHKDF3() { - let password = Array(hex: "0x0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b") - let keyLength = 42 - let variant = HMAC.Variant.sha2(.sha256) - let reference = Array(hex: "0x8da4e775a563c18f715f802a063c5a31b8a11f5c5ee1879ec3454e5f3c738d2d9d201395faa4b61a96c8") - - XCTAssertEqual(reference, try HKDF(password: password, keyLength: keyLength, variant: variant).calculate()) - } - - func testHKDF4() { - let password = Array(hex: "0x0b0b0b0b0b0b0b0b0b0b0b") - let salt = Array(hex: "0x000102030405060708090a0b0c") - let info = Array(hex: "0xf0f1f2f3f4f5f6f7f8f9") - let keyLength = 42 - let variant = HMAC.Variant.sha1 - let reference = Array(hex: "0x085a01ea1b10f36933068b56efa5ad81a4f14b822f5b091568a9cdd4f155fda2c22e422478d305f3f896") - - XCTAssertEqual(reference, try HKDF(password: password, salt: salt, info: info, keyLength: keyLength, variant: variant).calculate()) - } - - func testHKDF5() { - let password = Array(hex: "0x000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f") - let salt = Array(hex: "0x606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeaf") - let info = Array(hex: "0xb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff") - let keyLength = 82 - let variant = HMAC.Variant.sha1 - let reference = Array(hex: "0x0bd770a74d1160f7c9f12cd5912a06ebff6adcae899d92191fe4305673ba2ffe8fa3f1a4e5ad79f3f334b3b202b2173c486ea37ce3d397ed034c7f9dfeb15c5e927336d0441f4c4300e2cff0d0900b52d3b4") - - XCTAssertEqual(reference, try HKDF(password: password, salt: salt, info: info, keyLength: keyLength, variant: variant).calculate()) - } - - func testHKDF6() { - let password = Array(hex: "0x0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b") - let keyLength = 42 - let variant = HMAC.Variant.sha1 - let reference = Array(hex: "0x0ac1af7002b3d761d1e55298da9d0506b9ae52057220a306e07b6b87e8df21d0ea00033de03984d34918") - - XCTAssertEqual(reference, try HKDF(password: password, keyLength: keyLength, variant: variant).calculate()) - } - - static func allTests() -> [(String, (HKDFTests) -> () -> Void)] { - let tests = [ - ("Basic test case with SHA-256", testHKDF1), - ("Test with SHA-256 and longer inputs/outputs", testHKDF2), - ("Test with SHA-256 and zero-length salt/info", testHKDF3), - ("Basic test case with SHA-1", testHKDF4), - ("Test with SHA-1 and longer inputs/outputs", testHKDF5), - ("Test with SHA-1 and zero-length salt/info", testHKDF6) - ] - - return tests - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/HMACTests.swift b/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/HMACTests.swift deleted file mode 100644 index 1684bb4de..000000000 --- a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/HMACTests.swift +++ /dev/null @@ -1,71 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import XCTest -@testable import CryptoSwift - -final class HMACTests: XCTestCase { - func testMD5() { - let key: Array = [] - let msg: Array = [] - let expectedMac: Array = [0x74, 0xe6, 0xf7, 0x29, 0x8a, 0x9c, 0x2d, 0x16, 0x89, 0x35, 0xf5, 0x8c, 0x00, 0x1b, 0xad, 0x88] - - let hmac = try! HMAC(key: key, variant: .md5).authenticate(msg) - XCTAssertEqual(hmac, expectedMac, "Invalid authentication result") - } - - func testSHA1() { - XCTAssertEqual(try HMAC(key: [], variant: .sha1).authenticate([]), Array(hex: "fbdb1d1b18aa6c08324b7d64b71fb76370690e1d")) - // echo -n "test" | openssl sha1 -hmac 'test' - XCTAssertEqual(try HMAC(key: Array(hex: "74657374"), variant: .sha1).authenticate(Array(hex: "74657374")), Array(hex: "0c94515c15e5095b8a87a50ba0df3bf38ed05fe6")) - // echo -n "test" | openssl sha1 -hmac '0123456789012345678901234567890123456789012345678901234567890123' - XCTAssertEqual(try HMAC(key: Array(hex: "30313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233"), variant: .sha1).authenticate(Array(hex: "74657374")), Array(hex: "23cea58b0c484ed005434938ee70a938d7524e91")) - } - - func testSHA256() { - let key: Array = [] - let msg: Array = [] - let expectedMac: Array = [0xb6, 0x13, 0x67, 0x9a, 0x08, 0x14, 0xd9, 0xec, 0x77, 0x2f, 0x95, 0xd7, 0x78, 0xc3, 0x5f, 0xc5, 0xff, 0x16, 0x97, 0xc4, 0x93, 0x71, 0x56, 0x53, 0xc6, 0xc7, 0x12, 0x14, 0x42, 0x92, 0xc5, 0xad] - - let hmac = try! HMAC(key: key, variant: .sha2(.sha256)).authenticate(msg) - XCTAssertEqual(hmac, expectedMac, "Invalid authentication result") - } - - func testSHA384() { - let key: Array = [] - let msg: Array = [] - let expectedMac: Array = [0x6c, 0x1f, 0x2e, 0xe9, 0x38, 0xfa, 0xd2, 0xe2, 0x4b, 0xd9, 0x12, 0x98, 0x47, 0x43, 0x82, 0xca, 0x21, 0x8c, 0x75, 0xdb, 0x3d, 0x83, 0xe1, 0x14, 0xb3, 0xd4, 0x36, 0x77, 0x76, 0xd1, 0x4d, 0x35, 0x51, 0x28, 0x9e, 0x75, 0xe8, 0x20, 0x9c, 0xd4, 0xb7, 0x92, 0x30, 0x28, 0x40, 0x23, 0x4a, 0xdc] - - let hmac = try! HMAC(key: key, variant: .sha2(.sha384)).authenticate(msg) - XCTAssertEqual(hmac, expectedMac, "Invalid authentication result") - } - - func testSHA512() { - let key: Array = [] - let msg: Array = [] - let expectedMac: Array = [0xb9, 0x36, 0xce, 0xe8, 0x6c, 0x9f, 0x87, 0xaa, 0x5d, 0x3c, 0x6f, 0x2e, 0x84, 0xcb, 0x5a, 0x42, 0x39, 0xa5, 0xfe, 0x50, 0x48, 0x0a, 0x6e, 0xc6, 0x6b, 0x70, 0xab, 0x5b, 0x1f, 0x4a, 0xc6, 0x73, 0x0c, 0x6c, 0x51, 0x54, 0x21, 0xb3, 0x27, 0xec, 0x1d, 0x69, 0x40, 0x2e, 0x53, 0xdf, 0xb4, 0x9a, 0xd7, 0x38, 0x1e, 0xb0, 0x67, 0xb3, 0x38, 0xfd, 0x7b, 0x0c, 0xb2, 0x22, 0x47, 0x22, 0x5d, 0x47] - - let hmac = try! HMAC(key: key, variant: .sha2(.sha512)).authenticate(msg) - XCTAssertEqual(hmac, expectedMac, "Invalid authentication result") - } - - static let allTests = [ - ("testMD5", testMD5), - ("testSHA1", testSHA1), - ("testSHA256", testSHA256), - ("testSHA384", testSHA384), - ("testSHA512", testSHA512) - ] -} diff --git a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/PBKDF.swift b/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/PBKDF.swift deleted file mode 100644 index 6665dd7ed..000000000 --- a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/PBKDF.swift +++ /dev/null @@ -1,74 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import XCTest -@testable import CryptoSwift - -class PBKDF: XCTestCase { - func testPBKDF1() { - let password: Array = [0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64] - let salt: Array = [0x78, 0x57, 0x8e, 0x5a, 0x5d, 0x63, 0xcb, 0x06] - let value = try! PKCS5.PBKDF1(password: password, salt: salt, iterations: 1000, keyLength: 16).calculate() - XCTAssertEqual(value.toHexString(), "dc19847e05c64d2faf10ebfb4a3d2a20") - } - - func testPBKDF2() { - // P = "password", S = "salt", c = 1, dkLen = 20 - XCTAssertEqual([0x0c, 0x60, 0xc8, 0x0f, 0x96, 0x1f, 0x0e, 0x71, 0xf3, 0xa9, 0xb5, 0x24, 0xaf, 0x60, 0x12, 0x06, 0x2f, 0xe0, 0x37, 0xa6], - try PKCS5.PBKDF2(password: [0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64], salt: [0x73, 0x61, 0x6c, 0x74], iterations: 1, keyLength: 20, variant: .sha1).calculate()) - - // P = "password", S = "salt", c = 2, dkLen = 20 - XCTAssertEqual([0xea, 0x6c, 0x01, 0x4d, 0xc7, 0x2d, 0x6f, 0x8c, 0xcd, 0x1e, 0xd9, 0x2a, 0xce, 0x1d, 0x41, 0xf0, 0xd8, 0xde, 0x89, 0x57], - try PKCS5.PBKDF2(password: [0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64], salt: [0x73, 0x61, 0x6c, 0x74], iterations: 2, keyLength: 20, variant: .sha1).calculate()) - - // P = "password", S = "salt", c = 4096, dkLen = 20 - XCTAssertEqual([0x4b, 0x00, 0x79, 0x01, 0xb7, 0x65, 0x48, 0x9a, 0xbe, 0xad, 0x49, 0xd9, 0x26, 0xf7, 0x21, 0xd0, 0x65, 0xa4, 0x29, 0xc1], - try PKCS5.PBKDF2(password: [0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64], salt: [0x73, 0x61, 0x6c, 0x74], iterations: 4096, keyLength: 20, variant: .sha1).calculate()) - - // P = "password", S = "salt", c = 16777216, dkLen = 20 - // Commented because it takes a lot of time with Debug build to finish. - // XCTAssertEqual([0xee, 0xfe, 0x3d, 0x61, 0xcd, 0x4d, 0xa4, 0xe4, 0xe9, 0x94, 0x5b, 0x3d, 0x6b, 0xa2, 0x15, 0x8c, 0x26, 0x34, 0xe9, 0x84], - // try PKCS5.PBKDF2(password: [0x70, 0x61, 0x73, 0x73, 0x77, 0x6F, 0x72, 0x64], salt: [0x73, 0x61, 0x6C, 0x74], iterations: 16777216, keyLength: 20, variant: .sha1).calculate()) - - // P = "passwordPASSWORDpassword", S = "saltSALTsaltSALTsaltSALTsaltSALTsalt", c = 4096, dkLen = 25 - XCTAssertEqual([0x3d, 0x2e, 0xec, 0x4f, 0xe4, 0x1c, 0x84, 0x9b, 0x80, 0xc8, 0xd8, 0x36, 0x62, 0xc0, 0xe4, 0x4a, 0x8b, 0x29, 0x1a, 0x96, 0x4c, 0xf2, 0xf0, 0x70, 0x38], - try PKCS5.PBKDF2(password: [0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52, 0x44, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64], salt: [0x73, 0x61, 0x6c, 0x74, 0x53, 0x41, 0x4c, 0x54, 0x73, 0x61, 0x6c, 0x74, 0x53, 0x41, 0x4c, 0x54, 0x73, 0x61, 0x6c, 0x74, 0x53, 0x41, 0x4c, 0x54, 0x73, 0x61, 0x6c, 0x74, 0x53, 0x41, 0x4c, 0x54, 0x73, 0x61, 0x6c, 0x74], iterations: 4096, keyLength: 25, variant: .sha1).calculate()) - - // P = "pass\0word", S = "sa\0lt", c = 4096, dkLen = 16 - XCTAssertEqual([0x56, 0xfa, 0x6a, 0xa7, 0x55, 0x48, 0x09, 0x9d, 0xcc, 0x37, 0xd7, 0xf0, 0x34, 0x25, 0xe0, 0xc3], - try PKCS5.PBKDF2(password: [0x70, 0x61, 0x73, 0x73, 0x00, 0x77, 0x6f, 0x72, 0x64], salt: [0x73, 0x61, 0x00, 0x6c, 0x74], iterations: 4096, keyLength: 16, variant: .sha1).calculate()) - - // P = "", S = "salt", c = 1, dkLen = 20 - XCTAssertEqual([0xa3, 0x3d, 0xdd, 0xc3, 0x04, 0x78, 0x18, 0x55, 0x15, 0x31, 0x1f, 0x87, 0x52, 0x89, 0x5d, 0x36, 0xea, 0x43, 0x63, 0xa2], - try PKCS5.PBKDF2(password: [], salt: [0x73, 0x61, 0x6c, 0x74], iterations: 1, keyLength: 20, variant: .sha1).calculate()) - } - - func testPBKDF2Length() { - let password: Array = "s33krit".bytes - let salt: Array = "nacl".bytes - let value = try! PKCS5.PBKDF2(password: password, salt: salt, iterations: 2, keyLength: 8, variant: .sha1).calculate() - XCTAssertEqual(value.toHexString(), "a53cf3df485e5cd9") - } - - static func allTests() -> [(String, (PBKDF) -> () -> Void)] { - let tests = [ - ("testPBKDF1", testPBKDF1), - ("testPBKDF2", testPBKDF2), - ("testPBKDF2Length", testPBKDF2Length) - ] - - return tests - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/PBKDFPerf.swift b/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/PBKDFPerf.swift deleted file mode 100644 index f2d5496cf..000000000 --- a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/PBKDFPerf.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import XCTest -@testable import CryptoSwift - -class PBKDFPerf: XCTestCase { - func testPerformance() { - let password: Array = "s33krit".bytes - let salt: Array = "nacl".bytes - measure { - _ = try! PKCS5.PBKDF2(password: password, salt: salt, iterations: 65536, keyLength: 32, variant: .sha1).calculate() - } - } - - static func allTests() -> [(String, (PBKDFPerf) -> () -> Void)] { - let tests = [("testPerformance", testPerformance)] - return tests - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/PaddingTests.swift b/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/PaddingTests.swift deleted file mode 100644 index f57a187b4..000000000 --- a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/PaddingTests.swift +++ /dev/null @@ -1,133 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import XCTest -@testable import CryptoSwift - -final class PaddingTests: XCTestCase { - func testPKCS7_0() { - let input: Array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6] - let expected: Array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16] - let padded = PKCS7.Padding().add(to: input, blockSize: 16) - XCTAssertEqual(padded, expected, "PKCS7 failed") - let clean = PKCS7.Padding().remove(from: padded, blockSize: nil) - XCTAssertEqual(clean, input, "PKCS7 failed") - } - - func testPKCS7_1() { - let input: Array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5] - let expected: Array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 1] - let padded = PKCS7.Padding().add(to: input, blockSize: 16) - XCTAssertEqual(padded, expected, "PKCS7 failed") - let clean = PKCS7.Padding().remove(from: padded, blockSize: nil) - XCTAssertEqual(clean, input, "PKCS7 failed") - } - - func testPKCS7_2() { - let input: Array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4] - let expected: Array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 2, 2] - let padded = PKCS7.Padding().add(to: input, blockSize: 16) - XCTAssertEqual(padded, expected, "PKCS7 failed") - let clean = PKCS7.Padding().remove(from: padded, blockSize: nil) - XCTAssertEqual(clean, input, "PKCS7 failed") - } - - func testZeroPadding1() { - let input: Array = [1, 2, 3, 4, 5, 6, 7, 8, 9] - let expected: Array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0] - let padding = ZeroPadding() - XCTAssertEqual(padding.add(to: input, blockSize: 16), expected, "ZeroPadding failed") - XCTAssertEqual(padding.remove(from: padding.add(to: input, blockSize: 16), blockSize: 16), input, "ZeroPadding failed") - } - - func testZeroPadding2() { - let input: Array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6] - let expected: Array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] - let padding = ZeroPadding() - XCTAssertEqual(padding.add(to: input, blockSize: 16), expected, "ZeroPadding failed") - XCTAssertEqual(padding.remove(from: padding.add(to: input, blockSize: 16), blockSize: 16), input, "ZeroPadding failed") - } - - func testISO78164_0() { - let input: Array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 0x80] - let expected: Array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 0x80, 0x80] - let padded = ISO78164Padding().add(to: input, blockSize: 16) - XCTAssertEqual(padded, expected, "ISO78164 failed") - let clean = ISO78164Padding().remove(from: padded, blockSize: nil) - XCTAssertEqual(clean, input, "ISO78164 failed") - } - - func testISO78164_1() { - let input: Array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 0] - let expected: Array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 0, 0x80] + [UInt8](repeating: UInt8(0), count: 15) - let padded = ISO78164Padding().add(to: input, blockSize: 16) - XCTAssertEqual(padded, expected, "ISO78164 failed") - let clean = ISO78164Padding().remove(from: padded, blockSize: nil) - XCTAssertEqual(clean, input, "ISO78164 failed") - } - - func testISO78164_2() { - let input: Array = [] - let expected: Array = [0x80] + [UInt8](repeating: UInt8(0), count: 15) - let padded = ISO78164Padding().add(to: input, blockSize: 16) - XCTAssertEqual(padded, expected, "ISO78164 failed") - let clean = ISO78164Padding().remove(from: padded, blockSize: nil) - XCTAssertEqual(clean, input, "ISO78164 failed") - } - - func testISO10126_0() { - let input: Array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3] - let padded = ISO10126Padding().add(to: input, blockSize: 16) - XCTAssertTrue(padded.starts(with: input), "ISO10126 failed") - XCTAssertEqual(padded.last, 3, "ISO10126 failed") - XCTAssertEqual(padded.count, 16) - let clean = ISO10126Padding().remove(from: padded, blockSize: nil) - XCTAssertEqual(clean, input, "ISO10126 failed") - } - - func testISO10126_1() { - let input: Array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6] - let padded = ISO10126Padding().add(to: input, blockSize: 16) - XCTAssertTrue(padded.starts(with: input), "ISO10126 failed") - XCTAssertEqual(padded.last, 16, "ISO10126 failed") - XCTAssertEqual(padded.count, 32) - let clean = ISO10126Padding().remove(from: padded, blockSize: nil) - XCTAssertEqual(clean, input, "ISO10126 failed") - } - - func testISO10126_2() { - let input: Array = [] - let padded = ISO10126Padding().add(to: input, blockSize: 16) - XCTAssertTrue(padded.starts(with: input), "ISO10126 failed") - XCTAssertEqual(padded.last, 16, "ISO10126 failed") - XCTAssertEqual(padded.count, 16) - let clean = ISO10126Padding().remove(from: padded, blockSize: nil) - XCTAssertEqual(clean, input, "ISO10126 failed") - } - - static let allTests = [ - ("testPKCS7_0", testPKCS7_0), - ("testPKCS7_1", testPKCS7_1), - ("testPKCS7_2", testPKCS7_2), - ("testZeroPadding1", testZeroPadding1), - ("testZeroPadding2", testZeroPadding2), - ("testISO78164_0", testISO78164_0), - ("testISO78164_1", testISO78164_1), - ("testISO78164_2", testISO78164_2), - ("testISO10126_0", testISO10126_0), - ("testISO10126_1", testISO10126_1), - ("testISO10126_2", testISO10126_2) - ] -} diff --git a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/Poly1305Tests.swift b/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/Poly1305Tests.swift deleted file mode 100644 index cdc1dcb54..000000000 --- a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/Poly1305Tests.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import Foundation -import XCTest -@testable import CryptoSwift - -final class Poly1305Tests: XCTestCase { - func testPoly1305() { - let key: Array = [0xdd, 0xde, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc] - let msg: Array = [0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc1] - let expectedMac: Array = [0xdd, 0xb9, 0xda, 0x7d, 0xdd, 0x5e, 0x52, 0x79, 0x27, 0x30, 0xed, 0x5c, 0xda, 0x5f, 0x90, 0xa4] - - XCTAssertEqual(try Poly1305(key: key).authenticate(msg), expectedMac) - - // extensions - let msgData = Data( msg) - XCTAssertEqual(try msgData.authenticate(with: Poly1305(key: key)), Data( expectedMac), "Invalid authentication result") - } - - // https://github.com/krzyzanowskim/CryptoSwift/issues/183 - func testIssue183() { - let key: Array = [111, 53, 197, 181, 1, 92, 67, 199, 37, 92, 76, 167, 12, 35, 75, 226, 198, 34, 107, 84, 79, 6, 231, 10, 25, 221, 14, 155, 81, 244, 15, 203] - let message: Array = [208, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 162, 210, 40, 78, 3, 161, 87, 187, 96, 253, 104, 187, 87, 87, 249, 56, 5, 156, 122, 121, 196, 192, 254, 58, 98, 22, 47, 151, 205, 201, 108, 143, 197, 99, 182, 109, 59, 63, 172, 111, 120, 185, 175, 129, 59, 126, 68, 140, 237, 126, 175, 49, 224, 249, 245, 37, 75, 252, 69, 215, 171, 27, 163, 16, 185, 239, 184, 144, 37, 131, 242, 12, 90, 134, 24, 237, 209, 127, 71, 86, 122, 173, 238, 73, 186, 58, 102, 112, 90, 217, 243, 251, 110, 85, 106, 18, 172, 167, 179, 173, 73, 125, 9, 129, 132, 80, 70, 4, 254, 178, 211, 200, 207, 231, 232, 17, 176, 127, 153, 120, 71, 164, 139, 56, 106, 71, 96, 79, 11, 213, 243, 66, 53, 167, 108, 233, 250, 136, 69, 190, 191, 12, 136, 24, 157, 202, 49, 158, 152, 150, 34, 88, 132, 112, 74, 168, 153, 116, 31, 7, 61, 60, 22, 199, 108, 187, 209, 114, 234, 185, 247, 41, 68, 184, 95, 169, 60, 126, 73, 59, 54, 126, 162, 90, 18, 32, 230, 123, 2, 40, 74, 177, 127, 219, 93, 186, 22, 75, 251, 101, 95, 160, 68, 235, 77, 2, 10, 202, 2, 0, 0, 0, 0, 0, 0, 0, 208, 0, 0, 0, 0, 0, 0, 0] - let expectedMac: Array = [68, 216, 92, 163, 164, 144, 55, 43, 185, 18, 83, 92, 41, 133, 72, 168] - XCTAssertEqual(try message.authenticate(with: Poly1305(key: key)), expectedMac) - } - - static let allTests = [ - ("testPoly1305", testPoly1305), - ("testIssue183", testIssue183) - ] -} diff --git a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/RabbitTests.swift b/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/RabbitTests.swift deleted file mode 100644 index fdd104327..000000000 --- a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/RabbitTests.swift +++ /dev/null @@ -1,128 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import XCTest -@testable import CryptoSwift - -class RabbitTests: XCTestCase { - func testInitialization() { - var key = Array(repeating: 0, count: Rabbit.keySize - 1) - var iv: Array? - XCTAssertThrowsError(try Rabbit(key: key, iv: iv)) - - key = Array(repeating: 0, count: Rabbit.keySize + 1) - XCTAssertThrowsError(try Rabbit(key: key, iv: iv)) - - key = Array(repeating: 0, count: Rabbit.keySize) - XCTAssertNotNil(try Rabbit(key: key, iv: iv)) - - iv = Array(repeating: 0, count: Rabbit.ivSize - 1) - XCTAssertThrowsError(try Rabbit(key: key, iv: iv)) - - iv = Array(repeating: 0, count: Rabbit.ivSize) - XCTAssertNotNil(try Rabbit(key: key, iv: iv)) - } - - func testRabbitWithoutIV() { - // Examples from Appendix A: Test Vectors in http://tools.ietf.org/rfc/rfc4503.txt - let cases: [(Array, Array)] = [ // First case - ( - [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], - [ - 0xb1, 0x57, 0x54, 0xf0, 0x36, 0xa5, 0xd6, 0xec, 0xf5, 0x6b, 0x45, 0x26, 0x1c, 0x4a, 0xf7, 0x02, - 0x88, 0xe8, 0xd8, 0x15, 0xc5, 0x9c, 0x0c, 0x39, 0x7b, 0x69, 0x6c, 0x47, 0x89, 0xc6, 0x8a, 0xa7, - 0xf4, 0x16, 0xa1, 0xc3, 0x70, 0x0c, 0xd4, 0x51, 0xda, 0x68, 0xd1, 0x88, 0x16, 0x73, 0xd6, 0x96 - ] - ), - // Second case - ( - [0x91, 0x28, 0x13, 0x29, 0x2e, 0x3d, 0x36, 0xfe, 0x3b, 0xfc, 0x62, 0xf1, 0xdc, 0x51, 0xc3, 0xac], - [ - 0x3d, 0x2d, 0xf3, 0xc8, 0x3e, 0xf6, 0x27, 0xa1, 0xe9, 0x7f, 0xc3, 0x84, 0x87, 0xe2, 0x51, 0x9c, - 0xf5, 0x76, 0xcd, 0x61, 0xf4, 0x40, 0x5b, 0x88, 0x96, 0xbf, 0x53, 0xaa, 0x85, 0x54, 0xfc, 0x19, - 0xe5, 0x54, 0x74, 0x73, 0xfb, 0xdb, 0x43, 0x50, 0x8a, 0xe5, 0x3b, 0x20, 0x20, 0x4d, 0x4c, 0x5e - ] - ), - // Third case - ( - [0x83, 0x95, 0x74, 0x15, 0x87, 0xe0, 0xc7, 0x33, 0xe9, 0xe9, 0xab, 0x01, 0xc0, 0x9b, 0x00, 0x43], - [ - 0x0c, 0xb1, 0x0d, 0xcd, 0xa0, 0x41, 0xcd, 0xac, 0x32, 0xeb, 0x5c, 0xfd, 0x02, 0xd0, 0x60, 0x9b, - 0x95, 0xfc, 0x9f, 0xca, 0x0f, 0x17, 0x01, 0x5a, 0x7b, 0x70, 0x92, 0x11, 0x4c, 0xff, 0x3e, 0xad, - 0x96, 0x49, 0xe5, 0xde, 0x8b, 0xfc, 0x7f, 0x3f, 0x92, 0x41, 0x47, 0xad, 0x3a, 0x94, 0x74, 0x28 - ] - ) - ] - - let plainText = Array(repeating: 0, count: 48) - for (key, expectedCipher) in cases { - let rabbit = try! Rabbit(key: key) - let cipherText = try! rabbit.encrypt(plainText) - XCTAssertEqual(cipherText, expectedCipher) - XCTAssertEqual(try! rabbit.decrypt(cipherText), plainText) - } - } - - func testRabbitWithIV() { - // Examples from Appendix A: Test Vectors in http://tools.ietf.org/rfc/rfc4503.txt - let key = Array(repeating: 0, count: Rabbit.keySize) - let cases: [(Array, Array)] = [ - ( - [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], - [ - 0xc6, 0xa7, 0x27, 0x5e, 0xf8, 0x54, 0x95, 0xd8, 0x7c, 0xcd, 0x5d, 0x37, 0x67, 0x05, 0xb7, 0xed, - 0x5f, 0x29, 0xa6, 0xac, 0x04, 0xf5, 0xef, 0xd4, 0x7b, 0x8f, 0x29, 0x32, 0x70, 0xdc, 0x4a, 0x8d, - 0x2a, 0xde, 0x82, 0x2b, 0x29, 0xde, 0x6c, 0x1e, 0xe5, 0x2b, 0xdb, 0x8a, 0x47, 0xbf, 0x8f, 0x66 - ] - ), - ( - [0xc3, 0x73, 0xf5, 0x75, 0xc1, 0x26, 0x7e, 0x59], - [ - 0x1f, 0xcd, 0x4e, 0xb9, 0x58, 0x00, 0x12, 0xe2, 0xe0, 0xdc, 0xcc, 0x92, 0x22, 0x01, 0x7d, 0x6d, - 0xa7, 0x5f, 0x4e, 0x10, 0xd1, 0x21, 0x25, 0x01, 0x7b, 0x24, 0x99, 0xff, 0xed, 0x93, 0x6f, 0x2e, - 0xeb, 0xc1, 0x12, 0xc3, 0x93, 0xe7, 0x38, 0x39, 0x23, 0x56, 0xbd, 0xd0, 0x12, 0x02, 0x9b, 0xa7 - ] - ), - ( - [0xa6, 0xeb, 0x56, 0x1a, 0xd2, 0xf4, 0x17, 0x27], - [ - 0x44, 0x5a, 0xd8, 0xc8, 0x05, 0x85, 0x8d, 0xbf, 0x70, 0xb6, 0xaf, 0x23, 0xa1, 0x51, 0x10, 0x4d, - 0x96, 0xc8, 0xf2, 0x79, 0x47, 0xf4, 0x2c, 0x5b, 0xae, 0xae, 0x67, 0xc6, 0xac, 0xc3, 0x5b, 0x03, - 0x9f, 0xcb, 0xfc, 0x89, 0x5f, 0xa7, 0x1c, 0x17, 0x31, 0x3d, 0xf0, 0x34, 0xf0, 0x15, 0x51, 0xcb - ] - ) - ] - - let plainText = Array(repeating: 0, count: 48) - for (iv, expectedCipher) in cases { - let rabbit = try! Rabbit(key: key, iv: iv) - let cipherText = try! rabbit.encrypt(plainText) - XCTAssertEqual(cipherText, expectedCipher) - XCTAssertEqual(try! rabbit.decrypt(cipherText), plainText) - } - } -} - -extension RabbitTests { - static func allTests() -> [(String, (RabbitTests) -> () -> Void)] { - let tests = [ - ("testInitialization", testInitialization), - ("testRabbitWithoutIV", testRabbitWithoutIV), - ("testRabbitWithIV", testRabbitWithIV) - ] - - return tests - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/RabbitTestsPerf.swift b/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/RabbitTestsPerf.swift deleted file mode 100644 index 05de1b5ea..000000000 --- a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/RabbitTestsPerf.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import XCTest -@testable import CryptoSwift - -class RabbitTestsPerf: XCTestCase { - func testRabbitPerformance() { - let key: Array = Array(repeating: 0, count: Rabbit.keySize) - let iv: Array = Array(repeating: 0, count: Rabbit.ivSize) - let message = Array(repeating: 7, count: (1024 * 1024) * 1) - measure { - _ = try! Rabbit(key: key, iv: iv).encrypt(message) - } - } -} - -extension RabbitTestsPerf { - static func allTests() -> [(String, (RabbitTestsPerf) -> () -> Void)] { - let tests = [ - ("testRabbitPerformance", testRabbitPerformance) - ] - return tests - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/SHATestsPerf.swift b/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/SHATestsPerf.swift deleted file mode 100644 index c1f52aa22..000000000 --- a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/SHATestsPerf.swift +++ /dev/null @@ -1,108 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import Foundation -import XCTest -@testable import CryptoSwift - -final class SHATestsPerf: XCTestCase { - - static let len = 100000 - let a = [UInt8](unsafeUninitializedCapacity: SHATestsPerf.len) { buf, count in - for i in 0.. -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import XCTest -@testable import CryptoSwift - -class Scrypt: XCTestCase { - - func testScrypt_0() { - let password = Array("password".data(using: .ascii)!) - let salt = Array("NaCl".data(using: .ascii)!) - let deriver = try! CryptoSwift.Scrypt(password: password, salt: salt, dkLen: 64, N: 1024, r: 8, p: 16) - let derived = try! deriver.calculate() - let expected: [UInt8] = Array.init(hex: """ - fd ba be 1c 9d 34 72 00 78 56 e7 19 0d 01 e9 fe - 7c 6a d7 cb c8 23 78 30 e7 73 76 63 4b 37 31 62 - 2e af 30 d9 2e 22 a3 88 6f f1 09 27 9d 98 30 da - c7 27 af b9 4a 83 ee 6d 83 60 cb df a2 cc 06 40 - """.replacingOccurrences(of: " ", with: "").replacingOccurrences(of: "\n", with: "").replacingOccurrences(of: "\t", with: "")) - XCTAssertEqual(derived, expected) - } - - func testScrypt_1() { - let password = Array("pleaseletmein".data(using: .ascii)!) - let salt = Array("SodiumChloride".data(using: .ascii)!) - let deriver = try! CryptoSwift.Scrypt(password: password, salt: salt, dkLen: 64, N: 16384, r: 8, p: 1) - let derived = try! deriver.calculate() - let expected: [UInt8] = Array.init(hex: """ - 70 23 bd cb 3a fd 73 48 46 1c 06 cd 81 fd 38 eb - fd a8 fb ba 90 4f 8e 3e a9 b5 43 f6 54 5d a1 f2 - d5 43 29 55 61 3f 0f cf 62 d4 97 05 24 2a 9a f9 - e6 1e 85 dc 0d 65 1e 40 df cf 01 7b 45 57 58 87 - """.replacingOccurrences(of: " ", with: "").replacingOccurrences(of: "\n", with: "").replacingOccurrences(of: "\t", with: "")) - XCTAssertEqual(derived, expected) - } - -// Takes too long to run in debug mode! - func testScrypt_2() { - #if !DEBUG - let password = Array("pleaseletmein".data(using: .ascii)!) - let salt = Array("SodiumChloride".data(using: .ascii)!) - let deriver = try! CryptoSwift.Scrypt(password: password, salt: salt, dkLen: 64, N: 1048576, r: 8, p: 1) - let derived = try! deriver.calculate() - let expected: [UInt8] = Array.init(hex: """ - 21 01 cb 9b 6a 51 1a ae ad db be 09 cf 70 f8 81 - ec 56 8d 57 4a 2f fd 4d ab e5 ee 98 20 ad aa 47 - 8e 56 fd 8f 4b a5 d0 9f fa 1c 6d 92 7c 40 f4 c3 - 37 30 40 49 e8 a9 52 fb cb f4 5c 6f a7 7a 41 a4 - """.replacingOccurrences(of: " ", with: "").replacingOccurrences(of: "\n", with: "").replacingOccurrences(of: "\t", with: "")) - XCTAssertEqual(derived, expected) - #endif - } - - static let allTests = [ - ("testScrypt_0", testScrypt_0), - ("testScrypt_1", testScrypt_1), - ("testScrypt_2", testScrypt_2) - ] -} diff --git a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/ScryptTestsPerf.swift b/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/ScryptTestsPerf.swift deleted file mode 100644 index 52d850e18..000000000 --- a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/ScryptTestsPerf.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import XCTest -@testable import CryptoSwift - -class ScryptTestsPeft: XCTestCase { - func testScryptPerformance() { - let N = 16384 - let password: Array = Array(repeating: 0, count: 32) - let salt: Array = Array(repeating: 0, count: 32) - measure { - _ = try! CryptoSwift.Scrypt(password: password, salt: salt, dkLen: 64, N: N, r: 8, p: 1).calculate() - } - } -} - -extension ScryptTestsPeft { - static func allTests() -> [(String, (ScryptTestsPeft) -> () -> Void)] { - let tests = [ - ("testScryptPerformance", testScryptPerformance) - ] - return tests - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/XCTestManifests.swift b/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/XCTestManifests.swift deleted file mode 100644 index 25d18cfdc..000000000 --- a/Carthage/Checkouts/CryptoSwift/Tests/CryptoSwiftTests/XCTestManifests.swift +++ /dev/null @@ -1,406 +0,0 @@ -#if !canImport(ObjectiveC) -import XCTest - -extension AESCCMTests { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__AESCCMTests = [ - ("testAESCCMTestCase1", testAESCCMTestCase1), - ("testAESCCMTestCase1Decrypt", testAESCCMTestCase1Decrypt), - ("testAESCCMTestCase2", testAESCCMTestCase2), - ("testAESCCMTestCase2Decrypt", testAESCCMTestCase2Decrypt), - ("testAESCCMTestCase3", testAESCCMTestCase3), - ("testAESCCMTestCase3Decrypt", testAESCCMTestCase3Decrypt), - ("testAESCCMTestCase3DecryptPartial", testAESCCMTestCase3DecryptPartial), - ("testAESCCMTestDVPT256", testAESCCMTestDVPT256), - ] -} - -extension AESTests { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__AESTests = [ - ("testAESDecryptCBCWithPaddingPartial", testAESDecryptCBCWithPaddingPartial), - ("testAESDecryptCTRSeek", testAESDecryptCTRSeek), - ("testAESEncrypt", testAESEncrypt), - ("testAESEncrypt2", testAESEncrypt2), - ("testAESEncrypt3", testAESEncrypt3), - ("testAESEncryptCBCNoPadding", testAESEncryptCBCNoPadding), - ("testAESEncryptCBCWithPadding", testAESEncryptCBCWithPadding), - ("testAESEncryptCBCWithPaddingPartial", testAESEncryptCBCWithPaddingPartial), - ("testAESEncryptCFB", testAESEncryptCFB), - ("testAESEncryptCFBLong", testAESEncryptCFBLong), - ("testAESEncryptCTR", testAESEncryptCTR), - ("testAESEncryptCTRIrregularLength", testAESEncryptCTRIrregularLength), - ("testAESEncryptCTRIrregularLengthIncrementalUpdate", testAESEncryptCTRIrregularLengthIncrementalUpdate), - ("testAESEncryptCTRStream", testAESEncryptCTRStream), - ("testAESEncryptCTRZeroPadding", testAESEncryptCTRZeroPadding), - ("testAESEncryptIncremental", testAESEncryptIncremental), - ("testAESEncryptOFB128", testAESEncryptOFB128), - ("testAESEncryptOFB256", testAESEncryptOFB256), - ("testAESEncryptPCBC256", testAESEncryptPCBC256), - ("testAESGCMTagLengthCombined", testAESGCMTagLengthCombined), - ("testAESGCMTagLengthCombined2", testAESGCMTagLengthCombined2), - ("testAESGCMTagLengthDetached", testAESGCMTagLengthDetached), - ("testAESGCMTestCase1", testAESGCMTestCase1), - ("testAESGCMTestCase2", testAESGCMTestCase2), - ("testAESGCMTestCase3", testAESGCMTestCase3), - ("testAESGCMTestCase3Combined", testAESGCMTestCase3Combined), - ("testAESGCMTestCase4", testAESGCMTestCase4), - ("testAESGCMTestCase5", testAESGCMTestCase5), - ("testAESGCMTestCase6", testAESGCMTestCase6), - ("testAESGCMTestCase7", testAESGCMTestCase7), - ("testAESGCMTestCaseIrregularCombined1", testAESGCMTestCaseIrregularCombined1), - ("testAESGCMTestCaseIrregularCombined2", testAESGCMTestCaseIrregularCombined2), - ("testAESWithWrongKey", testAESWithWrongKey), - ("testIssue298", testIssue298), - ("testIssue394", testIssue394), - ("testIssue411", testIssue411), - ] -} - -extension AESTestsPerf { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__AESTestsPerf = [ - ("testAESDecryptPerformance", testAESDecryptPerformance), - ("testAESEncryptPerformance", testAESEncryptPerformance), - ] -} - -extension Access { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__Access = [ - ("testAES", testAES), - ("testArrayExtension", testArrayExtension), - ("testAuthenticators", testAuthenticators), - ("testBlowfish", testBlowfish), - ("testChaCha20", testChaCha20), - ("testChecksum", testChecksum), - ("testCollectionExtension", testCollectionExtension), - ("testDataExtension", testDataExtension), - ("testDigest", testDigest), - ("testIntExtension", testIntExtension), - ("testPadding", testPadding), - ("testPBKDF", testPBKDF), - ("testRabbit", testRabbit), - ("testRandomIV", testRandomIV), - ("testStringExtension", testStringExtension), - ("testStringFoundationExtension", testStringFoundationExtension), - ("testUInt16Extension", testUInt16Extension), - ("testUInt32Extension", testUInt32Extension), - ("testUInt64Extension", testUInt64Extension), - ("testUInt8Extension", testUInt8Extension), - ("testUpdatable", testUpdatable), - ] -} - -extension BlowfishTests { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__BlowfishTests = [ - ("testCBCZeroPadding", testCBCZeroPadding), - ("testDecrypt", testDecrypt), - ("testDecryptCFB415", testDecryptCFB415), - ("testEncrypt", testEncrypt), - ("testEncryptDecrypt", testEncryptDecrypt), - ] -} - -extension CBCMacTests { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__CBCMacTests = [ - ("testMessageLength0", testMessageLength0), - ("testMessageLength16", testMessageLength16), - ("testMessageLength40", testMessageLength40), - ("testMessageLength64", testMessageLength64), - ] -} - -extension CMACTests { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__CMACTests = [ - ("testMessageLength0", testMessageLength0), - ("testMessageLength16", testMessageLength16), - ("testMessageLength40", testMessageLength40), - ("testMessageLength64", testMessageLength64), - ("testOMACTextVectors", testOMACTextVectors), - ] -} - -extension ChaCha20Poly1305Tests { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__ChaCha20Poly1305Tests = [ - ("test1", test1), - ("test2", test2), - ("test3", test3), - ] -} - -extension ChaCha20Tests { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__ChaCha20Tests = [ - ("testChaCha20", testChaCha20), - ("testChaCha20EncryptPartial", testChaCha20EncryptPartial), - ("testCore", testCore), - ("testVector1Py", testVector1Py), - ] -} - -extension ChaCha20TestsPerf { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__ChaCha20TestsPerf = [ - ("testChaCha20Performance", testChaCha20Performance), - ] -} - -extension DigestTests { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__DigestTests = [ - ("testChecksum", testChecksum), - ("testChecksumPerformance", testChecksumPerformance), - ("testCRC16", testCRC16), - ("testCRC32", testCRC32), - ("testCRC32C", testCRC32C), - ("testCRC32NotReflected", testCRC32NotReflected), - ("testMD5", testMD5), - ("testMD5Data", testMD5Data), - ("testMD5Updates", testMD5Updates), - ("testSHA1", testSHA1), - ("testSHA1Updatable1", testSHA1Updatable1), - ("testSHA1Updatable2", testSHA1Updatable2), - ("testSHA2", testSHA2), - ("testSHA3", testSHA3), - ("testSHAPartialUpdates", testSHAPartialUpdates), - ] -} - -extension DigestTestsPerf { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__DigestTestsPerf = [ - ("testMD5Performance", testMD5Performance), - ("testSHA1Performance", testSHA1Performance), - ] -} - -extension ExtensionsTest { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__ExtensionsTest = [ - ("testArrayInitHex", testArrayInitHex), - ("testBytes", testBytes), - ("testDataInit", testDataInit), - ("testEmptyStringEncrypt", testEmptyStringEncrypt), - ("testStringDecryptBase64", testStringDecryptBase64), - ("testStringEncrypt", testStringEncrypt), - ("testToHexStringPerformance", testToHexStringPerformance), - ("testToUInt32Array", testToUInt32Array), - ("testToUInt32Performance", testToUInt32Performance), - ("testToUInt64Performance", testToUInt64Performance), - ] -} - -extension ExtensionsTestPerf { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__ExtensionsTestPerf = [ - ("testArrayInitHexPerformance", testArrayInitHexPerformance), - ] -} - -extension HKDFTests { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__HKDFTests = [ - ("testHKDF1", testHKDF1), - ("testHKDF2", testHKDF2), - ("testHKDF3", testHKDF3), - ("testHKDF4", testHKDF4), - ("testHKDF5", testHKDF5), - ("testHKDF6", testHKDF6), - ] -} - -extension HMACTests { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__HMACTests = [ - ("testMD5", testMD5), - ("testSHA1", testSHA1), - ("testSHA256", testSHA256), - ("testSHA384", testSHA384), - ("testSHA512", testSHA512), - ] -} - -extension OCBTests { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__OCBTests = [ - ("testAESOCBWithRFC7253Tests", testAESOCBWithRFC7253Tests), - ] -} - -extension PBKDF { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__PBKDF = [ - ("testPBKDF1", testPBKDF1), - ("testPBKDF2", testPBKDF2), - ("testPBKDF2Length", testPBKDF2Length), - ] -} - -extension PBKDFPerf { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__PBKDFPerf = [ - ("testPerformance", testPerformance), - ] -} - -extension PaddingTests { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__PaddingTests = [ - ("testISO78164_0", testISO78164_0), - ("testISO78164_1", testISO78164_1), - ("testISO78164_2", testISO78164_2), - ("testPKCS7_0", testPKCS7_0), - ("testPKCS7_1", testPKCS7_1), - ("testPKCS7_2", testPKCS7_2), - ("testZeroPadding1", testZeroPadding1), - ("testZeroPadding2", testZeroPadding2), - ] -} - -extension Poly1305Tests { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__Poly1305Tests = [ - ("testIssue183", testIssue183), - ("testPoly1305", testPoly1305), - ] -} - -extension RabbitTests { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__RabbitTests = [ - ("testInitialization", testInitialization), - ("testRabbitWithIV", testRabbitWithIV), - ("testRabbitWithoutIV", testRabbitWithoutIV), - ] -} - -extension RabbitTestsPerf { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__RabbitTestsPerf = [ - ("testRabbitPerformance", testRabbitPerformance), - ] -} - -extension SHATestsPerf { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__SHATestsPerf = [ - ("testSHA1Performance", testSHA1Performance), - ("testSHA2224Performance", testSHA2224Performance), - ("testSHA2256Performance", testSHA2256Performance), - ("testSHA2384Performance", testSHA2384Performance), - ("testSHA2512Performance", testSHA2512Performance), - ("testSHA3224Performance", testSHA3224Performance), - ("testSHA3256Performance", testSHA3256Performance), - ("testSHA3384Performance", testSHA3384Performance), - ("testSHA3512Performance", testSHA3512Performance), - ("testSHA3keccak224Performance", testSHA3keccak224Performance), - ("testSHA3keccak256Performance", testSHA3keccak256Performance), - ("testSHA3keccak384Performance", testSHA3keccak384Performance), - ("testSHA3keccak512Performance", testSHA3keccak512Performance), - ] -} - -extension Scrypt { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__Scrypt = [ - ("testScrypt_0", testScrypt_0), - ("testScrypt_1", testScrypt_1), - ("testScrypt_2", testScrypt_2), - ] -} - -extension ScryptTestsPeft { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__ScryptTestsPeft = [ - ("testScryptPerformance", testScryptPerformance), - ] -} - -public func __allTests() -> [XCTestCaseEntry] { - return [ - testCase(AESCCMTests.__allTests__AESCCMTests), - testCase(AESTests.__allTests__AESTests), - testCase(AESTestsPerf.__allTests__AESTestsPerf), - testCase(Access.__allTests__Access), - testCase(BlowfishTests.__allTests__BlowfishTests), - testCase(CBCMacTests.__allTests__CBCMacTests), - testCase(CMACTests.__allTests__CMACTests), - testCase(ChaCha20Poly1305Tests.__allTests__ChaCha20Poly1305Tests), - testCase(ChaCha20Tests.__allTests__ChaCha20Tests), - testCase(ChaCha20TestsPerf.__allTests__ChaCha20TestsPerf), - testCase(DigestTests.__allTests__DigestTests), - testCase(DigestTestsPerf.__allTests__DigestTestsPerf), - testCase(ExtensionsTest.__allTests__ExtensionsTest), - testCase(ExtensionsTestPerf.__allTests__ExtensionsTestPerf), - testCase(HKDFTests.__allTests__HKDFTests), - testCase(HMACTests.__allTests__HMACTests), - testCase(OCBTests.__allTests__OCBTests), - testCase(PBKDF.__allTests__PBKDF), - testCase(PBKDFPerf.__allTests__PBKDFPerf), - testCase(PaddingTests.__allTests__PaddingTests), - testCase(Poly1305Tests.__allTests__Poly1305Tests), - testCase(RabbitTests.__allTests__RabbitTests), - testCase(RabbitTestsPerf.__allTests__RabbitTestsPerf), - testCase(SHATestsPerf.__allTests__SHATestsPerf), - testCase(Scrypt.__allTests__Scrypt), - testCase(ScryptTestsPeft.__allTests__ScryptTestsPeft), - ] -} -#endif diff --git a/Carthage/Checkouts/CryptoSwift/Tests/LinuxMain.swift b/Carthage/Checkouts/CryptoSwift/Tests/LinuxMain.swift deleted file mode 100644 index 7ece303a5..000000000 --- a/Carthage/Checkouts/CryptoSwift/Tests/LinuxMain.swift +++ /dev/null @@ -1,10 +0,0 @@ -import XCTest - -import CryptoSwiftTests -import TestsPerformance - -var tests = [XCTestCaseEntry]() -tests += CryptoSwiftTests.__allTests() -tests += TestsPerformance.__allTests() - -XCTMain(tests) diff --git a/Carthage/Checkouts/CryptoSwift/Tests/TestsPerformance/Bridging.h b/Carthage/Checkouts/CryptoSwift/Tests/TestsPerformance/Bridging.h deleted file mode 100644 index 160b7b65d..000000000 --- a/Carthage/Checkouts/CryptoSwift/Tests/TestsPerformance/Bridging.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2021 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -#ifndef CryptoSwift_Bridging_h -#define CryptoSwift_Bridging_h - -#import - -#endif diff --git a/Carthage/Checkouts/CryptoSwift/Tests/TestsPerformance/TestsPerformance.swift b/Carthage/Checkouts/CryptoSwift/Tests/TestsPerformance/TestsPerformance.swift deleted file mode 100644 index 3e361836f..000000000 --- a/Carthage/Checkouts/CryptoSwift/Tests/TestsPerformance/TestsPerformance.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// TestsPerformance.swift -// TestsPerformance -// -// Created by Marcin Krzyzanowski on 03/04/2018. -// Copyright © 2018 Marcin Krzyzanowski. All rights reserved. -// - -import XCTest - -class TestsPerformance: XCTestCase { - - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - - func testExample() { - // This is an example of a functional test case. - // Use XCTAssert and related functions to verify your tests produce the correct results. - } - - func testPerformanceExample() { - // This is an example of a performance test case. - self.measure { - // Put the code you want to measure the time of here. - } - } -} diff --git a/Carthage/Checkouts/CryptoSwift/Tests/TestsPerformance/XCTestManifests.swift b/Carthage/Checkouts/CryptoSwift/Tests/TestsPerformance/XCTestManifests.swift deleted file mode 100644 index bd30b2f16..000000000 --- a/Carthage/Checkouts/CryptoSwift/Tests/TestsPerformance/XCTestManifests.swift +++ /dev/null @@ -1,19 +0,0 @@ -#if !canImport(ObjectiveC) -import XCTest - -extension TestsPerformance { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__TestsPerformance = [ - ("testExample", testExample), - ("testPerformanceExample", testPerformanceExample), - ] -} - -public func __allTests() -> [XCTestCaseEntry] { - return [ - testCase(TestsPerformance.__allTests__TestsPerformance), - ] -} -#endif diff --git a/Carthage/Checkouts/CryptoSwift/_config.yml b/Carthage/Checkouts/CryptoSwift/_config.yml deleted file mode 100644 index 277f1f2c5..000000000 --- a/Carthage/Checkouts/CryptoSwift/_config.yml +++ /dev/null @@ -1 +0,0 @@ -theme: jekyll-theme-cayman diff --git a/Carthage/Checkouts/CryptoSwift/config/CryptoSwift-Debug.xcconfig b/Carthage/Checkouts/CryptoSwift/config/CryptoSwift-Debug.xcconfig deleted file mode 100644 index b129b1c9d..000000000 --- a/Carthage/Checkouts/CryptoSwift/config/CryptoSwift-Debug.xcconfig +++ /dev/null @@ -1,6 +0,0 @@ -#include "CryptoSwift-Shared.xcconfig" - -OTHER_SWIFT_FLAGS = $(inherited) -Xfrontend -debug-time-function-bodies -SWIFT_COMPILATION_MODE = incremental -SWIFT_OPTIMIZATION_LEVEL = -Onone -SWIFT_ENFORCE_EXCLUSIVE_ACCESS = none diff --git a/Carthage/Checkouts/CryptoSwift/config/CryptoSwift-Release.xcconfig b/Carthage/Checkouts/CryptoSwift/config/CryptoSwift-Release.xcconfig deleted file mode 100644 index ff5571568..000000000 --- a/Carthage/Checkouts/CryptoSwift/config/CryptoSwift-Release.xcconfig +++ /dev/null @@ -1,10 +0,0 @@ -#include "CryptoSwift-Shared.xcconfig" - -BITCODE_GENERATION_MODE = bitcode -CLANG_USE_OPTIMIZATION_PROFILE = NO -GCC_GENERATE_DEBUGGING_SYMBOLS = NO -GCC_UNROLL_LOOPS = YES -LLVM_LTO = YES -SWIFT_DISABLE_SAFETY_CHECKS = YES -SWIFT_ENFORCE_EXCLUSIVE_ACCESS = compile-time -SWIFT_OPTIMIZATION_LEVEL = -O diff --git a/Carthage/Checkouts/CryptoSwift/config/CryptoSwift-Shared.xcconfig b/Carthage/Checkouts/CryptoSwift/config/CryptoSwift-Shared.xcconfig deleted file mode 100644 index 371770413..000000000 --- a/Carthage/Checkouts/CryptoSwift/config/CryptoSwift-Shared.xcconfig +++ /dev/null @@ -1,15 +0,0 @@ -CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES -APPLICATION_EXTENSION_API_ONLY = YES -DYLIB_COMPATIBILITY_VERSION = 1 -DYLIB_CURRENT_VERSION = 1 -DYLIB_INSTALL_NAME_BASE = @rpath - -ENABLE_BITCODE = YES -ENABLE_BITCODE[sdk=macosx*] = NO - -INSTALL_PATH = $(LOCAL_LIBRARY_DIR)/Frameworks -LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks @loader_path/Frameworks -INFOPLIST_FILE = Info.plist -PRODUCT_BUNDLE_IDENTIFIER = com.krzyzanowskim.${PRODUCT_NAME:rfc1034identifier} -PRODUCT_NAME = $(TARGET_NAME) -SKIP_INSTALL = YES diff --git a/Carthage/Checkouts/CryptoSwift/config/CryptoSwift-Test.xcconfig b/Carthage/Checkouts/CryptoSwift/config/CryptoSwift-Test.xcconfig deleted file mode 100644 index fd1332e6b..000000000 --- a/Carthage/Checkouts/CryptoSwift/config/CryptoSwift-Test.xcconfig +++ /dev/null @@ -1,8 +0,0 @@ -#include "CryptoSwift-Shared.xcconfig" - -ENABLE_TESTABILITY = YES -STRIP_INSTALLED_PRODUCT = NO - -// Disable for tests. https://twitter.com/krzyzanowskim/status/1191515868401983489 -BUILD_LIBRARY_FOR_DISTRIBUTION = NO -COPY_PHASE_STRIP = NO diff --git a/Carthage/Checkouts/CryptoSwift/config/CryptoSwift-TestHostApp-Shared.xcconfig b/Carthage/Checkouts/CryptoSwift/config/CryptoSwift-TestHostApp-Shared.xcconfig deleted file mode 100644 index df8cae112..000000000 --- a/Carthage/Checkouts/CryptoSwift/config/CryptoSwift-TestHostApp-Shared.xcconfig +++ /dev/null @@ -1,68 +0,0 @@ -// -// CryptoSwift-TestHostApp-Shared.xcconfig -// -// Generated by BuildSettingExtractor on 02/04/2018 -// https://github.com/dempseyatgithub/BuildSettingExtractor -// - -CODE_SIGN_STYLE = Automatic -CODE_SIGN_IDENTITY = iPhone Developer -DEVELOPMENT_TEAM = HA4H7JURM8 -PROVISIONING_PROFILE_SPECIFIER = -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES - -// Asset Catalog App Icon Set Name -// -// Name of an asset catalog app icon set whose contents will be merged into the -// `Info.plist`. - -ASSETCATALOG_COMPILER_APPICON_NAME = - - -// Info.plist File -// -// The project-relative path to the property list file that contains the `Info.plist` -// information used by bundles. For details on information property list files, see -// [Information Property List -// Files](https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/ConfigFiles.html#//apple_ref/doc/uid/20002091-CJBJIEDH) -// in [Runtime Configuration -// Guidelines](https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPRuntimeConfig/000-Introduction/introduction.html). - -INFOPLIST_FILE = CryptoSwift-TestHostApp/Info.plist - - - -// Runpath Search Paths -// -// This is a list of paths to be added to the `runpath` search path list for the image -// being created. At runtime, `dyld` uses the `runpath` when searching for dylibs whose -// load path begins with `@rpath/`. See [Dynamic Library Programming -// Topics](https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/DynamicLibraries/000-Introduction/Introduction.html). - -LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks - - - -// Product Bundle Identifier -// -// A string that uniquely identifies the bundle. The string should be in reverse DNS -// format using only alphanumeric characters (`A-Z`, `a-z`, `0-9`), the dot (`.`), and -// the hyphen (`-`). This value is used as the `CFBundleIdentifier` in the `Info.plist` -// of the built bundle. - -PRODUCT_BUNDLE_IDENTIFIER = test.CryptoSwiftTestHostApp - - -// Base SDK -// -// The name or path of the base SDK being used during the build. The product will be -// built against the headers and libraries located inside the indicated SDK. This path -// will be prepended to all search paths, and will be passed through the environment to -// the compiler and linker. Additional SDKs can be specified in the `ADDITIONAL_SDKS` -// setting. - -SDKROOT = iphoneos -SUPPORTED_PLATFORMS = iphonesimulator iphoneos - -COPY_PHASE_STRIP = NO -ONLY_ACTIVE_ARCH = YES diff --git a/Carthage/Checkouts/CryptoSwift/config/CryptoSwift-TestHostApp-Test.xcconfig b/Carthage/Checkouts/CryptoSwift/config/CryptoSwift-TestHostApp-Test.xcconfig deleted file mode 100644 index 3cd31285e..000000000 --- a/Carthage/Checkouts/CryptoSwift/config/CryptoSwift-TestHostApp-Test.xcconfig +++ /dev/null @@ -1,14 +0,0 @@ -// -// CryptoSwift-TestHostApp-Test.xcconfig -// -// Generated by BuildSettingExtractor on 02/04/2018 -// https://github.com/dempseyatgithub/BuildSettingExtractor -// - -#include "CryptoSwift-TestHostApp-Shared.xcconfig" - -DEBUG_INFORMATION_FORMAT = dwarf-with-dsym -ENABLE_NS_ASSERTIONS = NO -MTL_ENABLE_DEBUG_INFO = NO -SWIFT_OPTIMIZATION_LEVEL = -O -VALIDATE_PRODUCT = YES diff --git a/Carthage/Checkouts/CryptoSwift/config/Project-Debug.xcconfig b/Carthage/Checkouts/CryptoSwift/config/Project-Debug.xcconfig deleted file mode 100644 index b008ac089..000000000 --- a/Carthage/Checkouts/CryptoSwift/config/Project-Debug.xcconfig +++ /dev/null @@ -1,9 +0,0 @@ -#include "Project-Shared.xcconfig" - -COPY_PHASE_STRIP = NO -GCC_DYNAMIC_NO_PIC = NO -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) DEBUG=1 -SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG -METAL_ENABLE_DEBUG_INFO = YES -ONLY_ACTIVE_ARCH = YES -ENABLE_TESTABILITY = YES diff --git a/Carthage/Checkouts/CryptoSwift/config/Project-Release.xcconfig b/Carthage/Checkouts/CryptoSwift/config/Project-Release.xcconfig deleted file mode 100644 index e986f2339..000000000 --- a/Carthage/Checkouts/CryptoSwift/config/Project-Release.xcconfig +++ /dev/null @@ -1,10 +0,0 @@ -#include "Project-Shared.xcconfig" - -CODE_SIGN_IDENTITY[sdk=macosx*] = Developer ID Application - -CLANG_USE_OPTIMIZATION_PROFILE = YES -COPY_PHASE_STRIP = YES -ENABLE_NS_ASSERTIONS = NO -GCC_OPTIMIZATION_LEVEL = fast -METAL_ENABLE_DEBUG_INFO = NO -VALIDATE_PRODUCT = YES diff --git a/Carthage/Checkouts/CryptoSwift/config/Project-Shared.xcconfig b/Carthage/Checkouts/CryptoSwift/config/Project-Shared.xcconfig deleted file mode 100644 index af2081609..000000000 --- a/Carthage/Checkouts/CryptoSwift/config/Project-Shared.xcconfig +++ /dev/null @@ -1,86 +0,0 @@ -MARKETING_VERSION = 1.4.2 - -SUPPORTED_PLATFORMS = iphonesimulator iphoneos macosx appletvos watchos appletvsimulator watchsimulator - -SWIFT_COMPILATION_MODE = wholemodule -SWIFT_VERSION = 5.0 - -TARGETED_DEVICE_FAMILY = 1,2,3,4 - -TVOS_DEPLOYMENT_TARGET = 9.0 -IPHONEOS_DEPLOYMENT_TARGET = 9.0 -MACOSX_DEPLOYMENT_TARGET = 10.12 -WATCHOS_DEPLOYMENT_TARGET = 2.0 - -DEVELOPMENT_TEAM = -//PROVISIONING_PROFILE = -//PROVISIONING_PROFILE_SPECIFIER = - -CODE_SIGN_IDENTITY[sdk=macosx*] = Mac Developer -CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer -CODE_SIGN_IDENTITY[sdk=iphonesimulator*] = iPhone Developer -CODE_SIGN_STYLE = Automatic - -PRODUCT_NAME = ${TARGET_NAME} - -CLANG_ANALYZER_NONNULL = YES -CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE - -ALWAYS_SEARCH_USER_PATHS = NO - -CLANG_CXX_LANGUAGE_STANDARD = gnu++0x -CLANG_CXX_LIBRARY = libc++ -CLANG_ENABLE_MODULES = YES -CLANG_ENABLE_OBJC_ARC = YES -CLANG_ENABLE_OBJC_WEAK = YES - -CLANG_WARN__DUPLICATE_METHOD_MATCH = YES -CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES -CLANG_WARN_BOOL_CONVERSION = YES -CLANG_WARN_COMMA = YES -CLANG_WARN_CONSTANT_CONVERSION = YES -CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES -CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR -CLANG_WARN_EMPTY_BODY = YES -CLANG_WARN_ENUM_CONVERSION = YES -CLANG_WARN_INFINITE_RECURSION = YES -CLANG_WARN_INT_CONVERSION = YES -CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES -CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES -CLANG_WARN_OBJC_LITERAL_CONVERSION = YES -CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR -CLANG_WARN_RANGE_LOOP_ANALYSIS = YES -CLANG_WARN_STRICT_PROTOTYPES = YES -CLANG_WARN_SUSPICIOUS_MOVE = YES -CLANG_WARN_UNREACHABLE_CODE = YES -CLANG_WARN_DOCUMENTATION_COMMENTS = YES -CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE - -DEBUG_INFORMATION_FORMAT = dwarf -DEFINES_MODULE = YES - -ENABLE_STRICT_OBJC_MSGSEND = YES - -GCC_C_LANGUAGE_STANDARD = gnu99 -GCC_NO_COMMON_BLOCKS = YES -GCC_WARN_64_TO_32_BIT_CONVERSION = YES -GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR -GCC_WARN_UNDECLARED_SELECTOR = YES -GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE -GCC_WARN_UNUSED_FUNCTION = YES -GCC_WARN_UNUSED_LABEL = YES -GCC_WARN_UNUSED_VARIABLE = YES - -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES - -VERSION_INFO_PREFIX = -VERSIONING_SYSTEM = apple-generic -CURRENT_PROJECT_VERSION = 1 - -// XCFramework -// Swift have (at least) 2 language dialects: With and without Library Evolution behave differently regarding enums. -BUILD_LIBRARY_FOR_DISTRIBUTION = YES - -// Catalyst -SUPPORTS_MACCATALYST = YES -DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = NO diff --git a/Carthage/Checkouts/CryptoSwift/config/Tests-Shared.xcconfig b/Carthage/Checkouts/CryptoSwift/config/Tests-Shared.xcconfig deleted file mode 100644 index a1d1007a4..000000000 --- a/Carthage/Checkouts/CryptoSwift/config/Tests-Shared.xcconfig +++ /dev/null @@ -1,19 +0,0 @@ -DEVELOPMENT_TEAM = -CODE_SIGN_IDENTITY = -CODE_SIGN_STYLE = Manual -CODE_SIGNING_REQUIRED = NO - -HEADER_SEARCH_PATHS = $(inherited) includes/** - -LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks @loader_path/Frameworks @loader_path/../Frameworks @executable_path/../Frameworks - -PRODUCT_BUNDLE_IDENTIFIER = com.krzyzanowskim.${PRODUCT_NAME:rfc1034identifier} - -OTHER_SWIFT_FLAGS = $(inherited) -Xfrontend -debug-time-function-bodies - -// Disable for tests. https://twitter.com/krzyzanowskim/status/1191515868401983489 -BUILD_LIBRARY_FOR_DISTRIBUTION = NO - -MACOSX_DEPLOYMENT_TARGET = 10.15 - -INFOPLIST_FILE = Info.plist diff --git a/Carthage/Checkouts/CryptoSwift/config/Tests-Test.xcconfig b/Carthage/Checkouts/CryptoSwift/config/Tests-Test.xcconfig deleted file mode 100644 index 044ce7092..000000000 --- a/Carthage/Checkouts/CryptoSwift/config/Tests-Test.xcconfig +++ /dev/null @@ -1,16 +0,0 @@ -#include "Tests-Shared.xcconfig" - -COPY_PHASE_STRIP = NO -ENABLE_NS_ASSERTIONS = NO -ENABLE_TESTABILITY = YES -GCC_OPTIMIZATION_LEVEL = fast - -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) DEBUG=1 CI=1 -SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG - -SWIFT_DISABLE_SAFETY_CHECKS = YES -SWIFT_OPTIMIZATION_LEVEL = -O - -METAL_ENABLE_DEBUG_INFO = NO -ONLY_ACTIVE_ARCH = YES -VALIDATE_PRODUCT = YES diff --git a/Carthage/Checkouts/CryptoSwift/scripts/build-framework.sh b/Carthage/Checkouts/CryptoSwift/scripts/build-framework.sh deleted file mode 100755 index 59427f573..000000000 --- a/Carthage/Checkouts/CryptoSwift/scripts/build-framework.sh +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/env bash - -set -e - -BASE_PWD="$PWD" -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" -OUTPUT_DIR=$( mktemp -d ) -COMMON_SETUP="-project ${SCRIPT_DIR}/../CryptoSwift.xcodeproj -scheme CryptoSwift -configuration Release -quiet SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES" - -# macOS -DERIVED_DATA_PATH=$( mktemp -d ) -xcrun xcodebuild build \ - $COMMON_SETUP \ - -derivedDataPath "${DERIVED_DATA_PATH}" \ - -destination 'generic/platform=macOS' - -mkdir -p "${OUTPUT_DIR}/macos" -ditto "${DERIVED_DATA_PATH}/Build/Products/Release/CryptoSwift.framework" "${OUTPUT_DIR}/macos/CryptoSwift.framework" -rm -rf "${DERIVED_DATA_PATH}" - -# macOS Catalyst -DERIVED_DATA_PATH=$( mktemp -d ) -xcrun xcodebuild build \ - $COMMON_SETUP \ - -derivedDataPath "${DERIVED_DATA_PATH}" \ - -destination 'generic/platform=macOS,variant=Mac Catalyst' - -mkdir -p "${OUTPUT_DIR}/maccatalyst" -ditto "${DERIVED_DATA_PATH}/Build/Products/Release-maccatalyst/CryptoSwift.framework" "${OUTPUT_DIR}/maccatalyst/CryptoSwift.framework" -rm -rf "${DERIVED_DATA_PATH}" - -# iOS -DERIVED_DATA_PATH=$( mktemp -d ) -xcrun xcodebuild build \ - $COMMON_SETUP \ - -derivedDataPath "${DERIVED_DATA_PATH}" \ - -destination 'generic/platform=iOS' - -mkdir -p "${OUTPUT_DIR}/iphoneos" -ditto "${DERIVED_DATA_PATH}/Build/Products/Release-iphoneos/CryptoSwift.framework" "${OUTPUT_DIR}/iphoneos/CryptoSwift.framework" -rm -rf "${DERIVED_DATA_PATH}" - -# iOS Simulator -DERIVED_DATA_PATH=$( mktemp -d ) -xcrun xcodebuild build \ - $COMMON_SETUP \ - -derivedDataPath "${DERIVED_DATA_PATH}" \ - -destination 'generic/platform=iOS Simulator' - -mkdir -p "${OUTPUT_DIR}/iphonesimulator" -ditto "${DERIVED_DATA_PATH}/Build/Products/Release-iphonesimulator/CryptoSwift.framework" "${OUTPUT_DIR}/iphonesimulator/CryptoSwift.framework" -rm -rf "${DERIVED_DATA_PATH}" - -# tvOS -DERIVED_DATA_PATH=$( mktemp -d ) -xcrun xcodebuild build \ - $COMMON_SETUP \ - -derivedDataPath "${DERIVED_DATA_PATH}" \ - -destination 'generic/platform=tvOS' - -mkdir -p "${OUTPUT_DIR}/appletvos" -ditto "${DERIVED_DATA_PATH}/Build/Products/Release-appletvos/CryptoSwift.framework" "${OUTPUT_DIR}/appletvos/CryptoSwift.framework" -rm -rf "${DERIVED_DATA_PATH}" - -# tvOS Simulator -DERIVED_DATA_PATH=$( mktemp -d ) -xcrun xcodebuild build \ - $COMMON_SETUP \ - -derivedDataPath "${DERIVED_DATA_PATH}" \ - -destination 'generic/platform=tvOS Simulator' - -mkdir -p "${OUTPUT_DIR}/appletvsimulator" -ditto "${DERIVED_DATA_PATH}/Build/Products/Release-appletvsimulator/CryptoSwift.framework" "${OUTPUT_DIR}/appletvsimulator/CryptoSwift.framework" -rm -rf "${DERIVED_DATA_PATH}" - -# watchOS -DERIVED_DATA_PATH=$( mktemp -d ) -xcrun xcodebuild build \ - $COMMON_SETUP \ - -derivedDataPath "${DERIVED_DATA_PATH}" \ - -destination 'generic/platform=watchOS' - -mkdir -p "${OUTPUT_DIR}/watchos" -ditto "${DERIVED_DATA_PATH}/Build/Products/Release-watchos/CryptoSwift.framework" "${OUTPUT_DIR}/watchos/CryptoSwift.framework" -rm -rf "${DERIVED_DATA_PATH}" - -# watchOS Simulator -DERIVED_DATA_PATH=$( mktemp -d ) -xcrun xcodebuild build \ - $COMMON_SETUP \ - -derivedDataPath "${DERIVED_DATA_PATH}" \ - -destination 'generic/platform=watchOS Simulator' - -mkdir -p "${OUTPUT_DIR}/watchsimulator" -ditto "${DERIVED_DATA_PATH}/Build/Products/Release-watchsimulator/CryptoSwift.framework" "${OUTPUT_DIR}/watchsimulator/CryptoSwift.framework" -rm -rf "${DERIVED_DATA_PATH}" - -# XCFRAMEWORK -rm -rf ${SCRIPT_DIR}/../CryptoSwift.xcframework -xcrun xcodebuild -quiet -create-xcframework \ - -framework "${OUTPUT_DIR}/iphoneos/CryptoSwift.framework" \ - -framework "${OUTPUT_DIR}/iphonesimulator/CryptoSwift.framework" \ - -framework "${OUTPUT_DIR}/appletvos/CryptoSwift.framework" \ - -framework "${OUTPUT_DIR}/appletvsimulator/CryptoSwift.framework" \ - -framework "${OUTPUT_DIR}/watchos/CryptoSwift.framework" \ - -framework "${OUTPUT_DIR}/watchsimulator/CryptoSwift.framework" \ - -framework "${OUTPUT_DIR}/macos/CryptoSwift.framework" \ - -framework "${OUTPUT_DIR}/maccatalyst/CryptoSwift.framework" \ - -output ${SCRIPT_DIR}/../CryptoSwift.xcframework - -# pushd ${OUTPUT_DIR} -# xcrun zip --symlinks -r -o ${BASE_PWD}/CryptoSwift.xcframework.zip CryptoSwift.xcframework -# popd - -echo "✔️ CryptoSwift.xcframework" -echo ${OUTPUT_DIR} - -rm -rf ${OUTPUT_DIR} -cd ${BASE_PWD} \ No newline at end of file diff --git a/Carthage/Checkouts/CryptoSwift/scripts/generate-contributors-list.sh b/Carthage/Checkouts/CryptoSwift/scripts/generate-contributors-list.sh deleted file mode 100755 index cf120c800..000000000 --- a/Carthage/Checkouts/CryptoSwift/scripts/generate-contributors-list.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -##===----------------------------------------------------------------------===## -## -## This source file is part of the SwiftNIO open source project -## -## Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors -## Licensed under Apache License v2.0 -## -## See LICENSE.txt for license information -## See CONTRIBUTORS.txt for the list of SwiftNIO project authors -## -## SPDX-License-Identifier: Apache-2.0 -## -##===----------------------------------------------------------------------===## - -set -eu -here="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -contributors=$( cd "$here"/.. && git shortlog -es | cut -f2 | sed 's/^/- /' ) - -cat > "$here/../CONTRIBUTORS.txt" <<- EOF - For the purpose of tracking copyright, this is the list of individuals and - organizations who have contributed source code to CryptoSwift. - - ### Contributors - - $contributors - - **Updating this list** - - Please do not edit this file manually. It is generated using \`./scripts/generate-contributors-list.sh\`. If a name is misspelled or appearing multiple times: add an entry in \`./.mailmap\` -EOF diff --git a/Carthage/Checkouts/CryptoSwift/scripts/swiftformat.sh b/Carthage/Checkouts/CryptoSwift/scripts/swiftformat.sh deleted file mode 100755 index 90d1db0f5..000000000 --- a/Carthage/Checkouts/CryptoSwift/scripts/swiftformat.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -swiftformat --hexliteralcase lowercase --hexgrouping none --ranges nospace --wrapelements beforefirst --self remove $1 diff --git a/Carthage/Checkouts/PromiseKit/.github/FUNDING.yml b/Carthage/Checkouts/PromiseKit/.github/FUNDING.yml deleted file mode 100644 index c62e094b2..000000000 --- a/Carthage/Checkouts/PromiseKit/.github/FUNDING.yml +++ /dev/null @@ -1,3 +0,0 @@ -tidelift: "cocoapods/PromiseKit" -patreon: "mxcl" -github: mxcl diff --git a/Carthage/Checkouts/PromiseKit/.github/ISSUE_TEMPLATE.md b/Carthage/Checkouts/PromiseKit/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 7c027eb00..000000000 --- a/Carthage/Checkouts/PromiseKit/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,11 +0,0 @@ -[PLEASE READ THE TROUBLESHOOTING GUIDE](https://github.com/mxcl/PromiseKit/blob/master/Documentation/Troubleshooting.md). - ---- - -You read the guide but it didn’t help? OK, we’re here to help. - -* Please specify the PromiseKit major version you are using -* [Please format your code in triple backticks and ensure readable indentation](https://help.github.com/articles/creating-and-highlighting-code-blocks/) -* Please specify how you installed PromiseKit, ie. Carthage, CocoaPods, SwiftPM or other. If other provide DETAILED information about how you are integrating PromiseKit. - -If you ignore this template we will close your ticket and link to this template until you provide this necessary information. We cannot help you without it. diff --git a/Carthage/Checkouts/PromiseKit/.github/LinuxMain.stencil b/Carthage/Checkouts/PromiseKit/.github/LinuxMain.stencil deleted file mode 100644 index 11d1618ec..000000000 --- a/Carthage/Checkouts/PromiseKit/.github/LinuxMain.stencil +++ /dev/null @@ -1,19 +0,0 @@ -@testable import Core -@testable import A_ -import XCTest - -//TODO get this to run on CI and don’t have it committed -//NOTE problem is Sourcery doesn’t support Linux currently -//USAGE: cd PromiseKit/Sources/.. && sourcery --config .github/sourcery.yml - -{% for type in types.classes|based:"XCTestCase" %} -extension {{ type.name }} { - static var allTests = [ - {% for method in type.methods %}{% if method.parameters.count == 0 and method.shortName|hasPrefix:"test" %} ("{{ method.shortName }}", {{type.name}}.{{ method.shortName }}), - {% endif %}{% endfor %}] -} - -{% endfor %} -XCTMain([ -{% for type in types.classes|based:"XCTestCase" %}{% if not type.annotations.excludeFromLinuxMain %} testCase({{ type.name }}.allTests), -{% endif %}{% endfor %}]) diff --git a/Carthage/Checkouts/PromiseKit/.github/codecov.yml b/Carthage/Checkouts/PromiseKit/.github/codecov.yml deleted file mode 100644 index 8ffbde74d..000000000 --- a/Carthage/Checkouts/PromiseKit/.github/codecov.yml +++ /dev/null @@ -1,29 +0,0 @@ -ignore: - - "Tests" - - "README.md" - - "Documentation" - - ".travis.yml" - -codecov: - notify: - require_ci_to_pass: yes - -coverage: - precision: 1 - round: up - range: "70...100" - - status: - project: yes - patch: yes - changes: no - -parsers: - gcov: - branch_detection: - conditional: yes - loop: yes - method: no - macro: no - -comment: off diff --git a/Carthage/Checkouts/PromiseKit/.github/jazzy.yml b/Carthage/Checkouts/PromiseKit/.github/jazzy.yml deleted file mode 100644 index 9e8d71f05..000000000 --- a/Carthage/Checkouts/PromiseKit/.github/jazzy.yml +++ /dev/null @@ -1,18 +0,0 @@ -module: PromiseKit -custom_categories: - - name: Core Components - children: - - Promise - - Guarantee - - Thenable - - CatchMixin - - Resolver -xcodebuild_arguments: - - UseModernBuildSystem=NO -output: - ../output - # output directory is relative to config file… ugh -readme: - Documentation/README.md -theme: - fullwidth diff --git a/Carthage/Checkouts/PromiseKit/.github/ranger.yml b/Carthage/Checkouts/PromiseKit/.github/ranger.yml deleted file mode 100644 index c9169dceb..000000000 --- a/Carthage/Checkouts/PromiseKit/.github/ranger.yml +++ /dev/null @@ -1,2 +0,0 @@ -merges: - - action: delete_branch diff --git a/Carthage/Checkouts/PromiseKit/.github/sourcery.yml b/Carthage/Checkouts/PromiseKit/.github/sourcery.yml deleted file mode 100644 index e965499c6..000000000 --- a/Carthage/Checkouts/PromiseKit/.github/sourcery.yml +++ /dev/null @@ -1,12 +0,0 @@ -sources: - include: - - ../Tests/A+ - - ../Tests/CorePromise - exclude: - - ../Tests/A+/0.0.0.swift - - ../Tests/CorePromise/Utilities.swift -templates: - include: - - LinuxMain.stencil -output: - ../Tests/LinuxMain.swift diff --git a/Carthage/Checkouts/PromiseKit/.github/workflows/cd.yml b/Carthage/Checkouts/PromiseKit/.github/workflows/cd.yml deleted file mode 100644 index 4a8b06c96..000000000 --- a/Carthage/Checkouts/PromiseKit/.github/workflows/cd.yml +++ /dev/null @@ -1,119 +0,0 @@ -name: CD -on: - workflow_dispatch: - inputs: - version: - required: true -jobs: - pods: - runs-on: macos-latest - steps: - - - name: Start Deployment - uses: bobheadxi/deployments@v0.5.2 - id: deployment - with: - step: start - token: ${{ secrets.GITHUB_TOKEN }} - env: pods - - - uses: actions/checkout@v2 - with: - submodules: true - - - run: pod trunk push --allow-warnings --skip-tests --skip-import-validation - env: - COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} - - - name: Seal Deployment - uses: bobheadxi/deployments@v0.5.2 - if: always() - with: - step: finish - token: ${{ secrets.GITHUB_TOKEN }} - status: ${{ job.status }} - deployment_id: ${{ steps.deployment.outputs.deployment_id }} - - carthage: - runs-on: macos-latest - steps: - - - name: Start Deployment - uses: bobheadxi/deployments@v0.5.2 - id: deployment - with: - step: start - token: ${{ secrets.GITHUB_TOKEN }} - env: carthage - - - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: ^11 - # Waiting on https://github.com/Carthage/Carthage/issues/3103 for Xcode 12 - - - uses: joutvhu/get-release@v1 - id: release - with: - tag_name: ${{ github.event.inputs.version }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - uses: actions/checkout@v2 - - run: carthage build --no-skip-current --platform macOS,iOS,watchOS,tvOS --archive - - run: mv PromiseKit.framework.zip PromiseKit-$v.framework.zip - - - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ steps.release.outputs.upload_url }} - asset_path: ./PromiseKit-${{ github.event.inputs.version }}.framework.zip - asset_name: PromiseKit-${{ github.event.inputs.version }}.framework.zip - asset_content_type: application/zip - env: - GITHUB_TOKEN: ${{ github.token }} - - - name: Seal Deployment - uses: bobheadxi/deployments@v0.5.2 - if: always() - with: - step: finish - token: ${{ secrets.GITHUB_TOKEN }} - status: ${{ job.status }} - deployment_id: ${{ steps.deployment.outputs.deployment_id }} - - docs: - runs-on: macos-latest - steps: - - - name: Start Deployment - uses: bobheadxi/deployments@v0.5.2 - id: deployment - with: - step: start - token: ${{ secrets.GITHUB_TOKEN }} - env: docs - - - uses: actions/checkout@v2 - - run: gem install jazzy - - run: | - jazzy --config .github/jazzy.yml \ - --github_url 'https://github.com/mxcl/PromiseKit' \ - --module-version ${{ github.event.inputs.version }} - - run: git remote update - - run: git checkout gh-pages - - run: rm -rf reference/v6 - - run: mv output reference/v6 - - run: git add reference/v6 - - run: git config user.name github-actions - - run: git config user.email github-actions@github.com - - run: git commit -m 'Updated docs for v${{ github.event.inputs.version }}' - - run: git remote add secure-origin https://${{ secrets.JAZZY_PAT }}@github.com/mxcl/PromiseKit.git - - run: git push secure-origin gh-pages - - - name: Seal Deployment - uses: bobheadxi/deployments@v0.5.2 - if: always() - with: - step: finish - token: ${{ secrets.GITHUB_TOKEN }} - status: ${{ job.status }} - deployment_id: ${{ steps.deployment.outputs.deployment_id }} diff --git a/Carthage/Checkouts/PromiseKit/.github/workflows/ci.yml b/Carthage/Checkouts/PromiseKit/.github/workflows/ci.yml deleted file mode 100644 index 574dbf8cb..000000000 --- a/Carthage/Checkouts/PromiseKit/.github/workflows/ci.yml +++ /dev/null @@ -1,117 +0,0 @@ -name: CI -on: - workflow_dispatch: - pull_request: - paths: - - Sources/** - - Tests/** - - .github/workflows/ci.yml -jobs: - auto-cancel: - runs-on: ubuntu-latest - steps: - - uses: technote-space/auto-cancel-redundant-job@v1 - - linux: - needs: auto-cancel - runs-on: ubuntu-18.04 - strategy: - matrix: - swift: - - 4.0.3 - - 4.1.3 - - 4.2.4 - container: - image: swift:${{ matrix.swift }} - steps: - - uses: actions/checkout@v2 - - run: swift build -Xswiftc -warnings-as-errors -Xswiftc -swift-version -Xswiftc 3 - - run: swift build # generated linuxmain requires Swift 5 sadly - - linux-code-cov: - name: linux - needs: auto-cancel - runs-on: ubuntu-18.04 - strategy: - matrix: - swift: - - 5.0.3 - - 5.1.5 - - 5.2.5 - - 5.3.3 - - 5.4.1 - container: - image: swift:${{ matrix.swift }} - steps: - - uses: actions/checkout@v2 - - run: swift build -Xswiftc -warnings-as-errors -Xswiftc -swift-version -Xswiftc 4 - - run: swift build -Xswiftc -warnings-as-errors -Xswiftc -swift-version -Xswiftc 4.2 - - run: swift test --enable-code-coverage --parallel - - - name: Generate Coverage Report - if: ${{ matrix.swift != '5.4.1' }} # fails for SOME REASON - run: | - apt-get -qq update - apt-get -qq install llvm-10 curl - export b=$(swift build --show-bin-path) && llvm-cov-10 \ - export -format lcov \ - -instr-profile=$b/codecov/default.profdata \ - --ignore-filename-regex='\.build/' \ - $b/*.xctest \ - > info.lcov - - uses: codecov/codecov-action@v1 - with: - file: ./info.lcov - - verify-linuxmain: - runs-on: macos-latest - name: linux (validate manifests) - steps: - - uses: actions/checkout@v2 - - run: swift test --generate-linuxmain - - run: git diff --exit-code - - test: - runs-on: macos-latest - strategy: - matrix: - dst: - - platform=macOS - - platform=tvOS Simulator,OS=14.3,name=Apple TV - - platform=iOS Simulator,OS=14.4,name=iPhone 12 - steps: - - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: 12.4 - - uses: actions/checkout@v2 - - uses: sersoft-gmbh/xcodebuild-action@v1 - with: - project: PromiseKit.xcodeproj - scheme: PromiseKit - destination: ${{ matrix.dst }} - action: test - enable-code-coverage: true - - uses: codecov/codecov-action@v1 - - carthage: - runs-on: macos-latest - strategy: - matrix: - xcode: [^10, ^11, ^12] - steps: - - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: ${{ matrix.xcode }} - - uses: actions/checkout@v2 - - - uses: mingjun97/file-regex-replace@v1 - with: - regex: SWIFT_TREAT_WARNINGS_AS_ERRORS = NO - replacement: SWIFT_TREAT_WARNINGS_AS_ERRORS = YES - include: project.pbxproj - - - run: | - if [ ${{ matrix.xcode }} == ^12 ]; then - echo "CARTHAGE_ARGS=--use-xcframeworks" >> $GITHUB_ENV - fi - - run: carthage build --no-skip-current --no-use-binaries $CARTHAGE_ARGS diff --git a/Carthage/Checkouts/PromiseKit/.github/workflows/publish.yml b/Carthage/Checkouts/PromiseKit/.github/workflows/publish.yml deleted file mode 100644 index e4ea2c75e..000000000 --- a/Carthage/Checkouts/PromiseKit/.github/workflows/publish.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: Publish -on: - workflow_dispatch: - inputs: - version: - description: Version to publish - required: true -jobs: - ci: - runs-on: ubuntu-latest - steps: - - uses: aurelien-baudet/workflow-dispatch@v2 - with: - workflow: CI - token: ${{ secrets.JAZZY_PAT }} - wait-for-completion: true - - lint: - runs-on: macos-10.15 - strategy: - matrix: - xcode: - - ^10 - - ^11 - - ^12 - steps: - - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: ${{ matrix.xcode }} - - uses: actions/checkout@v2 - with: - submodules: true - - run: pod lib lint --fail-fast - - create-release: - runs-on: ubuntu-latest - needs: [ci, lint] - env: - v: ${{ github.event.inputs.version }} - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 # zero means “all” (or push fails) - - name: Update committed versions - run: | - ruby -i -pe "sub(/CURRENT_PROJECT_VERSION = [0-9.]+/, 'CURRENT_PROJECT_VERSION = $v')" PromiseKit.xcodeproj/project.pbxproj - ruby -i -pe "sub(/s.version = '[0-9.]+'/, 's.version = \'$v\'')" PromiseKit.podspec - - run: | - ! (git diff --quiet) - - name: Commit - run: | - git config user.name github-actions - git config user.email github-actions@github.com - git commit -am "PromiseKit $v" - git push - - uses: softprops/action-gh-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.event.inputs.version }} - name: ${{ github.event.inputs.version }} - - cd: - needs: create-release - runs-on: ubuntu-latest - steps: - - uses: aurelien-baudet/workflow-dispatch@v2 - with: - workflow: CD - token: ${{ secrets.JAZZY_PAT }} - inputs: "{\"version\": \"${{ github.event.inputs.version }}\"}" - ref: master # or doesn’t use our new commit above - wait-for-completion: true diff --git a/Carthage/Checkouts/PromiseKit/.gitignore b/Carthage/Checkouts/PromiseKit/.gitignore deleted file mode 100644 index 6d14149ac..000000000 --- a/Carthage/Checkouts/PromiseKit/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -*.xcodeproj/**/xcuserdata/ -*.xcscmblueprint -/Carthage -/.build -.DS_Store -DerivedData -/Extensions/Carthage -/Tests/JS-A+/build diff --git a/Carthage/Checkouts/PromiseKit/.gitmodules b/Carthage/Checkouts/PromiseKit/.gitmodules deleted file mode 100644 index 9a18709e2..000000000 --- a/Carthage/Checkouts/PromiseKit/.gitmodules +++ /dev/null @@ -1,69 +0,0 @@ -[submodule "Extensions/Foundation"] - path = Extensions/Foundation - url = https://github.com/PromiseKit/Foundation.git -[submodule "Extensions/UIKit"] - path = Extensions/UIKit - url = https://github.com/PromiseKit/UIKit.git -[submodule "Extensions/Accounts"] - path = Extensions/Accounts - url = https://github.com/PromiseKit/Accounts.git -[submodule "Extensions/MessagesUI"] - path = Extensions/MessagesUI - url = https://github.com/PromiseKit/MessagesUI.git -[submodule "Extensions/WatchConnectivity"] - path = Extensions/WatchConnectivity - url = https://github.com/PromiseKit/WatchConnectivity.git -[submodule "Extensions/Photos"] - path = Extensions/Photos - url = https://github.com/PromiseKit/Photos.git -[submodule "Extensions/MapKit"] - path = Extensions/MapKit - url = https://github.com/PromiseKit/MapKit.git -[submodule "Extensions/CloudKit"] - path = Extensions/CloudKit - url = https://github.com/PromiseKit/CloudKit.git -[submodule "Extensions/AddressBook"] - path = Extensions/AddressBook - url = https://github.com/PromiseKit/AddressBook.git -[submodule "Extensions/AssetsLibrary"] - path = Extensions/AssetsLibrary - url = https://github.com/PromiseKit/AssetsLibrary.git -[submodule "Extensions/CoreLocation"] - path = Extensions/CoreLocation - url = https://github.com/PromiseKit/CoreLocation.git -[submodule "Extensions/QuartzCore"] - path = Extensions/QuartzCore - url = https://github.com/PromiseKit/QuartzCore.git -[submodule "Extensions/Social"] - path = Extensions/Social - url = https://github.com/PromiseKit/Social.git -[submodule "Extensions/StoreKit"] - path = Extensions/StoreKit - url = https://github.com/PromiseKit/StoreKit.git -[submodule "Extensions/Bolts"] - path = Extensions/Bolts - url = https://github.com/PromiseKit/Bolts.git -[submodule "Extensions/CoreBluetooth"] - path = Extensions/CoreBluetooth - url = https://github.com/PromiseKit/CoreBluetooth.git -[submodule "Extensions/EventKit"] - path = Extensions/EventKit - url = https://github.com/PromiseKit/EventKit.git -[submodule "Extensions/SystemConfiguration"] - path = Extensions/SystemConfiguration - url = https://github.com/PromiseKit/SystemConfiguration -[submodule "Extensions/Alamofire"] - path = Extensions/Alamofire - url = https://github.com/PromiseKit/Alamofire -[submodule "Extensions/OMGHTTPURLRQ"] - path = Extensions/OMGHTTPURLRQ - url = https://github.com/PromiseKit/OMGHTTPURLRQ -[submodule "Extensions/AVFoundation"] - path = Extensions/AVFoundation - url = https://github.com/PromiseKit/AVFoundation -[submodule "Extensions/HomeKit"] - path = Extensions/HomeKit - url = https://github.com/PromiseKit/HomeKit.git -[submodule "Extensions/HealthKit"] - path = Extensions/HealthKit - url = https://github.com/PromiseKit/PMKHealthKit diff --git a/Carthage/Checkouts/PromiseKit/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/Carthage/Checkouts/PromiseKit/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/Carthage/Checkouts/PromiseKit/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Carthage/Checkouts/PromiseKit/.tidelift.yml b/Carthage/Checkouts/PromiseKit/.tidelift.yml deleted file mode 100644 index aab29a9c2..000000000 --- a/Carthage/Checkouts/PromiseKit/.tidelift.yml +++ /dev/null @@ -1 +0,0 @@ -extra_ignore_directories: [ Tests ] diff --git a/Carthage/Checkouts/PromiseKit/.travis.yml b/Carthage/Checkouts/PromiseKit/.travis.yml deleted file mode 100644 index 16223f286..000000000 --- a/Carthage/Checkouts/PromiseKit/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -os: osx -language: swift -osx_image: xcode9.4 - -if: tag =~ /^[0-9]+\.[0-9]+\.[0-9]+/ - -stages: - - swiftpm - - carthage - -jobs: - include: - - &swiftpm - stage: swiftpm - osx_image: xcode9.4 - script: swift build - - <<: *swiftpm - osx_image: xcode10.3 - - <<: *swiftpm - osx_image: xcode11.6 - - - &carthage - stage: carthage - osx_image: xcode9.4 - install: sed -i '' "s/SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;/SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;/" *.xcodeproj/project.pbxproj - script: carthage build --no-skip-current - - <<: *carthage - osx_image: xcode10.3 - - <<: *carthage - osx_image: xcode11.6 diff --git a/Carthage/Checkouts/PromiseKit/Documentation/Appendix.md b/Carthage/Checkouts/PromiseKit/Documentation/Appendix.md deleted file mode 100644 index d3797f4d9..000000000 --- a/Carthage/Checkouts/PromiseKit/Documentation/Appendix.md +++ /dev/null @@ -1,211 +0,0 @@ -# Common Misusage - -## Doubling up Promises - -Don’t do this: - -```swift -func toggleNetworkSpinnerWithPromise(funcToCall: () -> Promise) -> Promise { - return Promise { seal in - firstly { - setNetworkActivityIndicatorVisible(true) - return funcToCall() - }.then { result in - seal.fulfill(result) - }.always { - setNetworkActivityIndicatorVisible(false) - }.catch { err in - seal.reject(err) - } - } -} -``` - -Do this: - -```swift -func toggleNetworkSpinnerWithPromise(funcToCall: () -> Promise) -> Promise { - return firstly { - setNetworkActivityIndicatorVisible(true) - return funcToCall() - }.always { - setNetworkActivityIndicatorVisible(false) - } -} -``` - -You already *had* a promise, you don’t need to wrap it in another promise. - - -## Optionals in Promises - -When we see `Promise`, it usually implies a misuse of promises. For -example: - -```swift -return firstly { - getItems() -}.then { items -> Promise<[Item]?> in - guard !items.isEmpty else { - return .value(nil) - } - return Promise(value: items) -} -``` - -The second `then` chooses to return `nil` in some circumstances. This choice -imposes the need to check for `nil` on the consumer of the promise. - -It's usually better to shunt these sorts of exceptions away from the -happy path and onto the error path. In this case, we can create a specific -error type for this condition: - -```swift -return firstly { - getItems() -}.map { items -> [Item]> in - guard !items.isEmpty else { - throw MyError.emptyItems - } - return items -} -``` - -> *Note*: Use `compactMap` when an API outside your control returns an Optional and you want to generate an error instead of propagating `nil`. - -# Tips n’ Tricks - -## Background-Loaded Member Variables - -```swift -class MyViewController: UIViewController { - private let ambience: Promise = DispatchQueue.global().async(.promise) { - guard let asset = NSDataAsset(name: "CreepyPad") else { throw PMKError.badInput } - let player = try AVAudioPlayer(data: asset.data) - player.prepareToPlay() - return player - } -} -``` - -## Chaining Animations - -```swift -firstly { - UIView.animate(.promise, duration: 0.3) { - self.button1.alpha = 0 - } -}.then { - UIView.animate(.promise, duration: 0.3) { - self.button2.alpha = 1 - } -}.then { - UIView.animate(.promise, duration: 0.3) { - adjustConstraints() - self.view.layoutIfNeeded() - } -} -``` - - -## Voiding Promises - -It is often convenient to erase the type of a promise to facilitate chaining. -For example, `UIView.animate(.promise)` returns `Guarantee` because UIKit’s -completion API supplies a `Bool`. However, we usually don’t need this value and -can chain more simply if it is discarded (that is, converted to `Void`). We can use -`asVoid()` to achieve this conversion: - -```swift -UIView.animate(.promise, duration: 0.3) { - self.button1.alpha = 0 -}.asVoid().done(self.nextStep) -``` - -For situations in which we are combining many promises into a `when`, `asVoid()` -becomes essential: - -```swift -let p1 = foo() -let p2 = bar() -let p3 = baz() -//… -let p10 = fluff() - -when(fulfilled: p1.asVoid(), p2.asVoid(), /*…*/, p10.asVoid()).then { - let value1 = p1.value! // safe bang since all the promises fulfilled - // … - let value10 = p10.value! -}.catch { - //… -} -``` - -You normally don't have to do this explicitly because `when` does it for you -for up to 5 parameters. - - -## Blocking (Await) - -Sometimes you have to block the main thread to await completion of an asynchronous task. -In these cases, you can (with caution) use `wait`: - -```swift -public extension UNUserNotificationCenter { - var wasPushRequested: Bool { - let settings = Guarantee(resolver: getNotificationSettings).wait() - return settings != .notDetermined - } -} -``` - -The task under the promise **must not** call back onto the current thread or it -will deadlock. - -## Starting a Chain on a Background Queue/Thread - -`firstly` deliberately does not take a queue. A detailed rationale for this choice -can be found in the ticket tracker. - -So, if you want to start a chain by dispatching to the background, you have to use -`DispatchQueue.async`: - -```swift -DispatchQueue.global().async(.promise) { - return value -}.done { value in - //… -} -``` - -However, this function cannot return a promise because of Swift compiler ambiguity -issues. Thus, if you must start a promise on a background queue, you need to -do something like this: - - -```swift -Promise { seal in - DispatchQueue.global().async { - seal(value) - } -}.done { value in - //… -} -``` - -Or more simply (though with caveats; see the documentation for `wait`): - -```swift -DispatchQueue.global().async(.promise) { - return try fetch().wait() -}.done { value in - //… -} -``` - -However, you shouldn't need to do this often. If you find yourself wanting to use -this technique, perhaps you should instead modify the code for `fetch` to make it do -its work on a background thread. - -Promises abstract asynchronicity, so exploit and support that model. Design your -APIs so that consumers don’t have to care what queue your functions run on. diff --git a/Carthage/Checkouts/PromiseKit/Documentation/CommonPatterns.md b/Carthage/Checkouts/PromiseKit/Documentation/CommonPatterns.md deleted file mode 100644 index 97dfe5ef8..000000000 --- a/Carthage/Checkouts/PromiseKit/Documentation/CommonPatterns.md +++ /dev/null @@ -1,495 +0,0 @@ -# Common Patterns - -One feature of promises that makes them particularly useful is that they are composable. -This fact enables complex, yet safe asynchronous patterns that would otherwise be quite -intimidating when implemented with traditional methods. - - -## Chaining - -The most common pattern is chaining: - -```swift -firstly { - fetch() -}.then { - map($0) -}.then { - set($0) - return animate() -}.ensure { - // something that should happen whatever the outcome -}.catch { - handle(error: $0) -} -``` - -If you return a promise in a `then`, the next `then` *waits* on that promise -before continuing. This is the essence of promises. - -Promises are easy to compose, so they encourage you to develop highly asynchronous -apps without fear of the spaghetti code (and associated refactoring pains) of -asynchronous systems that use completion handlers. - - -## APIs That Use Promises - -Promises are composable, so return them instead of accepting completion blocks: - -```swift -class MyRestAPI { - func user() -> Promise { - return firstly { - URLSession.shared.dataTask(.promise, with: url) - }.compactMap { - try JSONSerialization.jsonObject(with: $0.data) as? [String: Any] - }.map { dict in - User(dict: dict) - } - } - - func avatar() -> Promise { - return user().then { user in - URLSession.shared.dataTask(.promise, with: user.imageUrl) - }.compactMap { - UIImage(data: $0.data) - } - } -} -``` - -This way, asynchronous chains can cleanly and seamlessly incorporate code from all over -your app without violating architectural boundaries. - -> *Note*: We provide [promises for Alamofire](https://github.com/PromiseKit/Alamofire-) too! - - -## Background Work - -```swift -class MyRestAPI { - func avatar() -> Promise { - let bgq = DispatchQueue.global(qos: .userInitiated) - - return firstly { - user() - }.then(on: bgq) { user in - URLSession.shared.dataTask(.promise, with: user.imageUrl) - }.compactMap(on: bgq) { - UIImage(data: $0) - } - } -} -``` - -All PromiseKit handlers take an `on` parameter that lets you designate the dispatch queue -on which to run the handler. The default is always the main queue. - -PromiseKit is *entirely* thread safe. - -> *Tip*: With caution, you can have all `then`, `map`, `compactMap`, etc., run on -a background queue. See `PromiseKit.conf`. Note that we suggest only changing -the queue for the `map` suite of functions, so `done` and `catch` will -continue to run on the main queue, which is *usually* what you want. - -## Failing Chains - -If an error occurs mid-chain, simply throw an error: - -```swift -firstly { - foo() -}.then { baz in - bar(baz) -}.then { result in - guard !result.isBad else { throw MyError.myIssue } - //… - return doOtherThing() -} -``` - -The error will surface at the next `catch` handler. - -Since promises handle thrown errors, you don't have to wrap calls to throwing functions -in a `do` block unless you really want to handle the errors locally: - -```swift -foo().then { baz in - bar(baz) -}.then { result in - try doOtherThing() -}.catch { error in - // if doOtherThing() throws, we end up here -} -``` - -> *Tip*: Swift lets you define an inline `enum Error` inside the function you -are working on. This isn’t *great* coding practice, but it's better than -avoiding throwing an error because you couldn't be bothered to define a good global -`Error` `enum`. - - -## Abstracting Away Asynchronicity - -```swift -var fetch = API.fetch() - -override func viewDidAppear() { - fetch.then { items in - //… - } -} - -func buttonPressed() { - fetch.then { items in - //… - } -} - -func refresh() -> Promise { - // ensure only one fetch operation happens at a time - - if fetch.isResolved { - startSpinner() - fetch = API.fetch().ensure { - stopSpinner() - } - } - return fetch -} -``` - -With promises, you don’t need to worry about *when* your asynchronous operation -finishes. Just act like it already has. - -Above, we see that you can call `then` as many times on a promise as you -like. All the blocks will be executed in the order they were added. - - -## Chaining Sequences - -When you have a series of tasks to perform on an array of data: - -```swift -// fade all visible table cells one by one in a “cascading” effect - -var fade = Guarantee() -for cell in tableView.visibleCells { - fade = fade.then { - UIView.animate(.promise, duration: 0.1) { - cell.alpha = 0 - } - } -} -fade.done { - // finish -} -``` - -Or if you have an array of closures that return promises: - -```swift -var foo = Promise() -for nextPromise in arrayOfClosuresThatReturnPromises { - foo = foo.then(nextPromise) - // ^^ you rarely would want an array of promises instead, since then - // they have all already started, you may as well use `when()` -} -foo.done { - // finish -} -``` - -> *Note*: You *usually* want `when()`, since `when` executes all of its -component promises in parallel and so completes much faster. Use the pattern -shown above in situations where tasks *must* be run sequentially; animation -is a good example. - -> We also provide `when(concurrently:)`, which lets you schedule more than -one promise at a time if you need to. - -## Timeout - -```swift -let fetches: [Promise] = makeFetches() -let timeout = after(seconds: 4) - -race(when(fulfilled: fetches).asVoid(), timeout).then { - //… -} -``` - -`race` continues as soon as one of the promises it is watching finishes. - -Make sure the promises you pass to `race` are all of the same type. The easiest way -to ensure this is to use `asVoid()`. - -Note that if any component promise rejects, the `race` will reject, too. - - -# Minimum Duration - -Sometimes you need a task to take *at least* a certain amount of time. (For example, -you want to show a progress spinner, but if it shows for less than 0.3 seconds, the UI -appears broken to the user.) - -```swift -let waitAtLeast = after(seconds: 0.3) - -firstly { - foo() -}.then { - waitAtLeast -}.done { - //… -} -``` - -The code above works because we create the delay *before* we do work in `foo()`. By the -time we get to waiting on that promise, either it will have already timed out or we will wait -for whatever remains of the 0.3 seconds before continuing the chain. - - -## Cancellation - -Promises don’t have a `cancel` function, but they do support cancellation through a -special error type that conforms to the `CancellableError` protocol. - -```swift -func foo() -> (Promise, cancel: () -> Void) { - let task = Task(…) - var cancelme = false - - let promise = Promise { seal in - task.completion = { value in - guard !cancelme else { return reject(PMKError.cancelled) } - seal.fulfill(value) - } - task.start() - } - - let cancel = { - cancelme = true - task.cancel() - } - - return (promise, cancel) -} -``` - -Promises don’t have a `cancel` function because you don’t want code outside of -your control to be able to cancel your operations--*unless*, of course, you explicitly -want to enable that behavior. In cases where you do want cancellation, the exact way -that it should work will vary depending on how the underlying task supports cancellation. -PromiseKit provides cancellation primitives but no concrete API. - -**Important**: Errors which conform to the `CancellableError` protocol do *not* normally trigger the `.catch` block. -Cancelation is neither success nor failure, so cancelled chains do not call `catch` handlers by default. -However you can intercept cancellation if you like: - -```swift -foo.then { - //… -}.catch(policy: .allErrors) { - // cancelled errors are handled *as well* -} -``` - -**Important**: Canceling a promise chain is *not* the same as canceling the underlying -asynchronous task. Promises are wrappers around asynchronicity, but they have no -control over the underlying tasks. If you need to cancel an underlying task, you -need to cancel the underlying task! - -> The library [CancellablePromiseKit](https://github.com/johannesd/CancellablePromiseKit) extends the concept of Promises to fully cover cancellable tasks. - -## Retry / Polling - -```swift -func attempt(maximumRetryCount: Int = 3, delayBeforeRetry: DispatchTimeInterval = .seconds(2), _ body: @escaping () -> Promise) -> Promise { - var attempts = 0 - func attempt() -> Promise { - attempts += 1 - return body().recover { error -> Promise in - guard attempts < maximumRetryCount else { throw error } - return after(delayBeforeRetry).then(attempt) - } - } - return attempt() -} - -attempt(maximumRetryCount: 3) { - flakeyTask(parameters: foo) -}.then { - //… -}.catch { _ in - // we attempted three times but still failed -} -``` - -In most cases, you should probably supplement the code above so that it re-attempts only for -specific error conditions. - - -## Wrapping Delegate Systems - -Be careful with Promises and delegate systems, as they are not always compatible. -Promises complete *once*, whereas most delegate systems may notify their delegate many -times. This is why, for example, there is no PromiseKit extension for a -`UIButton`. - -A good example of an appropriate time to wrap delegation is when you need a -single `CLLocation` lookup: - -```swift -extension CLLocationManager { - static func promise() -> Promise { - return PMKCLLocationManagerProxy().promise - } -} - -class PMKCLLocationManagerProxy: NSObject, CLLocationManagerDelegate { - private let (promise, seal) = Promise<[CLLocation]>.pending() - private var retainCycle: PMKCLLocationManagerProxy? - private let manager = CLLocationManager() - - init() { - super.init() - retainCycle = self - manager.delegate = self // does not retain hence the `retainCycle` property - - promise.ensure { - // ensure we break the retain cycle - self.retainCycle = nil - } - } - - @objc fileprivate func locationManager(_: CLLocationManager, didUpdateLocations locations: [CLLocation]) { - seal.fulfill(locations) - } - - @objc func locationManager(_: CLLocationManager, didFailWithError error: Error) { - seal.reject(error) - } -} - -// use: - -CLLocationManager.promise().then { locations in - //… -}.catch { error in - //… -} -``` - -> Please note: we provide this promise with our CoreLocation extensions at -> https://github.com/PromiseKit/CoreLocation - - -## Recovery - -Sometimes you don’t want an error to cascade. Instead, you want to supply a default result: - -```swift -CLLocationManager.requestLocation().recover { error -> Promise in - guard error == MyError.airplaneMode else { - throw error - } - return .value(CLLocation.savannah) -}.done { location in - //… -} -``` - -Be careful not to ignore all errors, though! Recover only those errors that make sense to recover. - - -## Promises for Modal View Controllers - -```swift -class ViewController: UIViewController { - - private let (promise, seal) = Guarantee<…>.pending() // use Promise if your flow can fail - - func show(in: UIViewController) -> Promise<…> { - in.show(self, sender: in) - return promise - } - - func done() { - dismiss(animated: true) - seal.fulfill(…) - } -} - -// use: - -ViewController().show(in: self).done { - //… -}.catch { error in - //… -} -``` - -This is the best approach we have found, which is a pity as it requires the -presentee to control the presentation and requires the presentee to dismiss itself -explicitly. - -Nothing seems to beat storyboard segues for decoupling an app's controllers. - - -## Saving Previous Results - -Let’s say you have: - - -```swift -login().then { username in - fetch(avatar: username) -}.done { image in - //… -} -``` - -What if you want access to both `username` and `image` in your `done`? - -The most obvious way is to use nesting: - -```swift -login().then { username in - fetch(avatar: username).done { image in - // we have access to both `image` and `username` - } -}.done { - // the chain still continues as you'd expect -} -``` - -However, such nesting reduces the clarity of the chain. Instead, we could use Swift -tuples: - -```swift -login().then { username in - fetch(avatar: username).map { ($0, username) } -}.then { image, username in - //… -} -``` - -The code above simply maps `Promise` into `Promise<(UIImage, String)>`. - - -## Waiting on Multiple Promises, Whatever Their Result - -Use `when(resolved:)`: - -```swift -when(resolved: a, b).done { (results: [Result]) in - // `Result` is an enum of `.fulfilled` or `.rejected` -} - -// ^^ cannot call `catch` as `when(resolved:)` returns a `Guarantee` -``` - -Generally, you don't want this! People ask for it a lot, but usually because -they are trying to ignore errors. What they really need is to use `recover` on one of the -promises. Errors happen, so they should be handled; you usually don't want to ignore them. diff --git a/Carthage/Checkouts/PromiseKit/Documentation/Examples/ImageCache.md b/Carthage/Checkouts/PromiseKit/Documentation/Examples/ImageCache.md deleted file mode 100644 index 98af805ed..000000000 --- a/Carthage/Checkouts/PromiseKit/Documentation/Examples/ImageCache.md +++ /dev/null @@ -1,131 +0,0 @@ -# Image Cache with Promises - -Here is an example of a simple image cache that uses promises to simplify the -state machine: - -```swift -import Foundation -import PromiseKit - -/** - * Small (10 images) - * Thread-safe - * Consolidates multiple requests to the same URLs - * Removes stale entries (FIXME well, strictly we may delete while fetching from cache, but this is unlikely and non-fatal) - * Completely _ignores_ server caching headers! - */ - -private let q = DispatchQueue(label: "org.promisekit.cache.image", attributes: .concurrent) -private var active: [URL: Promise] = [:] -private var cleanup = Promise() - - -public func fetch(image url: URL) -> Promise { - var promise: Promise? - q.sync { - promise = active[url] - } - if let promise = promise { - return promise - } - - q.sync { - promise = Promise(.start) { - - let dst = try url.cacheDestination() - - guard !FileManager.default.isReadableFile(atPath: dst.path) else { - return Promise(dst) - } - - return Promise { seal in - URLSession.shared.downloadTask(with: url) { tmpurl, _, error in - do { - guard let tmpurl = tmpurl else { throw error ?? E.unexpectedError } - try FileManager.default.moveItem(at: tmpurl, to: dst) - seal.fulfill(dst) - } catch { - seal.reject(error) - } - }.resume() - } - - }.then(on: .global(QoS: .userInitiated)) { - try Data(contentsOf: $0) - } - - active[url] = promise - - if cleanup.isFulfilled { - cleanup = promise!.asVoid().then(on: .global(QoS: .utility), execute: docleanup) - } - } - - return promise! -} - -public func cached(image url: URL) -> Data? { - guard let dst = try? url.cacheDestination() else { - return nil - } - return try? Data(contentsOf: dst) -} - - -public func cache(destination remoteUrl: URL) throws -> URL { - return try remoteUrl.cacheDestination() -} - -private func cache() throws -> URL { - guard let dst = FileManager.default.docs? - .appendingPathComponent("Library") - .appendingPathComponent("Caches") - .appendingPathComponent("cache.img") - else { - throw E.unexpectedError - } - - try FileManager.default.createDirectory(at: dst, withIntermediateDirectories: true, attributes: [:]) - - return dst -} - -private extension URL { - func cacheDestination() throws -> URL { - - var fn = String(hashValue) - let ext = pathExtension - - // many of Apple's functions don’t recognize file type - // unless we preserve the file extension - if !ext.isEmpty { - fn += ".\(ext)" - } - - return try cache().appendingPathComponent(fn) - } -} - -enum E: Error { - case unexpectedError - case noCreationTime -} - -private func docleanup() throws { - var contents = try FileManager.default - .contentsOfDirectory(at: try cache(), includingPropertiesForKeys: [.creationDateKey]) - .map { url -> (Date, URL) in - guard let date = try url.resourceValues(forKeys: [.creationDateKey]).creationDate else { - throw E.noCreationTime - } - return (date, url) - }.sorted(by: { - $0.0 > $1.0 - }) - - while contents.count > 10 { - let rm = contents.popLast()!.1 - try FileManager.default.removeItem(at: rm) - } -} -```` \ No newline at end of file diff --git a/Carthage/Checkouts/PromiseKit/Documentation/Examples/URLSession+BadResponseErrors.swift b/Carthage/Checkouts/PromiseKit/Documentation/Examples/URLSession+BadResponseErrors.swift deleted file mode 100644 index efc37ef73..000000000 --- a/Carthage/Checkouts/PromiseKit/Documentation/Examples/URLSession+BadResponseErrors.swift +++ /dev/null @@ -1,20 +0,0 @@ -Promise(.pending) { seal in - URLSession.shared.dataTask(with: rq, completionHandler: { data, rsp, error in - if let data = data { - seal.fulfill(data) - } else if let error = error { - if case URLError.badServerResponse = error, let rsp = rsp as? HTTPURLResponse { - seal.reject(Error.badResponse(rsp.statusCode)) - } else { - seal.reject(error) - } - } else { - seal.reject(PMKError.invalidCallingConvention) - } - }) -} - -enum Error: Swift.Error { - case badUrl - case badResponse(Int) -} diff --git a/Carthage/Checkouts/PromiseKit/Documentation/Examples/detweet.swift b/Carthage/Checkouts/PromiseKit/Documentation/Examples/detweet.swift deleted file mode 100644 index 6522d0c75..000000000 --- a/Carthage/Checkouts/PromiseKit/Documentation/Examples/detweet.swift +++ /dev/null @@ -1,102 +0,0 @@ -#!/usr/bin/swift sh -import Foundation -import PromiseKit // @mxcl ~> 6.5 -import Swifter // @mattdonnelly == b27a89 -let swifter = Swifter( - consumerKey: "FILL", - consumerSecret: "ME", - oauthToken: "IN", - oauthTokenSecret: "https://developer.twitter.com/en/docs/basics/apps/overview.html" -) - -extension JSON { - var date: Date? { - guard let string = string else { return nil } - - let formatter = DateFormatter() - formatter.dateFormat = "EEE MMM dd HH:mm:ss Z yyyy" - return formatter.date(from: string) - } -} - -let twoMonthsAgo = Date() - 24*60*60*30*2 - -print("Deleting qualifying tweets before:", twoMonthsAgo) - -func deleteTweets(maxID: String? = nil) -> Promise { - return Promise { seal in - swifter.getTimeline(for: "mxcl", count: 200, maxID: maxID, success: { json in - - if json.array!.count <= 1 { - // if we get one result for a requested maxID, we're done - return seal.fulfill() - } - - for item in json.array! { - let date = item["created_at"].date! - guard date < twoMonthsAgo, item["favorite_count"].integer! < 2 else { - continue - } - swifter.destroyTweet(forID: id, success: { _ in - print("D:", item["text"].string!) - }, failure: seal.reject) - } - - let next = json.array!.last!["id_str"].string! - deleteTweets(maxID: next).pipe(to: seal.resolve) - - }, failure: seal.reject) - } -} - -func deleteFavorites(maxID: String? = nil) -> Promise { - return Promise { seal in - swifter.getRecentlyFavoritedTweets(count: 200, maxID: maxID, success: { json in - - if json.array!.count <= 1 { - return seal.fulfill() - } - - for item in json.array! { - guard item["created_at"].date! < twoMonthsAgo else { continue } - - swifter.unfavoriteTweet(forID: item["id_str"].string!, success: { _ in - print("D❤️:", item["text"].string!) - }, failure: seal.reject) - } - - let next = json.array!.last!["id_str"].string! - deleteFavorites(maxID: next).pipe(to: seal.resolve) - - }, failure: seal.reject) - } -} - -func unblockPeople(cursor: String? = nil) -> Promise { - return Promise { seal in - swifter.getBlockedUsersIDs(stringifyIDs: "true", cursor: cursor, success: { json, prev, next in - for id in json.array! { - print("Unblocking:", id) - swifter.unblockUser(for: .id(id.string!)) - } - - if let next = next, !next.isEmpty, next != prev, next != "0" { - unblockPeople(cursor: next).pipe(to: seal.resolve) - } else { - seal.fulfill() - } - - }, failure: seal.reject) - } -} - -firstly { - when(fulfilled: deleteTweets(), deleteFavorites(), unblockPeople()) -}.done { - exit(0) -}.catch { - print("error:", $0) - exit(1) -} - -RunLoop.main.run() diff --git a/Carthage/Checkouts/PromiseKit/Documentation/FAQ.md b/Carthage/Checkouts/PromiseKit/Documentation/FAQ.md deleted file mode 100644 index decd7ba3d..000000000 --- a/Carthage/Checkouts/PromiseKit/Documentation/FAQ.md +++ /dev/null @@ -1,398 +0,0 @@ -# FAQ - -## Why should I use PromiseKit over X-Promises-Foo? - -* PromiseKit has a heavy focus on **developer experience**. You’re a developer; do you care about your experience? Yes? Then pick PromiseKit. -* Do you care about having any bugs you find fixed? Then pick PromiseKit. -* Do you care about having your input heard and reacted to in a fast fashion? Then pick PromiseKit. -* Do you want a library that has been maintained continuously and passionately for 6 years? Then pick PromiseKit. -* Do you want a library that the community has chosen to be their №1 Promises/Futures library? Then pick PromiseKit. -* Do you want to be able to use Promises with Apple’s SDKs rather than having to do all the work of writing the Promise implementations yourself? Then pick PromiseKit. -* Do you want to be able to use Promises with Swift 3.x, Swift 4.x, ObjC, iOS, tvOS, watchOS, macOS, Android & Linux? Then pick PromiseKit. -* PromiseKit verifies its correctness by testing against the entire [Promises/A+ test suite](https://github.com/promises-aplus/promises-tests). - -## How do I create a fulfilled `Void` promise? - -```swift -let foo = Promise() - -// or: - -let bar = Promise.value(()) -``` - -## How do I “early `return`”? - -```swift -func foo() -> Promise { - guard thingy else { - return Promise() - } - - //… -} - -func bar() -> Promise { - guard thingy else { - return .value(instanceOfSomethingNotVoid) - } - - //… -} -``` - -## Do I need to worry about retain cycles? - -Generally, no. Once a promise completes, all handlers are released and so -any references to `self` are also released. - -However, if your chain contains side effects that you would typically -not want to happen after, say, a view controller is popped, then you should still -use `weak self` (and check for `self == nil`) to prevent any such side effects. - -*However*, in our experience most things that developers consider side effects that -should be protected against are in fact *not* side effects. - -Side effects include changes to global application state. They *do not* include -changing the display state of a view-controller. So, protect against setting `UserDefaults` or -modifying the application database, and don't bother protecting against changing -the text in a `UILabel`. - -[This StackOverflow question](https://stackoverflow.com/questions/39281214/should-i-use-weak-self-in-promisekit-blocks) -has some good discussion on this topic. - -## Do I need to retain my promises? - -No. Every promise handler retains its promise until the handler is executed. Once -all handlers have been executed, the promise is deallocated. So you only need to retain -the promise if you need to refer to its final value after its chain has completed. - -## Where should I put my `catch`? - -`catch` deliberately terminates the chain. You should put it low in your promise -hierarchy at a point as close to the root as possible. Typically, this would be -somewhere such as a view controller, where your `catch` can then display a message -to the user. - -This means you should be writing one catch for many `then`s and returning -promises that do not have internal `catch` handlers of their own. - -This is obviously a guideline; do what is necessary. - -## How do branched chains work? - -Suppose you have a promise: - -``` -let promise = foo() -``` - -And you call `then` twice: - -``` -promise.then { - // branch A -} - -promise.then { - // branch B -} -``` - -You now have a branched chain. When `promise` resolves, both chains receive its -value. However, the two chains are entirely separate and Swift will prompt you -to ensure that both have `catch` handlers. - -You can most likely ignore the `catch` for one of these branches, but be careful: -in these situations, Swift cannot help you ensure that your chains are error-handled. - -``` -promise.then { - // branch A -}.catch { error in - //… -} - -_ = promise.then { - print("foo") - - // ignoring errors here as print cannot error and we handle errors above -} -``` - -It may be safer to recombine the two branches into a single chain again: - -``` -let p1 = promise.then { - // branch A -} - -let p2 = promise.then { - // branch B -} - -when(fulfilled: p1, p2).catch { error in - //… -} -``` - -> It's worth noting that you can add multiple `catch` handlers to a promise, too. -> And indeed, both will be called if the chain is rejected. - -## Is PromiseKit “heavy”? - -No. PromiseKit contains hardly any source code. In fact, it is quite lightweight. Any -“weight” relative to other promise implementations derives from 6 years of bug fixes -and tuning, from the fact that we have *stellar* Objective-C-to-Swift bridging and -from important things such as [Zalgo prevention](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony) -that hobby-project implementations don’t consider. - -## Why is debugging hard? - -Because promises always execute via dispatch, the backtrace you see at the point of -an error has less information than is usually required to trace the path of execution. - -One solution is to turn off dispatch during debugging: - -```swift -// Swift -DispatchQueue.default = zalgo - -//ObjC -PMKSetDefaultDispatchQueue(zalgo) -``` - -Don’t leave this on. In normal use, we always dispatch to avoid you accidentally writing -a common bug pattern. See [this blog post](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony). - -## Where is `all()`? - -Some promise libraries provide `all` for awaiting multiple results. We call this function -`when`, but it is the same thing. We chose `when` because it's the more common term and -because we think it reads better in code. - -## How can I test APIs that return promises? - -You need to use `XCTestExpectation`. - -We also define `wait()` and `hang()`. Use them if you must, but be careful because they -block the current thread! - -## Is PromiseKit thread-safe? - -Yes, entirely. - -However the code *you* write in your `then`s might not be! - -Just make sure you don’t access state outside the chain from concurrent queues. -By default, PromiseKit handlers run on the `main` thread, which is serial, so -you typically won't have to worry about this. - -## Why are there separate classes for Objective-C and Swift? - -`Promise` is generic and and so cannot be represented by Objective-C. - -## Does PromiseKit conform to Promises/A+? - -Yes. We have tests that prove this. - -## How do PromiseKit and RxSwift/ReactiveSwift differ? - -PromiseKit is a lot simpler. - -The top-level difference between PromiseKit and RxSwift is that RxSwift `Observable`s (roughly -analogous to PromiseKit `Promise`s) do not necessarily return a single result: they may emit -zero, one, or an infinite stream of values. This small conceptual change leads to an API -that's both surprisingly powerful and surprisingly complex. - -RxSwift requires commitment to a paradigm shift in how you program. It proposes that you -restructure your code as a matrix of interacting value pipelines. When applied properly -to a suitable problem, RxSwift can yield great benefits in robustness and simplicity. -But not all applications are suitable for RxSwift. - -By contrast, PromiseKit selectively applies the best parts of reactive programming -to the hardest part of pure Swift development, the management of asynchronicity. It's a broadly -applicable tool. Most asynchronous code can be clarified, simplified and made more robust -just by converting it to use promises. (And the conversion process is easy.) - -Promises make for code that is clear to most developers. RxSwift, perhaps not. Take a look at this -[sign-up panel](https://github.com/ReactiveX/RxSwift/tree/master/RxExample/RxExample/Examples/GitHubSignup) -implemented in RxSwift and see what you think. (Note that this is one of RxSwift's own examples.) - -Even where PromiseKit and RxSwift are broadly similar, there are many differences in implementation: - -* RxSwift has a separate API for chain-terminating elements ("subscribers") versus interior -elements. In PromiseKit, all elements of a chain use roughly the same code pattern. - -* The RxSwift API to define an interior element of a chain (an "operator") is hair-raisingly complex. -So, RxSwift tries hard to supply every operator you might ever want to use right off the shelf. There are -hundreds. PromiseKit supplies a few utilities to help with specific scenarios, but because it's trivial -to write your own chain elements, there's no need for all this extra code in the library. - -* PromiseKit dispatches the execution of every block. RxSwift dispatches only when told to do so. Moreover, the -current dispatching state is an attribute of the chain, not the specific block, as it is in PromiseKit. -The RxSwift system is more powerful but more complex. PromiseKit is simple, predictable and safe. - -* In PromiseKit, both sides of a branched chain refer back to their shared common ancestors. In RxSwift, -branching normally creates a duplicate parallel chain that reruns the code at the head of the chain...except -when it doesn't. The rules for determining what will actually happen are complex, and given -a chain created by another chunk of code, you can't really tell what the behavior will be. - -* Because RxSwift chains don't necessarily terminate on their own, RxSwift needs you to take on some -explicit garbage collection duties to ensure that pipelines that are no longer needed are properly -deallocated. All promises yield a single value, terminate and then automatically deallocate themselves. - -You can find some additional discussion in [this ticket](https://github.com/mxcl/PromiseKit/issues/484). - -## Why can’t I return from a catch like I can in JavaScript? - -Swift demands that functions have one purpose. Thus, we have two error handlers: - -* `catch`: ends the chain and handles errors -* `recover`: attempts to recover from errors in a chain - -You want `recover`. - -## When do promises “start”? - -Often people are confused about when Promises “start”. Is it immediately? Is it -later? Is it when you call `then`? - -The answer is: The promise **body** executes during initialization of the promise, on the current thread. -As an example, `"Executing the promise body"` will be printed to the console right after the promise is created, -without having to call `then` on the promise. - -```swift -let testPromise = Promise { - print("Executing the promise body.") - return $0.fulfill(true) -} -``` - -But what about asynchronous tasks that you create in your promise's body? They behave the same way as they would -without using PromiseKit. Here's a simple example: - -```swift -let testPromise = Promise { seal in - print("Executing the promise body.") - DispatchQueue.main.asyncAfter(deadline: .now() + 3.0) { - print("Executing asyncAfter.") - return seal.fulfill(true) - } -} -``` - -The message `"Executing the promise body."` is being logged right away, but the message `"Executing asyncAfter."` -is only logged three seconds later. In this case `DispatchQueue` is responsible for deciding when to execute -the task you pass to it, PromiseKit has nothing to do with it. - -## What is a good way to use Firebase with PromiseKit - -There is no good way to use Firebase with PromiseKit. See the next question for -a more detailed rationale. - -The best option is to embed your chain in your Firebase handler: - -``` -foo.observe(.value) { snapshot in - firstly { - bar(with: snapshot) - }.then { - baz() - }.then { - baffle() - }.catch { - //… - } -} -``` - - -## I need my `then` to fire multiple times - -Then we’re afraid you cannot use PromiseKit for that event. Promises only -resolve *once*. This is the fundamental nature of promises and it is considered a -feature because it gives you guarantees about the flow of your chains. - - -## How do I change the default queues that handlers run on? - -You can change the values of `PromiseKit.conf.Q`. There are two variables that -change the default queues that the two kinds of handler run on. A typical -pattern is to change all your `then`-type handlers to run on a background queue -and to have all your “finalizers” run on the main queue: - -``` -PromiseKit.conf.Q.map = .global() -PromiseKit.conf.Q.return = .main //NOTE this is the default -``` - -Be very careful about setting either of these queues to `nil`. It has the -effect of running *immediately*, and this is not what you usually want to do in -your application. This is, however, useful when you are running specs and want -your promises to resolve immediately. (This is basically the same idea as "stubbing" -an HTTP request.) - -```swift -// in your test suite setup code -PromiseKit.conf.Q.map = nil -PromiseKit.conf.Q.return = nil -``` - -## How do I use PromiseKit on the server side? - -If your server framework requires that the main queue remain unused (e.g., Kitura), -then you must use PromiseKit 6 and you must tell PromiseKit not to dispatch to the -main queue by default. This is easy enough: - -```swift -PromiseKit.conf.Q = (map: DispatchQueue.global(), return: DispatchQueue.global()) -``` - -> Note, we recommend using your own queue rather than `.global()`, we've seen better performance this way. - -Here’s a more complete example: - -```swift -import Foundation -import HeliumLogger -import Kitura -import LoggerAPI -import PromiseKit - -HeliumLogger.use(.info) - -let pmkQ = DispatchQueue(label: "pmkQ", qos: .default, attributes: .concurrent, autoreleaseFrequency: .workItem) -PromiseKit.conf.Q = (map: pmkQ, return: pmkQ) - -let router = Router() -router.get("/") { _, response, next in - Log.info("Request received") - after(seconds: 1.0).done { - Log.info("Sending response") - response.send("OK") - next() - } -} - -Log.info("Starting server") -Kitura.addHTTPServer(onPort: 8888, with: router) -Kitura.run() -``` - -## How do I control console output? - -By default PromiseKit emits console messages when certain events occur. These events include: -- A promise or guarantee has blocked the main thread -- A promise has been deallocated without being fulfilled -- An error which occurred while fulfilling a promise was swallowed using cauterize - -You may turn off or redirect this output by setting a thread safe closure in [PMKConfiguration](https://github.com/mxcl/PromiseKit/blob/master/Sources/Configuration.swift) **before** processing any promises. For example, to turn off console output: - -```swift -conf.logHandler = { event in } -``` - -## My question was not answered - -[Please open a ticket](https://github.com/mxcl/PromiseKit/issues/new). diff --git a/Carthage/Checkouts/PromiseKit/Documentation/GettingStarted.md b/Carthage/Checkouts/PromiseKit/Documentation/GettingStarted.md deleted file mode 100644 index 8f6af48dc..000000000 --- a/Carthage/Checkouts/PromiseKit/Documentation/GettingStarted.md +++ /dev/null @@ -1,535 +0,0 @@ -# `then` and `done` - -Here is a typical promise chain: - -```swift -firstly { - login() -}.then { creds in - fetch(avatar: creds.user) -}.done { image in - self.imageView = image -} -``` - -If this code used completion handlers, it would look like this: - -```swift -login { creds, error in - if let creds = creds { - fetch(avatar: creds.user) { image, error in - if let image = image { - self.imageView = image - } - } - } -} -``` - -`then` *is* just another way to structure completion handlers, but it is also quite a -bit more. At this initial stage of our understanding, it mostly helps -readability. The promise chain above is easy to scan and understand: one asynchronous -operation leads into the other, line by line. It's as close to -procedural code as we can easily come given the current state of Swift. - -`done` is the same as `then` but you cannot return a promise. It is -typically the end of the “success” part of the chain. Above, you can see that we -receive the final image in our `done` and use it to set up the UI. - -Let’s compare the signatures of the two login methods: - -```swift -func login() -> Promise - -// Compared with: - -func login(completion: (Creds?, Error?) -> Void) - // ^^ ugh. Optionals. Double optionals. -``` - -The distinction is that with promises, your functions return *promises* instead -of accepting and running callbacks. Each handler in a chain returns a promise. -`Promise` objects define the `then` method, which waits for the completion of the -promise before continuing the chain. Chains resolve procedurally, one promise -at a time. - -A `Promise` represents the future value of an asynchronous task. It has a type -that represents the type of object it wraps. For example, in the example above, -`login` is a function that returns a `Promise` that *will* represent an instance -of `Creds`. - -> *Note*: `done` is new to PromiseKit 5. We previously defined a variant of `then` that -did not require you to return a promise. Unfortunately, this convention often confused -Swift and led to odd and hard-to-debug error messages. It also made using PromiseKit -more painful. The introduction of `done` lets you type out promise chains that -compile without additional qualification to help the compiler figure out type information. - ---- - -You may notice that unlike the completion pattern, the promise chain appears to -ignore errors. This is not the case! In fact, it has the opposite effect: the promise -chain makes error handling more accessible and makes errors harder to ignore. - - -# `catch` - -With promises, errors cascade along the promise chain, ensuring that your apps are -robust and your code is clear: - -```swift -firstly { - login() -}.then { creds in - fetch(avatar: creds.user) -}.done { image in - self.imageView = image -}.catch { - // any errors in the whole chain land here -} -``` - -> Swift emits a warning if you forget to `catch` a chain. But we'll -> talk about that in more detail later. - -Each promise is an object that represents an individual, asynchronous task. -If a task fails, its promise becomes *rejected*. Chains that contain rejected -promises skip all subsequent `then`s. Instead, the next `catch` is executed. -(Strictly speaking, *all* subsequent `catch` handlers are executed.) - -For fun, let’s compare this pattern with its completion handler equivalent: - -```swift -func handle(error: Error) { - //… -} - -login { creds, error in - guard let creds = creds else { return handle(error: error!) } - fetch(avatar: creds.user) { image, error in - guard let image = image else { return handle(error: error!) } - self.imageView.image = image - } -} -``` - -The use of `guard` and a consolidated error handler help, but the promise chain’s -readability speaks for itself. - - -# `ensure` - -We have learned to compose asynchronicity. Next let’s extend our primitives: - -```swift -firstly { - UIApplication.shared.isNetworkActivityIndicatorVisible = true - return login() -}.then { - fetch(avatar: $0.user) -}.done { - self.imageView = $0 -}.ensure { - UIApplication.shared.isNetworkActivityIndicatorVisible = false -}.catch { - //… -} -``` - -No matter the outcome of your chain—-failure or success—-your `ensure` -handler is always called. - -Let’s compare this pattern with its completion handler equivalent: - -```swift -UIApplication.shared.isNetworkActivityIndicatorVisible = true - -func handle(error: Error) { - UIApplication.shared.isNetworkActivityIndicatorVisible = false - //… -} - -login { creds, error in - guard let creds = creds else { return handle(error: error!) } - fetch(avatar: creds.user) { image, error in - guard let image = image else { return handle(error: error!) } - self.imageView.image = image - UIApplication.shared.isNetworkActivityIndicatorVisible = false - } -} -``` - -It would be very easy for someone to amend this code and forget to unset -the activity indicator, leading to a bug. With promises, this type of error is -almost impossible: the Swift compiler resists your supplementing the chain without -using promises. You almost won’t need to review the pull requests. - -> *Note*: PromiseKit has perhaps capriciously switched between the names `always` -and `ensure` for this function several times in the past. Sorry about this. We suck. - -You can also use `finally` as an `ensure` that terminates the promise chain and does not return a value: - -``` -spinner(visible: true) - -firstly { - foo() -}.done { - //… -}.catch { - //… -}.finally { - self.spinner(visible: false) -} -``` - - -# `when` - -With completion handlers, reacting to multiple asynchronous operations is either -slow or hard. Slow means doing it serially: - -```swift -operation1 { result1 in - operation2 { result2 in - finish(result1, result2) - } -} -``` - -The fast (*parallel*) path code makes the code less clear: - -```swift -var result1: …! -var result2: …! -let group = DispatchGroup() -group.enter() -group.enter() -operation1 { - result1 = $0 - group.leave() -} -operation2 { - result2 = $0 - group.leave() -} -group.notify(queue: .main) { - finish(result1, result2) -} -``` - -Promises are easier: - -```swift -firstly { - when(fulfilled: operation1(), operation2()) -}.done { result1, result2 in - //… -} -``` - -`when` takes promises, waits for them to resolve and returns a promise containing the results. - -As with any promise chain, if any of the component promises fail, the chain calls the next `catch`. - - -# PromiseKit Extensions - -When we made PromiseKit, we understood that we wanted to use *only* promises to implement -asynchronous behavior. So wherever possible, we offer extensions to Apple’s APIs that reframe -the API in terms of promises. For example: - -```swift -firstly { - CLLocationManager.promise() -}.then { location in - CLGeocoder.reverseGeocode(location) -}.done { placemarks in - self.placemark.text = "\(placemarks.first)" -} -``` - -To use these extensions, you need to specify subspecs: - -```ruby -pod "PromiseKit" -pod "PromiseKit/CoreLocation" -pod "PromiseKit/MapKit" -``` - -All of these extensions are available at the [PromiseKit organization](https://github.com/PromiseKit). -Go there to see what's available and to read the source code and documentation. Every file and function -has been copiously documented. - -> We also provide extensions for common libraries such as [Alamofire](https://github.com/PromiseKit/Alamofire-). - - -# Making Promises - -The standard extensions will take you a long way, but sometimes you'll still need to start chains -of your own. Maybe you're using a third party API that doesn’t provide promises, or perhaps you wrote -your own asynchronous system. Either way, it's easy to add promises. If you look at the code of the -standard extensions, you'll see that it uses the same approach described below. - -Let’s say we have the following method: - -```swift -func fetch(completion: (String?, Error?) -> Void) -``` - -How do we convert this to a promise? Well, it's easy: - -```swift -func fetch() -> Promise { - return Promise { fetch(completion: $0.resolve) } -} -``` - -You may find the expanded version more readable: - -```swift -func fetch() -> Promise { - return Promise { seal in - fetch { result, error in - seal.resolve(result, error) - } - } -} -``` - -The `seal` object that the `Promise` initializer provides to you defines -many methods for handling garden-variety completion handlers. It even -covers a variety of rarer situations, thus making it easy for you to add -promises to an existing codebase. - -> *Note*: We tried to make it so that you could just do `Promise(fetch)`, but we -were not able to make this simpler pattern work universally without requiring -extra disambiguation for the Swift compiler. Sorry; we tried. - -> *Note*: In PMK 4, this initializer provided two parameters to your closure: -`fulfill` and `reject`. PMK 5 and 6 give you an object that has both `fulfill` and -`reject` methods, but also many variants of the method `resolve`. You can -typically just pass completion handler parameters to `resolve` and let Swift figure -out which variant to apply to your particular case (as shown in the example above). - -> *Note* `Guarantees` (below) have a slightly different initializer (since they -cannot error) so the parameter to the initializer closure is just a closure. Not -a `Resolver` object. Thus do `seal(value)` rather than `seal.fulfill(value)`. This -is because there is no variations in what guarantees can be sealed with, they can -*only* fulfill. - -# `Guarantee` - -Since PromiseKit 5, we have provided `Guarantee` as a supplementary class to -`Promise`. We do this to complement Swift’s strong error handling system. - -Guarantees *never* fail, so they cannot be rejected. A good example is `after`: - -``` -firstly { - after(seconds: 0.1) -}.done { - // there is no way to add a `catch` because after cannot fail. -} -``` - -Swift warns you if you don’t terminate a regular `Promise` chain (i.e., not -a `Guarantee` chain). You're expected to silence this warning by supplying -either a `catch` or a `return`. (In the latter case, you will then have to `catch` -at the point where you receive that promise.) - -Use `Guarantee`s wherever possible so that your code has error handling where -it's required and no error handling where it's not required. - -In general, you should be able to use `Guarantee`s and `Promise`s interchangeably, -We have gone to great lengths to try and ensure this, so please open a ticket -if you find an issue. - ---- - -If you are creating your own guarantees the syntax is simpler than that of promises; - -```swift -func fetch() -> Promise { - return Guarantee { seal in - fetch { result in - seal(result) - } - } -} -``` - -Which could be reduced to: - -```swift -func fetch() -> Promise { - return Guarantee(resolver: fetch) -} -``` - -# `map`, `compactMap`, etc. - -`then` provides you with the result of the previous promise and requires you to return -another promise. - -`map` provides you with the result of the previous promise and requires you to return -an object or value type. - -`compactMap` provides you with the result of the previous promise and requires you -to return an `Optional`. If you return `nil`, the chain fails with -`PMKError.compactMap`. - -> *Rationale*: Before PromiseKit 4, `then` handled all these cases, and it was -painful. We hoped the pain would disappear with new Swift versions. However, -it has become clear that the various pain points are here to stay. In fact, we -as library authors are expected to disambiguate at the naming level of our API. -Therefore, we have split the three main kinds of `then` into `then`, `map` and -`done`. After using these new functions, we realized this is much nicer in practice, -so we added `compactMap` as well (modeled on `Optional.compactMap`). - -`compactMap` facilitates quick composition of promise chains. For example: - -```swift -firstly { - URLSession.shared.dataTask(.promise, with: rq) -}.compactMap { - try JSONSerialization.jsonObject($0.data) as? [String] -}.done { arrayOfStrings in - //… -}.catch { error in - // Foundation.JSONError if JSON was badly formed - // PMKError.compactMap if JSON was of different type -} -``` - -> *Tip*: We also provide most of the functional methods you would expect for sequences, -e.g., `map`, `thenMap`, `compactMapValues`, `firstValue`, etc. - - -# `get` - -We provide `get` as a `done` that returns the value fed to `get`. - -```swift -firstly { - foo() -}.get { foo in - //… -}.done { foo in - // same foo! -} -``` - - -# `tap` - -We provide `tap` for debugging. It's the same as `get` but provides the -`Result` of the `Promise` so you can inspect the value of the chain at this -point without causing any side effects: - -```swift -firstly { - foo() -}.tap { - print($0) -}.done { - //… -}.catch { - //… -} -``` - - -# Supplement - -## `firstly` - -We've used `firstly` several times on this page, but what is it, really? In fact, -it is just [syntactic sugar](https://en.wikipedia.org/wiki/Syntactic_sugar). -You don’t really need it, but it helps to make your chains more readable. Instead of: - -```swift -firstly { - login() -}.then { creds in - //… -} -``` - -You could just do: - -```swift -login().then { creds in - //… -} -``` - -Here is a key understanding: `login()` returns a `Promise`, and all `Promise`s have a `then` function. `firstly` returns a `Promise`, and `then` returns a `Promise`, too! But don’t worry too much about these details. Learn the *patterns* to start with. Then, when you are ready to advance, learn the underlying architecture. - - -## `when` Variants - -`when` is one of PromiseKit’s more useful functions, and so we offer several variants. - -* The default `when`, and the one you should typically use, is `when(fulfilled:)`. This variant -waits on all its component promises, but if any fail, `when` fails too, and thus the chain *rejects*. -It's important to note that all promises in the `when` *continue*. Promises have *no* control over -the tasks they represent. Promises are just wrappers around tasks. - -* `when(resolved:)` waits even if one or more of its component promises fails. The value produced -by this variant of `when` is an array of `Result`. Consequently, this variant requires all its -component promises to have the same generic type. See our advanced patterns guide for work-arounds -for this limitation. - -* The `race` variant lets you *race* several promises. Whichever finishes first is the result. See the -advanced patterns guide for typical usage. - - -## Swift Closure Inference - -Swift automatically infers returns and return types for one-line closures. -The following two forms are the same: - -```swift -foo.then { - bar($0) -} - -// is the same as: - -foo.then { baz -> Promise in - return bar(baz) -} -``` - -Our documentation often omits the `return` for clarity. - -However, this shorthand is both a blessing and a curse. You may find that the Swift compiler -often fails to infer return types properly. See our [Troubleshooting Guide](Troubleshooting.md) if -you require further assistance. - -> By adding `done` to PromiseKit 5, we have managed to avoid many of these common -pain points in using PromiseKit and Swift. - - - -# Further Reading - -The above information is the 90% you will use. We **strongly** suggest reading the -[API Reference]. -There are numerous little -functions that may be useful to you, and the documentation for everything outlined above -is more thorough at the source. - -In Xcode, don’t forget to option-click on PromiseKit functions to access this -documentation while you're coding. - -Here are some recent articles that document PromiseKit 5+: - -* [Using Promises - Agostini.tech](https://agostini.tech/2018/10/08/using-promisekit) - -Careful with general online references, many of them refer to PMK < 5 which has a subtly -different API (sorry about that, but Swift has changed a lot over the years and thus -we had to too). - - -[API Reference]: https://mxcl.dev/PromiseKit/reference/v6/Classes/Promise.html diff --git a/Carthage/Checkouts/PromiseKit/Documentation/Installation.md b/Carthage/Checkouts/PromiseKit/Documentation/Installation.md deleted file mode 100644 index e0078ee1e..000000000 --- a/Carthage/Checkouts/PromiseKit/Documentation/Installation.md +++ /dev/null @@ -1,222 +0,0 @@ -# Xcode 8.3, 9.x or 10.x / Swift 3 or 4 - -We recommend Carthage over CocoaPods, but both installation methods are supported. - -## CocoaPods - -```ruby -use_frameworks! - -target "Change Me!" do - pod "PromiseKit", "~> 6.8" -end -``` - -If the generated Xcode project gives you a warning that PromiseKit needs to be upgraded to -Swift 4.0 or Swift 4.2, then add the following: - -```ruby -post_install do |installer| - installer.pods_project.targets.each do |target| - if target.name == 'PromiseKit' - target.build_configurations.each do |config| - config.build_settings['SWIFT_VERSION'] = '4.2' - end - end - end -end -``` - -Adjust the value for `SWIFT_VERSION` as needed. - -CocoaPods are aware of this [issue](https://github.com/CocoaPods/CocoaPods/issues/7134). - -## Carthage - -```ruby -github "mxcl/PromiseKit" ~> 6.8 -``` - -> Please note, since PromiseKit 6.8.1 our Carthage support has transitioned to -> Swift 4 and above only. Strictly we *do* still support Swift 3.1 for Carthage, -> and if you like you could edit the PromiseKit `project.pbxproj` file during -> `carthage bootstrap` to make this possible. This change was involuntary and due -> to Xcode 10.2 dropping support for Swift 3. - -From Xcode 12, you will likely need to build using `--use-xcframeworks`, eg: - - carthage build --use-xcframeworks - -## Accio - -Add the following to your Package.swift: - -```swift -.package(url: "https://github.com/mxcl/PromiseKit.git", .upToNextMajor(from: "6.8.4")), -``` - -Next, add `PromiseKit` to your App targets dependencies like so: - -```swift -.target( - name: "App", - dependencies: [ - "PromiseKit", - ] -), -``` - -Then run `accio update`. - -## SwiftPM - -```swift -package.dependencies.append( - .package(url: "https://github.com/mxcl/PromiseKit", from: "6.8.0") -) -``` - -## Manually - -You can just drop `PromiseKit.xcodeproj` into your project and then add -`PromiseKit.framework` to your app’s embedded frameworks. - - -# PromiseKit vs. Xcode - -PromiseKit contains Swift, so there have been rev-lock issues with Xcode: - -| PromiseKit | Swift | Xcode | CI Status | Release Notes | -| ---------- | ----------------------- | -------- | ------------ | ----------------- | -| 6 | 3.2, 3.3, 4.x, 5.x | 8.3, 9.x, 10.x | ![ci-master] | [2018/02][news-6] | -| 5 | 3.1, 3.2, 3.3, 4.x | 8.3, 9.x, 10.1 | *Deprecated* | *n/a* | -| 4 | 3.0, 3.1, 3.2, 3.3, 4.x | 8.x, 9.x, 10.1 | ![ci-master] | [2016/09][news-4] | -| 3 | 2.x | 7.x, 8.0 | ![ci-swift2] | [2015/10][news-3] | -| 2 | 1.x | 7.x | *Deprecated* | [2015/10][news-3] | -| 1† | *N/A* | * | ![ci-legacy] | – | - -† PromiseKit 1 is pure Objective-C and thus can be used with any Xcode, it is -also your only choice if you need to support iOS 7 or below. - ---- - -We also maintain a series of branches to aid migration for PromiseKit 2: - -| Xcode | Swift | PromiseKit | Branch | CI Status | -| ----- | ----- | -----------| --------------------------- | --------- | -| 8.0 | 2.3 | 2 | [swift-2.3-minimal-changes] | ![ci-23] | -| 7.3 | 2.2 | 2 | [swift-2.2-minimal-changes] | ![ci-22] | -| 7.2 | 2.2 | 2 | [swift-2.2-minimal-changes] | ![ci-22] | -| 7.1 | 2.1 | 2 | [swift-2.0-minimal-changes] | ![ci-20] | -| 7.0 | 2.0 | 2 | [swift-2.0-minimal-changes] | ![ci-20] | - -We do **not** usually backport fixes to these branches, but pull requests are welcome. - - -## Xcode 8 / Swift 2.3 or Xcode 7 - -```ruby -# CocoaPods -swift_version = "2.3" -pod "PromiseKit", "~> 3.5" - -# Carthage -github "mxcl/PromiseKit" ~> 3.5 -``` - - -[travis]: https://travis-ci.org/mxcl/PromiseKit -[ci-master]: https://travis-ci.org/mxcl/PromiseKit.svg?branch=master -[ci-legacy]: https://travis-ci.org/mxcl/PromiseKit.svg?branch=legacy-1.x -[ci-swift2]: https://travis-ci.org/mxcl/PromiseKit.svg?branch=swift-2.x -[ci-23]: https://travis-ci.org/mxcl/PromiseKit.svg?branch=swift-2.3-minimal-changes -[ci-22]: https://travis-ci.org/mxcl/PromiseKit.svg?branch=swift-2.2-minimal-changes -[ci-20]: https://travis-ci.org/mxcl/PromiseKit.svg?branch=swift-2.0-minimal-changes -[news-2]: http://mxcl.dev/PromiseKit/news/2015/05/PromiseKit-2.0-Released/ -[news-3]: https://github.com/mxcl/PromiseKit/blob/212f31f41864d1e3ec54f5dd529bd8e1e5697024/CHANGELOG.markdown#300-oct-1st-2015 -[news-4]: http://mxcl.dev/PromiseKit/news/2016/09/PromiseKit-4.0-Released/ -[news-6]: http://mxcl.dev/PromiseKit/news/2018/02/PromiseKit-6.0-Released/ -[swift-2.3-minimal-changes]: https://github.com/mxcl/PromiseKit/tree/swift-2.3-minimal-changes -[swift-2.2-minimal-changes]: https://github.com/mxcl/PromiseKit/tree/swift-2.2-minimal-changes -[swift-2.0-minimal-changes]: https://github.com/mxcl/PromiseKit/tree/swift-2.0-minimal-changes - - -# Using Git Submodules for PromiseKit’s Extensions - -> *Note*: This is a more advanced technique. - -If you use CocoaPods and a few PromiseKit extensions, then importing PromiseKit -causes that module to import all the extension frameworks. Thus, if you have an -app and a few app extensions (e.g., iOS app, iOS watch extension, iOS Today -extension) then all your final products that use PromiseKit will have forced -dependencies on all the Apple frameworks that PromiseKit provides extensions -for. - -This isn’t that bad, but every framework that loads entails overhead and -lengthens startup time. - -It’s both better and worse with Carthage. We build individual micro-frameworks -for each PromiseKit extension, so your final products link -against only the Apple frameworks that they actually need. However, Apple has -advised that apps link only against “about 12” frameworks for performance -reasons. So with Carthage, we are worse off on this metric. - -The solution is to instead import only CorePromise: - -```ruby -# CocoaPods -pod "PromiseKit/CorePromise" - -# Carthage -github "mxcl/PromiseKit" -# ^^ for Carthage *only* have this -``` - -And to use the extensions you need via `git submodules`: - -``` -git submodule init -git submodule add https://github.com/PromiseKit/UIKit Submodules/PMKUIKit -``` - -Then in Xcode you can add these sources to your targets on a per-target basis. - -Then when you `pod update`, ensure that you also update your submodules: - - pod update && git submodule update --recursive --remote - - - -# Release History - -## [6.0](https://github.com/mxcl/PromiseKit/releases/tag/6.0.0) Feb 13th, 2018 - -* [PromiseKit 6 announcement post][news-6]. - -## [4.0](https://github.com/mxcl/PromiseKit/releases/tag/4.0.0) - -* [PromiseKit 4 announcement post][news-4]. - -## [3.0](https://github.com/mxcl/PromiseKit/releases/tag/3.0.0) Oct 1st, 2015 - -In Swift 2.0 `catch` and `defer` became reserved keywords mandating we rename -our functions with these names. This forced a major semantic version change on -PromiseKit and thus we took the opportunity to make other minor (source -compatibility breaking) improvements. - -Thus if you cannot afford to adapt to PromiseKit 3 but still want to use -Xcode-7.0/Swift-2.0 we provide a [minimal changes branch] where `catch` and -`defer` are renamed `catch_` and `defer_` and all other changes are the bare -minimum to make PromiseKit 2 compile against Swift 2. - -If you still are using Xcode 6 and Swift 1.2 then use PromiseKit 2. - -[minimal changes branch]: https://github.com/mxcl/PromiseKit/tree/swift-2.0-minimal-changes - -## [2.0](https://github.com/mxcl/PromiseKit/releases/tag/2.0.0) May 14th, 2015 - -[PromiseKit 2 announcement post](http://mxcl.dev/PromiseKit/news/2015/05/PromiseKit-2.0-Released/). - -## [1.5](https://github.com/mxcl/PromiseKit/releases/tag/1.5.0) - -Swift 1.2 support. Xcode 6.3 required. diff --git a/Carthage/Checkouts/PromiseKit/Documentation/ObjectiveC.md b/Carthage/Checkouts/PromiseKit/Documentation/ObjectiveC.md deleted file mode 100644 index 5d8c6827e..000000000 --- a/Carthage/Checkouts/PromiseKit/Documentation/ObjectiveC.md +++ /dev/null @@ -1,219 +0,0 @@ -# Objective-C - -PromiseKit has two promise classes: - -* `Promise` (Swift) -* `AnyPromise` (Objective-C) - -Each is designed to be an appropriate promise implementation for the strong points of its language: - -* `Promise` is strict, defined and precise. -* `AnyPromise` is loose and dynamic. - -Unlike most libraries, we have extensive bridging support, you can use PromiseKit -in mixed projects with mixed language targets and mixed language libraries. - - -# Using PromiseKit with Objective-C - -`AnyPromise` is our promise class for Objective-C. It behaves almost identically to `Promise`, our Swift promise class. - -```objc -myPromise.then(^(NSString *bar){ - return anotherPromise; -}).then(^{ - //… -}).catch(^(NSError *error){ - //… -}); -``` - -You make new promises using `promiseWithResolverBlock`: - -```objc -- (AnyPromise *)myPromise { - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve){ - resolve(foo); // if foo is an NSError, rejects, else, resolves - }]; -} -``` - ---- - -You reject promises by throwing errors: - -```objc -myPromise.then(^{ - @throw [NSError errorWithDomain:domain code:code userInfo:nil]; -}).catch(^(NSError *error){ - //… -}); -``` - -One important feature is the syntactic flexibility of your handlers: - -```objc -myPromise.then(^{ - // no parameters is fine -}); - -myPromise.then(^(id foo){ - // one parameter is fine -}); - -myPromise.then(^(id a, id b, id c){ - // up to three parameter is fine, no crash! -}); - -myPromise.then(^{ - return @1; // return anything or nothing, it's fine, no crash -}); -``` - -We do runtime inspection of the block you pass to achieve this magic. - ---- - -Another important distinction is that the equivalent function to Swift’s `recover` is combined with `AnyPromise`’s `catch`. This is typical to other “dynamic” promise implementations and thus achieves our goal that `AnyPromise` is loose and dynamic while `Promise` is strict and specific. - -A sometimes unexpected consequence of this fact is that returning nothing from a `catch` *resolves* the returned promise: - -```objc -myPromise.catch(^{ - [UIAlertView …]; -}).then(^{ - // always executes! -}); -``` - ---- - -Another important distinction is that the `value` property returns even if the promise is rejected; in that case, it returns the `NSError` object with which the promise was rejected. - - -# Bridging Between Objective-C & Swift - -Let’s say you have: - -```objc -@interface Foo -- (AnyPromise *)myPromise; -@end -``` - -Ensure that this interface is included in your bridging header. You can now use the -following pattern in your Swift code: - -```swift -let foo = Foo() -foo.myPromise.then { (obj: AnyObject?) -> Int in - // it is not necessary to specify the type of `obj` - // we just do that for demonstrative purposes -} -``` - ---- - -Let’s say you have: - -```swift -@objc class Foo: NSObject { - func stringPromise() -> Promise - func barPromise() -> Promise -} - -@objc class Bar: NSObject { /*…*/ } -``` - -Ensure that your project is generating a `…-Swift.h` header so that Objective-C can see your Swift code. - -If you built this project and opened the `…-Swift.h` header, you would only see this: - -```objc -@interface Foo -@end - -@interface Bar -@end -``` - -That's because Objective-C cannot import Swift objects that are generic. So we need to write some stubs: - -```swift -@objc class Foo: NSObject { - @objc func stringPromise() -> AnyPromise { - return AnyPromise(stringPromise()) - } - @objc func barPromise() -> AnyPromise { - return AnyPromise(barPromise()) - } -} -``` - -If we built this and opened our generated header, we would now see: - -```objc -@interface Foo -- (AnyPromise *)stringPromise; -- (AnyPromise *)barPromise; -@end - -@interface Bar -@end -``` - -Perfect. - -Note that AnyPromise can only bridge objects that conform to `AnyObject` or derive from `NSObject`. This is a limitation of Objective-C. - -# Using ObjC AnyPromises from Swift - -Simply use them, the type of your handler parameter is `Any`: - -```objective-c -- (AnyPromise *)fetchThings { - return [AnyPromise promiseWithValue:@[@"a", @"b", @"c"]]; -} -``` - -Since ObjC is not type-safe and Swift is, you will (probably) need to cast the `Any` to whatever it is you actually are feeding: - -```swift -Foo.fetchThings().done { any in - let bar = any as! [String] -} -``` - -## :warning: Caution: - -ARC in Objective-C, unlike in Objective-C++, is not exception-safe by default. -So, throwing an error will result in keeping a strong reference to the closure -that contains the throw statement. -This pattern will consequently result in memory leaks if you're not careful. - -> *Note:* Only having a strong reference to the closure would result in memory leaks. -> In our case, PromiseKit automatically keeps a strong reference to the closure until it's released. - -__Workarounds:__ - -1. Return a Promise with value NSError\ -Instead of throwing a normal error, you can return a Promise with value NSError instead. - -```objc -myPromise.then(^{ - return [AnyPromise promiseWithValue:[NSError myCustomError]]; -}).catch(^(NSError *error){ - if ([error isEqual:[NSError myCustomError]]) { - // In case, same error as the one we thrown - return; - } - //… -}); -``` -2. Enable ARC for exceptions in Objective-C (not recommended)\ -You can add this ```-fobjc-arc-exceptions to your``` to your compiler flags to enable ARC for exceptions. -This is not recommended unless you've read the Apple documentation and are comfortable with the caveats. - -For more details on ARC and exceptions: -https://clang.llvm.org/docs/AutomaticReferenceCounting.html#exceptions - diff --git a/Carthage/Checkouts/PromiseKit/Documentation/README.md b/Carthage/Checkouts/PromiseKit/Documentation/README.md deleted file mode 100644 index a03f4aa42..000000000 --- a/Carthage/Checkouts/PromiseKit/Documentation/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Contents - -* [README](../README.md) -* Handbook - * [Getting Started](GettingStarted.md) - * [Promises: Common Patterns](CommonPatterns.md) - * [Frequently Asked Questions](FAQ.md) -* Manual - * [Installation Guide](Installation.md) - * [Objective-C Guide](ObjectiveC.md) - * [Troubleshooting](Troubleshooting.md) - * [Appendix](Appendix.md) -* [Examples](Examples) -* [API Reference](https://mxcl.dev/PromiseKit/reference/v6/Classes/Promise.html) diff --git a/Carthage/Checkouts/PromiseKit/Documentation/Troubleshooting.md b/Carthage/Checkouts/PromiseKit/Documentation/Troubleshooting.md deleted file mode 100644 index cb27a12dc..000000000 --- a/Carthage/Checkouts/PromiseKit/Documentation/Troubleshooting.md +++ /dev/null @@ -1,304 +0,0 @@ -# Troubleshooting - -## Compilation errors - -99% of compilation issues involving PromiseKit can be addressed or diagnosed by one of the fixes below. - -### Check your handler - -```swift -return firstly { - URLSession.shared.dataTask(.promise, with: url) -}.compactMap { - JSONSerialization.jsonObject(with: $0.data) as? [String: Any] -}.then { dict in - User(dict: dict) -} -``` - -Swift (unhelpfully) says: - -> Cannot convert value of type '([String : Any]) -> User' to expected argument type '([String : Any]) -> _' - -What’s the real problem? `then` *must* return a `Promise`, and you're trying to return something else. What you really want is `map`: - -```swift -return firstly { - URLSession.shared.dataTask(.promise, with: url) -}.compactMap { - JSONSerialization.jsonObject(with: $0.data) as? [String: Any] -}.map { dict in - User(dict: dict) -} -``` - -### Specify closure parameters **and** return type - -For example: - -```swift -return firstly { - foo() -}.then { user in - //… - return bar() -} -``` - -This code may compile if you specify the type of `user`: - - -```swift -return firstly { - foo() -}.then { (user: User) in - //… - return bar() -} -``` - -If it still doesn't compile, perhaps you need to specify the return type, too: - -```swift -return firstly { - foo() -}.then { (user: User) -> Promise in - //… - return bar() -} -``` - -We have made great effort to reduce the need for explicit typing in PromiseKit 6, -but as with all Swift functions that return a generic type (e.g., `Array.map`), -you may need to explicitly tell Swift what a closure returns if the closure's body is -longer than one line. - -> *Tip*: Sometimes you can force a one-liner by using semicolons. - - -### Acknowledge all incoming closure parameters - -Swift does not permit you to silently ignore a closure's parameters. For example, this code: - -```swift -func _() -> Promise { - return firstly { - proc.launch(.promise) // proc: Foundation.Process - }.then { - when(fulfilled: p1, p2) // both p1 & p2 are `Promise` - } -} -``` - -Fails to compile with the error: - - Cannot invoke 'then' with an argument list of type '(() -> _) - -What's the problem? Well, `Process.launch(.promise)` returns -`Promise<(String, String)>`, and we are ignoring this value in our `then` closure. -If we’d referenced `$0` or named the parameter, Swift would have been satisfied. - -Assuming that we really do want to ignore the argument, the fix is to explicitly -acknowledge its existence by assigning it the name "_". That's Swift-ese for "I -know there's a value here, but I'm ignoring it." - - -```swift -func _() -> Promise { - return firstly { - proc.launch(.promise) - }.then { _ in - when(fulfilled: p1, p2) - } -} -``` - -In this situation, you won't always receive an error message that's as clear as the -one shown above. Sometimes, a missing closure parameter sends Swift scurrying off -into type inference limbo. When it finally concludes that there's no way for it to make -all the inferred types work together, it may end up assigning blame to some other -closure entirely and giving you an error message that makes no sense at all. - -When faced with this kind of enigmatic complaint, a good rule of thumb is to -double-check your argument and return types carefully. If everything looks OK, -temporarily add explicit type information as shown above, just to rule -out misinference as a possible cause. - -### Try moving code to a temporary inline function - -Try taking the code out of a closure and putting it in a standalone function. Now Swift -will give you the *real* error message. For example: - -```swift -func doStuff() { - firstly { - foo() - }.then { - let bar = bar() - let baz = baz() - when(fulfilled: bar, baz) - } -} -``` - -Becomes: - -```swift -func doStuff() { - func fluff() -> Promise<…> { - let bar = bar() - let baz = baz() - when(fulfilled: bar, baz) - } - - firstly { - foo() - }.then { - fluff() - } -} -``` - -An *inline* function like this is all you need. Here, the problem is that you -forgot to mark the last line of the closure with an explicit `return`. It's required -here because the closure is longer than one line. - - -## You copied code off the Internet that doesn’t work - -Swift has changed a lot over the years and so PromiseKit has had to change to keep -up. The code you copied is probably for an older PromiseKit. *Read the definitions of the -functions.* It's easy to do this in Xcode by option-clicking or command-clicking function names. -All PromiseKit functions are documented and provide examples. - -## "Context type for closure argument expects 1 argument, which cannot be implicitly ignored" - -You have a `then`; you want a `done`. - -## "Missing argument for parameter #1 in call" - -This is part of Swift 4’s “tuplegate”. - -You must specify your `Void` parameter: - -```swift -seal.fulfill(()) -``` - -Yes: we hope they revert this change in Swift 5 too. - -## "Ambiguous reference to 'firstly(execute:)'" - -Remove the firstly, e.g.: - -```swift -firstly { - foo() -}.then { - //… -} -``` - -becomes: - -```swift -foo().then { - //… -} -``` - -Rebuild and Swift should now tell you the *real* error. - -## Other issues - -### `Pending Promise Deallocated!` - -If you see this warning, you have a path in your `Promise` initializer that allows -the promise to escape without being sealed: - -```swift -Promise { seal in - task { value, error in - if let value = value as? String { - seal.fulfill(value) - } else if let error = error { - seal.reject(error) - } - } -} -``` - -There are two missing paths here, and if either occurs, the promise will soon be -deallocated without resolving. This will manifest itself as a bug in your app, -probably the awful infinite spinner. - -So let’s be thorough: - -```swift -Promise { seal in - task { value, error in - if let value = value as? String { - fulfill(value) - } else if let error = error { - reject(error) - } else if value != nil { - reject(MyError.valueNotString) - } else { - // should never happen, but we have an `PMKError` for task being called with `nil`, `nil` - reject(PMKError.invalidCallingConvention) - } - } -} -``` - -If this seems tedious, it shouldn’t. You would have to be this thorough without promises, too. -The difference is that without promises, you wouldn’t get a warning in the console notifying -you of your mistake! - -### Slow compilation / compiler cannot solve in reasonable time - -Add return types to your closures. - -### My promise never resolves - -There are several potential causes: - -#### 1. Check to be sure that your asynchronous task even *starts* - -You’d be surprised how often this is the cause. - -For example, if you are using `URLSession` without our extension (but -don’t do that; *use* our extension! we know all the pitfalls), did you forget -to call `resume` on the task? If so, the task never actually starts, and so of -course it never finishes, either. - -#### 2. Check that all paths in your custom Promise initializers are handled - -See “Pending Promise Deallocated” above. Usually you will see this warning if -you are not handling a path, but that requires your promise deallocate, so you -may not see this warning yet you are still not handling all paths. - -Unhandled paths mean the promise will not resolve. - -#### 3. Ensure the queue your promise handler runs upon is not blocked - -If the thread is blocked the handlers cannot execute. Commonly you can see this -if you are using our `wait()` function. Please read the documentation for `wait()` -for suggestions and caveats. - -#### 4. Your promise returned a cancellation error - -Cancelation is neither success nor failure. So this is the correct behavior. -Use a `finally` if you need to do some clean up. - -### `Result of call to 'done(on:_:)' is unused`, `Result of call to 'then(on:_:)' is unused` - -PromiseKit deliberately avoids the `@discardableResult` annotation because the -unused result warning is a hint that you have not handled the error in your -chain. So do one of these: - -1. Add a `catch` -2. `return` the promise (thus punting the error handling to the caller) -3. Use `cauterize()` to silence the warning. - -Obviously, do 1 or 2 in preference to 3. diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/.gitignore b/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/.gitignore deleted file mode 100644 index 30f50040c..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.xcodeproj/**/xcuserdata/ -*.xcscmblueprint -/Carthage -/.build -.DS_Store diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/.travis.yml b/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/.travis.yml deleted file mode 100644 index a76fb3b84..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/.travis.yml +++ /dev/null @@ -1,78 +0,0 @@ -os: osx -language: swift -osx_image: xcode10.2 - -branches: - only: - - master -stages: - - lint - - carthage - - test -jobs: - include: - - &pod - stage: lint - osx_image: xcode8.3 - env: SWIFT=3.1 - cache: cocoapods - before_install: - gem install cocoapods --prerelease --version 1.7.0.beta.3 - install: - carthage bootstrap --no-build PromiseKit - script: | - cd Carthage/Checkouts/PromiseKit - mv .github/PromiseKit.podspec . - rm -rf Extensions/AVFoundation/Sources - cp -R ../../../Sources Extensions/AVFoundation - pod lib lint --subspec=PromiseKit/AVFoundation --fail-fast --swift-version=$SWIFT - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=3.2 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=3.3 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=3.4 - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=4.0 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=4.1 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=4.2 - - <<: *pod - osx_image: xcode10.2 - env: SWIFT=4.3 - - <<: *pod - osx_image: xcode10.2 - env: SWIFT=5.0 - - - &carthage - stage: carthage - osx_image: xcode9.2 - script: | - carthage bootstrap --cache-builds --platform iOS - sed -i '' "s/SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;/SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;/" *.xcodeproj/project.pbxproj - carthage build --no-skip-current - cache.directories: - - Carthage - - <<: *carthage - osx_image: xcode9.4 - - <<: *carthage - osx_image: xcode10.1 - - <<: *carthage - osx_image: xcode10.2 - - - stage: test - name: iOS Tests - xcode_scheme: PMKAVFoundation - xcode_project: PMKAVFoundation.xcodeproj - xcode_destination: 'platform=iOS Simulator,OS=12.2,name=iPhone SE' - cache.directories: - - Carthage - before_install: - carthage bootstrap --cache-builds --no-use-binaries diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/Cartfile b/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/Cartfile deleted file mode 100644 index d4703e986..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" ~> 6.8.4 diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/Cartfile.resolved b/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/Cartfile.resolved deleted file mode 100644 index f54bbdbf2..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/Cartfile.resolved +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" "6.8.4" diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/Carthage.xcconfig b/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/Carthage.xcconfig deleted file mode 100644 index c8b995651..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/Carthage.xcconfig +++ /dev/null @@ -1,7 +0,0 @@ -// Created by Kevin Ballard on 12/14/15. -// Copyright © 2015 Postmates. All rights reserved. - -FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(SRCROOT)/Carthage/Build/Mac/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=iphone*] = $(SRCROOT)/Carthage/Build/iOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=watch*] = $(SRCROOT)/Carthage/Build/watchOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=appletv*] = $(SRCROOT)/Carthage/Build/tvOS/ $(inherited) diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/Info.plist b/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/Info.plist deleted file mode 100644 index fbe1e6b31..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/LICENSE b/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/LICENSE deleted file mode 100644 index 50f758c89..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2016-present, Max Howell; mxcl@me.com - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/PMKAVFoundation.xcodeproj/project.pbxproj b/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/PMKAVFoundation.xcodeproj/project.pbxproj deleted file mode 100644 index 64b1f5350..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/PMKAVFoundation.xcodeproj/project.pbxproj +++ /dev/null @@ -1,456 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 63C7FFF71D5C020D003BAE60 /* PMKAVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C7FFA71D5BEE09003BAE60 /* PMKAVFoundation.framework */; }; - 63DD7EF81D7E7411000F279D /* TestAVFoundation.m in Sources */ = {isa = PBXBuildFile; fileRef = 63DD7EF61D7E7411000F279D /* TestAVFoundation.m */; }; - 63DD7EF91D7E7411000F279D /* TestAVFoundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63DD7EF71D7E7411000F279D /* TestAVFoundation.swift */; }; - 63DD7EFD1D7E7419000F279D /* AVAudioSession+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 63DD7EFA1D7E7419000F279D /* AVAudioSession+AnyPromise.h */; }; - 63DD7EFE1D7E7419000F279D /* AVAudioSession+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 63DD7EFB1D7E7419000F279D /* AVAudioSession+AnyPromise.m */; }; - 63DD7EFF1D7E7419000F279D /* AVAudioSession+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63DD7EFC1D7E7419000F279D /* AVAudioSession+Promise.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 63C7FF9E1D5BEE09003BAE60 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 63C7FFA61D5BEE09003BAE60; - remoteInfo = PMKFoundation; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 63167B891D5C23B4007A96B0 /* Cartfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile; sourceTree = ""; }; - 63BF28101D5C257100F62C66 /* Carthage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Carthage.xcconfig; sourceTree = ""; }; - 63C700091D5C0253003BAE60 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 63C7FFA71D5BEE09003BAE60 /* PMKAVFoundation.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PMKAVFoundation.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 63C7FFF21D5C020D003BAE60 /* PMKAVTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PMKAVTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 63DD7EF61D7E7411000F279D /* TestAVFoundation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TestAVFoundation.m; path = Tests/TestAVFoundation.m; sourceTree = SOURCE_ROOT; }; - 63DD7EF71D7E7411000F279D /* TestAVFoundation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TestAVFoundation.swift; path = Tests/TestAVFoundation.swift; sourceTree = SOURCE_ROOT; }; - 63DD7EFA1D7E7419000F279D /* AVAudioSession+AnyPromise.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "AVAudioSession+AnyPromise.h"; path = "Sources/AVAudioSession+AnyPromise.h"; sourceTree = SOURCE_ROOT; }; - 63DD7EFB1D7E7419000F279D /* AVAudioSession+AnyPromise.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "AVAudioSession+AnyPromise.m"; path = "Sources/AVAudioSession+AnyPromise.m"; sourceTree = SOURCE_ROOT; }; - 63DD7EFC1D7E7419000F279D /* AVAudioSession+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "AVAudioSession+Promise.swift"; path = "Sources/AVAudioSession+Promise.swift"; sourceTree = SOURCE_ROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 63C7FFEF1D5C020D003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 63C7FFF71D5C020D003BAE60 /* PMKAVFoundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 63C7FF9D1D5BEE09003BAE60 = { - isa = PBXGroup; - children = ( - 63167B891D5C23B4007A96B0 /* Cartfile */, - 63BF28101D5C257100F62C66 /* Carthage.xcconfig */, - 63C700091D5C0253003BAE60 /* Info.plist */, - 63C7FFA91D5BEE09003BAE60 /* Sources */, - 63C7FFF31D5C020D003BAE60 /* Tests */, - 63C7FFA81D5BEE09003BAE60 /* Products */, - ); - sourceTree = ""; - }; - 63C7FFA81D5BEE09003BAE60 /* Products */ = { - isa = PBXGroup; - children = ( - 63C7FFA71D5BEE09003BAE60 /* PMKAVFoundation.framework */, - 63C7FFF21D5C020D003BAE60 /* PMKAVTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 63C7FFA91D5BEE09003BAE60 /* Sources */ = { - isa = PBXGroup; - children = ( - 63DD7EFA1D7E7419000F279D /* AVAudioSession+AnyPromise.h */, - 63DD7EFB1D7E7419000F279D /* AVAudioSession+AnyPromise.m */, - 63DD7EFC1D7E7419000F279D /* AVAudioSession+Promise.swift */, - ); - path = Sources; - sourceTree = ""; - }; - 63C7FFF31D5C020D003BAE60 /* Tests */ = { - isa = PBXGroup; - children = ( - 63DD7EF61D7E7411000F279D /* TestAVFoundation.m */, - 63DD7EF71D7E7411000F279D /* TestAVFoundation.swift */, - ); - path = Tests; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 63C7FFA41D5BEE09003BAE60 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 63DD7EFD1D7E7419000F279D /* AVAudioSession+AnyPromise.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 63C7FFA61D5BEE09003BAE60 /* PMKAVFoundation */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKAVFoundation" */; - buildPhases = ( - 63C7FFA21D5BEE09003BAE60 /* Sources */, - 63C7FFA41D5BEE09003BAE60 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PMKAVFoundation; - productName = "PMK+UIKit"; - productReference = 63C7FFA71D5BEE09003BAE60 /* PMKAVFoundation.framework */; - productType = "com.apple.product-type.framework"; - }; - 63C7FFF11D5C020D003BAE60 /* PMKAVTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKAVTests" */; - buildPhases = ( - 63C7FFEE1D5C020D003BAE60 /* Sources */, - 63C7FFEF1D5C020D003BAE60 /* Frameworks */, - 638F9B161D5EEEDC00717B37 /* Embed Carthage Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */, - ); - name = PMKAVTests; - productName = PMKTests/NS; - productReference = 63C7FFF21D5C020D003BAE60 /* PMKAVTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 63C7FF9E1D5BEE09003BAE60 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = "Max Howell"; - TargetAttributes = { - 63C7FFA61D5BEE09003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - 63C7FFF11D5C020D003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKAVFoundation" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 63C7FF9D1D5BEE09003BAE60; - productRefGroup = 63C7FFA81D5BEE09003BAE60 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 63C7FFA61D5BEE09003BAE60 /* PMKAVFoundation */, - 63C7FFF11D5C020D003BAE60 /* PMKAVTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXShellScriptBuildPhase section */ - 638F9B161D5EEEDC00717B37 /* Embed Carthage Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - PromiseKit, - ); - name = "Embed Carthage Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "case \"$PLATFORM_NAME\" in\nmacosx) plat=Mac;;\niphone*) plat=iOS;;\nwatch*) plat=watchOS;;\nappletv*) plat=tvOS;;\n*) echo \"error: Unknown PLATFORM_NAME: $PLATFORM_NAME\"; exit 1;;\nesac\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nframework=$(basename \"${!VAR}\")\nexport SCRIPT_INPUT_FILE_$n=\"$SRCROOT\"/Carthage/Build/$plat/\"$framework\".framework\ndone\n\n/usr/local/bin/carthage copy-frameworks || exit\n\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nsource=${!VAR}.dSYM\ndest=${BUILT_PRODUCTS_DIR}/$(basename \"$source\")\nditto \"$source\" \"$dest\" || exit\ndone"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 63C7FFA21D5BEE09003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63DD7EFF1D7E7419000F279D /* AVAudioSession+Promise.swift in Sources */, - 63DD7EFE1D7E7419000F279D /* AVAudioSession+AnyPromise.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEE1D5C020D003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63DD7EF81D7E7411000F279D /* TestAVFoundation.m in Sources */, - 63DD7EF91D7E7411000F279D /* TestAVFoundation.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 63C7FFA61D5BEE09003BAE60 /* PMKAVFoundation */; - targetProxy = 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 63C7FFAD1D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63BF28101D5C257100F62C66 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.Foundation; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Debug; - }; - 63C7FFAE1D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63BF28101D5C257100F62C66 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.Foundation; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Release; - }; - 63C7FFB01D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.Accounts; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Debug; - }; - 63C7FFB11D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.Accounts; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Release; - }; - 63C7FFFB1D5C020D003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SUPPRESS_WARNINGS = YES; - }; - name = Debug; - }; - 63C7FFFC1D5C020D003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SUPPRESS_WARNINGS = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKAVFoundation" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFAD1D5BEE09003BAE60 /* Debug */, - 63C7FFAE1D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKAVFoundation" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFB01D5BEE09003BAE60 /* Debug */, - 63C7FFB11D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKAVTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFFB1D5C020D003BAE60 /* Debug */, - 63C7FFFC1D5C020D003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 63C7FF9E1D5BEE09003BAE60 /* Project object */; -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/PMKAVFoundation.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/PMKAVFoundation.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index ecdffaeb5..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/PMKAVFoundation.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/PMKAVFoundation.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/PMKAVFoundation.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/PMKAVFoundation.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/PMKAVFoundation.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/PMKAVFoundation.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index 08de0be8d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/PMKAVFoundation.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/PMKAVFoundation.xcodeproj/xcshareddata/xcschemes/PMKAVFoundation.xcscheme b/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/PMKAVFoundation.xcodeproj/xcshareddata/xcschemes/PMKAVFoundation.xcscheme deleted file mode 100644 index 6c27ca1bf..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/PMKAVFoundation.xcodeproj/xcshareddata/xcschemes/PMKAVFoundation.xcscheme +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/README.markdown b/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/README.markdown deleted file mode 100644 index 35c2f0019..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/README.markdown +++ /dev/null @@ -1,34 +0,0 @@ -# PromiseKit AVFoundation Extensions ![Build Status] - -This project adds promises to Apple’s AVFoundation framework. - -## CococaPods - -```ruby -pod "PromiseKit/AVFoundation" ~> 6.0 -``` - -The extensions are built into `PromiseKit.framework` thus nothing else is needed. - -## Carthage - -```ruby -github "PromiseKit/AVFoundation" ~> 3.0 -``` - -The extensions are built into their own framework: - -```swift -// swift -import PromiseKit -import PMKAVFoundation -``` - -```objc -// objc -@import PromiseKit; -@import PMKAVFoundation; -``` - - -[Build Status]: https://travis-ci.org/PromiseKit/AVFoundation.svg?branch=master diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/Sources/AVAudioSession+AnyPromise.h b/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/Sources/AVAudioSession+AnyPromise.h deleted file mode 100644 index 54a953617..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/Sources/AVAudioSession+AnyPromise.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// AVFoundation+AnyPromise.h -// -// Created by Matthew Loseke on 6/21/14. -// - -#import -#import - -/** - To import the `AVAudioSession` category: - - use_frameworks! - pod "PromiseKit/AVFoundation" - - And then in your sources: - - #import -*/ -@interface AVAudioSession (PromiseKit) - -/** - Wraps `-requestRecordPermission:`, thens the `BOOL granted` parameter - passed to the wrapped completion block. This promise cannot fail. - - @see requestRecordPermission: -*/ -- (AnyPromise *)requestRecordPermission; - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/Sources/AVAudioSession+AnyPromise.m b/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/Sources/AVAudioSession+AnyPromise.m deleted file mode 100644 index 3de824c30..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/Sources/AVAudioSession+AnyPromise.m +++ /dev/null @@ -1,21 +0,0 @@ -// -// AVAudioSession+PromiseKit.m -// -// Created by Matthew Loseke on 6/21/14. -// - -#import "AVAudioSession+AnyPromise.h" -#import - - -@implementation AVAudioSession (PromiseKit) - -- (AnyPromise *)requestRecordPermission { - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - [[AVAudioSession sharedInstance] requestRecordPermission:^(BOOL granted) { - resolve(@(granted)); - }]; - }]; -} - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/Sources/AVAudioSession+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/Sources/AVAudioSession+Promise.swift deleted file mode 100644 index 742176b05..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/Sources/AVAudioSession+Promise.swift +++ /dev/null @@ -1,21 +0,0 @@ -import AVFoundation -import Foundation -#if !PMKCocoaPods -import PromiseKit -#endif - -/** - To import the `AVAudioSession` category: - - use_frameworks! - pod "PromiseKit/AVFoundation" - - And then in your sources: - - import PromiseKit -*/ -extension AVAudioSession { - public func requestRecordPermission() -> Guarantee { - return Guarantee(resolver: requestRecordPermission) - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/Tests/TestAVFoundation.m b/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/Tests/TestAVFoundation.m deleted file mode 100644 index 19eae79f7..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/Tests/TestAVFoundation.m +++ /dev/null @@ -1,17 +0,0 @@ -#import "AVAudioSession+AnyPromise.h" -@import AVFoundation; -@import XCTest; - -@implementation Test_AVAudioSession_ObjC: XCTestCase - -- (void)test { - id ex = [self expectationWithDescription:@""]; - - [[AVAudioSession new] requestRecordPermission].then(^{ - [ex fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/Tests/TestAVFoundation.swift b/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/Tests/TestAVFoundation.swift deleted file mode 100644 index 0d777b3f7..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/Tests/TestAVFoundation.swift +++ /dev/null @@ -1,24 +0,0 @@ -import PMKAVFoundation -import AVFoundation -import PromiseKit -import XCTest - -class Test_AVAudioSession_Swift: XCTestCase { - func test() { - let ex = expectation(description: "") - - AVAudioSession().requestRecordPermission().done { _ in - ex.fulfill() - } - - waitForExpectations(timeout: 1) - } - - func testNotAmbiguous() { - let ex = expectation(description: "") - AVAudioSession().requestRecordPermission { _ in - ex.fulfill() - } - waitForExpectations(timeout: 1) - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/.gitignore b/Carthage/Checkouts/PromiseKit/Extensions/Accounts/.gitignore deleted file mode 100644 index bec9c1741..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.xcodeproj/**/xcuserdata/ -*.xcscmblueprint -/Carthage -/.build -.DS_Store \ No newline at end of file diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/.travis.yml b/Carthage/Checkouts/PromiseKit/Extensions/Accounts/.travis.yml deleted file mode 100644 index 44b35745b..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/.travis.yml +++ /dev/null @@ -1,84 +0,0 @@ -osx_image: xcode10.2 -language: swift -os: osx - -branches: - only: - - master -stages: - - lint - - carthage - - test -jobs: - include: - - &pod - stage: lint - osx_image: xcode8.3 - env: SWIFT=3.1 - cache: cocoapods - before_install: - gem install cocoapods --prerelease --version 1.7.0.beta.3 - install: - carthage bootstrap --no-build PromiseKit - script: | - cd Carthage/Checkouts/PromiseKit - mv .github/PromiseKit.podspec . - rm -rf Extensions/Accounts/Sources - cp -R ../../../Sources Extensions/Accounts - pod lib lint --subspec=PromiseKit/Accounts --fail-fast --swift-version=$SWIFT - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=3.2 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=3.3 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=3.4 - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=4.0 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=4.1 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=4.2 - - <<: *pod - osx_image: xcode10.2 - env: SWIFT=4.3 - - <<: *pod - osx_image: xcode10.2 - env: SWIFT=5.0 - - - &carthage - stage: carthage - osx_image: xcode9.2 - script: | - carthage bootstrap --cache-builds --platform iOS,macOS - sed -i '' "s/SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;/SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;/" *.xcodeproj/project.pbxproj - carthage build --no-skip-current - cache: - directories: - - Carthage - - <<: *carthage - osx_image: xcode9.4 - - <<: *carthage - osx_image: xcode10.1 - - <<: *carthage - osx_image: xcode10.2 - - - &test - stage: test - name: macOS Tests - xcode_scheme: PMKAccounts - xcode_project: PMKAccounts.xcodeproj - xcode_destination: 'platform=macOS' - cache: - directories: - - Carthage - before_install: - carthage bootstrap --cache-builds --no-use-binaries - - <<: *test - xcode_destination: 'platform=iOS Simulator,OS=12.2,name=iPhone SE' - name: iOS Tests diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/Cartfile b/Carthage/Checkouts/PromiseKit/Extensions/Accounts/Cartfile deleted file mode 100644 index d4703e986..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" ~> 6.8.4 diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/Cartfile.resolved b/Carthage/Checkouts/PromiseKit/Extensions/Accounts/Cartfile.resolved deleted file mode 100644 index f54bbdbf2..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/Cartfile.resolved +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" "6.8.4" diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/Carthage.xcconfig b/Carthage/Checkouts/PromiseKit/Extensions/Accounts/Carthage.xcconfig deleted file mode 100644 index c8b995651..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/Carthage.xcconfig +++ /dev/null @@ -1,7 +0,0 @@ -// Created by Kevin Ballard on 12/14/15. -// Copyright © 2015 Postmates. All rights reserved. - -FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(SRCROOT)/Carthage/Build/Mac/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=iphone*] = $(SRCROOT)/Carthage/Build/iOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=watch*] = $(SRCROOT)/Carthage/Build/watchOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=appletv*] = $(SRCROOT)/Carthage/Build/tvOS/ $(inherited) diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/Info.plist b/Carthage/Checkouts/PromiseKit/Extensions/Accounts/Info.plist deleted file mode 100644 index fbe1e6b31..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/LICENSE b/Carthage/Checkouts/PromiseKit/Extensions/Accounts/LICENSE deleted file mode 100644 index 50f758c89..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2016-present, Max Howell; mxcl@me.com - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/PMKAccounts.xcodeproj/project.pbxproj b/Carthage/Checkouts/PromiseKit/Extensions/Accounts/PMKAccounts.xcodeproj/project.pbxproj deleted file mode 100644 index 63f5f4368..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/PMKAccounts.xcodeproj/project.pbxproj +++ /dev/null @@ -1,448 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 63167B841D5C2332007A96B0 /* ACAccountStore+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 63167B811D5C2332007A96B0 /* ACAccountStore+AnyPromise.h */; }; - 63167B851D5C2332007A96B0 /* ACAccountStore+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 63167B821D5C2332007A96B0 /* ACAccountStore+AnyPromise.m */; }; - 63167B861D5C2332007A96B0 /* ACAccountStore+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63167B831D5C2332007A96B0 /* ACAccountStore+Promise.swift */; }; - 63167B881D5C233C007A96B0 /* TestAccounts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63167B871D5C233C007A96B0 /* TestAccounts.swift */; }; - 63C7FFF71D5C020D003BAE60 /* PMKAccounts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C7FFA71D5BEE09003BAE60 /* PMKAccounts.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 63C7FF9E1D5BEE09003BAE60 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 63C7FFA61D5BEE09003BAE60; - remoteInfo = PMKFoundation; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 63167B811D5C2332007A96B0 /* ACAccountStore+AnyPromise.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "ACAccountStore+AnyPromise.h"; path = "Sources/ACAccountStore+AnyPromise.h"; sourceTree = SOURCE_ROOT; }; - 63167B821D5C2332007A96B0 /* ACAccountStore+AnyPromise.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "ACAccountStore+AnyPromise.m"; path = "Sources/ACAccountStore+AnyPromise.m"; sourceTree = SOURCE_ROOT; }; - 63167B831D5C2332007A96B0 /* ACAccountStore+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "ACAccountStore+Promise.swift"; path = "Sources/ACAccountStore+Promise.swift"; sourceTree = SOURCE_ROOT; }; - 63167B871D5C233C007A96B0 /* TestAccounts.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TestAccounts.swift; path = Tests/TestAccounts.swift; sourceTree = SOURCE_ROOT; }; - 63167B891D5C23B4007A96B0 /* Cartfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile; sourceTree = ""; }; - 63BF28101D5C257100F62C66 /* Carthage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Carthage.xcconfig; sourceTree = ""; }; - 63C700091D5C0253003BAE60 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 63C7FFA71D5BEE09003BAE60 /* PMKAccounts.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PMKAccounts.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 63C7FFF21D5C020D003BAE60 /* PMKACTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PMKACTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 63C7FFEF1D5C020D003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 63C7FFF71D5C020D003BAE60 /* PMKAccounts.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 63C7FF9D1D5BEE09003BAE60 = { - isa = PBXGroup; - children = ( - 63167B891D5C23B4007A96B0 /* Cartfile */, - 63BF28101D5C257100F62C66 /* Carthage.xcconfig */, - 63C700091D5C0253003BAE60 /* Info.plist */, - 63C7FFA91D5BEE09003BAE60 /* Sources */, - 63C7FFF31D5C020D003BAE60 /* Tests */, - 63C7FFA81D5BEE09003BAE60 /* Products */, - ); - sourceTree = ""; - }; - 63C7FFA81D5BEE09003BAE60 /* Products */ = { - isa = PBXGroup; - children = ( - 63C7FFA71D5BEE09003BAE60 /* PMKAccounts.framework */, - 63C7FFF21D5C020D003BAE60 /* PMKACTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 63C7FFA91D5BEE09003BAE60 /* Sources */ = { - isa = PBXGroup; - children = ( - 63167B811D5C2332007A96B0 /* ACAccountStore+AnyPromise.h */, - 63167B821D5C2332007A96B0 /* ACAccountStore+AnyPromise.m */, - 63167B831D5C2332007A96B0 /* ACAccountStore+Promise.swift */, - ); - path = Sources; - sourceTree = SOURCE_ROOT; - }; - 63C7FFF31D5C020D003BAE60 /* Tests */ = { - isa = PBXGroup; - children = ( - 63167B871D5C233C007A96B0 /* TestAccounts.swift */, - ); - path = Tests; - sourceTree = SOURCE_ROOT; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 63C7FFA41D5BEE09003BAE60 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 63167B841D5C2332007A96B0 /* ACAccountStore+AnyPromise.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 63C7FFA61D5BEE09003BAE60 /* PMKAccounts */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKAccounts" */; - buildPhases = ( - 63C7FFA21D5BEE09003BAE60 /* Sources */, - 63C7FFA41D5BEE09003BAE60 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PMKAccounts; - productName = "PMK+UIKit"; - productReference = 63C7FFA71D5BEE09003BAE60 /* PMKAccounts.framework */; - productType = "com.apple.product-type.framework"; - }; - 63C7FFF11D5C020D003BAE60 /* PMKACTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKACTests" */; - buildPhases = ( - 63C7FFEE1D5C020D003BAE60 /* Sources */, - 63C7FFEF1D5C020D003BAE60 /* Frameworks */, - 638F9B161D5EEEDC00717B37 /* Embed Carthage Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */, - ); - name = PMKACTests; - productName = PMKTests/NS; - productReference = 63C7FFF21D5C020D003BAE60 /* PMKACTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 63C7FF9E1D5BEE09003BAE60 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = "Max Howell"; - TargetAttributes = { - 63C7FFA61D5BEE09003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - 63C7FFF11D5C020D003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKAccounts" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 63C7FF9D1D5BEE09003BAE60; - productRefGroup = 63C7FFA81D5BEE09003BAE60 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 63C7FFA61D5BEE09003BAE60 /* PMKAccounts */, - 63C7FFF11D5C020D003BAE60 /* PMKACTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXShellScriptBuildPhase section */ - 638F9B161D5EEEDC00717B37 /* Embed Carthage Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - PromiseKit, - ); - name = "Embed Carthage Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "case \"$PLATFORM_NAME\" in\nmacosx) plat=Mac;;\niphone*) plat=iOS;;\nwatch*) plat=watchOS;;\nappletv*) plat=tvOS;;\n*) echo \"error: Unknown PLATFORM_NAME: $PLATFORM_NAME\"; exit 1;;\nesac\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nframework=$(basename \"${!VAR}\")\nexport SCRIPT_INPUT_FILE_$n=\"$SRCROOT\"/Carthage/Build/$plat/\"$framework\".framework\ndone\n\n/usr/local/bin/carthage copy-frameworks || exit\n\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nsource=${!VAR}.dSYM\ndest=${BUILT_PRODUCTS_DIR}/$(basename \"$source\")\nditto \"$source\" \"$dest\" || exit\ndone"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 63C7FFA21D5BEE09003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63167B851D5C2332007A96B0 /* ACAccountStore+AnyPromise.m in Sources */, - 63167B861D5C2332007A96B0 /* ACAccountStore+Promise.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEE1D5C020D003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63167B881D5C233C007A96B0 /* TestAccounts.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 63C7FFA61D5BEE09003BAE60 /* PMKAccounts */; - targetProxy = 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 63C7FFAD1D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63BF28101D5C257100F62C66 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.Foundation; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Debug; - }; - 63C7FFAE1D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63BF28101D5C257100F62C66 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.Foundation; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Release; - }; - 63C7FFB01D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.Accounts; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Debug; - }; - 63C7FFB11D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.Accounts; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Release; - }; - 63C7FFFB1D5C020D003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 63C7FFFC1D5C020D003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKAccounts" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFAD1D5BEE09003BAE60 /* Debug */, - 63C7FFAE1D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKAccounts" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFB01D5BEE09003BAE60 /* Debug */, - 63C7FFB11D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKACTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFFB1D5C020D003BAE60 /* Debug */, - 63C7FFFC1D5C020D003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 63C7FF9E1D5BEE09003BAE60 /* Project object */; -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/PMKAccounts.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Carthage/Checkouts/PromiseKit/Extensions/Accounts/PMKAccounts.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index b49fefe7f..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/PMKAccounts.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/PMKAccounts.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Carthage/Checkouts/PromiseKit/Extensions/Accounts/PMKAccounts.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/PMKAccounts.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/PMKAccounts.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Carthage/Checkouts/PromiseKit/Extensions/Accounts/PMKAccounts.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index 08de0be8d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/PMKAccounts.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/PMKAccounts.xcodeproj/xcshareddata/xcschemes/PMKAccounts.xcscheme b/Carthage/Checkouts/PromiseKit/Extensions/Accounts/PMKAccounts.xcodeproj/xcshareddata/xcschemes/PMKAccounts.xcscheme deleted file mode 100644 index 7ca34a8dd..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/PMKAccounts.xcodeproj/xcshareddata/xcschemes/PMKAccounts.xcscheme +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/README.markdown b/Carthage/Checkouts/PromiseKit/Extensions/Accounts/README.markdown deleted file mode 100644 index af9bcde12..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/README.markdown +++ /dev/null @@ -1,34 +0,0 @@ -# PromiseKit Accounts Extensions ![Build Status] - -This project adds promises to Apple’s Accounts framework. - -## CococaPods - -```ruby -pod "PromiseKit/Accounts" ~> 6.0 -``` - -The extensions are built into `PromiseKit.framework` thus nothing else is needed. - -## Carthage - -```ruby -github "PromiseKit/Accounts" ~> 3.0 -``` - -The extensions are built into their own framework: - -```swift -// swift -import PromiseKit -import PMKAccounts -``` - -```objc -// objc -@import PromiseKit; -@import PMKAccounts; -``` - - -[Build Status]: https://travis-ci.org/PromiseKit/Accounts.svg?branch=master diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/Sources/ACAccountStore+AnyPromise.h b/Carthage/Checkouts/PromiseKit/Extensions/Accounts/Sources/ACAccountStore+AnyPromise.h deleted file mode 100644 index b7353ae75..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/Sources/ACAccountStore+AnyPromise.h +++ /dev/null @@ -1,66 +0,0 @@ -// -// Created by merowing on 09/05/2014. -// -// -// - -#import -#import - -/** - To import the `ACAccountStore` category: - - use_frameworks! - pod "PromiseKit/Accounts" - - And then in your sources: - - @import PromiseKit; -*/ -@interface ACAccountStore (PromiseKit) - -/** - Obtains permission to access protected user properties. - - @param type The account type. - - @param options Can be nil. - - @return A promise that resolves when the requested permissions have been - successfully obtained. The promise thens all accounts of the specified - type. - - @see requestAccessToAccountsWithType:options:completion: -*/ -- (AnyPromise *)requestAccessToAccountsWithType:(ACAccountType *)type options:(NSDictionary *)options NS_REFINED_FOR_SWIFT; - -/** - Renews account credentials when the credentials are no longer valid. - - @param account The account to renew credentials. - - @return A promise that thens the `ACAccountCredentialRenewResult`. -*/ -- (AnyPromise *)renewCredentialsForAccount:(ACAccount *)account NS_REFINED_FOR_SWIFT; - -/** - Saves an account to the Accounts database. - - @param account The account to save. - - @return A promise that resolves when the account has been successfully - saved. -*/ -- (AnyPromise *)saveAccount:(ACAccount *)account NS_REFINED_FOR_SWIFT; - -/** - Removes an account from the account store. - - @param account The account to remove. - - @return A promise that resolves when the account has been successfully - removed. -*/ -- (AnyPromise *)removeAccount:(ACAccount *)account NS_REFINED_FOR_SWIFT; - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/Sources/ACAccountStore+AnyPromise.m b/Carthage/Checkouts/PromiseKit/Extensions/Accounts/Sources/ACAccountStore+AnyPromise.m deleted file mode 100644 index 30f987a88..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/Sources/ACAccountStore+AnyPromise.m +++ /dev/null @@ -1,48 +0,0 @@ -#import "ACAccountStore+AnyPromise.h" -#import - - -@implementation ACAccountStore (PromiseKit) - -- (AnyPromise *)requestAccessToAccountsWithType:(ACAccountType *)type options:(NSDictionary *)options { - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - [self requestAccessToAccountsWithType:type options:options completion:^(BOOL granted, NSError *error) { - if (granted) { - resolve([self accountsWithAccountType:type]); - } else if (error) { - resolve(error); - } else { - error = [NSError errorWithDomain:PMKErrorDomain code:PMKAccessDeniedError userInfo:@{ - NSLocalizedDescriptionKey: @"Access to the requested social service has been denied. Please enable access in your device settings." - }]; - resolve(error); - } - }]; - }]; -} - -- (AnyPromise *)renewCredentialsForAccount:(ACAccount *)account { - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - [self renewCredentialsForAccount:account completion:^(ACAccountCredentialRenewResult renewResult, NSError *error) { - resolve(error ?: @(renewResult)); - }]; - }]; -} - -- (AnyPromise *)saveAccount:(ACAccount *)account { - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - [self saveAccount:account withCompletionHandler:^(BOOL success, NSError *error) { - resolve(error); - }]; - }]; -} - -- (AnyPromise *)removeAccount:(ACAccount *)account { - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - [self removeAccount:account withCompletionHandler:^(BOOL success, NSError *error) { - resolve(error); - }]; - }]; -} - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/Sources/ACAccountStore+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/Accounts/Sources/ACAccountStore+Promise.swift deleted file mode 100644 index 1789f84c9..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/Sources/ACAccountStore+Promise.swift +++ /dev/null @@ -1,59 +0,0 @@ -import Accounts -#if !PMKCocoaPods -import PromiseKit -#endif - -/** - To import the `ACAccountStore` category: - - use_frameworks! - pod "PromiseKit/ACAccountStore" - - And then in your sources: - - import PromiseKit -*/ -extension ACAccountStore { - /// Renews account credentials when the credentials are no longer valid. - public func renewCredentials(for account: ACAccount) -> Promise { - return Promise { renewCredentials(for: account, completion: $0.resolve) } - } - - /// Obtains permission to access protected user properties. - public func requestAccessToAccounts(with type: ACAccountType, options: [AnyHashable: Any]? = nil) -> Promise { - return Promise { seal in - requestAccessToAccounts(with: type, options: options, completion: { granted, error in - if granted { - seal.fulfill(()) - } else if let error = error { - seal.reject(error) - } else { - seal.reject(PMKError.accessDenied) - } - }) - } - } - - /// Saves an account to the Accounts database. - public func saveAccount(_ account: ACAccount) -> Promise { - return Promise { saveAccount(account, withCompletionHandler: $0.resolve) }.asVoid() - } - - /// Removes an account from the account store. - public func removeAccount(_ account: ACAccount) -> Promise { - return Promise { removeAccount(account, withCompletionHandler: $0.resolve) }.asVoid() - } - - /// PromiseKit ACAccountStore errors - public enum PMKError: Error, CustomStringConvertible { - /// The request for accounts access was denied. - case accessDenied - - public var description: String { - switch self { - case .accessDenied: - return "Access to the requested social service has been denied. Please enable access in your device settings." - } - } - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/Tests/TestAccounts.swift b/Carthage/Checkouts/PromiseKit/Extensions/Accounts/Tests/TestAccounts.swift deleted file mode 100644 index 5a6591ee5..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Accounts/Tests/TestAccounts.swift +++ /dev/null @@ -1,80 +0,0 @@ -import PMKAccounts -import PromiseKit -import Accounts -import XCTest - -class Test_ACAccountStore_Swift: XCTestCase { - var dummy: ACAccount { return ACAccount() } - - func test_renewCredentialsForAccount() { - let ex = expectation(description: "") - - class MockAccountStore: ACAccountStore { - override func renewCredentials(for account: ACAccount!, completion: ACAccountStoreCredentialRenewalHandler!) { - completion(.renewed, nil) - } - } - - MockAccountStore().renewCredentials(for: dummy).done { result in - XCTAssertEqual(result, ACAccountCredentialRenewResult.renewed) - ex.fulfill() - }.catch { - XCTFail("\($0)") - } - - waitForExpectations(timeout: 1) - } - - func test_requestAccessToAccountsWithType() { - class MockAccountStore: ACAccountStore { - override func requestAccessToAccounts(with accountType: ACAccountType!, options: [AnyHashable : Any]! = [:], completion: ACAccountStoreRequestAccessCompletionHandler!) { - completion(true, nil) - } - } - - let ex = expectation(description: "") - let store = MockAccountStore() - let type = store.accountType(withAccountTypeIdentifier: ACAccountTypeIdentifierFacebook)! - store.requestAccessToAccounts(with: type).done { _ in - ex.fulfill() - }.catch { - XCTFail("\($0)") - } - - waitForExpectations(timeout: 1) - } - - func test_saveAccount() { - class MockAccountStore: ACAccountStore { - override func saveAccount(_ account: ACAccount!, withCompletionHandler completionHandler: ACAccountStoreSaveCompletionHandler!) { - completionHandler(true, nil) - } - } - - let ex = expectation(description: "") - MockAccountStore().saveAccount(dummy).done { _ in - ex.fulfill() - }.catch { - XCTFail("\($0)") - } - - waitForExpectations(timeout: 1) - } - - func test_removeAccount() { - class MockAccountStore: ACAccountStore { - override func removeAccount(_ account: ACAccount!, withCompletionHandler completionHandler: ACAccountStoreSaveCompletionHandler!) { - completionHandler(true, nil) - } - } - - let ex = expectation(description: "") - MockAccountStore().removeAccount(dummy).done { _ in - ex.fulfill() - }.catch { - XCTFail("\($0)") - } - - waitForExpectations(timeout: 1) - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/.gitignore b/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/.gitignore deleted file mode 100644 index 30f50040c..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.xcodeproj/**/xcuserdata/ -*.xcscmblueprint -/Carthage -/.build -.DS_Store diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/.travis.yml b/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/.travis.yml deleted file mode 100644 index 070b4ab08..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/.travis.yml +++ /dev/null @@ -1,76 +0,0 @@ -os: osx -language: swift -osx_image: xcode10.2 - -branches: - only: - - master -stages: - - lint - - carthage - - test -jobs: - include: - - &pod - stage: lint - osx_image: xcode8.3 - env: SWIFT=3.1 - before_install: - gem install cocoapods --prerelease --version 1.7.0.beta.3 - install: - carthage bootstrap --no-build PromiseKit - script: | - cd Carthage/Checkouts/PromiseKit - mv .github/PromiseKit.podspec . - rm -rf Extensions/AddressBook/Sources - cp -R ../../../Sources Extensions/AddressBook - pod lib lint --subspec=PromiseKit/AddressBook --fail-fast --swift-version=$SWIFT - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=3.2 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=3.3 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=3.4 - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=4.0 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=4.1 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=4.2 - - <<: *pod - osx_image: xcode10.2 - env: SWIFT=4.3 - - <<: *pod - osx_image: xcode10.2 - env: SWIFT=5.0 - - - &carthage - stage: carthage - osx_image: xcode9.2 - script: | - carthage bootstrap --cache-builds --platform iOS - sed -i '' "s/SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;/SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;/" *.xcodeproj/project.pbxproj - carthage build --no-skip-current - cache.directories: - - Carthage - - <<: *carthage - osx_image: xcode9.4 - - <<: *carthage - osx_image: xcode10.1 - - <<: *carthage - osx_image: xcode10.2 - - - stage: test - xcode_scheme: PMKAddressBook - xcode_project: PMKAddressBook.xcodeproj - xcode_destination: 'platform=iOS Simulator,OS=12.2,name=iPhone SE' - cache.directories: - - Carthage - before_install: - carthage bootstrap --cache-builds --no-use-binaries --platform iOS diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/Cartfile b/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/Cartfile deleted file mode 100644 index d11272a9a..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" ~> 6.8.4 \ No newline at end of file diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/Cartfile.resolved b/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/Cartfile.resolved deleted file mode 100644 index f54bbdbf2..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/Cartfile.resolved +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" "6.8.4" diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/Carthage.xcconfig b/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/Carthage.xcconfig deleted file mode 100644 index c8b995651..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/Carthage.xcconfig +++ /dev/null @@ -1,7 +0,0 @@ -// Created by Kevin Ballard on 12/14/15. -// Copyright © 2015 Postmates. All rights reserved. - -FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(SRCROOT)/Carthage/Build/Mac/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=iphone*] = $(SRCROOT)/Carthage/Build/iOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=watch*] = $(SRCROOT)/Carthage/Build/watchOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=appletv*] = $(SRCROOT)/Carthage/Build/tvOS/ $(inherited) diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/Info.plist b/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/Info.plist deleted file mode 100644 index fbe1e6b31..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/LICENSE b/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/LICENSE deleted file mode 100644 index 50f758c89..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2016-present, Max Howell; mxcl@me.com - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/PMKAddressBook.xcodeproj/project.pbxproj b/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/PMKAddressBook.xcodeproj/project.pbxproj deleted file mode 100644 index 180f4d66c..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/PMKAddressBook.xcodeproj/project.pbxproj +++ /dev/null @@ -1,442 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 63938C031D5C27AE00F4C165 /* ABAddressBookRequestAccess+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63938C021D5C27AE00F4C165 /* ABAddressBookRequestAccess+Promise.swift */; }; - 63938C091D5C27F600F4C165 /* TestAddressBook.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63938C081D5C27F600F4C165 /* TestAddressBook.swift */; }; - 63C7FFF71D5C020D003BAE60 /* PMKAddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C7FFA71D5BEE09003BAE60 /* PMKAddressBook.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 63C7FF9E1D5BEE09003BAE60 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 63C7FFA61D5BEE09003BAE60; - remoteInfo = PMKFoundation; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 63167B891D5C23B4007A96B0 /* Cartfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile; sourceTree = ""; }; - 63938C021D5C27AE00F4C165 /* ABAddressBookRequestAccess+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "ABAddressBookRequestAccess+Promise.swift"; path = "Sources/ABAddressBookRequestAccess+Promise.swift"; sourceTree = SOURCE_ROOT; }; - 63938C081D5C27F600F4C165 /* TestAddressBook.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TestAddressBook.swift; path = Tests/TestAddressBook.swift; sourceTree = SOURCE_ROOT; }; - 63BF28101D5C257100F62C66 /* Carthage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Carthage.xcconfig; sourceTree = ""; }; - 63C700091D5C0253003BAE60 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 63C7FFA71D5BEE09003BAE60 /* PMKAddressBook.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PMKAddressBook.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 63C7FFF21D5C020D003BAE60 /* PMKABTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PMKABTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 63C7FFEF1D5C020D003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 63C7FFF71D5C020D003BAE60 /* PMKAddressBook.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 63C7FF9D1D5BEE09003BAE60 = { - isa = PBXGroup; - children = ( - 63167B891D5C23B4007A96B0 /* Cartfile */, - 63BF28101D5C257100F62C66 /* Carthage.xcconfig */, - 63C700091D5C0253003BAE60 /* Info.plist */, - 63C7FFA91D5BEE09003BAE60 /* Sources */, - 63C7FFF31D5C020D003BAE60 /* Tests */, - 63C7FFA81D5BEE09003BAE60 /* Products */, - ); - sourceTree = ""; - }; - 63C7FFA81D5BEE09003BAE60 /* Products */ = { - isa = PBXGroup; - children = ( - 63C7FFA71D5BEE09003BAE60 /* PMKAddressBook.framework */, - 63C7FFF21D5C020D003BAE60 /* PMKABTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 63C7FFA91D5BEE09003BAE60 /* Sources */ = { - isa = PBXGroup; - children = ( - 63938C021D5C27AE00F4C165 /* ABAddressBookRequestAccess+Promise.swift */, - ); - path = Sources; - sourceTree = SOURCE_ROOT; - }; - 63C7FFF31D5C020D003BAE60 /* Tests */ = { - isa = PBXGroup; - children = ( - 63938C081D5C27F600F4C165 /* TestAddressBook.swift */, - ); - path = Tests; - sourceTree = SOURCE_ROOT; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 63C7FFA41D5BEE09003BAE60 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 63C7FFA61D5BEE09003BAE60 /* PMKAddressBook */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKAddressBook" */; - buildPhases = ( - 63C7FFA21D5BEE09003BAE60 /* Sources */, - 63C7FFA41D5BEE09003BAE60 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PMKAddressBook; - productName = "PMK+UIKit"; - productReference = 63C7FFA71D5BEE09003BAE60 /* PMKAddressBook.framework */; - productType = "com.apple.product-type.framework"; - }; - 63C7FFF11D5C020D003BAE60 /* PMKABTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKABTests" */; - buildPhases = ( - 63C7FFEE1D5C020D003BAE60 /* Sources */, - 63C7FFEF1D5C020D003BAE60 /* Frameworks */, - 63EF83AD1D5FA940008748A6 /* Embed Carthage Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */, - ); - name = PMKABTests; - productName = PMKTests/NS; - productReference = 63C7FFF21D5C020D003BAE60 /* PMKABTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 63C7FF9E1D5BEE09003BAE60 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = "Max Howell"; - TargetAttributes = { - 63C7FFA61D5BEE09003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - 63C7FFF11D5C020D003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKAddressBook" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 63C7FF9D1D5BEE09003BAE60; - productRefGroup = 63C7FFA81D5BEE09003BAE60 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 63C7FFA61D5BEE09003BAE60 /* PMKAddressBook */, - 63C7FFF11D5C020D003BAE60 /* PMKABTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXShellScriptBuildPhase section */ - 63EF83AD1D5FA940008748A6 /* Embed Carthage Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - PromiseKit, - ); - name = "Embed Carthage Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "case \"$PLATFORM_NAME\" in\nmacosx) plat=Mac;;\niphone*) plat=iOS;;\nwatch*) plat=watchOS;;\nappletv*) plat=tvOS;;\n*) echo \"error: Unknown PLATFORM_NAME: $PLATFORM_NAME\"; exit 1;;\nesac\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nframework=$(basename \"${!VAR}\")\nexport SCRIPT_INPUT_FILE_$n=\"$SRCROOT\"/Carthage/Build/$plat/\"$framework\".framework\ndone\n\n/usr/local/bin/carthage copy-frameworks || exit\n\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nsource=${!VAR}.dSYM\ndest=${BUILT_PRODUCTS_DIR}/$(basename \"$source\")\nditto \"$source\" \"$dest\" || exit\ndone"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 63C7FFA21D5BEE09003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63938C031D5C27AE00F4C165 /* ABAddressBookRequestAccess+Promise.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEE1D5C020D003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63938C091D5C27F600F4C165 /* TestAddressBook.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 63C7FFA61D5BEE09003BAE60 /* PMKAddressBook */; - targetProxy = 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 63C7FFAD1D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63BF28101D5C257100F62C66 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.Foundation; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Debug; - }; - 63C7FFAE1D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63BF28101D5C257100F62C66 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.Foundation; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Release; - }; - 63C7FFB01D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.AddressBook; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Debug; - }; - 63C7FFB11D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.AddressBook; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Release; - }; - 63C7FFFB1D5C020D003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SUPPRESS_WARNINGS = YES; - }; - name = Debug; - }; - 63C7FFFC1D5C020D003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SUPPRESS_WARNINGS = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKAddressBook" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFAD1D5BEE09003BAE60 /* Debug */, - 63C7FFAE1D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKAddressBook" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFB01D5BEE09003BAE60 /* Debug */, - 63C7FFB11D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKABTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFFB1D5C020D003BAE60 /* Debug */, - 63C7FFFC1D5C020D003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 63C7FF9E1D5BEE09003BAE60 /* Project object */; -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/PMKAddressBook.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/PMKAddressBook.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index b49fefe7f..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/PMKAddressBook.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/PMKAddressBook.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/PMKAddressBook.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/PMKAddressBook.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/PMKAddressBook.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/PMKAddressBook.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index 08de0be8d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/PMKAddressBook.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/PMKAddressBook.xcodeproj/xcshareddata/xcschemes/PMKAddressBook.xcscheme b/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/PMKAddressBook.xcodeproj/xcshareddata/xcschemes/PMKAddressBook.xcscheme deleted file mode 100644 index 48de42603..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/PMKAddressBook.xcodeproj/xcshareddata/xcschemes/PMKAddressBook.xcscheme +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/README.markdown b/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/README.markdown deleted file mode 100644 index 3be2f7778..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/README.markdown +++ /dev/null @@ -1,34 +0,0 @@ -# PromiseKit AddressBook Extensions ![Build Status] - -This project adds promises to Apple’s AddressBook framework. - -## CococaPods - -```ruby -pod "PromiseKit/AddressBook" ~> 6.0 -``` - -The extensions are built into `PromiseKit.framework` thus nothing else is needed. - -## Carthage - -```ruby -github "PromiseKit/AddressBook" ~> 3.0 -``` - -The extensions are built into their own framework: - -```swift -// swift -import PromiseKit -import PMKAddressBook -``` - -```objc -// objc -@import PromiseKit; -@import PMKAddressBook; -``` - - -[Build Status]: https://travis-ci.org/PromiseKit/AddressBook.svg?branch=master diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/Sources/ABAddressBookRequestAccess+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/Sources/ABAddressBookRequestAccess+Promise.swift deleted file mode 100644 index 64935296d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/Sources/ABAddressBookRequestAccess+Promise.swift +++ /dev/null @@ -1,107 +0,0 @@ -import Foundation.NSError -import CoreFoundation -import AddressBook -#if !PMKCocoaPods -import PromiseKit -#endif - -public enum AddressBookError: Error { - case notDetermined - case restricted - case denied - - public var localizedDescription: String { - switch self { - case .notDetermined: - return "Access to the address book could not be determined." - case .restricted: - return "A head of family must grant address book access." - case .denied: - return "Address book access has been denied." - } - } -} - -/** - Requests access to the address book. - - To import `ABAddressBookRequestAccess`: - - use_frameworks! - pod "PromiseKit/AddressBook" - - And then in your sources: - - import PromiseKit - - @return A promise that fulfills with the ABAuthorizationStatus. -*/ -public func ABAddressBookRequestAccess() -> Promise { - return ABAddressBookRequestAccess().map(on: nil) { (_, _) -> ABAuthorizationStatus in - return ABAddressBookGetAuthorizationStatus() - } -} - -/** - Requests access to the address book. - - To import `ABAddressBookRequestAccess`: - - pod "PromiseKit/AddressBook" - - And then in your sources: - - import PromiseKit - - @return A promise that fulfills with the ABAddressBook instance if access was granted. -*/ -public func ABAddressBookRequestAccess() -> Promise { - return ABAddressBookRequestAccess().then(on: nil) { granted, book -> Promise in - guard granted else { - switch ABAddressBookGetAuthorizationStatus() { - case .notDetermined: - throw AddressBookError.notDetermined - case .restricted: - throw AddressBookError.restricted - case .denied: - throw AddressBookError.denied - case .authorized: - fatalError("This should not happen") - #if swift(>=4.3) - @unknown default: - print("warning: PromiseKit: unknown case statement, please PR a fix!") - throw AddressBookError.denied - #endif - } - } - - return .value(book) - } -} - -extension NSError { - fileprivate convenience init(CFError error: CoreFoundation.CFError) { - let domain = CFErrorGetDomain(error) as String - let code = CFErrorGetCode(error) - let info = CFErrorCopyUserInfo(error) as? [String: Any] ?? [:] - self.init(domain: domain, code: code, userInfo: info) - } -} - -private func ABAddressBookRequestAccess() -> Promise<(Bool, ABAddressBook)> { - var error: Unmanaged? = nil - guard let ubook = ABAddressBookCreateWithOptions(nil, &error) else { - return Promise(error: NSError(CFError: error!.takeRetainedValue())) - } - - let book: ABAddressBook = ubook.takeRetainedValue() - return Promise { seal in - ABAddressBookRequestAccessWithCompletion(book) { granted, error in - if let error = error { - seal.reject(NSError(CFError: error)) - } else { - seal.fulfill((granted, book)) - } - } - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/Tests/TestAddressBook.swift b/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/Tests/TestAddressBook.swift deleted file mode 100644 index 76dd423b6..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AddressBook/Tests/TestAddressBook.swift +++ /dev/null @@ -1,15 +0,0 @@ -import PMKAddressBook -import AddressBook -import PromiseKit -import XCTest - -class AddressBookTests: XCTestCase { - func test() { - let ex = expectation(description: "") - ABAddressBookRequestAccess().done { (auth: ABAuthorizationStatus) in - XCTAssertEqual(auth, ABAuthorizationStatus.authorized) - ex.fulfill() - } - waitForExpectations(timeout: 1) - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/.gitignore b/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/.gitignore deleted file mode 100644 index 30f50040c..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.xcodeproj/**/xcuserdata/ -*.xcscmblueprint -/Carthage -/.build -.DS_Store diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/.travis.yml b/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/.travis.yml deleted file mode 100644 index 1b34fa860..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/.travis.yml +++ /dev/null @@ -1,97 +0,0 @@ -os: osx -language: swift -osx_image: xcode10.2 - -branches: - only: - - master -stages: - - lint - - carthage - - swiftpm - - test -jobs: - include: - - &pod - stage: lint - osx_image: xcode8.3 - env: SWIFT=3.1 - cache: - - cocoapods - - directories: - - Carthage - before_install: - gem install cocoapods --prerelease --version 1.7.0.beta.3 - install: - carthage bootstrap --no-build PromiseKit - script: | - cd Carthage/Checkouts/PromiseKit - mv .github/PromiseKit.podspec . - rm -rf Extensions/Alamofire/Sources - cp -R ../../../Sources Extensions/Alamofire - pod lib lint --subspec=PromiseKit/Alamofire --fail-fast --swift-version=$SWIFT - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=3.2 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=3.3 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=3.4 - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=4.0 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=4.1 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=4.2 - - <<: *pod - osx_image: xcode10.2 - env: SWIFT=4.3 - - <<: *pod - osx_image: xcode10.2 - env: SWIFT=5.0 - - - &carthage - stage: carthage - osx_image: xcode9.2 - script: | - carthage bootstrap --cache-builds - sed -i '' "s/SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;/SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;/" *.xcodeproj/project.pbxproj - carthage build --no-skip-current - cache.directories: - - Carthage - - <<: *carthage - osx_image: xcode9.4 - - <<: *carthage - osx_image: xcode10.1 - - <<: *carthage - osx_image: xcode10.2 - - - &swiftpm - stage: swiftpm - osx_image: xcode8.3 - script: swift build - - <<: *swiftpm - osx_image: xcode9.4 - - <<: *swiftpm - osx_image: xcode10.1 - - <<: *swiftpm - osx_image: xcode10.2 - - - &test - stage: test - xcode_scheme: PMKAlamofire - xcode_project: PMKAlamofire.xcodeproj - xcode_destination: 'platform=macOS' - cache.directories: - - Carthage - before_install: - carthage bootstrap --cache-builds --no-use-binaries - - <<: *test - xcode_destination: 'platform=iOS Simulator,OS=12.2,name=iPhone SE' - - <<: *test - xcode_destination: 'platform=tvOS Simulator,OS=12.2,name=Apple TV' diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/Cartfile b/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/Cartfile deleted file mode 100644 index 14c7c1284..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/Cartfile +++ /dev/null @@ -1,2 +0,0 @@ -github "mxcl/PromiseKit" ~> 6.8.4 -github "Alamofire/Alamofire" ~> 4.0 diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/Cartfile.private b/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/Cartfile.private deleted file mode 100644 index 7ad353e56..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/Cartfile.private +++ /dev/null @@ -1 +0,0 @@ -github "AliSoftware/OHHTTPStubs" ~> 7.0 diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/Cartfile.resolved b/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/Cartfile.resolved deleted file mode 100644 index 10b37bd55..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/Cartfile.resolved +++ /dev/null @@ -1,3 +0,0 @@ -github "Alamofire/Alamofire" "4.8.2" -github "AliSoftware/OHHTTPStubs" "7.0.0" -github "mxcl/PromiseKit" "6.8.4" diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/Carthage.xcconfig b/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/Carthage.xcconfig deleted file mode 100644 index c8b995651..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/Carthage.xcconfig +++ /dev/null @@ -1,7 +0,0 @@ -// Created by Kevin Ballard on 12/14/15. -// Copyright © 2015 Postmates. All rights reserved. - -FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(SRCROOT)/Carthage/Build/Mac/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=iphone*] = $(SRCROOT)/Carthage/Build/iOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=watch*] = $(SRCROOT)/Carthage/Build/watchOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=appletv*] = $(SRCROOT)/Carthage/Build/tvOS/ $(inherited) diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/Info.plist b/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/Info.plist deleted file mode 100644 index fbe1e6b31..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/LICENSE b/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/LICENSE deleted file mode 100644 index 50f758c89..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2016-present, Max Howell; mxcl@me.com - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/PMKAlamofire.xcodeproj/project.pbxproj b/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/PMKAlamofire.xcodeproj/project.pbxproj deleted file mode 100644 index 45ae8f763..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/PMKAlamofire.xcodeproj/project.pbxproj +++ /dev/null @@ -1,454 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 63C700081D5C021F003BAE60 /* TestAlamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63C700021D5C021F003BAE60 /* TestAlamofire.swift */; }; - 63C7FFE91D5C00F2003BAE60 /* Alamofire+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63C7FFDB1D5C00F2003BAE60 /* Alamofire+Promise.swift */; }; - 63C7FFF71D5C020D003BAE60 /* PMKAlamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C7FFA71D5BEE09003BAE60 /* PMKAlamofire.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 63C7FF9E1D5BEE09003BAE60 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 63C7FFA61D5BEE09003BAE60; - remoteInfo = PMKFoundation; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 63C700021D5C021F003BAE60 /* TestAlamofire.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TestAlamofire.swift; path = Tests/TestAlamofire.swift; sourceTree = SOURCE_ROOT; }; - 63C700091D5C0253003BAE60 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 63C7FFA71D5BEE09003BAE60 /* PMKAlamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PMKAlamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 63C7FFDB1D5C00F2003BAE60 /* Alamofire+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "Alamofire+Promise.swift"; path = "Sources/Alamofire+Promise.swift"; sourceTree = SOURCE_ROOT; }; - 63C7FFF21D5C020D003BAE60 /* PMKAFTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PMKAFTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 63CCF8121D5C0C4E00503216 /* Cartfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile; sourceTree = ""; }; - 63CCF8131D5C0C4E00503216 /* Cartfile.private */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile.private; sourceTree = ""; }; - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Carthage.xcconfig; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 63C7FFA31D5BEE09003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEF1D5C020D003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 63C7FFF71D5C020D003BAE60 /* PMKAlamofire.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 63C7FF9D1D5BEE09003BAE60 = { - isa = PBXGroup; - children = ( - 63CCF8121D5C0C4E00503216 /* Cartfile */, - 63CCF8131D5C0C4E00503216 /* Cartfile.private */, - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */, - 63C700091D5C0253003BAE60 /* Info.plist */, - 63C7FFA91D5BEE09003BAE60 /* Sources */, - 63C7FFF31D5C020D003BAE60 /* Tests */, - 63C7FFA81D5BEE09003BAE60 /* Products */, - ); - sourceTree = ""; - }; - 63C7FFA81D5BEE09003BAE60 /* Products */ = { - isa = PBXGroup; - children = ( - 63C7FFA71D5BEE09003BAE60 /* PMKAlamofire.framework */, - 63C7FFF21D5C020D003BAE60 /* PMKAFTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 63C7FFA91D5BEE09003BAE60 /* Sources */ = { - isa = PBXGroup; - children = ( - 63C7FFDB1D5C00F2003BAE60 /* Alamofire+Promise.swift */, - ); - path = Sources; - sourceTree = SOURCE_ROOT; - }; - 63C7FFF31D5C020D003BAE60 /* Tests */ = { - isa = PBXGroup; - children = ( - 63C700021D5C021F003BAE60 /* TestAlamofire.swift */, - ); - path = Tests; - sourceTree = SOURCE_ROOT; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 63C7FFA41D5BEE09003BAE60 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 63C7FFA61D5BEE09003BAE60 /* PMKAlamofire */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKAlamofire" */; - buildPhases = ( - 63C7FFA21D5BEE09003BAE60 /* Sources */, - 63C7FFA31D5BEE09003BAE60 /* Frameworks */, - 63C7FFA41D5BEE09003BAE60 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PMKAlamofire; - productName = "PMK+UIKit"; - productReference = 63C7FFA71D5BEE09003BAE60 /* PMKAlamofire.framework */; - productType = "com.apple.product-type.framework"; - }; - 63C7FFF11D5C020D003BAE60 /* PMKAFTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKAFTests" */; - buildPhases = ( - 63C7FFEE1D5C020D003BAE60 /* Sources */, - 63C7FFEF1D5C020D003BAE60 /* Frameworks */, - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */, - ); - name = PMKAFTests; - productName = PMKTests/NS; - productReference = 63C7FFF21D5C020D003BAE60 /* PMKAFTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 63C7FF9E1D5BEE09003BAE60 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = "Max Howell"; - TargetAttributes = { - 63C7FFA61D5BEE09003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - 63C7FFF11D5C020D003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKAlamofire" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 63C7FF9D1D5BEE09003BAE60; - productRefGroup = 63C7FFA81D5BEE09003BAE60 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 63C7FFA61D5BEE09003BAE60 /* PMKAlamofire */, - 63C7FFF11D5C020D003BAE60 /* PMKAFTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXShellScriptBuildPhase section */ - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - PromiseKit, - OHHTTPStubs, - Alamofire, - ); - name = "Embed Carthage Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "case \"$PLATFORM_NAME\" in\nmacosx) plat=Mac;;\niphone*) plat=iOS;;\nwatch*) plat=watchOS;;\nappletv*) plat=tvOS;;\n*) echo \"error: Unknown PLATFORM_NAME: $PLATFORM_NAME\"; exit 1;;\nesac\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nframework=$(basename \"${!VAR}\")\nexport SCRIPT_INPUT_FILE_$n=\"$SRCROOT\"/Carthage/Build/$plat/\"$framework\".framework\ndone\n\n/usr/local/bin/carthage copy-frameworks || exit\n\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nsource=${!VAR}.dSYM\ndest=${BUILT_PRODUCTS_DIR}/$(basename \"$source\")\nditto \"$source\" \"$dest\" || exit\ndone"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 63C7FFA21D5BEE09003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63C7FFE91D5C00F2003BAE60 /* Alamofire+Promise.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEE1D5C020D003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63C700081D5C021F003BAE60 /* TestAlamofire.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 63C7FFA61D5BEE09003BAE60 /* PMKAlamofire */; - targetProxy = 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 63C7FFAD1D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1.0.6; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.11; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.Foundation; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos watchsimulator watchos macosx appletvsimulator appletvos"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Debug; - }; - 63C7FFAE1D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1.0.6; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.11; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.Foundation; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos watchsimulator watchos macosx appletvsimulator appletvos"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Release; - }; - 63C7FFB01D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Debug; - }; - 63C7FFB11D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Release; - }; - 63C7FFFB1D5C020D003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SUPPRESS_WARNINGS = YES; - }; - name = Debug; - }; - 63C7FFFC1D5C020D003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SUPPRESS_WARNINGS = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKAlamofire" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFAD1D5BEE09003BAE60 /* Debug */, - 63C7FFAE1D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKAlamofire" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFB01D5BEE09003BAE60 /* Debug */, - 63C7FFB11D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKAFTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFFB1D5C020D003BAE60 /* Debug */, - 63C7FFFC1D5C020D003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 63C7FF9E1D5BEE09003BAE60 /* Project object */; -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/PMKAlamofire.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/PMKAlamofire.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 3e1e5c8b2..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/PMKAlamofire.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/PMKAlamofire.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/PMKAlamofire.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/PMKAlamofire.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/PMKAlamofire.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/PMKAlamofire.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index 08de0be8d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/PMKAlamofire.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/PMKAlamofire.xcodeproj/xcshareddata/xcschemes/PMKAlamofire.xcscheme b/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/PMKAlamofire.xcodeproj/xcshareddata/xcschemes/PMKAlamofire.xcscheme deleted file mode 100644 index 221628cb3..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/PMKAlamofire.xcodeproj/xcshareddata/xcschemes/PMKAlamofire.xcscheme +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/Package.swift b/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/Package.swift deleted file mode 100644 index 2e0d33109..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/Package.swift +++ /dev/null @@ -1,10 +0,0 @@ -import PackageDescription - -let package = Package( - name: "PMKAlamofire", - dependencies: [ - .Package(url: "https://github.com/mxcl/PromiseKit.git", majorVersion: 6), - .Package(url: "https://github.com/Alamofire/Alamofire.git", majorVersion: 4) - ], - exclude: ["Tests"] -) diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/Package@swift-4.2.swift b/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/Package@swift-4.2.swift deleted file mode 100644 index d6ab7217b..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/Package@swift-4.2.swift +++ /dev/null @@ -1,23 +0,0 @@ -// swift-tools-version:4.2 - -import PackageDescription - -let pkg = Package(name: "PMKAlamofire") -pkg.products = [ - .library(name: "PMKAlamofire", targets: ["PMKAlamofire"]), -] -pkg.dependencies = [ - .package(url: "https://github.com/Alamofire/Alamofire.git", .upToNextMajor(from: "4.0.0")), - .package(url: "https://github.com/mxcl/PromiseKit.git", .upToNextMajor(from: "6.0.0")) -] -pkg.swiftLanguageVersions = [.v3, .v4, .v4_2] - -let target: Target = .target(name: "PMKAlamofire") -target.path = "Sources" -target.exclude = ["Tests"] -target.dependencies = [ - "PromiseKit", - "Alamofire" -] - -pkg.targets = [target] diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/README.markdown b/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/README.markdown deleted file mode 100644 index ced03e075..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/README.markdown +++ /dev/null @@ -1,93 +0,0 @@ -# PromiseKit Alamofire Extensions ![Build Status] - -This project adds promises to [Alamofire](https://github.com/Alamofire/Alamofire). - -This project supports Swift 3.1, 3.2, 4.0 and 4.1. - -## Usage - -```swift -Alamofire.request("https://httpbin.org/get", method: .GET) - .responseJSON().then { json, rsp in - // - }.catch{ error in - //… - } -``` - -Of course, the whole point in promises is composability, so: - -```swift -func login() -> Promise { - let q = DispatchQueue.global() - UIApplication.shared.isNetworkActivityIndicatorVisible = true - - return firstly { in - Alamofire.request(url, method: .get).responseData() - }.map(on: q) { data, rsp in - convertToUser(data) - }.ensure { - UIApplication.shared.isNetworkActivityIndicatorVisible = false - } -} - -firstly { - login() -}.done { user in - //… -}.catch { error in - UIAlertController(/*…*/).show() -} -``` - -## CocoaPods - -```ruby -# Podfile -pod 'PromiseKit/Alamofire', '~> 6.0' -``` - -```swift -// `.swift` files -import PromiseKit -import Alamofire -``` - -```objc -// `.m files` -@import PromiseKit; -@import Alamofire; -``` - -## Carthage - -```ruby -github "PromiseKit/PMKAlamofire" ~> 3.0 -``` - -The extensions are built into their own framework: - -```swift -// `.swift` files -import PromiseKit -import PMKAlamofire -``` - -```objc -// `.m files` -@import PromiseKit; -@import PMKAlamofire; -``` - -## SwiftPM - -```swift -let package = Package( - dependencies: [ - .Target(url: "https://github.com/PromiseKit/PMKAlamofire", majorVersion: 3) - ] -) -``` - - -[Build Status]: https://travis-ci.org/PromiseKit/PMKAlamofire.svg?branch=master diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/Sources/Alamofire+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/Sources/Alamofire+Promise.swift deleted file mode 100644 index f5f7b59ce..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/Sources/Alamofire+Promise.swift +++ /dev/null @@ -1,189 +0,0 @@ -@_exported import Alamofire -import Foundation -#if !PMKCocoaPods -import PromiseKit -#endif - -/** - To import the `Alamofire` category: - - use_frameworks! - pod "PromiseKit/Alamofire" - - And then in your sources: - - import PromiseKit - */ -extension Alamofire.DataRequest { - /// Adds a handler to be called once the request has finished. - public func response(_: PMKNamespacer, queue: DispatchQueue? = nil) -> Promise<(URLRequest, HTTPURLResponse, Data)> { - return Promise { seal in - response(queue: queue) { rsp in - if let error = rsp.error { - seal.reject(error) - } else if let a = rsp.request, let b = rsp.response, let c = rsp.data { - seal.fulfill((a, b, c)) - } else { - seal.reject(PMKError.invalidCallingConvention) - } - } - } - } - - /// Adds a handler to be called once the request has finished. - public func responseData(queue: DispatchQueue? = nil) -> Promise<(data: Data, response: PMKAlamofireDataResponse)> { - return Promise { seal in - responseData(queue: queue) { response in - switch response.result { - case .success(let value): - seal.fulfill((value, PMKAlamofireDataResponse(response))) - case .failure(let error): - seal.reject(error) - } - } - } - } - - /// Adds a handler to be called once the request has finished. - public func responseString(queue: DispatchQueue? = nil) -> Promise<(string: String, response: PMKAlamofireDataResponse)> { - return Promise { seal in - responseString(queue: queue) { response in - switch response.result { - case .success(let value): - seal.fulfill((value, PMKAlamofireDataResponse(response))) - case .failure(let error): - seal.reject(error) - } - } - } - } - - /// Adds a handler to be called once the request has finished. - public func responseJSON(queue: DispatchQueue? = nil, options: JSONSerialization.ReadingOptions = .allowFragments) -> Promise<(json: Any, response: PMKAlamofireDataResponse)> { - return Promise { seal in - responseJSON(queue: queue, options: options) { response in - switch response.result { - case .success(let value): - seal.fulfill((value, PMKAlamofireDataResponse(response))) - case .failure(let error): - seal.reject(error) - } - } - } - } - - /// Adds a handler to be called once the request has finished. - public func responsePropertyList(queue: DispatchQueue? = nil, options: PropertyListSerialization.ReadOptions = PropertyListSerialization.ReadOptions()) -> Promise<(plist: Any, response: PMKAlamofireDataResponse)> { - return Promise { seal in - responsePropertyList(queue: queue, options: options) { response in - switch response.result { - case .success(let value): - seal.fulfill((value, PMKAlamofireDataResponse(response))) - case .failure(let error): - seal.reject(error) - } - } - } - } - -#if swift(>=3.2) - /** - Returns a Promise for a Decodable - Adds a handler to be called once the request has finished. - - - Parameter queue: DispatchQueue, by default nil - - Parameter decoder: JSONDecoder, by default JSONDecoder() - */ - public func responseDecodable(queue: DispatchQueue? = nil, decoder: JSONDecoder = JSONDecoder()) -> Promise { - return Promise { seal in - responseData(queue: queue) { response in - switch response.result { - case .success(let value): - do { - seal.fulfill(try decoder.decode(T.self, from: value)) - } catch { - seal.reject(error) - } - case .failure(let error): - seal.reject(error) - } - } - } - } - - /** - Returns a Promise for a Decodable - Adds a handler to be called once the request has finished. - - - Parameter queue: DispatchQueue, by default nil - - Parameter decoder: JSONDecoder, by default JSONDecoder() - */ - public func responseDecodable(_ type: T.Type, queue: DispatchQueue? = nil, decoder: JSONDecoder = JSONDecoder()) -> Promise { - return Promise { seal in - responseData(queue: queue) { response in - switch response.result { - case .success(let value): - do { - seal.fulfill(try decoder.decode(type, from: value)) - } catch { - seal.reject(error) - } - case .failure(let error): - seal.reject(error) - } - } - } - } -#endif -} - -extension Alamofire.DownloadRequest { - public func response(_: PMKNamespacer, queue: DispatchQueue? = nil) -> Promise { - return Promise { seal in - response(queue: queue) { response in - if let error = response.error { - seal.reject(error) - } else { - seal.fulfill(response) - } - } - } - } - - /// Adds a handler to be called once the request has finished. - public func responseData(queue: DispatchQueue? = nil) -> Promise> { - return Promise { seal in - responseData(queue: queue) { response in - switch response.result { - case .success: - seal.fulfill(response) - case .failure(let error): - seal.reject(error) - } - } - } - } -} - - -/// Alamofire.DataResponse, but without the `result`, since the Promise represents the `Result` -public struct PMKAlamofireDataResponse { - public init(_ rawrsp: Alamofire.DataResponse) { - request = rawrsp.request - response = rawrsp.response - data = rawrsp.data - timeline = rawrsp.timeline - } - - /// The URL request sent to the server. - public let request: URLRequest? - - /// The server's response to the URL request. - public let response: HTTPURLResponse? - - /// The data returned by the server. - public let data: Data? - - /// The timeline of the complete lifecycle of the request. - public let timeline: Timeline -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/Tests/TestAlamofire.swift b/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/Tests/TestAlamofire.swift deleted file mode 100644 index 043ee8a7a..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Alamofire/Tests/TestAlamofire.swift +++ /dev/null @@ -1,74 +0,0 @@ -import PMKAlamofire -import OHHTTPStubs -import PromiseKit -import XCTest - -class AlamofireTests: XCTestCase { - func test() { - let json: NSDictionary = ["key1": "value1", "key2": ["value2A", "value2B"]] - - OHHTTPStubs.stubRequests(passingTest: { $0.url!.host == "example.com" }) { _ in - return OHHTTPStubsResponse(jsonObject: json, statusCode: 200, headers: nil) - } - - let ex = expectation(description: "") - - let rq = Alamofire.request("http://example.com", method: .get).responseJSON().done { rsp in - XCTAssertEqual(json, rsp.json as? NSDictionary) - ex.fulfill() - } - waitForExpectations(timeout: 1) - } - - override func tearDown() { - OHHTTPStubs.removeAllStubs() - } - -#if swift(>=3.2) - private struct Fixture: Decodable { - let key1: String - let key2: [String] - } - - func testDecodable1() { - - func getFixture() -> Promise { - return Alamofire.request("http://example.com", method: .get).responseDecodable(queue: nil) - } - - let json: NSDictionary = ["key1": "value1", "key2": ["value2A", "value2B"]] - - OHHTTPStubs.stubRequests(passingTest: { $0.url!.host == "example.com" }) { _ in - return OHHTTPStubsResponse(jsonObject: json, statusCode: 200, headers: nil) - } - - let ex = expectation(description: "") - - getFixture().done { fixture in - XCTAssert(fixture.key1 == "value1", "Value1 found") - ex.fulfill() - } - waitForExpectations(timeout: 1) - - } - - func testDecodable2() { - let json: NSDictionary = ["key1": "value1", "key2": ["value2A", "value2B"]] - - OHHTTPStubs.stubRequests(passingTest: { $0.url!.host == "example.com" }) { _ in - return OHHTTPStubsResponse(jsonObject: json, statusCode: 200, headers: nil) - } - - let ex = expectation(description: "") - - firstly { - Alamofire.request("http://example.com", method: .get).responseDecodable(Fixture.self) - }.done { fixture in - XCTAssert(fixture.key1 == "value1", "Value1 found") - ex.fulfill() - } - waitForExpectations(timeout: 1) - - } -#endif -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/.gitignore b/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/.gitignore deleted file mode 100644 index bec9c1741..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.xcodeproj/**/xcuserdata/ -*.xcscmblueprint -/Carthage -/.build -.DS_Store \ No newline at end of file diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/.travis.yml b/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/.travis.yml deleted file mode 100644 index af7371dd4..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/.travis.yml +++ /dev/null @@ -1,79 +0,0 @@ -os: osx -language: swift -osx_image: xcode10.2 - -branches: - only: - - master -stages: - - lint - - carthage - - test -jobs: - include: - - &pod - stage: lint - osx_image: xcode8.3 - env: SWIFT=3.1 - before_install: - gem install cocoapods --prerelease --version 1.7.0.beta.3 - install: - carthage bootstrap --no-build PromiseKit - script: | - cd Carthage/Checkouts/PromiseKit - mv .github/PromiseKit.podspec . - rm -rf Extensions/AssetsLibrary/Sources - cp -R ../../../Sources Extensions/AssetsLibrary - pod lib lint --subspec=PromiseKit/AssetsLibrary --fail-fast --swift-version=$SWIFT - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=3.2 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=3.3 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=3.4 - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=4.0 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=4.1 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=4.2 - - <<: *pod - osx_image: xcode10.2 - env: SWIFT=4.3 - - <<: *pod - osx_image: xcode10.2 - env: SWIFT=5.0 - - - &carthage - stage: carthage - osx_image: xcode9.2 - script: | - carthage bootstrap --cache-builds --platform iOS - sed -i '' "s/SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;/SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;/" *.xcodeproj/project.pbxproj - carthage build --no-skip-current - cache.directories: - - Carthage - - <<: *carthage - osx_image: xcode9.4 - - <<: *carthage - osx_image: xcode10.1 - - <<: *carthage - osx_image: xcode10.2 - - # 9.4 is highest UI tests still pass without reworking them - - stage: test - osx_image: xcode9.4 - xcode_scheme: PMKAssetsLibrary - xcode_project: PMKAssetsLibrary.xcodeproj - xcode_destination: 'platform=iOS Simulator,OS=11.4,name=iPhone 5s' - cache: - directories: - - Carthage - before_install: - carthage bootstrap --cache-builds --no-use-binaries --platform iOS diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/Cartfile b/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/Cartfile deleted file mode 100644 index d4703e986..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" ~> 6.8.4 diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/Cartfile.resolved b/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/Cartfile.resolved deleted file mode 100644 index f54bbdbf2..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/Cartfile.resolved +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" "6.8.4" diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/Carthage.xcconfig b/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/Carthage.xcconfig deleted file mode 100644 index c8b995651..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/Carthage.xcconfig +++ /dev/null @@ -1,7 +0,0 @@ -// Created by Kevin Ballard on 12/14/15. -// Copyright © 2015 Postmates. All rights reserved. - -FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(SRCROOT)/Carthage/Build/Mac/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=iphone*] = $(SRCROOT)/Carthage/Build/iOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=watch*] = $(SRCROOT)/Carthage/Build/watchOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=appletv*] = $(SRCROOT)/Carthage/Build/tvOS/ $(inherited) diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/Info.plist b/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/Info.plist deleted file mode 100644 index 34dfbc3ce..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - $(BUNDLE_PACKAGE_TYPE) - CFBundleShortVersionString - 1.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/LICENSE b/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/LICENSE deleted file mode 100644 index 50f758c89..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2016-present, Max Howell; mxcl@me.com - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/PMKAssetsLibrary.xcodeproj/project.pbxproj b/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/PMKAssetsLibrary.xcodeproj/project.pbxproj deleted file mode 100644 index 4a5ef108a..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/PMKAssetsLibrary.xcodeproj/project.pbxproj +++ /dev/null @@ -1,601 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 6362F8521D5DA15A0021D2DD /* app.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6362F8501D5DA15A0021D2DD /* app.swift */; }; - 6362F8531D5DA15A0021D2DD /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6362F8511D5DA15A0021D2DD /* Default-568h@2x.png */; }; - 6362F8541D5DA16A0021D2DD /* TestUIImagePickerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 637E2C8E1D5C2E720043E370 /* TestUIImagePickerController.swift */; }; - 6362F8561D5DA1750021D2DD /* ALAssetsLibrary+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6362F8551D5DA1750021D2DD /* ALAssetsLibrary+Promise.swift */; }; - 63C9C45E1D5D341600101ECE /* PMKAssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C7FFA71D5BEE09003BAE60 /* PMKAssetsLibrary.framework */; }; - 63C9C45F1D5D341600101ECE /* PMKAssetsLibrary.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 63C7FFA71D5BEE09003BAE60 /* PMKAssetsLibrary.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 63C9C4591D5D33A900101ECE /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 63C7FF9E1D5BEE09003BAE60 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 63C9C4441D5D334700101ECE; - remoteInfo = PMKTestsHost; - }; - 63C9C4601D5D341600101ECE /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 63C7FF9E1D5BEE09003BAE60 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 63C7FFA61D5BEE09003BAE60; - remoteInfo = PMKAssetsLibrary; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 63C9C4621D5D341600101ECE /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - 63C9C45F1D5D341600101ECE /* PMKAssetsLibrary.framework in Embed Frameworks */, - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 630B2E131D5D0AF500DC10E9 /* PMKALTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PMKALTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 6362F8501D5DA15A0021D2DD /* app.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = app.swift; path = Tests/app.swift; sourceTree = ""; }; - 6362F8511D5DA15A0021D2DD /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-568h@2x.png"; path = "Tests/Default-568h@2x.png"; sourceTree = ""; }; - 6362F8551D5DA1750021D2DD /* ALAssetsLibrary+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "ALAssetsLibrary+Promise.swift"; path = "Sources/ALAssetsLibrary+Promise.swift"; sourceTree = SOURCE_ROOT; }; - 637E2C8E1D5C2E720043E370 /* TestUIImagePickerController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TestUIImagePickerController.swift; path = Tests/TestUIImagePickerController.swift; sourceTree = SOURCE_ROOT; }; - 63C700091D5C0253003BAE60 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 63C7FFA71D5BEE09003BAE60 /* PMKAssetsLibrary.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PMKAssetsLibrary.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 63C9C4451D5D334700101ECE /* PMKALTestsHost.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PMKALTestsHost.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 63CCF8121D5C0C4E00503216 /* Cartfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile; sourceTree = ""; }; - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Carthage.xcconfig; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 630B2E0D1D5D0AF500DC10E9 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFA31D5BEE09003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C9C4421D5D334700101ECE /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 63C9C45E1D5D341600101ECE /* PMKAssetsLibrary.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 630B2DF31D5D0ABF00DC10E9 /* TestsHost */ = { - isa = PBXGroup; - children = ( - 6362F8501D5DA15A0021D2DD /* app.swift */, - 6362F8511D5DA15A0021D2DD /* Default-568h@2x.png */, - ); - name = TestsHost; - sourceTree = ""; - }; - 63C7FF9D1D5BEE09003BAE60 = { - isa = PBXGroup; - children = ( - 63C700091D5C0253003BAE60 /* Info.plist */, - 63CCF8121D5C0C4E00503216 /* Cartfile */, - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */, - 63C7FFA91D5BEE09003BAE60 /* Sources */, - 63C7FFF31D5C020D003BAE60 /* Tests */, - 630B2DF31D5D0ABF00DC10E9 /* TestsHost */, - 63C7FFA81D5BEE09003BAE60 /* Products */, - ); - sourceTree = ""; - }; - 63C7FFA81D5BEE09003BAE60 /* Products */ = { - isa = PBXGroup; - children = ( - 63C7FFA71D5BEE09003BAE60 /* PMKAssetsLibrary.framework */, - 630B2E131D5D0AF500DC10E9 /* PMKALTests.xctest */, - 63C9C4451D5D334700101ECE /* PMKALTestsHost.app */, - ); - name = Products; - sourceTree = ""; - }; - 63C7FFA91D5BEE09003BAE60 /* Sources */ = { - isa = PBXGroup; - children = ( - 6362F8551D5DA1750021D2DD /* ALAssetsLibrary+Promise.swift */, - ); - path = Sources; - sourceTree = SOURCE_ROOT; - }; - 63C7FFF31D5C020D003BAE60 /* Tests */ = { - isa = PBXGroup; - children = ( - 637E2C8E1D5C2E720043E370 /* TestUIImagePickerController.swift */, - ); - path = Tests; - sourceTree = SOURCE_ROOT; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 63C7FFA41D5BEE09003BAE60 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 630B2DFF1D5D0AF500DC10E9 /* PMKALTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 630B2E101D5D0AF500DC10E9 /* Build configuration list for PBXNativeTarget "PMKALTests" */; - buildPhases = ( - 630B2E041D5D0AF500DC10E9 /* Sources */, - 630B2E0D1D5D0AF500DC10E9 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 63C9C45A1D5D33A900101ECE /* PBXTargetDependency */, - ); - name = PMKALTests; - productName = PMKALTests; - productReference = 630B2E131D5D0AF500DC10E9 /* PMKALTests.xctest */; - productType = "com.apple.product-type.bundle.ui-testing"; - }; - 63C7FFA61D5BEE09003BAE60 /* PMKAssetsLibrary */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKAssetsLibrary" */; - buildPhases = ( - 63C7FFA21D5BEE09003BAE60 /* Sources */, - 63C7FFA31D5BEE09003BAE60 /* Frameworks */, - 63C7FFA41D5BEE09003BAE60 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PMKAssetsLibrary; - productName = PMKAssetsLibrary; - productReference = 63C7FFA71D5BEE09003BAE60 /* PMKAssetsLibrary.framework */; - productType = "com.apple.product-type.framework"; - }; - 63C9C4441D5D334700101ECE /* PMKALTestsHost */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C9C4541D5D334800101ECE /* Build configuration list for PBXNativeTarget "PMKALTestsHost" */; - buildPhases = ( - 63C9C4411D5D334700101ECE /* Sources */, - 63C9C4421D5D334700101ECE /* Frameworks */, - 63C9C4431D5D334700101ECE /* Resources */, - 63C9C45D1D5D33E700101ECE /* Embed Carthage Frameworks */, - 63C9C4621D5D341600101ECE /* Embed Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 63C9C4611D5D341600101ECE /* PBXTargetDependency */, - ); - name = PMKALTestsHost; - productName = PMKTestsHost; - productReference = 63C9C4451D5D334700101ECE /* PMKALTestsHost.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 63C7FF9E1D5BEE09003BAE60 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = "Max Howell"; - TargetAttributes = { - 630B2DFF1D5D0AF500DC10E9 = { - LastSwiftMigration = 1020; - TestTargetID = 63C9C4441D5D334700101ECE; - }; - 63C7FFA61D5BEE09003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - 63C9C4441D5D334700101ECE = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKAssetsLibrary" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 63C7FF9D1D5BEE09003BAE60; - productRefGroup = 63C7FFA81D5BEE09003BAE60 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 63C7FFA61D5BEE09003BAE60 /* PMKAssetsLibrary */, - 63C9C4441D5D334700101ECE /* PMKALTestsHost */, - 630B2DFF1D5D0AF500DC10E9 /* PMKALTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 63C9C4431D5D334700101ECE /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6362F8531D5DA15A0021D2DD /* Default-568h@2x.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 63C9C45D1D5D33E700101ECE /* Embed Carthage Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - PromiseKit, - ); - name = "Embed Carthage Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "case \"$PLATFORM_NAME\" in\nmacosx) plat=Mac;;\niphone*) plat=iOS;;\nwatch*) plat=watchOS;;\nappletv*) plat=tvOS;;\n*) echo \"error: Unknown PLATFORM_NAME: $PLATFORM_NAME\"; exit 1;;\nesac\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nframework=$(basename \"${!VAR}\")\nexport SCRIPT_INPUT_FILE_$n=\"$SRCROOT\"/Carthage/Build/$plat/\"$framework\".framework\ndone\n\n/usr/local/bin/carthage copy-frameworks || exit\n\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nsource=${!VAR}.dSYM\ndest=${BUILT_PRODUCTS_DIR}/$(basename \"$source\")\nditto \"$source\" \"$dest\" || exit\ndone"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 630B2E041D5D0AF500DC10E9 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6362F8541D5DA16A0021D2DD /* TestUIImagePickerController.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFA21D5BEE09003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6362F8561D5DA1750021D2DD /* ALAssetsLibrary+Promise.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C9C4411D5D334700101ECE /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6362F8521D5DA15A0021D2DD /* app.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 63C9C45A1D5D33A900101ECE /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 63C9C4441D5D334700101ECE /* PMKALTestsHost */; - targetProxy = 63C9C4591D5D33A900101ECE /* PBXContainerItemProxy */; - }; - 63C9C4611D5D341600101ECE /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 63C7FFA61D5BEE09003BAE60 /* PMKAssetsLibrary */; - targetProxy = 63C9C4601D5D341600101ECE /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 630B2E111D5D0AF500DC10E9 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_PACKAGE_TYPE = BNDL; - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.tests.ui.UIKit; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE = ""; - SWIFT_INSTALL_OBJC_HEADER = NO; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SUPPRESS_WARNINGS = YES; - SWIFT_VERSION = 4.0; - TEST_TARGET_NAME = PMKALTestsHost; - }; - name = Debug; - }; - 630B2E121D5D0AF500DC10E9 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_PACKAGE_TYPE = BNDL; - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.tests.ui.UIKit; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE = ""; - SWIFT_INSTALL_OBJC_HEADER = NO; - SWIFT_SUPPRESS_WARNINGS = YES; - SWIFT_VERSION = 4.0; - TEST_TARGET_NAME = PMKALTestsHost; - }; - name = Release; - }; - 63C7FFAD1D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - BUNDLE_PACKAGE_TYPE = FMWK; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.UIKit; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Debug; - }; - 63C7FFAE1D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - BUNDLE_PACKAGE_TYPE = FMWK; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.UIKit; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Release; - }; - 63C7FFB01D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 63C7FFB11D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; - 63C9C4551D5D334800101ECE /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_PACKAGE_TYPE = APPL; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Tests/Entitlements.plist; - COPY_PHASE_STRIP = NO; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.tests.host.UIKit; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_INSTALL_OBJC_HEADER = NO; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - }; - name = Debug; - }; - 63C9C4561D5D334800101ECE /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_PACKAGE_TYPE = APPL; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Tests/Entitlements.plist; - COPY_PHASE_STRIP = NO; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.tests.host.UIKit; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_INSTALL_OBJC_HEADER = NO; - SWIFT_VERSION = 4.0; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 630B2E101D5D0AF500DC10E9 /* Build configuration list for PBXNativeTarget "PMKALTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 630B2E111D5D0AF500DC10E9 /* Debug */, - 630B2E121D5D0AF500DC10E9 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKAssetsLibrary" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFAD1D5BEE09003BAE60 /* Debug */, - 63C7FFAE1D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKAssetsLibrary" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFB01D5BEE09003BAE60 /* Debug */, - 63C7FFB11D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C9C4541D5D334800101ECE /* Build configuration list for PBXNativeTarget "PMKALTestsHost" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C9C4551D5D334800101ECE /* Debug */, - 63C9C4561D5D334800101ECE /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 63C7FF9E1D5BEE09003BAE60 /* Project object */; -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/PMKAssetsLibrary.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/PMKAssetsLibrary.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index b49fefe7f..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/PMKAssetsLibrary.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/PMKAssetsLibrary.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/PMKAssetsLibrary.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/PMKAssetsLibrary.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/PMKAssetsLibrary.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/PMKAssetsLibrary.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index 08de0be8d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/PMKAssetsLibrary.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/PMKAssetsLibrary.xcodeproj/xcshareddata/xcschemes/PMKAssetsLibrary.xcscheme b/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/PMKAssetsLibrary.xcodeproj/xcshareddata/xcschemes/PMKAssetsLibrary.xcscheme deleted file mode 100644 index 456af2ffa..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/PMKAssetsLibrary.xcodeproj/xcshareddata/xcschemes/PMKAssetsLibrary.xcscheme +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/README.markdown b/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/README.markdown deleted file mode 100644 index 1c2f7d206..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/README.markdown +++ /dev/null @@ -1,34 +0,0 @@ -# PromiseKit AssetsLibrary Extensions ![Build Status] - -This project adds promises to Apple’s AssetsLibrary framework. - -## CococaPods - -```ruby -pod "PromiseKit/AssetsLibrary" ~> 6.0 -``` - -The extensions are built into `PromiseKit.framework` thus nothing else is needed. - -## Carthage - -```ruby -github "PromiseKit/AssetsLibrary" ~> 3.0 -``` - -The extensions are built into their own framework: - -```swift -// swift -import PromiseKit -import PMKAssetsLibrary -``` - -```objc -// objc -@import PromiseKit; -@import PMKAssetsLibrary; -``` - - -[Build Status]: https://travis-ci.org/PromiseKit/AssetsLibrary.svg?branch=master diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/Sources/ALAssetsLibrary+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/Sources/ALAssetsLibrary+Promise.swift deleted file mode 100644 index 27cf85d4e..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/Sources/ALAssetsLibrary+Promise.swift +++ /dev/null @@ -1,100 +0,0 @@ -import UIKit.UIViewController -import Foundation.NSData -import AssetsLibrary -#if !PMKCocoaPods -import PromiseKit -#endif - -/** - To import this `UIViewController` extension: - - use_frameworks! - pod "PromiseKit/AssetsLibrary" - - And then in your sources: - - import PromiseKit -*/ -extension UIViewController { - /** - - Returns: A promise that presents the provided UIImagePickerController and fulfills with the user selected media’s `NSData`. - */ - public func promise(_ vc: UIImagePickerController, animated: Bool = false, completion: (() -> Void)? = nil) -> Promise { - let proxy = UIImagePickerControllerProxy() - vc.delegate = proxy - - present(vc, animated: animated, completion: completion) - - return proxy.promise.then(on: nil) { info -> Promise in - #if swift(>=4.2) - let url = info[.referenceURL] as! URL - #else - let url = info[UIImagePickerControllerReferenceURL] as! URL - #endif - - return Promise { seal in - ALAssetsLibrary().asset(for: url, resultBlock: { asset in - let N = Int(asset!.defaultRepresentation().size()) - let bytes = UnsafeMutablePointer.allocate(capacity: N) - var error: NSError? - asset!.defaultRepresentation().getBytes(bytes, fromOffset: 0, length: N, error: &error) - - if let error = error { - seal.reject(error) - } else { - seal.fulfill(NSData(bytesNoCopy: bytes, length: N)) - } - }, failureBlock: { seal.reject($0!) } ) - } - }.ensure { - self.dismiss(animated: animated, completion: nil) - } - } -} - -@objc private class UIImagePickerControllerProxy: NSObject, UIImagePickerControllerDelegate, UINavigationControllerDelegate { -#if swift(>=4.2) - let (promise, seal) = Promise<[UIImagePickerController.InfoKey: Any]>.pending() -#else - let (promise, seal) = Promise<[String: Any]>.pending() -#endif - var retainCycle: AnyObject? - - required override init() { - super.init() - retainCycle = self - } - -#if swift(>=4.2) - func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey: Any]) { - seal.fulfill(info) - retainCycle = nil - } -#else - func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) { - seal.fulfill(info) - retainCycle = nil - } -#endif - - func imagePickerControllerDidCancel(_ picker: UIImagePickerController) { - seal.reject(UIImagePickerController.PMKError.cancelled) - retainCycle = nil - } -} - - -extension UIImagePickerController { - /// Errors representing PromiseKit UIImagePickerController failures - public enum PMKError: CancellableError { - /// The user cancelled the UIImagePickerController. - case cancelled - /// - Returns: true - public var isCancelled: Bool { - switch self { - case .cancelled: - return true - } - } - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/Tests/Default-568h@2x.png b/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/Tests/Default-568h@2x.png deleted file mode 100644 index 42d3f4250..000000000 Binary files a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/Tests/Default-568h@2x.png and /dev/null differ diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/Tests/Entitlements.plist b/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/Tests/Entitlements.plist deleted file mode 100644 index 76a15bb46..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/Tests/Entitlements.plist +++ /dev/null @@ -1,12 +0,0 @@ - - - - - com.apple.private.tcc.allow - - kTCCServiceAddressBook - kTCCServiceCalendar - kTCCServicePhotos - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/Tests/TestUIImagePickerController.swift b/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/Tests/TestUIImagePickerController.swift deleted file mode 100644 index 67b968148..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/Tests/TestUIImagePickerController.swift +++ /dev/null @@ -1,30 +0,0 @@ -import XCTest - -class UIImagePickerControllerTests: XCTestCase { - func test_fulfills_with_data() { - let app = XCUIApplication() - let tablesQuery = app.tables - tablesQuery.staticTexts["1"].tap() - tablesQuery.children(matching: .cell).element(boundBy: 1).tap() - app.collectionViews.children(matching: .cell).element(boundBy: 0).tap() - - XCTAssertTrue(value) - } - - var toggle: XCUIElement { - // calling this ensures that any other ViewController has dismissed - // as a side-effect since otherwise the switch won't be found - return XCUIApplication().tables.switches.element - } - - var value: Bool { - return (toggle.value as! String) == "1" - } - - override func setUp() { - super.setUp() - continueAfterFailure = false - XCUIApplication().launch() - XCTAssertFalse(value) - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/Tests/app.swift b/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/Tests/app.swift deleted file mode 100644 index 65efc863b..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/AssetsLibrary/Tests/app.swift +++ /dev/null @@ -1,39 +0,0 @@ -import PMKAssetsLibrary -import AssetsLibrary -import PromiseKit -import UIKit - -@UIApplicationMain -class App: UITableViewController, UIApplicationDelegate { - - var window: UIWindow? = UIWindow(frame: UIScreen.main.bounds) - let testSuceededSwitch = UISwitch() - - func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool { - window!.rootViewController = self - window!.backgroundColor = UIColor.purple - window!.makeKeyAndVisible() - UIView.setAnimationsEnabled(false) - return true - } - - override func viewDidLoad() { - view.addSubview(testSuceededSwitch) - } - - override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - return 1 - } - - override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - let cell = UITableViewCell() - cell.textLabel?.text = "1" - return cell - } - - override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { - _ = promise(UIImagePickerController()).done { (data: NSData) in - self.testSuceededSwitch.isOn = true - } - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Bolts/.gitignore b/Carthage/Checkouts/PromiseKit/Extensions/Bolts/.gitignore deleted file mode 100644 index bec9c1741..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Bolts/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.xcodeproj/**/xcuserdata/ -*.xcscmblueprint -/Carthage -/.build -.DS_Store \ No newline at end of file diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Bolts/.travis.yml b/Carthage/Checkouts/PromiseKit/Extensions/Bolts/.travis.yml deleted file mode 100644 index 3e63baa79..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Bolts/.travis.yml +++ /dev/null @@ -1,88 +0,0 @@ -os: osx -language: swift -osx_image: xcode10.2 - -branches: - only: - - master -stages: - - lint - - carthage - - test -jobs: - include: - - &pod - stage: lint - osx_image: xcode8.3 - env: SWIFT=3.1 - cache: - - cocoapods - - directories: - - Carthage - before_install: - gem install cocoapods --prerelease --version 1.7.0.beta.3 - install: - carthage bootstrap --no-build PromiseKit - before_script: - pod repo update - script: | - cd Carthage/Checkouts/PromiseKit - mv .github/PromiseKit.podspec . - rm -rf Extensions/Bolts/Sources - cp -R ../../../Sources Extensions/Bolts - pod lib lint --subspec=PromiseKit/Bolts --fail-fast --swift-version=$SWIFT - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=3.2 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=3.3 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=3.4 - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=4.0 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=4.1 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=4.2 - - <<: *pod - osx_image: xcode10.2 - env: SWIFT=4.3 - - <<: *pod - osx_image: xcode10.2 - env: SWIFT=5.0 - - - &carthage - stage: carthage - osx_image: xcode9.2 - script: | - carthage bootstrap --cache-builds - sed -i '' "s/SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;/SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;/" *.xcodeproj/project.pbxproj - carthage build --no-skip-current - cache.directories: - - Carthage - - <<: *carthage - osx_image: xcode9.4 - - <<: *carthage - osx_image: xcode10.1 - - <<: *carthage - osx_image: xcode10.2 - - - &test - stage: test - osx_image: xcode10.2 - xcode_scheme: PMKBolts - xcode_project: PMKBolts.xcodeproj - xcode_destination: 'platform=macOS' - before_script: - carthage bootstrap --cache-builds - cache.directories: - - Carthage - - <<: *test - xcode_destination: 'platform=iOS Simulator,OS=12.2,name=iPhone SE' - - <<: *test - xcode_destination: 'platform=tvOS Simulator,OS=12.2,name=Apple TV' diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Bolts/Cartfile b/Carthage/Checkouts/PromiseKit/Extensions/Bolts/Cartfile deleted file mode 100644 index b751e30de..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Bolts/Cartfile +++ /dev/null @@ -1,2 +0,0 @@ -github "mxcl/PromiseKit" ~> 6.8.4 -github "BoltsFramework/Bolts-ObjC" ~> 1.9 diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Bolts/Cartfile.resolved b/Carthage/Checkouts/PromiseKit/Extensions/Bolts/Cartfile.resolved deleted file mode 100644 index 335898479..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Bolts/Cartfile.resolved +++ /dev/null @@ -1,2 +0,0 @@ -github "BoltsFramework/Bolts-ObjC" "1.9.0" -github "mxcl/PromiseKit" "6.8.4" diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Bolts/Carthage.xcconfig b/Carthage/Checkouts/PromiseKit/Extensions/Bolts/Carthage.xcconfig deleted file mode 100644 index c8b995651..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Bolts/Carthage.xcconfig +++ /dev/null @@ -1,7 +0,0 @@ -// Created by Kevin Ballard on 12/14/15. -// Copyright © 2015 Postmates. All rights reserved. - -FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(SRCROOT)/Carthage/Build/Mac/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=iphone*] = $(SRCROOT)/Carthage/Build/iOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=watch*] = $(SRCROOT)/Carthage/Build/watchOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=appletv*] = $(SRCROOT)/Carthage/Build/tvOS/ $(inherited) diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Bolts/Info.plist b/Carthage/Checkouts/PromiseKit/Extensions/Bolts/Info.plist deleted file mode 100644 index fbe1e6b31..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Bolts/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Bolts/LICENSE b/Carthage/Checkouts/PromiseKit/Extensions/Bolts/LICENSE deleted file mode 100644 index 50f758c89..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Bolts/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2016-present, Max Howell; mxcl@me.com - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Bolts/PMKBolts.xcodeproj/project.pbxproj b/Carthage/Checkouts/PromiseKit/Extensions/Bolts/PMKBolts.xcodeproj/project.pbxproj deleted file mode 100644 index a36379a69..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Bolts/PMKBolts.xcodeproj/project.pbxproj +++ /dev/null @@ -1,430 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 63C7FFF71D5C020D003BAE60 /* PMKBolts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C7FFA71D5BEE09003BAE60 /* PMKBolts.framework */; }; - 63FE02391D5D5CA800522465 /* BFTask+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63FE02381D5D5CA800522465 /* BFTask+Promise.swift */; }; - 63FE023B1D5D5CB300522465 /* TestBolts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63FE023A1D5D5CB300522465 /* TestBolts.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 63C7FF9E1D5BEE09003BAE60 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 63C7FFA61D5BEE09003BAE60; - remoteInfo = PMKBolts; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 63C700091D5C0253003BAE60 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 63C7FFA71D5BEE09003BAE60 /* PMKBolts.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PMKBolts.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 63C7FFF21D5C020D003BAE60 /* PMKBoltsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PMKBoltsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 63CCF8121D5C0C4E00503216 /* Cartfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile; sourceTree = ""; }; - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Carthage.xcconfig; sourceTree = ""; }; - 63FE02381D5D5CA800522465 /* BFTask+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "BFTask+Promise.swift"; path = "Sources/BFTask+Promise.swift"; sourceTree = SOURCE_ROOT; }; - 63FE023A1D5D5CB300522465 /* TestBolts.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TestBolts.swift; path = Tests/TestBolts.swift; sourceTree = SOURCE_ROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 63C7FFEF1D5C020D003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 63C7FFF71D5C020D003BAE60 /* PMKBolts.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 63C7FF9D1D5BEE09003BAE60 = { - isa = PBXGroup; - children = ( - 63C700091D5C0253003BAE60 /* Info.plist */, - 63CCF8121D5C0C4E00503216 /* Cartfile */, - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */, - 63C7FFA91D5BEE09003BAE60 /* Sources */, - 63C7FFF31D5C020D003BAE60 /* Tests */, - 63C7FFA81D5BEE09003BAE60 /* Products */, - ); - sourceTree = ""; - }; - 63C7FFA81D5BEE09003BAE60 /* Products */ = { - isa = PBXGroup; - children = ( - 63C7FFA71D5BEE09003BAE60 /* PMKBolts.framework */, - 63C7FFF21D5C020D003BAE60 /* PMKBoltsTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 63C7FFA91D5BEE09003BAE60 /* Sources */ = { - isa = PBXGroup; - children = ( - 63FE02381D5D5CA800522465 /* BFTask+Promise.swift */, - ); - path = Sources; - sourceTree = ""; - }; - 63C7FFF31D5C020D003BAE60 /* Tests */ = { - isa = PBXGroup; - children = ( - 63FE023A1D5D5CB300522465 /* TestBolts.swift */, - ); - path = Tests; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 63C7FFA61D5BEE09003BAE60 /* PMKBolts */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKBolts" */; - buildPhases = ( - 63C7FFA21D5BEE09003BAE60 /* Sources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PMKBolts; - productName = "PMK+UIKit"; - productReference = 63C7FFA71D5BEE09003BAE60 /* PMKBolts.framework */; - productType = "com.apple.product-type.framework"; - }; - 63C7FFF11D5C020D003BAE60 /* PMKBoltsTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKBoltsTests" */; - buildPhases = ( - 63C7FFEE1D5C020D003BAE60 /* Sources */, - 63C7FFEF1D5C020D003BAE60 /* Frameworks */, - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */, - ); - name = PMKBoltsTests; - productName = PMKTests/NS; - productReference = 63C7FFF21D5C020D003BAE60 /* PMKBoltsTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 63C7FF9E1D5BEE09003BAE60 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = "Max Howell"; - TargetAttributes = { - 63C7FFA61D5BEE09003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - 63C7FFF11D5C020D003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKBolts" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 63C7FF9D1D5BEE09003BAE60; - productRefGroup = 63C7FFA81D5BEE09003BAE60 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 63C7FFA61D5BEE09003BAE60 /* PMKBolts */, - 63C7FFF11D5C020D003BAE60 /* PMKBoltsTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXShellScriptBuildPhase section */ - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - PromiseKit, - Bolts, - ); - name = "Embed Carthage Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "case \"$PLATFORM_NAME\" in\nmacosx) plat=Mac;;\niphone*) plat=iOS;;\nwatch*) plat=watchOS;;\nappletv*) plat=tvOS;;\n*) echo \"error: Unknown PLATFORM_NAME: $PLATFORM_NAME\"; exit 1;;\nesac\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nframework=$(basename \"${!VAR}\")\nexport SCRIPT_INPUT_FILE_$n=\"$SRCROOT\"/Carthage/Build/$plat/\"$framework\".framework\ndone\n\n/usr/local/bin/carthage copy-frameworks || exit\n\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nsource=${!VAR}.dSYM\ndest=${BUILT_PRODUCTS_DIR}/$(basename \"$source\")\nditto \"$source\" \"$dest\" || exit\ndone"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 63C7FFA21D5BEE09003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63FE02391D5D5CA800522465 /* BFTask+Promise.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEE1D5C020D003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63FE023B1D5D5CB300522465 /* TestBolts.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 63C7FFA61D5BEE09003BAE60 /* PMKBolts */; - targetProxy = 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 63C7FFAD1D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.Bolts; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos watchsimulator watchos macosx appletvsimulator appletvos"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Debug; - }; - 63C7FFAE1D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.Bolts; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos watchsimulator watchos macosx appletvsimulator appletvos"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Release; - }; - 63C7FFB01D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Debug; - }; - 63C7FFB11D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Release; - }; - 63C7FFFB1D5C020D003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SUPPRESS_WARNINGS = YES; - }; - name = Debug; - }; - 63C7FFFC1D5C020D003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SUPPRESS_WARNINGS = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKBolts" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFAD1D5BEE09003BAE60 /* Debug */, - 63C7FFAE1D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKBolts" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFB01D5BEE09003BAE60 /* Debug */, - 63C7FFB11D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKBoltsTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFFB1D5C020D003BAE60 /* Debug */, - 63C7FFFC1D5C020D003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 63C7FF9E1D5BEE09003BAE60 /* Project object */; -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Bolts/PMKBolts.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Carthage/Checkouts/PromiseKit/Extensions/Bolts/PMKBolts.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index b49fefe7f..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Bolts/PMKBolts.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Bolts/PMKBolts.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Carthage/Checkouts/PromiseKit/Extensions/Bolts/PMKBolts.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Bolts/PMKBolts.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Bolts/PMKBolts.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Carthage/Checkouts/PromiseKit/Extensions/Bolts/PMKBolts.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index 08de0be8d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Bolts/PMKBolts.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Bolts/PMKBolts.xcodeproj/xcshareddata/xcschemes/PMKBolts.xcscheme b/Carthage/Checkouts/PromiseKit/Extensions/Bolts/PMKBolts.xcodeproj/xcshareddata/xcschemes/PMKBolts.xcscheme deleted file mode 100644 index e80c26d67..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Bolts/PMKBolts.xcodeproj/xcshareddata/xcschemes/PMKBolts.xcscheme +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Bolts/README.markdown b/Carthage/Checkouts/PromiseKit/Extensions/Bolts/README.markdown deleted file mode 100644 index 5d59ab5bc..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Bolts/README.markdown +++ /dev/null @@ -1,47 +0,0 @@ -# PromiseKit Bolts Extensions ![Build Status] - -This project adds promises to Facebook’s [Bolts] framework. - -Bolts underlies the entire Facbook SDK. - -## Usage - -```swift -someBoltsTask().then { anyObject in - //… -} -``` - -## CocoaPods - -```ruby -pod "PromiseKit/Bolts" ~> 6.0 -``` - -The extensions are built into `PromiseKit.framework` thus nothing else is needed. - -## Carthage - -```ruby -github "PromiseKit/Bolts" ~> 3.0 -``` - -The extensions are built into their own framework: - -```swift -// swift -import PromiseKit -import PMKBolts -``` - -```objc -// objc -@import PromiseKit; -@import PMKBolts; -``` - - -[Bolts]: https://github.com/BoltsFramework - - -[Build Status]: https://travis-ci.org/PromiseKit/Bolts.svg?branch=master diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Bolts/Sources/BFTask+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/Bolts/Sources/BFTask+Promise.swift deleted file mode 100644 index de786558e..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Bolts/Sources/BFTask+Promise.swift +++ /dev/null @@ -1,27 +0,0 @@ -#if !PMKCocoaPods -import PromiseKit -#endif -import Bolts - -extension Promise { - /** - The provided closure is executed when this promise is resolved. - */ - public func then(on q: DispatchQueue? = conf.Q.map, body: @escaping (T) -> BFTask) -> Promise { - return then(on: q) { tee -> Promise in - let task = body(tee) - return Promise { seal in - task.continueWith(block: { task in - if task.isCompleted { - seal.fulfill(task.result) - } else if let error = task.error { - seal.reject(error) - } else { - seal.reject(PMKError.invalidCallingConvention) - } - return nil - }) - } - } - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Bolts/Tests/TestBolts.swift b/Carthage/Checkouts/PromiseKit/Extensions/Bolts/Tests/TestBolts.swift deleted file mode 100644 index 6985661ae..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Bolts/Tests/TestBolts.swift +++ /dev/null @@ -1,23 +0,0 @@ -import PromiseKit -import PMKBolts -import XCTest -import Bolts - -class TestBolts: XCTestCase { - func test() { - let ex = expectation(description: "") - - let value = { NSString(string: "1") } - - firstly { () -> Promise in - return Promise() - }.then { _ -> BFTask in - return BFTask(result: value()) - }.done { obj in - XCTAssertEqual(obj, value()) - ex.fulfill() - } - - waitForExpectations(timeout: 1) - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/.gitignore b/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/.gitignore deleted file mode 100644 index bec9c1741..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.xcodeproj/**/xcuserdata/ -*.xcscmblueprint -/Carthage -/.build -.DS_Store \ No newline at end of file diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/.travis.yml b/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/.travis.yml deleted file mode 100644 index 954c1a865..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/.travis.yml +++ /dev/null @@ -1,95 +0,0 @@ -os: osx -language: swift -osx_image: xcode10.2 - -branches: - only: - - master -stages: - - lint - - carthage - - swiftpm - - test -jobs: - include: - - &pod - stage: lint - osx_image: xcode8.3 - env: SWIFT=3.1 - os: osx - language: objective-c - before_install: - gem install cocoapods --prerelease --version 1.7.0.beta.3 - install: - carthage bootstrap --no-build PromiseKit - script: | - cd Carthage/Checkouts/PromiseKit - mv .github/PromiseKit.podspec . - rm -rf Extensions/CloudKit/Sources - cp -R ../../../Sources Extensions/CloudKit - pod lib lint --subspec=PromiseKit/CloudKit --fail-fast --swift-version=$SWIFT - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=3.2 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=3.3 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=3.4 - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=4.0 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=4.1 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=4.2 - - <<: *pod - osx_image: xcode10.2 - env: SWIFT=5.0 - - - &carthage - stage: carthage - osx_image: xcode9.2 - script: | - carthage bootstrap --cache-builds - sed -i '' "s/SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;/SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;/" *.xcodeproj/project.pbxproj - carthage build --no-skip-current - cache: - directories: - - Carthage - - <<: *carthage - osx_image: xcode9.4 - - <<: *carthage - osx_image: xcode10.1 - - <<: *carthage - osx_image: xcode10.2 - - - &swiftpm - stage: swiftpm - osx_image: xcode8.3 - script: swift build -Xswiftc -target -Xswiftc x86_64-apple-macosx10.12 - - <<: *swiftpm - osx_image: xcode9.2 - - <<: *swiftpm - osx_image: xcode9.4 - - <<: *swiftpm - osx_image: xcode10.1 - - <<: *swiftpm - osx_image: xcode10.2 - - - &test - stage: test - xcode_scheme: PMKCloudKit - xcode_project: PMKCloudKit.xcodeproj - xcode_destination: 'platform=macOS' - cache.directories: - - Carthage - before_install: - carthage bootstrap --cache-builds --no-use-binaries - - <<: *test - xcode_destination: 'platform=iOS Simulator,OS=12.2,name=iPhone SE' - - <<: *test - xcode_destination: 'platform=tvOS Simulator,OS=12.2,name=Apple TV' diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Cartfile b/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Cartfile deleted file mode 100644 index d4703e986..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" ~> 6.8.4 diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Cartfile.resolved b/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Cartfile.resolved deleted file mode 100644 index f54bbdbf2..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Cartfile.resolved +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" "6.8.4" diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Carthage.xcconfig b/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Carthage.xcconfig deleted file mode 100644 index c8b995651..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Carthage.xcconfig +++ /dev/null @@ -1,7 +0,0 @@ -// Created by Kevin Ballard on 12/14/15. -// Copyright © 2015 Postmates. All rights reserved. - -FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(SRCROOT)/Carthage/Build/Mac/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=iphone*] = $(SRCROOT)/Carthage/Build/iOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=watch*] = $(SRCROOT)/Carthage/Build/watchOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=appletv*] = $(SRCROOT)/Carthage/Build/tvOS/ $(inherited) diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Info.plist b/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Info.plist deleted file mode 100644 index fbe1e6b31..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/LICENSE b/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/LICENSE deleted file mode 100644 index 50f758c89..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2016-present, Max Howell; mxcl@me.com - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/PMKCloudKit.xcodeproj/project.pbxproj b/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/PMKCloudKit.xcodeproj/project.pbxproj deleted file mode 100644 index ca7d5653e..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/PMKCloudKit.xcodeproj/project.pbxproj +++ /dev/null @@ -1,484 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 63C7FFF71D5C020D003BAE60 /* PMKCloudKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C7FFA71D5BEE09003BAE60 /* PMKCloudKit.framework */; }; - 63F6071E1D5D48B200A11DEA /* CKContainer+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 63F607171D5D48B200A11DEA /* CKContainer+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 63F6071F1D5D48B200A11DEA /* CKContainer+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 63F607181D5D48B200A11DEA /* CKContainer+AnyPromise.m */; }; - 63F607201D5D48B200A11DEA /* CKContainer+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63F607191D5D48B200A11DEA /* CKContainer+Promise.swift */; }; - 63F607211D5D48B200A11DEA /* CKDatabase+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 63F6071A1D5D48B200A11DEA /* CKDatabase+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 63F607221D5D48B200A11DEA /* CKDatabase+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 63F6071B1D5D48B200A11DEA /* CKDatabase+AnyPromise.m */; }; - 63F607231D5D48B200A11DEA /* CKDatabase+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63F6071C1D5D48B200A11DEA /* CKDatabase+Promise.swift */; }; - 63F607241D5D48B200A11DEA /* PMKCloudKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 63F6071D1D5D48B200A11DEA /* PMKCloudKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 63F607281D5D48D600A11DEA /* TestCloudKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63F607271D5D48D600A11DEA /* TestCloudKit.swift */; }; - 63F6072C1D5D4A0200A11DEA /* infrastructure.m in Sources */ = {isa = PBXBuildFile; fileRef = 63F6072B1D5D4A0200A11DEA /* infrastructure.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 63C7FF9E1D5BEE09003BAE60 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 63C7FFA61D5BEE09003BAE60; - remoteInfo = PMKCloudKit; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 63C700091D5C0253003BAE60 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 63C7FFA71D5BEE09003BAE60 /* PMKCloudKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PMKCloudKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 63C7FFF21D5C020D003BAE60 /* PMKCKTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PMKCKTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 63CCF8121D5C0C4E00503216 /* Cartfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile; sourceTree = ""; }; - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Carthage.xcconfig; sourceTree = ""; }; - 63F607171D5D48B200A11DEA /* CKContainer+AnyPromise.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "CKContainer+AnyPromise.h"; path = "Sources/CKContainer+AnyPromise.h"; sourceTree = SOURCE_ROOT; }; - 63F607181D5D48B200A11DEA /* CKContainer+AnyPromise.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "CKContainer+AnyPromise.m"; path = "Sources/CKContainer+AnyPromise.m"; sourceTree = SOURCE_ROOT; }; - 63F607191D5D48B200A11DEA /* CKContainer+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "CKContainer+Promise.swift"; path = "Sources/CKContainer+Promise.swift"; sourceTree = SOURCE_ROOT; }; - 63F6071A1D5D48B200A11DEA /* CKDatabase+AnyPromise.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "CKDatabase+AnyPromise.h"; path = "Sources/CKDatabase+AnyPromise.h"; sourceTree = SOURCE_ROOT; }; - 63F6071B1D5D48B200A11DEA /* CKDatabase+AnyPromise.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "CKDatabase+AnyPromise.m"; path = "Sources/CKDatabase+AnyPromise.m"; sourceTree = SOURCE_ROOT; }; - 63F6071C1D5D48B200A11DEA /* CKDatabase+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "CKDatabase+Promise.swift"; path = "Sources/CKDatabase+Promise.swift"; sourceTree = SOURCE_ROOT; }; - 63F6071D1D5D48B200A11DEA /* PMKCloudKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PMKCloudKit.h; path = Sources/PMKCloudKit.h; sourceTree = SOURCE_ROOT; }; - 63F607271D5D48D600A11DEA /* TestCloudKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TestCloudKit.swift; path = Tests/TestCloudKit.swift; sourceTree = SOURCE_ROOT; }; - 63F6072A1D5D49BD00A11DEA /* infrastructure.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = infrastructure.h; path = Tests/infrastructure.h; sourceTree = SOURCE_ROOT; }; - 63F6072B1D5D4A0200A11DEA /* infrastructure.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = infrastructure.m; path = Tests/infrastructure.m; sourceTree = SOURCE_ROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 63C7FFA31D5BEE09003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEF1D5C020D003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 63C7FFF71D5C020D003BAE60 /* PMKCloudKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 63C7FF9D1D5BEE09003BAE60 = { - isa = PBXGroup; - children = ( - 63C700091D5C0253003BAE60 /* Info.plist */, - 63CCF8121D5C0C4E00503216 /* Cartfile */, - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */, - 63C7FFA91D5BEE09003BAE60 /* Sources */, - 63C7FFF31D5C020D003BAE60 /* Tests */, - 63C7FFA81D5BEE09003BAE60 /* Products */, - ); - sourceTree = ""; - }; - 63C7FFA81D5BEE09003BAE60 /* Products */ = { - isa = PBXGroup; - children = ( - 63C7FFA71D5BEE09003BAE60 /* PMKCloudKit.framework */, - 63C7FFF21D5C020D003BAE60 /* PMKCKTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 63C7FFA91D5BEE09003BAE60 /* Sources */ = { - isa = PBXGroup; - children = ( - 63F607171D5D48B200A11DEA /* CKContainer+AnyPromise.h */, - 63F607181D5D48B200A11DEA /* CKContainer+AnyPromise.m */, - 63F607191D5D48B200A11DEA /* CKContainer+Promise.swift */, - 63F6071A1D5D48B200A11DEA /* CKDatabase+AnyPromise.h */, - 63F6071B1D5D48B200A11DEA /* CKDatabase+AnyPromise.m */, - 63F6071C1D5D48B200A11DEA /* CKDatabase+Promise.swift */, - 63F6071D1D5D48B200A11DEA /* PMKCloudKit.h */, - ); - path = Sources; - sourceTree = SOURCE_ROOT; - }; - 63C7FFF31D5C020D003BAE60 /* Tests */ = { - isa = PBXGroup; - children = ( - 63F6072A1D5D49BD00A11DEA /* infrastructure.h */, - 63F6072B1D5D4A0200A11DEA /* infrastructure.m */, - 63F607271D5D48D600A11DEA /* TestCloudKit.swift */, - ); - path = Tests; - sourceTree = SOURCE_ROOT; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 63C7FFA41D5BEE09003BAE60 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 63F607241D5D48B200A11DEA /* PMKCloudKit.h in Headers */, - 63F6071E1D5D48B200A11DEA /* CKContainer+AnyPromise.h in Headers */, - 63F607211D5D48B200A11DEA /* CKDatabase+AnyPromise.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 63C7FFA61D5BEE09003BAE60 /* PMKCloudKit */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKCloudKit" */; - buildPhases = ( - 63C7FFA21D5BEE09003BAE60 /* Sources */, - 63C7FFA31D5BEE09003BAE60 /* Frameworks */, - 63C7FFA41D5BEE09003BAE60 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PMKCloudKit; - productName = "PMK+UIKit"; - productReference = 63C7FFA71D5BEE09003BAE60 /* PMKCloudKit.framework */; - productType = "com.apple.product-type.framework"; - }; - 63C7FFF11D5C020D003BAE60 /* PMKCKTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKCKTests" */; - buildPhases = ( - 63C7FFEE1D5C020D003BAE60 /* Sources */, - 63C7FFEF1D5C020D003BAE60 /* Frameworks */, - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */, - ); - name = PMKCKTests; - productName = PMKTests/NS; - productReference = 63C7FFF21D5C020D003BAE60 /* PMKCKTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 63C7FF9E1D5BEE09003BAE60 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = "Max Howell"; - TargetAttributes = { - 63C7FFA61D5BEE09003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - 63C7FFF11D5C020D003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKCloudKit" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 63C7FF9D1D5BEE09003BAE60; - productRefGroup = 63C7FFA81D5BEE09003BAE60 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 63C7FFA61D5BEE09003BAE60 /* PMKCloudKit */, - 63C7FFF11D5C020D003BAE60 /* PMKCKTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXShellScriptBuildPhase section */ - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - PromiseKit, - ); - name = "Embed Carthage Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "case \"$PLATFORM_NAME\" in\nmacosx) plat=Mac;;\niphone*) plat=iOS;;\nwatch*) plat=watchOS;;\nappletv*) plat=tvOS;;\n*) echo \"error: Unknown PLATFORM_NAME: $PLATFORM_NAME\"; exit 1;;\nesac\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nframework=$(basename \"${!VAR}\")\nexport SCRIPT_INPUT_FILE_$n=\"$SRCROOT\"/Carthage/Build/$plat/\"$framework\".framework\ndone\n\n/usr/local/bin/carthage copy-frameworks || exit\n\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nsource=${!VAR}.dSYM\ndest=${BUILT_PRODUCTS_DIR}/$(basename \"$source\")\nditto \"$source\" \"$dest\" || exit\ndone\n"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 63C7FFA21D5BEE09003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63F607231D5D48B200A11DEA /* CKDatabase+Promise.swift in Sources */, - 63F6071F1D5D48B200A11DEA /* CKContainer+AnyPromise.m in Sources */, - 63F607201D5D48B200A11DEA /* CKContainer+Promise.swift in Sources */, - 63F607221D5D48B200A11DEA /* CKDatabase+AnyPromise.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEE1D5C020D003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63F6072C1D5D4A0200A11DEA /* infrastructure.m in Sources */, - 63F607281D5D48D600A11DEA /* TestCloudKit.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 63C7FFA61D5BEE09003BAE60 /* PMKCloudKit */; - targetProxy = 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 63C7FFAD1D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - MACOSX_DEPLOYMENT_TARGET = 10.12; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.CloudKit; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos watchsimulator watchos macosx appletvsimulator appletvos"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 10.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 3.0; - }; - name = Debug; - }; - 63C7FFAE1D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - MACOSX_DEPLOYMENT_TARGET = 10.12; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.CloudKit; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos watchsimulator watchos macosx appletvsimulator appletvos"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 10.0; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 3.0; - }; - name = Release; - }; - 63C7FFB01D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Debug; - }; - 63C7FFB11D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Release; - }; - 63C7FFFB1D5C020D003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = Tests/infrastructure.h; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SUPPRESS_WARNINGS = YES; - SWIFT_VERSION = 4.0; - }; - name = Debug; - }; - 63C7FFFC1D5C020D003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = Tests/infrastructure.h; - SWIFT_SUPPRESS_WARNINGS = YES; - SWIFT_VERSION = 4.0; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKCloudKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFAD1D5BEE09003BAE60 /* Debug */, - 63C7FFAE1D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKCloudKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFB01D5BEE09003BAE60 /* Debug */, - 63C7FFB11D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKCKTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFFB1D5C020D003BAE60 /* Debug */, - 63C7FFFC1D5C020D003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 63C7FF9E1D5BEE09003BAE60 /* Project object */; -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/PMKCloudKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/PMKCloudKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index b49fefe7f..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/PMKCloudKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/PMKCloudKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/PMKCloudKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/PMKCloudKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/PMKCloudKit.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/PMKCloudKit.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index 08de0be8d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/PMKCloudKit.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/PMKCloudKit.xcodeproj/xcshareddata/xcschemes/PMKCloudKit.xcscheme b/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/PMKCloudKit.xcodeproj/xcshareddata/xcschemes/PMKCloudKit.xcscheme deleted file mode 100644 index 9eeccdc4d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/PMKCloudKit.xcodeproj/xcshareddata/xcschemes/PMKCloudKit.xcscheme +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Package.swift b/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Package.swift deleted file mode 100644 index 3db1930bc..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Package.swift +++ /dev/null @@ -1,16 +0,0 @@ -import PackageDescription - -let pkg = Package(name: "PMKCloudKit") - -pkg.dependencies = [ - .Package(url: "https://github.com/mxcl/PromiseKit.git", majorVersion: 6) -] - -pkg.exclude = [ - "Sources/CKContainer+AnyPromise.h", - "Sources/CKDatabase+AnyPromise.h", - "Sources/PMKCloudKit.h", - "Sources/CKContainer+AnyPromise.m", - "Sources/CKDatabase+AnyPromise.m", - "Tests" -] diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Package@swift-4.2.swift b/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Package@swift-4.2.swift deleted file mode 100644 index 94e11716d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Package@swift-4.2.swift +++ /dev/null @@ -1,26 +0,0 @@ -// swift-tools-version:4.2 -import PackageDescription - -let name = "PMKCloudKit" - -let pkg = Package(name: name) -pkg.products = [ - .library(name: name, targets: [name]), -] -pkg.swiftLanguageVersions = [.v3, .v4, .v4_2] -pkg.dependencies = [ - .package(url: "https://github.com/mxcl/PromiseKit.git", from: "6.0.0") -] - -let target: Target = .target(name: name) -target.path = "Sources" -target.exclude = [ - "CKContainer+AnyPromise.h", - "CKDatabase+AnyPromise.h", - "\(name).h", - "CKContainer+AnyPromise.m", - "CKDatabase+AnyPromise.m" -] -target.dependencies = ["PromiseKit"] - -pkg.targets = [target] diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Package@swift-5.0.swift b/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Package@swift-5.0.swift deleted file mode 100644 index b42b802eb..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Package@swift-5.0.swift +++ /dev/null @@ -1,30 +0,0 @@ -// swift-tools-version:5.0 -import PackageDescription - -let name = "PMKCloudKit" - -let pkg = Package(name: name) -pkg.products = [ - .library(name: name, targets: [name]), -] -pkg.swiftLanguageVersions = [.v4, .v4_2, .v5] -pkg.dependencies = [ - .package(url: "https://github.com/mxcl/PromiseKit.git", from: "6.0.0") -] - -let target: Target = .target(name: name) -target.path = "Sources" -target.exclude = [ - "CKContainer+AnyPromise.h", - "CKDatabase+AnyPromise.h", - "\(name).h", - "CKContainer+AnyPromise.m", - "CKDatabase+AnyPromise.m" -] -target.dependencies = ["PromiseKit"] - -pkg.targets = [target] - -pkg.platforms = [ - .macOS(.v10_12), .iOS(.v10), .tvOS(.v10), .watchOS(.v3) -] diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/README.markdown b/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/README.markdown deleted file mode 100644 index 1c80f7318..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/README.markdown +++ /dev/null @@ -1,34 +0,0 @@ -# PromiseKit CloudKit Extensions ![Build Status] - -This project adds promises to Apple’s CloudKit framework. - -## CocoaPods - -```ruby -pod "PromiseKit/CloudKit", ~> 6.0 -``` - -The extensions are built into `PromiseKit.framework` thus nothing else is needed. - -## Carthage - -```ruby -github "PromiseKit/CloudKit" ~> 3.0 -``` - -The extensions are built into their own framework: - -```swift -// swift -import PromiseKit -import PMKFoundation -``` - -```objc -// objc -@import PromiseKit; -@import PMKCloudKit; -``` - - -[Build Status]: https://travis-ci.org/PromiseKit/CloudKit.svg?branch=master diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Sources/CKContainer+AnyPromise.h b/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Sources/CKContainer+AnyPromise.h deleted file mode 100644 index 87e9b3de6..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Sources/CKContainer+AnyPromise.h +++ /dev/null @@ -1,79 +0,0 @@ -#import -#import - -/** - To import the `CKContainer` category: - - use_frameworks! - pod "PromiseKit/CloudKit" - - And then in your sources: - - @import PromiseKit; -*/ -@interface CKContainer (PromiseKit) - -/** - Reports whether the current user’s iCloud account can be accessed. - - @return A promise that thens the `CKAccountStatus` of this container. -*/ -- (AnyPromise *)accountStatus NS_REFINED_FOR_SWIFT; - -/** - Requests the specified permission from the user asynchronously. - - @param applicationPermission The requested permission. - - @return A promise that thens the `CKApplicationPermissionStatus` for the - requested permission. -*/ -- (AnyPromise *)requestApplicationPermission:(CKApplicationPermissions)applicationPermission NS_REFINED_FOR_SWIFT; - -/** - Checks the status of the specified permission asynchronously. - - @param applicationPermission The permission whose status you want to - check. - - @return A promise that thens the `CKApplicationPermissionStatus` for - the requested permission. -*/ -- (AnyPromise *)statusForApplicationPermission:(CKApplicationPermissions)applicationPermission NS_REFINED_FOR_SWIFT; - -#if !(TARGET_OS_TV && (TARGET_OS_EMBEDDED || TARGET_OS_SIMULATOR)) -/** - - Retrieves information about all discoverable users that are known to the - current user. - - @return A promise that thens the array of `CKDiscoveredUserInfo` objects. -*/ -#if TARGET_OS_WATCH -- (AnyPromise *)discoverAllIdentities NS_REFINED_FOR_SWIFT; -#else -- (AnyPromise *)discoverAllContactUserInfos NS_REFINED_FOR_SWIFT; -#endif -#endif - -/** - Retrieves information about a single user based on that user’s email - address or record ID. - - @param emailStringOrRecordID Either the email string or the `CKRecordID` - for the user record. - - @return A promise that thens the `CKDiscoveredUserInfo` for the - requested user record. -*/ -- (AnyPromise *)discoverUserInfo:(id)emailStringOrRecordID NS_REFINED_FOR_SWIFT; - -/** - Returns the user record associated with the current user. - - @return A promise that thens the `CKRecord` for the current user or `nil` - if there is no current user. -*/ -- (AnyPromise *)fetchUserRecordID NS_REFINED_FOR_SWIFT; - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Sources/CKContainer+AnyPromise.m b/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Sources/CKContainer+AnyPromise.m deleted file mode 100644 index 85aee8082..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Sources/CKContainer+AnyPromise.m +++ /dev/null @@ -1,71 +0,0 @@ -#import -#import "CKContainer+AnyPromise.h" - -@implementation CKContainer (PromiseKit) - -- (AnyPromise *)accountStatus { - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - [self accountStatusWithCompletionHandler:^(CKAccountStatus accountStatus, NSError *error) { - resolve(error ?: @(accountStatus)); - }]; - }]; -} - -- (AnyPromise *)requestApplicationPermission:(CKApplicationPermissions)permissions { - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - [self requestApplicationPermission:permissions completionHandler:^(CKApplicationPermissionStatus status, NSError *error) { - resolve(error ?: @(status)); - }]; - }]; -} - -- (AnyPromise *)statusForApplicationPermission:(CKApplicationPermissions)applicationPermission { - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - [self statusForApplicationPermission:applicationPermission completionHandler:^(CKApplicationPermissionStatus status, NSError *error) { - resolve(error ?: @(status)); - }]; - }]; -} - -#if !(TARGET_OS_TV && (TARGET_OS_EMBEDDED || TARGET_OS_SIMULATOR)) -#if TARGET_OS_WATCH -- (AnyPromise *)discoverAllIdentities { - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - [self discoverAllIdentitiesWithCompletionHandler:^(NSArray *userInfos, NSError *error) { - resolve(error ?: userInfos); - }]; - }]; -} -#else -- (AnyPromise *)discoverAllContactUserInfos { - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - [self discoverAllIdentitiesWithCompletionHandler:^(NSArray *userInfos, NSError *error) { - resolve(error ?: userInfos); - }]; - }]; -} -#endif -#endif - -- (AnyPromise *)discoverUserInfo:(id)input { - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - void (^adapter)(id, id) = ^(id value, id error){ - resolve(error ?: error); - }; - if ([input isKindOfClass:[CKRecordID class]]) { - [self discoverUserIdentityWithUserRecordID:input completionHandler:adapter]; - } else { - [self discoverUserIdentityWithEmailAddress:input completionHandler:adapter]; - } - }]; -} - -- (AnyPromise *)fetchUserRecordID { - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - [self fetchUserRecordIDWithCompletionHandler:^(CKRecordID *recordID, NSError *error) { - resolve(error ?: recordID); - }]; - }]; -} - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Sources/CKContainer+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Sources/CKContainer+Promise.swift deleted file mode 100644 index 42ecd984a..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Sources/CKContainer+Promise.swift +++ /dev/null @@ -1,79 +0,0 @@ -import CloudKit -#if !PMKCocoaPods -import PromiseKit -#endif - -#if swift(>=4.2) -#else -public extension CKRecord { - typealias ID = CKRecordID -} -public typealias CKContainer_Application_Permissions = CKApplicationPermissions -public typealias CKContainer_Application_PermissionStatus = CKApplicationPermissionStatus -#endif - -/** - To import the `CKContainer` category: - - use_frameworks! - pod "PromiseKit/CloudKit" - - And then in your sources: - - @import PromiseKit; -*/ -extension CKContainer { - /// Reports whether the current user’s iCloud account can be accessed. - public func accountStatus() -> Promise { - return Promise { accountStatus(completionHandler: $0.resolve) } - } - - /// Requests the specified permission from the user asynchronously. - public func requestApplicationPermission(_ applicationPermissions: CKContainer_Application_Permissions) -> Promise { - return Promise { requestApplicationPermission(applicationPermissions, completionHandler: $0.resolve) } - } - - /// Checks the status of the specified permission asynchronously. - public func status(forApplicationPermission applicationPermissions: CKContainer_Application_Permissions) -> Promise { - return Promise { status(forApplicationPermission: applicationPermissions, completionHandler: $0.resolve) } - } - -#if !os(tvOS) - /// Retrieves information about all discoverable users that are known to the current user. - @available(*, deprecated) - public func discoverAllContactUserInfos() -> Promise<[CKUserIdentity]> { - return Promise { discoverAllIdentities(completionHandler: $0.resolve) } - } - - public func discoverAllIdentities() -> Promise<[CKUserIdentity]> { - return Promise { discoverAllIdentities(completionHandler: $0.resolve) } - } -#endif - - /// Retrieves information about a single user based on that user’s email address. - @available(*, deprecated) - public func discoverUserInfo(withEmailAddress email: String) -> Promise { - return Promise { discoverUserIdentity(withEmailAddress: email, completionHandler: $0.resolve) } - } - - /// Retrieves information about a single user based on that user’s email address. - public func discoverUserIdentity(withEmailAddress email: String) -> Promise { - return Promise { discoverUserIdentity(withEmailAddress: email, completionHandler: $0.resolve) } - } - - /// Retrieves information about a single user based on the ID of the corresponding user record. - @available(*, deprecated) - public func discoverUserInfo(withUserRecordID recordID: CKRecord.ID) -> Promise { - return Promise { discoverUserIdentity(withUserRecordID: recordID, completionHandler: $0.resolve) } - } - - /// Retrieves information about a single user based on the ID of the corresponding user record. - public func discoverUserIdentity(withUserRecordID recordID: CKRecord.ID) -> Promise { - return Promise { discoverUserIdentity(withUserRecordID: recordID, completionHandler: $0.resolve) } - } - - /// Returns the user record ID associated with the current user. - public func fetchUserRecordID() -> Promise { - return Promise { fetchUserRecordID(completionHandler: $0.resolve) } - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Sources/CKDatabase+AnyPromise.h b/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Sources/CKDatabase+AnyPromise.h deleted file mode 100644 index c0f895995..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Sources/CKDatabase+AnyPromise.h +++ /dev/null @@ -1,46 +0,0 @@ -#import -#import - -/** - To import the `CKDatabase` category: - - use_frameworks! - pod "PromiseKit/CloudKit" - - And then in your sources: - - @import PromiseKit; -*/ -@interface CKDatabase (PromiseKit) - -/// Fetches one record asynchronously from the current database. -- (AnyPromise *)fetchRecordWithID:(CKRecordID *)recordID NS_REFINED_FOR_SWIFT; -/// Saves one record zone asynchronously to the current database. -- (AnyPromise *)saveRecord:(CKRecord *)record NS_REFINED_FOR_SWIFT; -/// Delete one subscription object asynchronously from the current database. -- (AnyPromise *)deleteRecordWithID:(CKRecordID *)recordID NS_REFINED_FOR_SWIFT; - -/// Searches the specified zone asynchronously for records that match the query parameters. -- (AnyPromise *)performQuery:(CKQuery *)query inZoneWithID:(CKRecordZoneID *)zoneID NS_REFINED_FOR_SWIFT; - -/// Fetches all record zones asynchronously from the current database. -- (AnyPromise *)fetchAllRecordZones NS_REFINED_FOR_SWIFT; -/// Fetches one record asynchronously from the current database. -- (AnyPromise *)fetchRecordZoneWithID:(CKRecordZoneID *)zoneID NS_REFINED_FOR_SWIFT; -/// Saves one record zone asynchronously to the current database. -- (AnyPromise *)saveRecordZone:(CKRecordZone *)zone NS_REFINED_FOR_SWIFT; -/// Delete one subscription object asynchronously from the current database. -- (AnyPromise *)deleteRecordZoneWithID:(CKRecordZoneID *)zoneID NS_REFINED_FOR_SWIFT; - -#if !(TARGET_OS_WATCH && (TARGET_OS_EMBEDDED || TARGET_OS_SIMULATOR)) -/// Fetches one record asynchronously from the current database. -- (AnyPromise *)fetchSubscriptionWithID:(NSString *)subscriptionID NS_REFINED_FOR_SWIFT; -/// Fetches all subscription objects asynchronously from the current database. -- (AnyPromise *)fetchAllSubscriptions NS_REFINED_FOR_SWIFT; -/// Saves one subscription object asynchronously to the current database. -- (AnyPromise *)saveSubscription:(CKSubscription *)subscription NS_REFINED_FOR_SWIFT; -/// Delete one subscription object asynchronously from the current database. -- (AnyPromise *)deleteSubscriptionWithID:(NSString *)subscriptionID NS_REFINED_FOR_SWIFT; -#endif - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Sources/CKDatabase+AnyPromise.m b/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Sources/CKDatabase+AnyPromise.m deleted file mode 100644 index 6f766ddb5..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Sources/CKDatabase+AnyPromise.m +++ /dev/null @@ -1,41 +0,0 @@ -#import "CKDatabase+AnyPromise.h" - -@implementation CKDatabase (PromiseKit) - -#define mkmethod1(method) \ -- (AnyPromise *)method { \ - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { \ - [self method ## WithCompletionHandler:^(id a, id b){ \ - resolve(b ?: a); \ - }]; \ - }]; \ -} - -#define mkmethod2(method) \ -- (AnyPromise *)method { \ - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { \ - [self method completionHandler:^(id a, id b){ \ - resolve(b ?: a); \ - }]; \ - }]; \ -} - -mkmethod2(fetchRecordWithID:(CKRecordID *)recordID); -mkmethod2(saveRecord:(CKRecord *)record); -mkmethod2(deleteRecordWithID:(CKRecordID *)recordID); - -mkmethod2(performQuery:(CKQuery *)query inZoneWithID:(CKRecordZoneID *)zoneID); - -mkmethod1(fetchAllRecordZones); -mkmethod2(fetchRecordZoneWithID:(CKRecordZoneID *)zoneID); -mkmethod2(saveRecordZone:(CKRecordZone *)zone); -mkmethod2(deleteRecordZoneWithID:(CKRecordZoneID *)zoneID); - -#if !(TARGET_OS_WATCH && (TARGET_OS_EMBEDDED || TARGET_OS_SIMULATOR)) -mkmethod2(fetchSubscriptionWithID:(NSString *)subscriptionID); -mkmethod1(fetchAllSubscriptions); -mkmethod2(saveSubscription:(CKSubscription *)subscription); -mkmethod2(deleteSubscriptionWithID:(NSString *)subscriptionID); -#endif - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Sources/CKDatabase+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Sources/CKDatabase+Promise.swift deleted file mode 100644 index 9d3ec9cf9..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Sources/CKDatabase+Promise.swift +++ /dev/null @@ -1,91 +0,0 @@ -import CloudKit.CKDatabase -#if !PMKCocoaPods -import PromiseKit -#endif - -#if swift(>=4.2) -#else -public extension CKRecordZone { - typealias ID = CKRecordZoneID -} -#endif - -/** - To import the `CKDatabase` category: - - use_frameworks! - pod "PromiseKit/CloudKit" - - And then in your sources: - - @import PromiseKit; -*/ -extension CKDatabase { - /// Fetches one record asynchronously from the current database. - public func fetch(withRecordID recordID: CKRecord.ID) -> Promise { - return Promise { fetch(withRecordID: recordID, completionHandler: $0.resolve) } - } - - /// Fetches one record zone asynchronously from the current database. - public func fetch(withRecordZoneID recordZoneID: CKRecordZone.ID) -> Promise { - return Promise { fetch(withRecordZoneID: recordZoneID, completionHandler: $0.resolve) } - } - /// Fetches all record zones asynchronously from the current database. - public func fetchAllRecordZones() -> Promise<[CKRecordZone]> { - return Promise { fetchAllRecordZones(completionHandler: $0.resolve) } - } - - /// Saves one record zone asynchronously to the current database. - public func save(_ record: CKRecord) -> Promise { - return Promise { save(record, completionHandler: $0.resolve) } - } - - /// Saves one record zone asynchronously to the current database. - public func save(_ recordZone: CKRecordZone) -> Promise { - return Promise { save(recordZone, completionHandler: $0.resolve) } - } - - /// Delete one subscription object asynchronously from the current database. - public func delete(withRecordID recordID: CKRecord.ID) -> Promise { - return Promise { delete(withRecordID: recordID, completionHandler: $0.resolve) } - } - - /// Delete one subscription object asynchronously from the current database. - public func delete(withRecordZoneID zoneID: CKRecordZone.ID) -> Promise { - return Promise { delete(withRecordZoneID: zoneID, completionHandler: $0.resolve) } - } - - /// Searches the specified zone asynchronously for records that match the query parameters. - public func perform(_ query: CKQuery, inZoneWith zoneID: CKRecordZone.ID? = nil) -> Promise<[CKRecord]> { - return Promise { perform(query, inZoneWith: zoneID, completionHandler: $0.resolve) } - } - - /// Fetches the record for the current user. - public func fetchUserRecord(_ container: CKContainer = CKContainer.default()) -> Promise { - return container.fetchUserRecordID().then(on: nil) { uid in - return self.fetch(withRecordID: uid) - } - } - -#if !os(watchOS) - /// Fetches one record zone asynchronously from the current database. - public func fetch(withSubscriptionID subscriptionID: String) -> Promise { - return Promise { fetch(withSubscriptionID: subscriptionID, completionHandler: $0.resolve) } - } - - /// Fetches all subscription objects asynchronously from the current database. - public func fetchAllSubscriptions() -> Promise<[CKSubscription]> { - return Promise { fetchAllSubscriptions(completionHandler: $0.resolve) } - } - - /// Saves one subscription object asynchronously to the current database. - public func save(_ subscription: CKSubscription) -> Promise { - return Promise { save(subscription, completionHandler: $0.resolve) } - } - - /// Delete one subscription object asynchronously from the current database. - public func delete(withSubscriptionID subscriptionID: String) -> Promise { - return Promise { delete(withSubscriptionID: subscriptionID, completionHandler: $0.resolve) } - } -#endif -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Sources/PMKCloudKit.h b/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Sources/PMKCloudKit.h deleted file mode 100644 index 3a8318046..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Sources/PMKCloudKit.h +++ /dev/null @@ -1,2 +0,0 @@ -#import "CKContainer+AnyPromise.h" -#import "CKDatabase+AnyPromise.h" diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Tests/TestCloudKit.swift b/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Tests/TestCloudKit.swift deleted file mode 100644 index ca96fd2e9..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Tests/TestCloudKit.swift +++ /dev/null @@ -1,146 +0,0 @@ -import PMKCloudKit -import XCTest - -//TODO possibly we should interpret eg. request permission result of Denied as error -// PMK should only resolve with values that allow a typical chain to proceed - -class Test_CKContainer_Swift: XCTestCase { - - func test_accountStatus() { - class MockContainer: CKContainer { - init(_: Bool = false) - {} - - override func accountStatus(completionHandler: @escaping (CKAccountStatus, Error?) -> Void) { - completionHandler(.couldNotDetermine, nil) - } - } - - let ex = expectation(description: "") - MockContainer().accountStatus().done { status in - XCTAssertEqual(status, CKAccountStatus.couldNotDetermine) - ex.fulfill() - } - waitForExpectations(timeout: 1) - } - - func test_requestApplicationPermission() { - class MockContainer: CKContainer { - init(_: Bool = false) - {} - - override func requestApplicationPermission(_ applicationPermission: CKApplicationPermissions, completionHandler: @escaping CKApplicationPermissionBlock) { - completionHandler(.granted, nil) - } - } - - let ex = expectation(description: "") - let pp = CKApplicationPermissions.userDiscoverability - MockContainer().requestApplicationPermission(pp).done { perms in - XCTAssertEqual(perms, CKApplicationPermissionStatus.granted) - ex.fulfill() - } - waitForExpectations(timeout: 1) - } - - func test_statusForApplicationPermission() { - class MockContainer: CKContainer { - init(_: Bool = false) - {} - - override func status(forApplicationPermission applicationPermission: CKApplicationPermissions, completionHandler: @escaping CKApplicationPermissionBlock) { - completionHandler(.granted, nil) - } - } - - let ex = expectation(description: "") - let pp = CKApplicationPermissions.userDiscoverability - MockContainer().status(forApplicationPermission: pp).done { - XCTAssertEqual($0, CKApplicationPermissionStatus.granted) - ex.fulfill() - } - waitForExpectations(timeout: 1) - } - -#if !os(tvOS) - func test_discoverAllContactUserInfos() { - class MockContainer: CKContainer { - init(_: Bool = false) - {} - - override func discoverAllIdentities(completionHandler: @escaping ([CKUserIdentity]?, Error?) -> Void) { - completionHandler([PMKDiscoveredUserInfo()], nil) - } - } - - let ex = expectation(description: "") - MockContainer().discoverAllIdentities().done { - XCTAssertEqual($0, [PMKDiscoveredUserInfo()]) - ex.fulfill() - } - waitForExpectations(timeout: 1) - } -#endif - - func test_discoverUserInfoWithEmailAddress() { - class MockContainer: CKContainer { - init(_: Bool = false) - {} - - override func discoverUserIdentity(withEmailAddress email: String, completionHandler: @escaping (CKUserIdentity?, Error?) -> Void) { - completionHandler(PMKDiscoveredUserInfo(), nil) - } - } - - let ex = expectation(description: "") - MockContainer().discoverUserIdentity(withEmailAddress: "mxcl@me.com").done { - XCTAssertEqual($0, PMKDiscoveredUserInfo()) - ex.fulfill() - } - waitForExpectations(timeout: 1, handler: nil) - } - - func test_discoverUserInfoWithRecordID() { - class MockContainer: CKContainer { - init(_: Bool = false) - {} - - override func discoverUserIdentity(withUserRecordID userRecordID: CKRecord.ID, completionHandler: @escaping (CKUserIdentity?, Error?) -> Void) { - completionHandler(PMKDiscoveredUserInfo(), nil) - } - } - - let ex = expectation(description: "") - MockContainer().discoverUserIdentity(withUserRecordID: dummy()).done { - XCTAssertEqual($0, PMKDiscoveredUserInfo()) - ex.fulfill() - } - waitForExpectations(timeout: 1) - } - - func test_fetchUserRecordID() { - class MockContainer: CKContainer { - init(_: Bool = false) - {} - - override func fetchUserRecordID(completionHandler: @escaping (CKRecordID?, Error?) -> Void) { - completionHandler(dummy(), nil) - } - } - - let ex = expectation(description: "") - MockContainer().fetchUserRecordID().done { - XCTAssertEqual($0, dummy()) - ex.fulfill() - } - waitForExpectations(timeout: 1) - } -} - - - -/////////////////////////////////////////////////////////////// resources - -private func dummy() -> CKRecordID { - return CKRecordID(recordName: "foo") -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Tests/infrastructure.h b/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Tests/infrastructure.h deleted file mode 100644 index 811cd498f..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Tests/infrastructure.h +++ /dev/null @@ -1,2 +0,0 @@ -@class CKUserIdentity; -extern CKUserIdentity *PMKDiscoveredUserInfo(); diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Tests/infrastructure.m b/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Tests/infrastructure.m deleted file mode 100644 index c940c19b8..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CloudKit/Tests/infrastructure.m +++ /dev/null @@ -1,5 +0,0 @@ -@import CloudKit; - -CKUserIdentity *PMKDiscoveredUserInfo() { - return [CKUserIdentity alloc]; -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/.gitignore b/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/.gitignore deleted file mode 100644 index bec9c1741..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.xcodeproj/**/xcuserdata/ -*.xcscmblueprint -/Carthage -/.build -.DS_Store \ No newline at end of file diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/.travis.yml b/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/.travis.yml deleted file mode 100644 index 9014cdae0..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: objective-c -osx_image: xcode9.4 -env: - - DESTINATION="arch=x86_64" PLATFORM=Mac - - DESTINATION="OS=11.4,name=iPhone 5s" PLATFORM=iOS -cache: - directories: - - Carthage -before_install: - - carthage bootstrap --cache-builds --no-use-binaries --platform $PLATFORM --verbose -install: - - xcodebuild -scheme PMKCoreBluetooth -destination "$DESTINATION" build -script: - - xcodebuild -scheme PMKCoreBluetooth -destination "$DESTINATION" test diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/Cartfile b/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/Cartfile deleted file mode 100644 index 2bfea98d6..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" ~> 6.0 diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/Cartfile.resolved b/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/Cartfile.resolved deleted file mode 100644 index a1be2061d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/Cartfile.resolved +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" "6.3.3" diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/Carthage.xcconfig b/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/Carthage.xcconfig deleted file mode 100644 index c8b995651..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/Carthage.xcconfig +++ /dev/null @@ -1,7 +0,0 @@ -// Created by Kevin Ballard on 12/14/15. -// Copyright © 2015 Postmates. All rights reserved. - -FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(SRCROOT)/Carthage/Build/Mac/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=iphone*] = $(SRCROOT)/Carthage/Build/iOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=watch*] = $(SRCROOT)/Carthage/Build/watchOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=appletv*] = $(SRCROOT)/Carthage/Build/tvOS/ $(inherited) diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/Info.plist b/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/Info.plist deleted file mode 100644 index fbe1e6b31..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/PMKCoreBluetooth.xcodeproj/project.pbxproj b/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/PMKCoreBluetooth.xcodeproj/project.pbxproj deleted file mode 100644 index 84b3d6375..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/PMKCoreBluetooth.xcodeproj/project.pbxproj +++ /dev/null @@ -1,447 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 63C7FFF71D5C020D003BAE60 /* PMKCoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C7FFA71D5BEE09003BAE60 /* PMKCoreBluetooth.framework */; }; - 63D3789F1D5D5AEC005B0A44 /* CBCentralManager+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63D3789E1D5D5AEC005B0A44 /* CBCentralManager+Promise.swift */; }; - 63D40DFB1D61290800E91E6E /* CBTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63D40DFA1D61290800E91E6E /* CBTests.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 63C7FF9E1D5BEE09003BAE60 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 63C7FFA61D5BEE09003BAE60; - remoteInfo = PMKCoreBluetooth; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 63C700091D5C0253003BAE60 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 63C7FFA71D5BEE09003BAE60 /* PMKCoreBluetooth.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PMKCoreBluetooth.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 63C7FFF21D5C020D003BAE60 /* PMKCBTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PMKCBTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 63CCF8121D5C0C4E00503216 /* Cartfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile; sourceTree = ""; }; - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Carthage.xcconfig; sourceTree = ""; }; - 63D3789E1D5D5AEC005B0A44 /* CBCentralManager+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "CBCentralManager+Promise.swift"; path = "Sources/CBCentralManager+Promise.swift"; sourceTree = SOURCE_ROOT; }; - 63D40DFA1D61290800E91E6E /* CBTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CBTests.swift; path = Tests/CBTests.swift; sourceTree = SOURCE_ROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 63C7FFA31D5BEE09003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEF1D5C020D003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 63C7FFF71D5C020D003BAE60 /* PMKCoreBluetooth.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 63C7FF9D1D5BEE09003BAE60 = { - isa = PBXGroup; - children = ( - 63C700091D5C0253003BAE60 /* Info.plist */, - 63CCF8121D5C0C4E00503216 /* Cartfile */, - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */, - 63C7FFA91D5BEE09003BAE60 /* Sources */, - 63C7FFF31D5C020D003BAE60 /* Tests */, - 63C7FFA81D5BEE09003BAE60 /* Products */, - ); - sourceTree = ""; - }; - 63C7FFA81D5BEE09003BAE60 /* Products */ = { - isa = PBXGroup; - children = ( - 63C7FFA71D5BEE09003BAE60 /* PMKCoreBluetooth.framework */, - 63C7FFF21D5C020D003BAE60 /* PMKCBTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 63C7FFA91D5BEE09003BAE60 /* Sources */ = { - isa = PBXGroup; - children = ( - 63D3789E1D5D5AEC005B0A44 /* CBCentralManager+Promise.swift */, - ); - path = Sources; - sourceTree = SOURCE_ROOT; - }; - 63C7FFF31D5C020D003BAE60 /* Tests */ = { - isa = PBXGroup; - children = ( - 63D40DFA1D61290800E91E6E /* CBTests.swift */, - ); - path = Tests; - sourceTree = SOURCE_ROOT; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 63C7FFA41D5BEE09003BAE60 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 63C7FFA61D5BEE09003BAE60 /* PMKCoreBluetooth */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKCoreBluetooth" */; - buildPhases = ( - 63C7FFA21D5BEE09003BAE60 /* Sources */, - 63C7FFA31D5BEE09003BAE60 /* Frameworks */, - 63C7FFA41D5BEE09003BAE60 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PMKCoreBluetooth; - productName = "PMK+UIKit"; - productReference = 63C7FFA71D5BEE09003BAE60 /* PMKCoreBluetooth.framework */; - productType = "com.apple.product-type.framework"; - }; - 63C7FFF11D5C020D003BAE60 /* PMKCBTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKCBTests" */; - buildPhases = ( - 63C7FFEE1D5C020D003BAE60 /* Sources */, - 63C7FFEF1D5C020D003BAE60 /* Frameworks */, - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */, - ); - name = PMKCBTests; - productName = PMKTests/NS; - productReference = 63C7FFF21D5C020D003BAE60 /* PMKCBTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 63C7FF9E1D5BEE09003BAE60 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 1000; - ORGANIZATIONNAME = "Max Howell"; - TargetAttributes = { - 63C7FFA61D5BEE09003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 0900; - ProvisioningStyle = Automatic; - }; - 63C7FFF11D5C020D003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 0900; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKCoreBluetooth" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 63C7FF9D1D5BEE09003BAE60; - productRefGroup = 63C7FFA81D5BEE09003BAE60 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 63C7FFA61D5BEE09003BAE60 /* PMKCoreBluetooth */, - 63C7FFF11D5C020D003BAE60 /* PMKCBTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXShellScriptBuildPhase section */ - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - PromiseKit, - ); - name = "Embed Carthage Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "case \"$PLATFORM_NAME\" in\nmacosx) plat=Mac;;\niphone*) plat=iOS;;\nwatch*) plat=watchOS;;\nappletv*) plat=tvOS;;\n*) echo \"error: Unknown PLATFORM_NAME: $PLATFORM_NAME\"; exit 1;;\nesac\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nframework=$(basename \"${!VAR}\")\nexport SCRIPT_INPUT_FILE_$n=\"$SRCROOT\"/Carthage/Build/$plat/\"$framework\".framework\ndone\n\n/usr/local/bin/carthage copy-frameworks || exit\n\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nsource=${!VAR}.dSYM\ndest=${BUILT_PRODUCTS_DIR}/$(basename \"$source\")\nditto \"$source\" \"$dest\" || exit\ndone"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 63C7FFA21D5BEE09003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63D3789F1D5D5AEC005B0A44 /* CBCentralManager+Promise.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEE1D5C020D003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63D40DFB1D61290800E91E6E /* CBTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 63C7FFA61D5BEE09003BAE60 /* PMKCoreBluetooth */; - targetProxy = 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 63C7FFAD1D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.CoreBluetooth; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvsimulator appletvos"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Debug; - }; - 63C7FFAE1D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.CoreBluetooth; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvsimulator appletvos"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Release; - }; - 63C7FFB01D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 63C7FFB11D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; - 63C7FFFB1D5C020D003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SUPPRESS_WARNINGS = YES; - SWIFT_VERSION = 4.0; - }; - name = Debug; - }; - 63C7FFFC1D5C020D003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SUPPRESS_WARNINGS = YES; - SWIFT_VERSION = 4.0; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKCoreBluetooth" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFAD1D5BEE09003BAE60 /* Debug */, - 63C7FFAE1D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKCoreBluetooth" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFB01D5BEE09003BAE60 /* Debug */, - 63C7FFB11D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKCBTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFFB1D5C020D003BAE60 /* Debug */, - 63C7FFFC1D5C020D003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 63C7FF9E1D5BEE09003BAE60 /* Project object */; -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/PMKCoreBluetooth.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/PMKCoreBluetooth.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index b49fefe7f..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/PMKCoreBluetooth.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/PMKCoreBluetooth.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/PMKCoreBluetooth.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/PMKCoreBluetooth.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/PMKCoreBluetooth.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/PMKCoreBluetooth.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index 08de0be8d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/PMKCoreBluetooth.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/PMKCoreBluetooth.xcodeproj/xcshareddata/xcschemes/PMKCoreBluetooth.xcscheme b/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/PMKCoreBluetooth.xcodeproj/xcshareddata/xcschemes/PMKCoreBluetooth.xcscheme deleted file mode 100644 index 20ad62ba5..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/PMKCoreBluetooth.xcodeproj/xcshareddata/xcschemes/PMKCoreBluetooth.xcscheme +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/README.markdown b/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/README.markdown deleted file mode 100644 index 54e84d63e..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/README.markdown +++ /dev/null @@ -1,38 +0,0 @@ -# DEPRECATED - -THe promises provided here are not-sensible. You should use a full delegate pattern for CoreBluetooth, one shot listening for connectivity is not wise since the accessory may disconnect at any time. - -# PromiseKit CoreBluetooth Extensions ![Build Status] - -This project adds promises to Apple’s CoreBluetooth framework. - -## CocoaPods - -```ruby -pod "PromiseKit/CoreBluetooth" ~> 6.0 -``` - -The extensions are built into `PromiseKit.framework` thus nothing else is needed. - -## Carthage - -```ruby -github "PromiseKit/CoreBluetooth" ~> 3.0 -``` - -The extensions are built into their own framework: - -```swift -// swift -import PromiseKit -import PMKCoreBluetooth -``` - -```objc -// objc -@import PromiseKit; -@import PMKCoreBluetooth; -``` - - -[Build Status]: https://travis-ci.org/PromiseKit/CoreBluetooth.svg?branch=master diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/Sources/CBCentralManager+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/Sources/CBCentralManager+Promise.swift deleted file mode 100644 index 01e9ddc71..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/Sources/CBCentralManager+Promise.swift +++ /dev/null @@ -1,29 +0,0 @@ -import CoreBluetooth -#if !PMKCocoaPods -import PromiseKit -#endif - - -private class CentralManager: CBCentralManager, CBCentralManagerDelegate { - var retainCycle: CentralManager? - let (promise, fulfill) = Guarantee.pending() - - @objc func centralManagerDidUpdateState(_ manager: CBCentralManager) { - if manager.state != .unknown { - fulfill(manager) - } - } -} - -extension CBCentralManager { - /// A promise that fulfills when the state of CoreBluetooth changes - public class func state(options: [String: Any]? = [CBCentralManagerOptionShowPowerAlertKey: false]) -> Guarantee { - let manager = CentralManager(delegate: nil, queue: nil, options: options) - manager.delegate = manager - manager.retainCycle = manager - manager.promise.done { _ in - manager.retainCycle = nil - } - return manager.promise - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/Tests/CBTests.swift b/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/Tests/CBTests.swift deleted file mode 100644 index 15631564e..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreBluetooth/Tests/CBTests.swift +++ /dev/null @@ -1,10 +0,0 @@ -import PMKCoreBluetooth -import CoreBluetooth -import XCTest - -class PMKCBTestCase: XCTestCase { - func test() { - // just test linking etc. - CBCentralManager.state() - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/.gitignore b/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/.gitignore deleted file mode 100644 index bec9c1741..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.xcodeproj/**/xcuserdata/ -*.xcscmblueprint -/Carthage -/.build -.DS_Store \ No newline at end of file diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/.travis.yml b/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/.travis.yml deleted file mode 100644 index 95c076137..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/.travis.yml +++ /dev/null @@ -1,78 +0,0 @@ -osx_image: xcode10.2 -language: swift -os: osx - -branches: - only: - - master -stages: - - lint - - carthage - - test -jobs: - include: - - &pod - stage: lint - osx_image: xcode8.3 - env: SWIFT=3.1 - before_install: - gem install cocoapods --prerelease --version 1.7.0.beta.3 - install: - carthage bootstrap --no-build PromiseKit - script: | - cd Carthage/Checkouts/PromiseKit - mv .github/PromiseKit.podspec . - rm -rf Extensions/CoreLocation/Sources - cp -R ../../../Sources Extensions/CoreLocation - pod lib lint --subspec=PromiseKit/CoreLocation --fail-fast --swift-version=$SWIFT - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=3.2 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=3.3 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=3.4 - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=4.0 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=4.1 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=4.2 - - <<: *pod - osx_image: xcode10.2 - env: SWIFT=5.0 - - - &carthage - stage: carthage - osx_image: xcode9.2 - script: | - carthage bootstrap --cache-builds - sed -i '' "s/SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;/SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;/" *.xcodeproj/project.pbxproj - carthage build --no-skip-current - cache.directories: - - Carthage - - <<: *carthage - osx_image: xcode9.4 - - <<: *carthage - osx_image: xcode10.1 - - <<: *carthage - osx_image: xcode10.2 - - - &test - stage: test - xcode_scheme: PMKCoreLocation - xcode_project: PMKCoreLocation.xcodeproj - xcode_destination: platform=macOS - cache.directories: - - Carthage - before_install: - carthage bootstrap --cache-builds --no-use-binaries - - <<: *test - xcode_destination: 'platform=iOS Simulator,OS=12.2,name=iPhone SE' - - <<: *test - xcode_destination: 'platform=tvOS Simulator,OS=12.2,name=Apple TV' diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Cartfile b/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Cartfile deleted file mode 100644 index d4703e986..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" ~> 6.8.4 diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Cartfile.resolved b/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Cartfile.resolved deleted file mode 100644 index f54bbdbf2..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Cartfile.resolved +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" "6.8.4" diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Carthage.xcconfig b/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Carthage.xcconfig deleted file mode 100644 index c8b995651..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Carthage.xcconfig +++ /dev/null @@ -1,7 +0,0 @@ -// Created by Kevin Ballard on 12/14/15. -// Copyright © 2015 Postmates. All rights reserved. - -FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(SRCROOT)/Carthage/Build/Mac/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=iphone*] = $(SRCROOT)/Carthage/Build/iOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=watch*] = $(SRCROOT)/Carthage/Build/watchOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=appletv*] = $(SRCROOT)/Carthage/Build/tvOS/ $(inherited) diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Info.plist b/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Info.plist deleted file mode 100644 index fbe1e6b31..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/LICENSE b/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/LICENSE deleted file mode 100644 index 50f758c89..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2016-present, Max Howell; mxcl@me.com - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/PMKCoreLocation.xcodeproj/project.pbxproj b/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/PMKCoreLocation.xcodeproj/project.pbxproj deleted file mode 100644 index 5ea24599b..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/PMKCoreLocation.xcodeproj/project.pbxproj +++ /dev/null @@ -1,476 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 63199F0C1D5FF25C007E8A0E /* CLGeocoder+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 63199F061D5FF25C007E8A0E /* CLGeocoder+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 63199F0D1D5FF25C007E8A0E /* CLGeocoder+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 63199F071D5FF25C007E8A0E /* CLGeocoder+AnyPromise.m */; }; - 63199F0E1D5FF25C007E8A0E /* CLGeocoder+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63199F081D5FF25C007E8A0E /* CLGeocoder+Promise.swift */; }; - 63199F0F1D5FF25C007E8A0E /* CLLocationManager+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 63199F091D5FF25C007E8A0E /* CLLocationManager+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 63199F101D5FF25C007E8A0E /* CLLocationManager+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 63199F0A1D5FF25C007E8A0E /* CLLocationManager+AnyPromise.m */; }; - 63199F111D5FF25C007E8A0E /* CLLocationManager+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63199F0B1D5FF25C007E8A0E /* CLLocationManager+Promise.swift */; }; - 63199F161D5FF7B9007E8A0E /* CLGeocoderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63199F141D5FF7B9007E8A0E /* CLGeocoderTests.swift */; }; - 63199F171D5FF7B9007E8A0E /* CLLocationManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63199F151D5FF7B9007E8A0E /* CLLocationManagerTests.swift */; }; - 6358AB7A1D5D4B6700B9B157 /* PMKCoreLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 6358AB791D5D4B6700B9B157 /* PMKCoreLocation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 63C7FFF71D5C020D003BAE60 /* PMKCoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C7FFA71D5BEE09003BAE60 /* PMKCoreLocation.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 63C7FF9E1D5BEE09003BAE60 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 63C7FFA61D5BEE09003BAE60; - remoteInfo = PMKCoreLocation; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 63199F061D5FF25C007E8A0E /* CLGeocoder+AnyPromise.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "CLGeocoder+AnyPromise.h"; path = "Sources/CLGeocoder+AnyPromise.h"; sourceTree = SOURCE_ROOT; }; - 63199F071D5FF25C007E8A0E /* CLGeocoder+AnyPromise.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "CLGeocoder+AnyPromise.m"; path = "Sources/CLGeocoder+AnyPromise.m"; sourceTree = SOURCE_ROOT; }; - 63199F081D5FF25C007E8A0E /* CLGeocoder+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "CLGeocoder+Promise.swift"; path = "Sources/CLGeocoder+Promise.swift"; sourceTree = SOURCE_ROOT; }; - 63199F091D5FF25C007E8A0E /* CLLocationManager+AnyPromise.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "CLLocationManager+AnyPromise.h"; path = "Sources/CLLocationManager+AnyPromise.h"; sourceTree = SOURCE_ROOT; }; - 63199F0A1D5FF25C007E8A0E /* CLLocationManager+AnyPromise.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "CLLocationManager+AnyPromise.m"; path = "Sources/CLLocationManager+AnyPromise.m"; sourceTree = SOURCE_ROOT; }; - 63199F0B1D5FF25C007E8A0E /* CLLocationManager+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "CLLocationManager+Promise.swift"; path = "Sources/CLLocationManager+Promise.swift"; sourceTree = SOURCE_ROOT; }; - 63199F141D5FF7B9007E8A0E /* CLGeocoderTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CLGeocoderTests.swift; path = Tests/CLGeocoderTests.swift; sourceTree = SOURCE_ROOT; }; - 63199F151D5FF7B9007E8A0E /* CLLocationManagerTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CLLocationManagerTests.swift; path = Tests/CLLocationManagerTests.swift; sourceTree = SOURCE_ROOT; }; - 6358AB791D5D4B6700B9B157 /* PMKCoreLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PMKCoreLocation.h; path = Sources/PMKCoreLocation.h; sourceTree = SOURCE_ROOT; }; - 63C700091D5C0253003BAE60 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 63C7FFA71D5BEE09003BAE60 /* PMKCoreLocation.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PMKCoreLocation.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 63C7FFF21D5C020D003BAE60 /* PMKCLTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PMKCLTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 63CCF8121D5C0C4E00503216 /* Cartfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile; sourceTree = ""; }; - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Carthage.xcconfig; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 63C7FFA31D5BEE09003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEF1D5C020D003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 63C7FFF71D5C020D003BAE60 /* PMKCoreLocation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 63C7FF9D1D5BEE09003BAE60 = { - isa = PBXGroup; - children = ( - 63C700091D5C0253003BAE60 /* Info.plist */, - 63CCF8121D5C0C4E00503216 /* Cartfile */, - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */, - 63C7FFA91D5BEE09003BAE60 /* Sources */, - 63C7FFF31D5C020D003BAE60 /* Tests */, - 63C7FFA81D5BEE09003BAE60 /* Products */, - ); - sourceTree = ""; - }; - 63C7FFA81D5BEE09003BAE60 /* Products */ = { - isa = PBXGroup; - children = ( - 63C7FFA71D5BEE09003BAE60 /* PMKCoreLocation.framework */, - 63C7FFF21D5C020D003BAE60 /* PMKCLTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 63C7FFA91D5BEE09003BAE60 /* Sources */ = { - isa = PBXGroup; - children = ( - 6358AB791D5D4B6700B9B157 /* PMKCoreLocation.h */, - 63199F061D5FF25C007E8A0E /* CLGeocoder+AnyPromise.h */, - 63199F071D5FF25C007E8A0E /* CLGeocoder+AnyPromise.m */, - 63199F081D5FF25C007E8A0E /* CLGeocoder+Promise.swift */, - 63199F091D5FF25C007E8A0E /* CLLocationManager+AnyPromise.h */, - 63199F0A1D5FF25C007E8A0E /* CLLocationManager+AnyPromise.m */, - 63199F0B1D5FF25C007E8A0E /* CLLocationManager+Promise.swift */, - ); - path = Sources; - sourceTree = SOURCE_ROOT; - }; - 63C7FFF31D5C020D003BAE60 /* Tests */ = { - isa = PBXGroup; - children = ( - 63199F141D5FF7B9007E8A0E /* CLGeocoderTests.swift */, - 63199F151D5FF7B9007E8A0E /* CLLocationManagerTests.swift */, - ); - path = Tests; - sourceTree = SOURCE_ROOT; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 63C7FFA41D5BEE09003BAE60 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 63199F0F1D5FF25C007E8A0E /* CLLocationManager+AnyPromise.h in Headers */, - 63199F0C1D5FF25C007E8A0E /* CLGeocoder+AnyPromise.h in Headers */, - 6358AB7A1D5D4B6700B9B157 /* PMKCoreLocation.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 63C7FFA61D5BEE09003BAE60 /* PMKCoreLocation */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKCoreLocation" */; - buildPhases = ( - 63C7FFA21D5BEE09003BAE60 /* Sources */, - 63C7FFA31D5BEE09003BAE60 /* Frameworks */, - 63C7FFA41D5BEE09003BAE60 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PMKCoreLocation; - productName = "PMK+UIKit"; - productReference = 63C7FFA71D5BEE09003BAE60 /* PMKCoreLocation.framework */; - productType = "com.apple.product-type.framework"; - }; - 63C7FFF11D5C020D003BAE60 /* PMKCLTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKCLTests" */; - buildPhases = ( - 63C7FFEE1D5C020D003BAE60 /* Sources */, - 63C7FFEF1D5C020D003BAE60 /* Frameworks */, - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */, - ); - name = PMKCLTests; - productName = PMKTests/NS; - productReference = 63C7FFF21D5C020D003BAE60 /* PMKCLTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 63C7FF9E1D5BEE09003BAE60 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = "Max Howell"; - TargetAttributes = { - 63C7FFA61D5BEE09003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 0900; - ProvisioningStyle = Automatic; - }; - 63C7FFF11D5C020D003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 0900; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKCoreLocation" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 63C7FF9D1D5BEE09003BAE60; - productRefGroup = 63C7FFA81D5BEE09003BAE60 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 63C7FFA61D5BEE09003BAE60 /* PMKCoreLocation */, - 63C7FFF11D5C020D003BAE60 /* PMKCLTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXShellScriptBuildPhase section */ - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - PromiseKit, - ); - name = "Embed Carthage Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "case \"$PLATFORM_NAME\" in\nmacosx) plat=Mac;;\niphone*) plat=iOS;;\nwatch*) plat=watchOS;;\nappletv*) plat=tvOS;;\n*) echo \"error: Unknown PLATFORM_NAME: $PLATFORM_NAME\"; exit 1;;\nesac\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nframework=$(basename \"${!VAR}\")\nexport SCRIPT_INPUT_FILE_$n=\"$SRCROOT\"/Carthage/Build/$plat/\"$framework\".framework\ndone\n\n/usr/local/bin/carthage copy-frameworks || exit\n\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nsource=${!VAR}.dSYM\ndest=${BUILT_PRODUCTS_DIR}/$(basename \"$source\")\nditto \"$source\" \"$dest\" || exit\ndone"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 63C7FFA21D5BEE09003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63199F0E1D5FF25C007E8A0E /* CLGeocoder+Promise.swift in Sources */, - 63199F101D5FF25C007E8A0E /* CLLocationManager+AnyPromise.m in Sources */, - 63199F0D1D5FF25C007E8A0E /* CLGeocoder+AnyPromise.m in Sources */, - 63199F111D5FF25C007E8A0E /* CLLocationManager+Promise.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEE1D5C020D003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63199F161D5FF7B9007E8A0E /* CLGeocoderTests.swift in Sources */, - 63199F171D5FF7B9007E8A0E /* CLLocationManagerTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 63C7FFA61D5BEE09003BAE60 /* PMKCoreLocation */; - targetProxy = 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 63C7FFAD1D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.CoreLocation; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos watchsimulator watchos macosx appletvsimulator appletvos"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 3.0; - }; - name = Debug; - }; - 63C7FFAE1D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.CoreLocation; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos watchsimulator watchos macosx appletvsimulator appletvos"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 3.0; - }; - name = Release; - }; - 63C7FFB01D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Debug; - }; - 63C7FFB11D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Release; - }; - 63C7FFFB1D5C020D003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SUPPRESS_WARNINGS = YES; - }; - name = Debug; - }; - 63C7FFFC1D5C020D003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SUPPRESS_WARNINGS = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKCoreLocation" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFAD1D5BEE09003BAE60 /* Debug */, - 63C7FFAE1D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKCoreLocation" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFB01D5BEE09003BAE60 /* Debug */, - 63C7FFB11D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKCLTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFFB1D5C020D003BAE60 /* Debug */, - 63C7FFFC1D5C020D003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 63C7FF9E1D5BEE09003BAE60 /* Project object */; -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/PMKCoreLocation.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/PMKCoreLocation.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index b49fefe7f..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/PMKCoreLocation.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/PMKCoreLocation.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/PMKCoreLocation.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/PMKCoreLocation.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/PMKCoreLocation.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/PMKCoreLocation.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index 08de0be8d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/PMKCoreLocation.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/PMKCoreLocation.xcodeproj/xcshareddata/xcschemes/PMKCoreLocation.xcscheme b/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/PMKCoreLocation.xcodeproj/xcshareddata/xcschemes/PMKCoreLocation.xcscheme deleted file mode 100644 index f75a810fd..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/PMKCoreLocation.xcodeproj/xcshareddata/xcschemes/PMKCoreLocation.xcscheme +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Package.swift b/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Package.swift deleted file mode 100644 index cb1c83fcd..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Package.swift +++ /dev/null @@ -1,30 +0,0 @@ -// swift-tools-version:5.1 - -import PackageDescription - -let exclude = ["PMKCoreLocation.h"] + ["CLGeocoder", "CLLocationManager"].flatMap { - ["\($0)+AnyPromise.m", "\($0)+AnyPromise.h"] -} - -let package = Package( - name: "PMKCoreLocation", - products: [ - .library( - name: "PMKCoreLocation", - targets: ["PMKCoreLocation"]), - ], - dependencies: [ - .package(url: "https://github.com/mxcl/PromiseKit.git", from: "6.0.0"), - ], - targets: [ - .target( - name: "PMKCoreLocation", - dependencies: ["PromiseKit"], - path: "Sources", - exclude: exclude), - .testTarget( - name: "PMKCoreLocationTests", - dependencies: ["PMKCoreLocation"], - path: "Tests"), - ] -) diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/README.markdown b/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/README.markdown deleted file mode 100644 index 49df0de3e..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/README.markdown +++ /dev/null @@ -1,34 +0,0 @@ -# PromiseKit CoreLocation Extensions ![Build Status] - -This project adds promises to Apple’s CoreLocation framework. - -## CocoaPods - -```ruby -pod "PromiseKit/CoreLocation", "~> 6.0" -``` - -The extensions are built into `PromiseKit.framework` thus nothing else is needed. - -## Carthage - -```ruby -github "PromiseKit/CoreLocation" ~> 3.0 -``` - -The extensions are built into their own framework: - -```swift -// swift -import PromiseKit -import PMKCoreLocation -``` - -```objc -// objc -@import PromiseKit; -@import PMKCoreLocation; -``` - - -[Build Status]: https://travis-ci.org/PromiseKit/CoreLocation.svg?branch=master diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Sources/CLGeocoder+AnyPromise.h b/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Sources/CLGeocoder+AnyPromise.h deleted file mode 100644 index c2db32be9..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Sources/CLGeocoder+AnyPromise.h +++ /dev/null @@ -1,40 +0,0 @@ -#import -#import - -/** - To import the `CLGecoder` category: - - use_frameworks! - pod "PromiseKit/CoreLocation" - - And then in your sources: - - @import PromiseKit; -*/ -@interface CLGeocoder (PromiseKit) - -/** - Submits a reverse-geocoding request for the specified location. - - @param location The location object containing the coordinate data to look up. - - @return A promise that thens two parameters: - - 1. The first placemark that resides at the specified location. - 2. The array of *all* placemarks that reside at the specified location. -*/ -- (AnyPromise *)reverseGeocode:(CLLocation *)location NS_REFINED_FOR_SWIFT; - -/** - Submits a forward-geocoding request using the specified address dictionary or address string. - - @param addressDictionaryOrAddressString The address dictionary or address string to look up. - - @return A promise that thens two parameters: - - 1. The first placemark that resides at the specified address. - 2. The array of *all* placemarks that reside at the specified address. -*/ -- (AnyPromise *)geocode:(id)addressDictionaryOrAddressString NS_REFINED_FOR_SWIFT; - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Sources/CLGeocoder+AnyPromise.m b/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Sources/CLGeocoder+AnyPromise.m deleted file mode 100644 index 5b19f7a6d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Sources/CLGeocoder+AnyPromise.m +++ /dev/null @@ -1,47 +0,0 @@ -#import "CLGeocoder+AnyPromise.h" -#import -#import -#import - - -@implementation CLGeocoder (PromiseKit) - -- (AnyPromise *)reverseGeocode:(CLLocation *)location { - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - [self reverseGeocodeLocation:location completionHandler:^(NSArray *placemarks, NSError *error) { - resolve(error ?: PMKManifold(placemarks.firstObject, placemarks)); - }]; - }]; -} - -- (AnyPromise *)geocode:(id)address { - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - id handler = ^(NSArray *placemarks, NSError *error) { - resolve(error ?: PMKManifold(placemarks.firstObject, placemarks)); - }; - if ([address isKindOfClass:[NSDictionary class]]) { - #pragma clang diagnostic push - #pragma clang diagnostic ignored "-Wdeprecated-declarations" - [self geocodeAddressDictionary:address completionHandler:handler]; - #pragma clang diagnostic pop - } else { - [self geocodeAddressString:address completionHandler:handler]; - } - }]; -} - -@end - - - -@implementation CLGeocoder (PMKDeprecated) - -+ (AnyPromise *)reverseGeocode:(CLLocation *)location { - return [[CLGeocoder new] reverseGeocode:location]; -} - -+ (AnyPromise *)geocode:(id)input { - return [[CLGeocoder new] geocode:input]; -} - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Sources/CLGeocoder+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Sources/CLGeocoder+Promise.swift deleted file mode 100644 index a1682262d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Sources/CLGeocoder+Promise.swift +++ /dev/null @@ -1,81 +0,0 @@ -import CoreLocation.CLGeocoder -#if !PMKCocoaPods -import PromiseKit -#endif -#if os(iOS) || os(watchOS) || os(OSX) -import class Contacts.CNPostalAddress -#endif - -/** - To import the `CLGeocoder` category: - - use_frameworks! - pod "PromiseKit/CoreLocation" - - And then in your sources: - - import PromiseKit -*/ -extension CLGeocoder { - /// Submits a reverse-geocoding request for the specified location. - public func reverseGeocode(location: CLLocation) -> Promise<[CLPlacemark]> { - return Promise { seal in - reverseGeocodeLocation(location, completionHandler: seal.resolve) - } - } - - /// Submits a forward-geocoding request using the specified address dictionary. - @available(iOS, deprecated: 11.0) - public func geocode(_ addressDictionary: [String: String]) -> Promise<[CLPlacemark]> { - return Promise { seal in - geocodeAddressDictionary(addressDictionary, completionHandler: seal.resolve) - } - } - - /// Submits a forward-geocoding request using the specified address string. - public func geocode(_ addressString: String) -> Promise<[CLPlacemark]> { - return Promise { seal in - geocodeAddressString(addressString, completionHandler: seal.resolve) - } - } - - /// Submits a forward-geocoding request using the specified address string within the specified region. - public func geocode(_ addressString: String, region: CLRegion?) -> Promise<[CLPlacemark]> { - return Promise { seal in - geocodeAddressString(addressString, in: region, completionHandler: seal.resolve) - } - } - -#if !os(tvOS) && swift(>=3.2) - /// Submits a forward-geocoding request using the specified postal address. - @available(iOS 11.0, OSX 10.13, watchOS 4.0, *) - public func geocodePostalAddress(_ postalAddress: CNPostalAddress) -> Promise<[CLPlacemark]> { - return Promise { seal in - geocodePostalAddress(postalAddress, completionHandler: seal.resolve) - } - } - - /// Submits a forward-geocoding requesting using the specified locale and postal address - @available(iOS 11.0, OSX 10.13, watchOS 4.0, *) - public func geocodePostalAddress(_ postalAddress: CNPostalAddress, preferredLocale locale: Locale?) -> Promise<[CLPlacemark]> { - return Promise { seal in - geocodePostalAddress(postalAddress, preferredLocale: locale, completionHandler: seal.resolve) - } - } - - /// Submits a reverse-geocoding request for the specified location and a preferred locale. - @available(iOS 11.0, OSX 10.13, watchOS 4.0, *) - public func reverseGeocode(location: CLLocation, preferredLocale locale: Locale?) -> Promise<[CLPlacemark]> { - return Promise { seal in - reverseGeocodeLocation(location, preferredLocale: locale, completionHandler: seal.resolve) - } - } -#endif -} - -// TODO still not possible in Swift 3.2 -//extension CLError: CancellableError { -// public var isCancelled: Bool { -// return self == .geocodeCanceled -// } -//} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Sources/CLLocationManager+AnyPromise.h b/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Sources/CLLocationManager+AnyPromise.h deleted file mode 100644 index 306496710..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Sources/CLLocationManager+AnyPromise.h +++ /dev/null @@ -1,46 +0,0 @@ -#import -#import - -/** - To import the `CLLocationManager` category: - - use_frameworks! - pod "PromiseKit/CoreLocation" - - And then in your sources: - - @import PromiseKit; -*/ -@interface CLLocationManager (PromiseKit) - -/** - Determines the device’s location waiting until the positional accuracy - of the measured locations is better than 500 meters. - - If your app has not yet asked the user for locational determination - permissions, PromiseKit calls `+requestWhenInUseAuthorization`, if - you need always permissions, you must call this yourself before - any use of this method, or the promise will be rejected. - - @return A promise that thens two parameters: - - 1. The most recent `CLLocation`. - 2. An array of all recent `CLLocations`. -*/ -+ (AnyPromise *)promise NS_REFINED_FOR_SWIFT; - - -/** - Determines the device’s location using the provided block to determine - when locations become acceptably accurate. - - With this variant you can wait for good accuracy or acceptable accuracy - (at your own discretion) if the `CLLocationManager` is taking too - long. For example, the user is not outside so you will never get 10 meter - accuracy, but it would be nice to wait a little just in case. - - - see +promise -*/ -+ (AnyPromise *)until:(BOOL(^)(CLLocation *))isLocationGoodBlock NS_REFINED_FOR_SWIFT; - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Sources/CLLocationManager+AnyPromise.m b/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Sources/CLLocationManager+AnyPromise.m deleted file mode 100644 index 8266a603d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Sources/CLLocationManager+AnyPromise.m +++ /dev/null @@ -1,72 +0,0 @@ -#import -#import "CLLocationManager+AnyPromise.h" -#import - -#if !(TARGET_OS_TV && (TARGET_OS_EMBEDDED || TARGET_OS_SIMULATOR)) - -@interface PMKLocationManager : CLLocationManager { -@public - PMKResolver resolve; - id retainCycle; - BOOL (^block)(CLLocation *); -} -@end - -@implementation PMKLocationManager - -#define PMKLocationManagerCleanup() \ - [manager stopUpdatingLocation]; \ - retainCycle = self.delegate = nil; - -- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations { - NSMutableArray *okd = [NSMutableArray new]; - for (id location in locations) - if (block(location)) - [okd addObject:location]; - - if (okd.count) { - resolve(PMKManifold(okd.lastObject, okd)); - PMKLocationManagerCleanup(); - } -} - -- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error { - // Apple docs say to ignore this error - if (error.code != kCLErrorLocationUnknown) { - resolve(error); - PMKLocationManagerCleanup(); - } -} - -- (void)locationManager:(CLLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status { - [manager startUpdatingLocation]; -} - -@end - - - -@implementation CLLocationManager (PromiseKit) - -+ (AnyPromise *)promise { - return [self until:^BOOL(CLLocation *location){ - return location.horizontalAccuracy <= 500 && location.verticalAccuracy <= 500; - }]; -} - -+ (AnyPromise *)until:(BOOL(^)(CLLocation *))block { - PMKLocationManager *manager = [PMKLocationManager new]; - manager.delegate = manager; - manager->block = block; - manager->retainCycle = manager; -#if TARGET_OS_IPHONE - if ([manager respondsToSelector:@selector(requestWhenInUseAuthorization)]) - [manager requestWhenInUseAuthorization]; -#endif - [manager startUpdatingLocation]; - return [[AnyPromise alloc] initWithResolver:&manager->resolve]; -} - -@end - -#endif diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Sources/CLLocationManager+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Sources/CLLocationManager+Promise.swift deleted file mode 100644 index 0095a2add..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Sources/CLLocationManager+Promise.swift +++ /dev/null @@ -1,311 +0,0 @@ -import CoreLocation.CLLocationManager -#if !PMKCocoaPods -import PromiseKit -#endif - -/** - To import the `CLLocationManager` category: - - use_frameworks! - pod "PromiseKit/CoreLocation" - - And then in your sources: - - import PromiseKit -*/ -extension CLLocationManager { - - /// The type of location permission we are asking for - public enum RequestAuthorizationType { - /// Determine the authorization from the application’s plist - case automatic - /// Request always-authorization - case always - /// Request when-in-use-authorization - case whenInUse - } - - public enum PMKError: Error { - case notAuthorized - } - - /** - Request the current location. - - Note: to obtain a single location use `Promise.lastValue` - - Parameters: - - authorizationType: requestAuthorizationType: We read your Info plist and try to - determine the authorization type we should request automatically. If you - want to force one or the other, change this parameter from its default - value. - - block: A block by which to perform any filtering of the locations that are - returned. In order to only retrieve accurate locations, only return true if the - locations horizontal accuracy < 50 - - Returns: A new promise that fulfills with the most recent CLLocation that satisfies - the provided block if it exists. If the block does not exist, simply return the - last location. - */ - public class func requestLocation(authorizationType: RequestAuthorizationType = .automatic, satisfying block: ((CLLocation) -> Bool)? = nil) -> Promise<[CLLocation]> { - - func std() -> Promise<[CLLocation]> { - return LocationManager(satisfying: block).promise - } - - func auth() -> Promise { - #if os(macOS) - return Promise() - #else - func auth(type: PMKCLAuthorizationType) -> Promise { - return AuthorizationCatcher(type: type).promise.done(on: nil) { - switch $0 { - case .restricted, .denied: - throw PMKError.notAuthorized - default: - break - } - } - } - - switch authorizationType { - case .automatic: - switch Bundle.main.permissionType { - case .always, .both: - return auth(type: .always) - case .whenInUse: - return auth(type: .whenInUse) - } - case .whenInUse: - return auth(type: .whenInUse) - case .always: - return auth(type: .always) - } - #endif - } - - switch CLLocationManager.authorizationStatus() { - case .authorizedAlways, .authorizedWhenInUse: - return std() - case .notDetermined: - return auth().then(std) - case .denied, .restricted: - return Promise(error: PMKError.notAuthorized) - #if swift(>=5) - @unknown default: - fatalError() - #endif - } - } - - @available(*, deprecated, renamed: "requestLocation") - public class func promise(_ requestAuthorizationType: RequestAuthorizationType = .automatic, satisfying block: ((CLLocation) -> Bool)? = nil) -> Promise<[CLLocation]> { - return requestLocation(authorizationType: requestAuthorizationType, satisfying: block) - } -} - -private class LocationManager: CLLocationManager, CLLocationManagerDelegate { - let (promise, seal) = Promise<[CLLocation]>.pending() - let satisfyingBlock: ((CLLocation) -> Bool)? - - @objc fileprivate func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { - if let block = satisfyingBlock { - let satisfiedLocations = locations.filter(block) - if !satisfiedLocations.isEmpty { - seal.fulfill(satisfiedLocations) - } else { - #if os(tvOS) - requestLocation() - #endif - } - } else { - seal.fulfill(locations) - } - } - - init(satisfying block: ((CLLocation) -> Bool)? = nil) { - satisfyingBlock = block - super.init() - delegate = self - #if !os(tvOS) - startUpdatingLocation() - #else - requestLocation() - #endif - _ = self.promise.ensure { - self.stopUpdatingLocation() - } - } - - @objc func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) { - let (domain, code) = { ($0.domain, $0.code) }(error as NSError) - if code == CLError.locationUnknown.rawValue && domain == kCLErrorDomain { - // Apple docs say you should just ignore this error - } else { - seal.reject(error) - } - } -} - - -#if !os(macOS) - -extension CLLocationManager { - /** - Request CoreLocation authorization from the user - - Note: By default we try to determine the authorization type you want by inspecting your Info.plist - - Note: This method will not perform upgrades from “when-in-use” to “always” unless you specify `.always` for the value of `type`. - */ - @available(iOS 8, tvOS 9, watchOS 2, *) - public class func requestAuthorization(type requestedAuthorizationType: RequestAuthorizationType = .automatic) -> Guarantee { - - let currentStatus = CLLocationManager.authorizationStatus() - - func std(type: PMKCLAuthorizationType) -> Guarantee { - if currentStatus == .notDetermined { - return AuthorizationCatcher(type: type).promise - } else { - return .value(currentStatus) - } - } - - switch requestedAuthorizationType { - case .always: - func iOS11Check() -> Guarantee { - switch currentStatus { - case .notDetermined, .authorizedWhenInUse: - return AuthorizationCatcher(type: .always).promise - default: - return .value(currentStatus) - } - } - #if PMKiOS11 - // ^^ define PMKiOS11 if you deploy against the iOS 11 SDK - // otherwise the warning you get below cannot be removed - return iOS11Check() - #else - if #available(iOS 11, *) { - return iOS11Check() - } else { - return std(type: .always) - } - #endif - - case .whenInUse: - return std(type: .whenInUse) - - case .automatic: - if currentStatus == .notDetermined { - switch Bundle.main.permissionType { - case .both, .whenInUse: - return AuthorizationCatcher(type: .whenInUse).promise - case .always: - return AuthorizationCatcher(type: .always).promise - } - } else { - return .value(currentStatus) - } - } - } -} - -@available(iOS 8, *) -private class AuthorizationCatcher: CLLocationManager, CLLocationManagerDelegate { - let (promise, fulfill) = Guarantee.pending() - var retainCycle: AuthorizationCatcher? - let initialAuthorizationState = CLLocationManager.authorizationStatus() - - init(type: PMKCLAuthorizationType) { - super.init() - - func ask(type: PMKCLAuthorizationType) { - delegate = self - retainCycle = self - - switch type { - case .always: - #if os(tvOS) - fallthrough - #else - requestAlwaysAuthorization() - #endif - case .whenInUse: - requestWhenInUseAuthorization() - } - - promise.done { _ in - self.retainCycle = nil - } - } - - func iOS11Check() { - switch (initialAuthorizationState, type) { - case (.notDetermined, .always), (.authorizedWhenInUse, .always), (.notDetermined, .whenInUse): - ask(type: type) - default: - fulfill(initialAuthorizationState) - } - } - - #if PMKiOS11 - // ^^ define PMKiOS11 if you deploy against the iOS 11 SDK - // otherwise the warning you get below cannot be removed - iOS11Check() - #else - if #available(iOS 11, *) { - iOS11Check() - } else { - if initialAuthorizationState == .notDetermined { - ask(type: type) - } else { - fulfill(initialAuthorizationState) - } - } - #endif - } - - @objc fileprivate func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) { - // `didChange` is a lie; it fires this immediately with the current status. - if status != initialAuthorizationState { - fulfill(status) - } - } -} - -#endif - -private extension Bundle { - enum PermissionType { - case both - case always - case whenInUse - } - - var permissionType: PermissionType { - func hasInfoPlistKey(_ key: String) -> Bool { - let value = object(forInfoDictionaryKey: key) as? String ?? "" - return !value.isEmpty - } - - if hasInfoPlistKey("NSLocationAlwaysAndWhenInUseUsageDescription") { - return .both - } - if hasInfoPlistKey("NSLocationAlwaysUsageDescription") { - return .always - } - if hasInfoPlistKey("NSLocationWhenInUseUsageDescription") { - return .whenInUse - } - - if #available(iOS 11, *) { - NSLog("PromiseKit: warning: `NSLocationAlwaysAndWhenInUseUsageDescription` key not set") - } else { - NSLog("PromiseKit: warning: `NSLocationWhenInUseUsageDescription` key not set") - } - - // won't work, but we warned the user above at least - return .whenInUse - } -} - -private enum PMKCLAuthorizationType { - case always - case whenInUse -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Sources/PMKCoreLocation.h b/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Sources/PMKCoreLocation.h deleted file mode 100644 index a4ab5c91b..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Sources/PMKCoreLocation.h +++ /dev/null @@ -1,2 +0,0 @@ -#import "CLLocationManager+AnyPromise.h" -#import "CLGeocoder+AnyPromise.h" diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Tests/CLGeocoderTests.swift b/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Tests/CLGeocoderTests.swift deleted file mode 100644 index e7c13d8bb..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Tests/CLGeocoderTests.swift +++ /dev/null @@ -1,121 +0,0 @@ -import PMKCoreLocation -import CoreLocation -import PromiseKit -import XCTest -#if os(iOS) || os(watchOS) || os(OSX) - import class Contacts.CNPostalAddress -#endif - -class CLGeocoderTests: XCTestCase { - func test_reverseGeocodeLocation() { - class MockGeocoder: CLGeocoder { - override func reverseGeocodeLocation(_ location: CLLocation, completionHandler: @escaping CLGeocodeCompletionHandler) { - after(.seconds(0)).done { - completionHandler([dummyPlacemark], nil) - } - } - } - - let ex = expectation(description: "") - MockGeocoder().reverseGeocode(location: CLLocation()).done { x in - XCTAssertEqual(x, [dummyPlacemark]) - ex.fulfill() - } - waitForExpectations(timeout: 1) - } - - func test_geocodeAddressDictionary() { - class MockGeocoder: CLGeocoder { - override func geocodeAddressDictionary(_ addressDictionary: [AnyHashable : Any], completionHandler: @escaping CLGeocodeCompletionHandler) { - after(.seconds(0)).done { - completionHandler([dummyPlacemark], nil) - } - } - } - - let ex = expectation(description: "") - MockGeocoder().geocode([:]).done { x in - XCTAssertEqual(x, [dummyPlacemark]) - ex.fulfill() - } - waitForExpectations(timeout: 1) - } - - func test_geocodeAddressString() { - class MockGeocoder: CLGeocoder { - override func geocodeAddressString(_ addressString: String, completionHandler: @escaping CLGeocodeCompletionHandler) { - after(.seconds(0)).done { - completionHandler([dummyPlacemark], nil) - } - } - } - - let ex = expectation(description: "") - MockGeocoder().geocode("").done { x in - XCTAssertEqual(x, [dummyPlacemark]) - ex.fulfill() - } - waitForExpectations(timeout: 1) - } - -#if !os(tvOS) && swift(>=3.2) - func test_geocodePostalAddress() { - guard #available(iOS 11.0, OSX 10.13, watchOS 4.0, *) else { return } - - class MockGeocoder: CLGeocoder { - override func geocodePostalAddress(_ postalAddress: CNPostalAddress, completionHandler: @escaping CLGeocodeCompletionHandler) { - after(.seconds(0)).done { - completionHandler([dummyPlacemark], nil) - } - } - } - - let ex = expectation(description: "") - MockGeocoder().geocodePostalAddress(CNPostalAddress()).done { x in - XCTAssertEqual(x, [dummyPlacemark]) - ex.fulfill() - } - waitForExpectations(timeout: 1) - } - - func test_geocodePostalAddressLocale() { - guard #available(iOS 11.0, OSX 10.13, watchOS 4.0, *) else { return } - - class MockGeocoder: CLGeocoder { - override func geocodePostalAddress(_ postalAddress: CNPostalAddress, preferredLocale locale: Locale?, completionHandler: @escaping CLGeocodeCompletionHandler) { - after(.seconds(0)).done { - completionHandler([dummyPlacemark], nil) - } - } - } - - let ex = expectation(description: "") - MockGeocoder().geocodePostalAddress(CNPostalAddress(), preferredLocale: nil).done { x in - XCTAssertEqual(x, [dummyPlacemark]) - ex.fulfill() - } - waitForExpectations(timeout: 1) - } - - func test_reverseGeocodeLocationLocale() { - guard #available(iOS 11.0, OSX 10.13, watchOS 4.0, *) else { return } - - class MockGeocoder: CLGeocoder { - override func reverseGeocodeLocation(_ location: CLLocation, preferredLocale locale: Locale?, completionHandler: @escaping CLGeocodeCompletionHandler) { - after(.seconds(0)).done { - completionHandler([dummyPlacemark], nil) - } - } - } - - let ex = expectation(description: "") - MockGeocoder().reverseGeocode(location: CLLocation(), preferredLocale: nil).done { x in - XCTAssertEqual(x, [dummyPlacemark]) - ex.fulfill() - } - waitForExpectations(timeout: 1) - } -#endif -} - -private let dummyPlacemark = CLPlacemark() diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Tests/CLLocationManagerTests.swift b/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Tests/CLLocationManagerTests.swift deleted file mode 100644 index 914af867c..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Tests/CLLocationManagerTests.swift +++ /dev/null @@ -1,95 +0,0 @@ -import PMKCoreLocation -import CoreLocation -import PromiseKit -import XCTest - -#if !os(tvOS) - -class Test_CLLocationManager_Swift: XCTestCase { - func test_fulfills_with_multiple_locations() { - swizzle(CLLocationManager.self, #selector(CLLocationManager.startUpdatingLocation)) { - swizzle(CLLocationManager.self, #selector(CLLocationManager.authorizationStatus), isClassMethod: true) { - let ex = expectation(description: "") - - CLLocationManager.requestLocation().done { x in - XCTAssertEqual(x, dummy) - ex.fulfill() - } - - waitForExpectations(timeout: 1) - } - } - } - - func test_fufillsWithSatisfyingBlock() { - swizzle(CLLocationManager.self, #selector(CLLocationManager.startUpdatingLocation)) { - swizzle(CLLocationManager.self, #selector(CLLocationManager.authorizationStatus), isClassMethod: true) { - let ex = expectation(description: "") - let block: ((CLLocation) -> Bool) = { location in - return location.coordinate.latitude == dummy.last?.coordinate.latitude - } - CLLocationManager.requestLocation(satisfying: block).done({ locations in - locations.forEach { XCTAssert(block($0) == true, "Block should be successful for returned values") } - ex.fulfill() - }) - waitForExpectations(timeout: 1) - } - } - } - -#if os(iOS) - func test_requestAuthorization() { - let ex = expectation(description: "") - - CLLocationManager.requestAuthorization().done { - XCTAssertEqual($0, CLAuthorizationStatus.restricted) - ex.fulfill() - } - - waitForExpectations(timeout: 1, handler: nil) - } -#endif -} - - -/////////////////////////////////////////////////////////////// resources -private let dummy = [CLLocation(latitude: 0, longitude: 0), CLLocation(latitude: 10, longitude: 20)] - -extension CLLocationManager { - @objc func pmk_startUpdatingLocation() { - after(.milliseconds(100)).done { - self.delegate!.locationManager?(self, didUpdateLocations: dummy) - } - } - - @objc static func pmk_authorizationStatus() -> CLAuthorizationStatus { - #if os(macOS) - return .authorized - #else - return .authorizedWhenInUse - #endif - } -} - - -/////////////////////////////////////////////////////////////// utilities -import ObjectiveC - -func swizzle(_ foo: AnyClass, _ from: Selector, isClassMethod: Bool = false, body: () -> Void) { - let originalMethod: Method - let swizzledMethod: Method - - if isClassMethod { - originalMethod = class_getClassMethod(foo, from)! - swizzledMethod = class_getClassMethod(foo, Selector("pmk_\(from)"))! - } else { - originalMethod = class_getInstanceMethod(foo, from)! - swizzledMethod = class_getInstanceMethod(foo, Selector("pmk_\(from)"))! - } - - method_exchangeImplementations(originalMethod, swizzledMethod) - body() - method_exchangeImplementations(swizzledMethod, originalMethod) -} - -#endif diff --git a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Tests/Entitlements.plist b/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Tests/Entitlements.plist deleted file mode 100644 index 76a15bb46..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/CoreLocation/Tests/Entitlements.plist +++ /dev/null @@ -1,12 +0,0 @@ - - - - - com.apple.private.tcc.allow - - kTCCServiceAddressBook - kTCCServiceCalendar - kTCCServicePhotos - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/.gitignore b/Carthage/Checkouts/PromiseKit/Extensions/EventKit/.gitignore deleted file mode 100644 index bec9c1741..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.xcodeproj/**/xcuserdata/ -*.xcscmblueprint -/Carthage -/.build -.DS_Store \ No newline at end of file diff --git a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/.travis.yml b/Carthage/Checkouts/PromiseKit/Extensions/EventKit/.travis.yml deleted file mode 100644 index 50d170da5..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/.travis.yml +++ /dev/null @@ -1,78 +0,0 @@ -os: osx -language: swift -osx_image: xcode10.2 - -branches: - only: - - master -stages: - - lint - - carthage - - test -jobs: - include: - - &pod - stage: lint - osx_image: xcode8.3 - env: SWIFT=3.1 - before_install: - gem install cocoapods --prerelease --version 1.7.0.beta.3 - install: - carthage bootstrap --no-build PromiseKit - script: | - cd Carthage/Checkouts/PromiseKit - mv .github/PromiseKit.podspec . - rm -rf Extensions/EventKit/Sources - cp -R ../../../Sources Extensions/EventKit - pod lib lint --subspec=PromiseKit/EventKit --fail-fast --swift-version=$SWIFT - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=3.2 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=3.3 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=3.4 - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=4.0 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=4.1 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=4.2 - - <<: *pod - osx_image: xcode10.2 - env: SWIFT=5.0 - - - &carthage - stage: carthage - osx_image: xcode9.2 - script: | - carthage bootstrap --cache-builds - sed -i '' "s/SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;/SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;/" *.xcodeproj/project.pbxproj - carthage build --no-skip-current - cache: - directories: - - Carthage - - <<: *carthage - osx_image: xcode9.4 - - <<: *carthage - osx_image: xcode10.1 - - <<: *carthage - osx_image: xcode10.2 - - - &test - stage: test - xcode_scheme: PMKEventKit - xcode_project: PMKEventKit.xcodeproj - xcode_destination: 'platform=macOS' - cache: - directories: - - Carthage - before_install: - carthage bootstrap --cache-builds --no-use-binaries - - <<: *test - xcode_destination: 'platform=iOS Simulator,OS=12.2,name=iPhone SE' diff --git a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/Cartfile b/Carthage/Checkouts/PromiseKit/Extensions/EventKit/Cartfile deleted file mode 100644 index d4703e986..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" ~> 6.8.4 diff --git a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/Cartfile.resolved b/Carthage/Checkouts/PromiseKit/Extensions/EventKit/Cartfile.resolved deleted file mode 100644 index f54bbdbf2..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/Cartfile.resolved +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" "6.8.4" diff --git a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/Carthage.xcconfig b/Carthage/Checkouts/PromiseKit/Extensions/EventKit/Carthage.xcconfig deleted file mode 100644 index c8b995651..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/Carthage.xcconfig +++ /dev/null @@ -1,7 +0,0 @@ -// Created by Kevin Ballard on 12/14/15. -// Copyright © 2015 Postmates. All rights reserved. - -FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(SRCROOT)/Carthage/Build/Mac/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=iphone*] = $(SRCROOT)/Carthage/Build/iOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=watch*] = $(SRCROOT)/Carthage/Build/watchOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=appletv*] = $(SRCROOT)/Carthage/Build/tvOS/ $(inherited) diff --git a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/Info.plist b/Carthage/Checkouts/PromiseKit/Extensions/EventKit/Info.plist deleted file mode 100644 index fbe1e6b31..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/LICENSE b/Carthage/Checkouts/PromiseKit/Extensions/EventKit/LICENSE deleted file mode 100644 index 50f758c89..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2016-present, Max Howell; mxcl@me.com - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/PMKEventKit.xcodeproj/project.pbxproj b/Carthage/Checkouts/PromiseKit/Extensions/EventKit/PMKEventKit.xcodeproj/project.pbxproj deleted file mode 100644 index dccf9512f..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/PMKEventKit.xcodeproj/project.pbxproj +++ /dev/null @@ -1,450 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 63C7FFF71D5C020D003BAE60 /* PMKEventKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C7FFA71D5BEE09003BAE60 /* PMKEventKit.framework */; }; - 63E5176D1D5D58B600742F86 /* EKEventStore+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63E5176C1D5D58B600742F86 /* EKEventStore+Promise.swift */; }; - 63E5176F1D5D58C000742F86 /* TestEventKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63E5176E1D5D58C000742F86 /* TestEventKit.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 63C7FF9E1D5BEE09003BAE60 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 63C7FFA61D5BEE09003BAE60; - remoteInfo = PMKEventKit; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 63C700091D5C0253003BAE60 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 63C7FFA71D5BEE09003BAE60 /* PMKEventKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PMKEventKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 63C7FFF21D5C020D003BAE60 /* PMKEKTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PMKEKTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 63CCF8121D5C0C4E00503216 /* Cartfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile; sourceTree = ""; }; - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Carthage.xcconfig; sourceTree = ""; }; - 63E5176C1D5D58B600742F86 /* EKEventStore+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "EKEventStore+Promise.swift"; path = "Sources/EKEventStore+Promise.swift"; sourceTree = SOURCE_ROOT; }; - 63E5176E1D5D58C000742F86 /* TestEventKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TestEventKit.swift; path = Tests/TestEventKit.swift; sourceTree = SOURCE_ROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 63C7FFA31D5BEE09003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEF1D5C020D003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 63C7FFF71D5C020D003BAE60 /* PMKEventKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 63C7FF9D1D5BEE09003BAE60 = { - isa = PBXGroup; - children = ( - 63C700091D5C0253003BAE60 /* Info.plist */, - 63CCF8121D5C0C4E00503216 /* Cartfile */, - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */, - 63C7FFA91D5BEE09003BAE60 /* Sources */, - 63C7FFF31D5C020D003BAE60 /* Tests */, - 63C7FFA81D5BEE09003BAE60 /* Products */, - ); - sourceTree = ""; - }; - 63C7FFA81D5BEE09003BAE60 /* Products */ = { - isa = PBXGroup; - children = ( - 63C7FFA71D5BEE09003BAE60 /* PMKEventKit.framework */, - 63C7FFF21D5C020D003BAE60 /* PMKEKTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 63C7FFA91D5BEE09003BAE60 /* Sources */ = { - isa = PBXGroup; - children = ( - 63E5176C1D5D58B600742F86 /* EKEventStore+Promise.swift */, - ); - path = Sources; - sourceTree = SOURCE_ROOT; - }; - 63C7FFF31D5C020D003BAE60 /* Tests */ = { - isa = PBXGroup; - children = ( - 63E5176E1D5D58C000742F86 /* TestEventKit.swift */, - ); - path = Tests; - sourceTree = SOURCE_ROOT; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 63C7FFA41D5BEE09003BAE60 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 63C7FFA61D5BEE09003BAE60 /* PMKEventKit */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKEventKit" */; - buildPhases = ( - 63C7FFA21D5BEE09003BAE60 /* Sources */, - 63C7FFA31D5BEE09003BAE60 /* Frameworks */, - 63C7FFA41D5BEE09003BAE60 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PMKEventKit; - productName = "PMK+UIKit"; - productReference = 63C7FFA71D5BEE09003BAE60 /* PMKEventKit.framework */; - productType = "com.apple.product-type.framework"; - }; - 63C7FFF11D5C020D003BAE60 /* PMKEKTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKEKTests" */; - buildPhases = ( - 63C7FFEE1D5C020D003BAE60 /* Sources */, - 63C7FFEF1D5C020D003BAE60 /* Frameworks */, - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */, - ); - name = PMKEKTests; - productName = PMKTests/NS; - productReference = 63C7FFF21D5C020D003BAE60 /* PMKEKTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 63C7FF9E1D5BEE09003BAE60 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = "Max Howell"; - TargetAttributes = { - 63C7FFA61D5BEE09003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - 63C7FFF11D5C020D003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKEventKit" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 63C7FF9D1D5BEE09003BAE60; - productRefGroup = 63C7FFA81D5BEE09003BAE60 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 63C7FFA61D5BEE09003BAE60 /* PMKEventKit */, - 63C7FFF11D5C020D003BAE60 /* PMKEKTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXShellScriptBuildPhase section */ - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - PromiseKit, - ); - name = "Embed Carthage Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "case \"$PLATFORM_NAME\" in\nmacosx) plat=Mac;;\niphone*) plat=iOS;;\nwatch*) plat=watchOS;;\nappletv*) plat=tvOS;;\n*) echo \"error: Unknown PLATFORM_NAME: $PLATFORM_NAME\"; exit 1;;\nesac\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nframework=$(basename \"${!VAR}\")\nexport SCRIPT_INPUT_FILE_$n=\"$SRCROOT\"/Carthage/Build/$plat/\"$framework\".framework\ndone\n\n/usr/local/bin/carthage copy-frameworks || exit\n\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nsource=${!VAR}.dSYM\ndest=${BUILT_PRODUCTS_DIR}/$(basename \"$source\")\nditto \"$source\" \"$dest\" || exit\ndone"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 63C7FFA21D5BEE09003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63E5176D1D5D58B600742F86 /* EKEventStore+Promise.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEE1D5C020D003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63E5176F1D5D58C000742F86 /* TestEventKit.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 63C7FFA61D5BEE09003BAE60 /* PMKEventKit */; - targetProxy = 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 63C7FFAD1D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.EventKit; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos watchsimulator watchos macosx"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Debug; - }; - 63C7FFAE1D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.EventKit; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos watchsimulator watchos macosx"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Release; - }; - 63C7FFB01D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Debug; - }; - 63C7FFB11D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Release; - }; - 63C7FFFB1D5C020D003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SUPPRESS_WARNINGS = YES; - }; - name = Debug; - }; - 63C7FFFC1D5C020D003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SUPPRESS_WARNINGS = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKEventKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFAD1D5BEE09003BAE60 /* Debug */, - 63C7FFAE1D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKEventKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFB01D5BEE09003BAE60 /* Debug */, - 63C7FFB11D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKEKTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFFB1D5C020D003BAE60 /* Debug */, - 63C7FFFC1D5C020D003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 63C7FF9E1D5BEE09003BAE60 /* Project object */; -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/PMKEventKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Carthage/Checkouts/PromiseKit/Extensions/EventKit/PMKEventKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index b49fefe7f..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/PMKEventKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/PMKEventKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Carthage/Checkouts/PromiseKit/Extensions/EventKit/PMKEventKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/PMKEventKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/PMKEventKit.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Carthage/Checkouts/PromiseKit/Extensions/EventKit/PMKEventKit.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index 08de0be8d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/PMKEventKit.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/PMKEventKit.xcodeproj/xcshareddata/xcschemes/PMKEventKit.xcscheme b/Carthage/Checkouts/PromiseKit/Extensions/EventKit/PMKEventKit.xcodeproj/xcshareddata/xcschemes/PMKEventKit.xcscheme deleted file mode 100644 index 2c856d0d5..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/PMKEventKit.xcodeproj/xcshareddata/xcschemes/PMKEventKit.xcscheme +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/Package.swift b/Carthage/Checkouts/PromiseKit/Extensions/EventKit/Package.swift deleted file mode 100644 index 6e9f56417..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/Package.swift +++ /dev/null @@ -1,21 +0,0 @@ -// swift-tools-version:4.2 - -import PackageDescription - -let name = "PMKEventKit" - -let pkg = Package(name: name) -pkg.products = [ - .library(name: name, targets: [name]), -] -pkg.swiftLanguageVersions = [.v4, .v4_2] -pkg.dependencies = [ - .package(url: "https://github.com/mxcl/PromiseKit.git", from: "6.0.0") -] - -let target: Target = .target(name: name) -target.path = "Sources" -target.exclude = ["Tests"] -target.dependencies = ["PromiseKit"] - -pkg.targets = [target] \ No newline at end of file diff --git a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/README.markdown b/Carthage/Checkouts/PromiseKit/Extensions/EventKit/README.markdown deleted file mode 100644 index 20e66ac05..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/README.markdown +++ /dev/null @@ -1,34 +0,0 @@ -# PromiseKit EventKit Extensions ![Build Status] - -This project adds promises to Apple’s EventKit framework. - -## CocoaPods - -```ruby -pod "PromiseKit/EventKit" ~> 6.0 -``` - -The extensions are built into `PromiseKit.framework` thus nothing else is needed. - -## Carthage - -```ruby -github "PromiseKit/PMKEventKit" ~> 4.0 -``` - -The extensions are built into their own framework: - -```swift -// swift -import PromiseKit -import PMKEventKit -``` - -```objc -// objc -@import PromiseKit; -@import PMKEventKit; -``` - - -[Build Status]: https://travis-ci.org/PromiseKit/PMKEventKit.svg?branch=master diff --git a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/Sources/EKEventStore+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/EventKit/Sources/EKEventStore+Promise.swift deleted file mode 100644 index 732d07a58..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/Sources/EKEventStore+Promise.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// EKEventStore+Promise.swift -// PromiseKit -// -// Created by Lammert Westerhoff on 16/02/16. -// Copyright © 2016 Max Howell. All rights reserved. -// - -import EventKit -#if !PMKCocoaPods -import PromiseKit -#endif - -/** - To import `EKEventStore`: - - pod "PromiseKit/EventKit" - - And then in your sources: - - import PromiseKit - */ -extension EKEventStore { - - /** - Requests access to the event store. - - - Returns: A promise that fulfills with the resulting EKAuthorizationStatus. - */ - public func requestAccess(to entityType: EKEntityType) -> Promise { - return Promise { seal in - requestAccess(to: entityType) { granted, error in - if let error = error { - seal.reject(error) - } else { - seal.fulfill(EKEventStore.authorizationStatus(for: entityType)) - } - } - } - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/Tests/Entitlements.plist b/Carthage/Checkouts/PromiseKit/Extensions/EventKit/Tests/Entitlements.plist deleted file mode 100644 index 76a15bb46..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/Tests/Entitlements.plist +++ /dev/null @@ -1,12 +0,0 @@ - - - - - com.apple.private.tcc.allow - - kTCCServiceAddressBook - kTCCServiceCalendar - kTCCServicePhotos - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/Tests/TestEventKit.swift b/Carthage/Checkouts/PromiseKit/Extensions/EventKit/Tests/TestEventKit.swift deleted file mode 100644 index b50f58da8..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/EventKit/Tests/TestEventKit.swift +++ /dev/null @@ -1,19 +0,0 @@ -import PMKEventKit -import PromiseKit -import EventKit -import XCTest - -class Test_EventKit_Swift: XCTestCase { - func test() { - #if os(OSX) - //FIXME can't make this succeed on Travis :( - // needs Entitlements, but then I can't get it to sign - // so, we'll just test linkage - EKEventStore().requestAccess(to: .event) - #else - let ex = expectation(description: "") - EKEventStore().requestAccess(to: .event).ensure(ex.fulfill) - waitForExpectations(timeout: 30) - #endif - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/.codecov.yml b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/.codecov.yml deleted file mode 100644 index 278f3f608..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/.codecov.yml +++ /dev/null @@ -1,26 +0,0 @@ -ignore: - - "Tests" - -codecov: - notify: - require_ci_to_pass: yes - -coverage: - precision: 1 - round: up - range: "70...100" - - status: - project: yes - patch: yes - changes: no - -parsers: - gcov: - branch_detection: - conditional: yes - loop: yes - method: no - macro: no - -comment: off diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/.gitignore b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/.gitignore deleted file mode 100644 index 30f50040c..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.xcodeproj/**/xcuserdata/ -*.xcscmblueprint -/Carthage -/.build -.DS_Store diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/.travis.yml b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/.travis.yml deleted file mode 100644 index a3e84dc7b..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/.travis.yml +++ /dev/null @@ -1,147 +0,0 @@ -os: osx -language: swift -osx_image: xcode10.2 - -branches: - only: - - master -stages: - - lint - - swiftpm - - carthage - - test -jobs: - include: - - &pod - stage: lint - osx_image: xcode8.3 - env: SWIFT=3.1 - before_install: - gem install cocoapods --version '~> 1.8.0' - install: - carthage bootstrap --no-build PromiseKit - script: | - cd Carthage/Checkouts/PromiseKit - mv .github/PromiseKit.podspec . - rm -rf Extensions/Foundation/Sources - cp -R ../../../Sources Extensions/Foundation - pod lib lint --subspec=PromiseKit/Foundation --fail-fast --swift-version=$SWIFT - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=3.2 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=3.3 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=3.4 - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=4.0 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=4.1 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=4.2 - - <<: *pod - osx_image: xcode10.2 - env: SWIFT=5.0 - - <<: *pod - osx_image: xcode11 - env: SWIFT=5.1 - - - &linux - stage: swiftpm - env: SWIFT_BUILD_VERSION=3 SWIFT_VERSION=4.0 - # ^^ we have some source-conditionals for this version - name: Linux / Swift 3.2.0 - os: linux - dist: trusty - sudo: required - language: generic - before_install: - eval "$(curl -sL https://swiftenv.fuller.li/install.sh)" - script: - swift build -Xswiftc -swift-version -Xswiftc $SWIFT_BUILD_VERSION - - <<: *linux - env: SWIFT_BUILD_VERSION=3 SWIFT_VERSION=4.0.3 - name: Linux / Swift 3.2.3 - - <<: *linux - env: SWIFT_BUILD_VERSION=3 SWIFT_VERSION=4.1.2 - name: Linux / Swift 3.3 - - <<: *linux - env: SWIFT_BUILD_VERSION=3 SWIFT_VERSION=4.2 - name: Linux / Swift 3.4 - - <<: *linux - env: SWIFT_BUILD_VERSION=4 SWIFT_VERSION=4.0 - name: Linux / Swift 4.0.0 - # ^^ we have some source-conditionals for this version - - <<: *linux - env: SWIFT_BUILD_VERSION=4 SWIFT_VERSION=4.0.3 - name: Linux / Swift 4.0.3 - - <<: *linux - env: SWIFT_BUILD_VERSION=4 SWIFT_VERSION=4.1.2 - name: Linux / Swift 4.1 - - <<: *linux - env: SWIFT_BUILD_VERSION=4 SWIFT_VERSION=4.2 - name: Linux / Swift 4.2 - - <<: *linux - env: SWIFT_BUILD_VERSION=5 SWIFT_VERSION=5.0 - name: Linux / Swift 5.0 - - <<: *linux - env: SWIFT_BUILD_VERSION=5 SWIFT_VERSION=5.1 - name: Linux / Swift 5.1 - - - &swiftpm - stage: swiftpm - name: Xcode 8.3 / SwiftPM - os: osx - osx_image: xcode8.3 - language: objective-c - script: swift build - - <<: *swiftpm - name: Xcode 9.4 / SwiftPM - osx_image: xcode9.4 - - <<: *swiftpm - name: Xcode 10.0 / SwiftPM - osx_image: xcode10 - - <<: *swiftpm - name: Xcode 11.0 / SwiftPM - osx_image: xcode11 - - - &carthage - stage: carthage - osx_image: xcode9.2 - script: | - carthage bootstrap --cache-builds - sed -i '' "s/SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;/SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;/" *.xcodeproj/project.pbxproj - carthage build --no-skip-current - cache: - directories: - - Carthage - - <<: *carthage - osx_image: xcode9.4 - - <<: *carthage - osx_image: xcode10.1 - - <<: *carthage - osx_image: xcode10.2 - - <<: *carthage - osx_image: xcode11 - - - &test - stage: test - xcode_scheme: PMKFoundation - xcode_project: PMKFoundation.xcodeproj - xcode_destination: 'platform=macOS' - cache: - directories: - - Carthage - before_install: | - carthage bootstrap --cache-builds --no-use-binaries - after_success: - bash <(curl -s https://codecov.io/bash); - - <<: *test - xcode_destination: 'platform=iOS Simulator,OS=12.2,name=iPhone SE' - - <<: *test - xcode_destination: 'platform=tvOS Simulator,OS=12.2,name=Apple TV' diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Cartfile b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Cartfile deleted file mode 100644 index d4703e986..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" ~> 6.8.4 diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Cartfile.private b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Cartfile.private deleted file mode 100644 index 7ad353e56..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Cartfile.private +++ /dev/null @@ -1 +0,0 @@ -github "AliSoftware/OHHTTPStubs" ~> 7.0 diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Cartfile.resolved b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Cartfile.resolved deleted file mode 100644 index 47a3dc3be..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Cartfile.resolved +++ /dev/null @@ -1,2 +0,0 @@ -github "AliSoftware/OHHTTPStubs" "7.0.0" -github "mxcl/PromiseKit" "6.11.0" diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Carthage.xcconfig b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Carthage.xcconfig deleted file mode 100644 index c8b995651..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Carthage.xcconfig +++ /dev/null @@ -1,7 +0,0 @@ -// Created by Kevin Ballard on 12/14/15. -// Copyright © 2015 Postmates. All rights reserved. - -FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(SRCROOT)/Carthage/Build/Mac/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=iphone*] = $(SRCROOT)/Carthage/Build/iOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=watch*] = $(SRCROOT)/Carthage/Build/watchOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=appletv*] = $(SRCROOT)/Carthage/Build/tvOS/ $(inherited) diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Info.plist b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Info.plist deleted file mode 100644 index fbe1e6b31..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/LICENSE b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/LICENSE deleted file mode 100644 index da14072b4..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2018-present, Max Howell; mxcl@me.com - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/PMKFoundation.xcodeproj/project.pbxproj b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/PMKFoundation.xcodeproj/project.pbxproj deleted file mode 100644 index 8ac1bf01a..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/PMKFoundation.xcodeproj/project.pbxproj +++ /dev/null @@ -1,507 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 6364F66F1D68B8DF008D7B94 /* NSNotificationCenter+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 6364F66C1D68B8DF008D7B94 /* NSNotificationCenter+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6364F6701D68B8DF008D7B94 /* NSTask+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 6364F66D1D68B8DF008D7B94 /* NSTask+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6364F6711D68B8DF008D7B94 /* NSURLSession+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 6364F66E1D68B8DF008D7B94 /* NSURLSession+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 63C700031D5C021F003BAE60 /* TestNSNotificationCenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63C7FFFD1D5C021F003BAE60 /* TestNSNotificationCenter.swift */; }; - 63C700041D5C021F003BAE60 /* TestNSObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63C7FFFE1D5C021F003BAE60 /* TestNSObject.swift */; }; - 63C700051D5C021F003BAE60 /* TestNSTask.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63C7FFFF1D5C021F003BAE60 /* TestNSTask.swift */; }; - 63C700081D5C021F003BAE60 /* TestNSURLSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63C700021D5C021F003BAE60 /* TestNSURLSession.swift */; }; - 63C7FFDC1D5C00F2003BAE60 /* afterlife.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63C7FFCE1D5C00F2003BAE60 /* afterlife.swift */; }; - 63C7FFDE1D5C00F2003BAE60 /* NSNotificationCenter+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C7FFD01D5C00F2003BAE60 /* NSNotificationCenter+AnyPromise.m */; }; - 63C7FFDF1D5C00F2003BAE60 /* NSNotificationCenter+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63C7FFD11D5C00F2003BAE60 /* NSNotificationCenter+Promise.swift */; }; - 63C7FFE01D5C00F2003BAE60 /* NSObject+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63C7FFD21D5C00F2003BAE60 /* NSObject+Promise.swift */; }; - 63C7FFE21D5C00F2003BAE60 /* NSTask+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C7FFD41D5C00F2003BAE60 /* NSTask+AnyPromise.m */; }; - 63C7FFE31D5C00F2003BAE60 /* Process+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63C7FFD51D5C00F2003BAE60 /* Process+Promise.swift */; }; - 63C7FFE81D5C00F2003BAE60 /* NSURLSession+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C7FFDA1D5C00F2003BAE60 /* NSURLSession+AnyPromise.m */; }; - 63C7FFE91D5C00F2003BAE60 /* NSURLSession+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63C7FFDB1D5C00F2003BAE60 /* NSURLSession+Promise.swift */; }; - 63C7FFED1D5C00FD003BAE60 /* PMKFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = 63C7FFEB1D5C00FD003BAE60 /* PMKFoundation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 63C7FFF71D5C020D003BAE60 /* PMKFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C7FFA71D5BEE09003BAE60 /* PMKFoundation.framework */; }; - 63CAF1061D682F9600D3835B /* TestNSURLSession.m in Sources */ = {isa = PBXBuildFile; fileRef = 63CAF1051D682F9600D3835B /* TestNSURLSession.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 63C7FF9E1D5BEE09003BAE60 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 63C7FFA61D5BEE09003BAE60; - remoteInfo = PMKFoundation; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 6364F66C1D68B8DF008D7B94 /* NSNotificationCenter+AnyPromise.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSNotificationCenter+AnyPromise.h"; path = "Sources/NSNotificationCenter+AnyPromise.h"; sourceTree = SOURCE_ROOT; }; - 6364F66D1D68B8DF008D7B94 /* NSTask+AnyPromise.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSTask+AnyPromise.h"; path = "Sources/NSTask+AnyPromise.h"; sourceTree = SOURCE_ROOT; }; - 6364F66E1D68B8DF008D7B94 /* NSURLSession+AnyPromise.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSURLSession+AnyPromise.h"; path = "Sources/NSURLSession+AnyPromise.h"; sourceTree = SOURCE_ROOT; }; - 63C700021D5C021F003BAE60 /* TestNSURLSession.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TestNSURLSession.swift; path = Tests/TestNSURLSession.swift; sourceTree = SOURCE_ROOT; }; - 63C700091D5C0253003BAE60 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 63C7FFA71D5BEE09003BAE60 /* PMKFoundation.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PMKFoundation.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 63C7FFCE1D5C00F2003BAE60 /* afterlife.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = afterlife.swift; path = Sources/afterlife.swift; sourceTree = SOURCE_ROOT; }; - 63C7FFD01D5C00F2003BAE60 /* NSNotificationCenter+AnyPromise.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSNotificationCenter+AnyPromise.m"; path = "Sources/NSNotificationCenter+AnyPromise.m"; sourceTree = SOURCE_ROOT; }; - 63C7FFD11D5C00F2003BAE60 /* NSNotificationCenter+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "NSNotificationCenter+Promise.swift"; path = "Sources/NSNotificationCenter+Promise.swift"; sourceTree = SOURCE_ROOT; }; - 63C7FFD21D5C00F2003BAE60 /* NSObject+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "NSObject+Promise.swift"; path = "Sources/NSObject+Promise.swift"; sourceTree = SOURCE_ROOT; }; - 63C7FFD41D5C00F2003BAE60 /* NSTask+AnyPromise.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSTask+AnyPromise.m"; path = "Sources/NSTask+AnyPromise.m"; sourceTree = SOURCE_ROOT; }; - 63C7FFD51D5C00F2003BAE60 /* Process+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "Process+Promise.swift"; path = "Sources/Process+Promise.swift"; sourceTree = SOURCE_ROOT; }; - 63C7FFDA1D5C00F2003BAE60 /* NSURLSession+AnyPromise.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSURLSession+AnyPromise.m"; path = "Sources/NSURLSession+AnyPromise.m"; sourceTree = SOURCE_ROOT; }; - 63C7FFDB1D5C00F2003BAE60 /* NSURLSession+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "NSURLSession+Promise.swift"; path = "Sources/NSURLSession+Promise.swift"; sourceTree = SOURCE_ROOT; }; - 63C7FFEB1D5C00FD003BAE60 /* PMKFoundation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PMKFoundation.h; path = Sources/PMKFoundation.h; sourceTree = SOURCE_ROOT; }; - 63C7FFF21D5C020D003BAE60 /* PMKNSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PMKNSTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 63C7FFFD1D5C021F003BAE60 /* TestNSNotificationCenter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TestNSNotificationCenter.swift; path = Tests/TestNSNotificationCenter.swift; sourceTree = SOURCE_ROOT; }; - 63C7FFFE1D5C021F003BAE60 /* TestNSObject.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TestNSObject.swift; path = Tests/TestNSObject.swift; sourceTree = SOURCE_ROOT; }; - 63C7FFFF1D5C021F003BAE60 /* TestNSTask.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TestNSTask.swift; path = Tests/TestNSTask.swift; sourceTree = SOURCE_ROOT; }; - 63CAF1051D682F9600D3835B /* TestNSURLSession.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TestNSURLSession.m; path = Tests/TestNSURLSession.m; sourceTree = SOURCE_ROOT; }; - 63CCF8121D5C0C4E00503216 /* Cartfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile; sourceTree = ""; }; - 63CCF8131D5C0C4E00503216 /* Cartfile.private */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile.private; sourceTree = ""; }; - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Carthage.xcconfig; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 63C7FFA31D5BEE09003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEF1D5C020D003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 63C7FFF71D5C020D003BAE60 /* PMKFoundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 63C7FF9D1D5BEE09003BAE60 = { - isa = PBXGroup; - children = ( - 63C700091D5C0253003BAE60 /* Info.plist */, - 63CCF8121D5C0C4E00503216 /* Cartfile */, - 63CCF8131D5C0C4E00503216 /* Cartfile.private */, - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */, - 63C7FFA91D5BEE09003BAE60 /* Sources */, - 63C7FFF31D5C020D003BAE60 /* Tests */, - 63C7FFA81D5BEE09003BAE60 /* Products */, - ); - sourceTree = ""; - }; - 63C7FFA81D5BEE09003BAE60 /* Products */ = { - isa = PBXGroup; - children = ( - 63C7FFA71D5BEE09003BAE60 /* PMKFoundation.framework */, - 63C7FFF21D5C020D003BAE60 /* PMKNSTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 63C7FFA91D5BEE09003BAE60 /* Sources */ = { - isa = PBXGroup; - children = ( - 63C7FFCE1D5C00F2003BAE60 /* afterlife.swift */, - 63C7FFD51D5C00F2003BAE60 /* Process+Promise.swift */, - 6364F66C1D68B8DF008D7B94 /* NSNotificationCenter+AnyPromise.h */, - 63C7FFD01D5C00F2003BAE60 /* NSNotificationCenter+AnyPromise.m */, - 63C7FFD11D5C00F2003BAE60 /* NSNotificationCenter+Promise.swift */, - 63C7FFD21D5C00F2003BAE60 /* NSObject+Promise.swift */, - 6364F66D1D68B8DF008D7B94 /* NSTask+AnyPromise.h */, - 63C7FFD41D5C00F2003BAE60 /* NSTask+AnyPromise.m */, - 6364F66E1D68B8DF008D7B94 /* NSURLSession+AnyPromise.h */, - 63C7FFDA1D5C00F2003BAE60 /* NSURLSession+AnyPromise.m */, - 63C7FFDB1D5C00F2003BAE60 /* NSURLSession+Promise.swift */, - 63C7FFEB1D5C00FD003BAE60 /* PMKFoundation.h */, - ); - path = Sources; - sourceTree = SOURCE_ROOT; - }; - 63C7FFF31D5C020D003BAE60 /* Tests */ = { - isa = PBXGroup; - children = ( - 63C7FFFD1D5C021F003BAE60 /* TestNSNotificationCenter.swift */, - 63C7FFFE1D5C021F003BAE60 /* TestNSObject.swift */, - 63C7FFFF1D5C021F003BAE60 /* TestNSTask.swift */, - 63C700021D5C021F003BAE60 /* TestNSURLSession.swift */, - 63CAF1051D682F9600D3835B /* TestNSURLSession.m */, - ); - path = Tests; - sourceTree = SOURCE_ROOT; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 63C7FFA41D5BEE09003BAE60 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 63C7FFED1D5C00FD003BAE60 /* PMKFoundation.h in Headers */, - 6364F66F1D68B8DF008D7B94 /* NSNotificationCenter+AnyPromise.h in Headers */, - 6364F6711D68B8DF008D7B94 /* NSURLSession+AnyPromise.h in Headers */, - 6364F6701D68B8DF008D7B94 /* NSTask+AnyPromise.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 63C7FFA61D5BEE09003BAE60 /* PMKFoundation */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKFoundation" */; - buildPhases = ( - 63C7FFA21D5BEE09003BAE60 /* Sources */, - 63C7FFA31D5BEE09003BAE60 /* Frameworks */, - 63C7FFA41D5BEE09003BAE60 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PMKFoundation; - productName = "PMK+UIKit"; - productReference = 63C7FFA71D5BEE09003BAE60 /* PMKFoundation.framework */; - productType = "com.apple.product-type.framework"; - }; - 63C7FFF11D5C020D003BAE60 /* PMKNSTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKNSTests" */; - buildPhases = ( - 63C7FFEE1D5C020D003BAE60 /* Sources */, - 63C7FFEF1D5C020D003BAE60 /* Frameworks */, - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */, - ); - name = PMKNSTests; - productName = PMKTests/NS; - productReference = 63C7FFF21D5C020D003BAE60 /* PMKNSTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 63C7FF9E1D5BEE09003BAE60 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = "Max Howell"; - TargetAttributes = { - 63C7FFA61D5BEE09003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 0900; - ProvisioningStyle = Automatic; - }; - 63C7FFF11D5C020D003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKFoundation" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 63C7FF9D1D5BEE09003BAE60; - productRefGroup = 63C7FFA81D5BEE09003BAE60 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 63C7FFA61D5BEE09003BAE60 /* PMKFoundation */, - 63C7FFF11D5C020D003BAE60 /* PMKNSTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXShellScriptBuildPhase section */ - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - PromiseKit, - OHHTTPStubs, - ); - name = "Embed Carthage Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "case \"$PLATFORM_NAME\" in\nmacosx) plat=Mac;;\niphone*) plat=iOS;;\nwatch*) plat=watchOS;;\nappletv*) plat=tvOS;;\n*) echo \"error: Unknown PLATFORM_NAME: $PLATFORM_NAME\"; exit 1;;\nesac\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nframework=$(basename \"${!VAR}\")\nexport SCRIPT_INPUT_FILE_$n=\"$SRCROOT\"/Carthage/Build/$plat/\"$framework\".framework\ndone\n\n/usr/local/bin/carthage copy-frameworks || exit\n\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nsource=${!VAR}.dSYM\ndest=${BUILT_PRODUCTS_DIR}/$(basename \"$source\")\nditto \"$source\" \"$dest\" || exit\ndone"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 63C7FFA21D5BEE09003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63C7FFDF1D5C00F2003BAE60 /* NSNotificationCenter+Promise.swift in Sources */, - 63C7FFDC1D5C00F2003BAE60 /* afterlife.swift in Sources */, - 63C7FFDE1D5C00F2003BAE60 /* NSNotificationCenter+AnyPromise.m in Sources */, - 63C7FFE91D5C00F2003BAE60 /* NSURLSession+Promise.swift in Sources */, - 63C7FFE31D5C00F2003BAE60 /* Process+Promise.swift in Sources */, - 63C7FFE01D5C00F2003BAE60 /* NSObject+Promise.swift in Sources */, - 63C7FFE81D5C00F2003BAE60 /* NSURLSession+AnyPromise.m in Sources */, - 63C7FFE21D5C00F2003BAE60 /* NSTask+AnyPromise.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEE1D5C020D003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63C700051D5C021F003BAE60 /* TestNSTask.swift in Sources */, - 63C700031D5C021F003BAE60 /* TestNSNotificationCenter.swift in Sources */, - 63C700081D5C021F003BAE60 /* TestNSURLSession.swift in Sources */, - 63CAF1061D682F9600D3835B /* TestNSURLSession.m in Sources */, - 63C700041D5C021F003BAE60 /* TestNSObject.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 63C7FFA61D5BEE09003BAE60 /* PMKFoundation */; - targetProxy = 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 63C7FFAD1D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1.0.4; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.Foundation; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos watchsimulator watchos macosx appletvsimulator appletvos"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Debug; - }; - 63C7FFAE1D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1.0.4; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.Foundation; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos watchsimulator watchos macosx appletvsimulator appletvos"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VALIDATE_PRODUCT = YES; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Release; - }; - 63C7FFB01D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Debug; - }; - 63C7FFB11D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Release; - }; - 63C7FFFB1D5C020D003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SUPPRESS_WARNINGS = YES; - }; - name = Debug; - }; - 63C7FFFC1D5C020D003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SUPPRESS_WARNINGS = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKFoundation" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFAD1D5BEE09003BAE60 /* Debug */, - 63C7FFAE1D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKFoundation" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFB01D5BEE09003BAE60 /* Debug */, - 63C7FFB11D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKNSTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFFB1D5C020D003BAE60 /* Debug */, - 63C7FFFC1D5C020D003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 63C7FF9E1D5BEE09003BAE60 /* Project object */; -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/PMKFoundation.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/PMKFoundation.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index b49fefe7f..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/PMKFoundation.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/PMKFoundation.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/PMKFoundation.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/PMKFoundation.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/PMKFoundation.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/PMKFoundation.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index 08de0be8d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/PMKFoundation.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/PMKFoundation.xcodeproj/xcshareddata/xcschemes/PMKFoundation.xcscheme b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/PMKFoundation.xcodeproj/xcshareddata/xcschemes/PMKFoundation.xcscheme deleted file mode 100644 index 741434bb9..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/PMKFoundation.xcodeproj/xcshareddata/xcschemes/PMKFoundation.xcscheme +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Package.resolved b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Package.resolved deleted file mode 100644 index 4225bb939..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Package.resolved +++ /dev/null @@ -1,16 +0,0 @@ -{ - "object": { - "pins": [ - { - "package": "PromiseKit", - "repositoryURL": "https://github.com/mxcl/PromiseKit.git", - "state": { - "branch": null, - "revision": "fe1e9c5b62465227cceb7b0e6e79489ba7b824af", - "version": "6.8.4" - } - } - ] - }, - "version": 1 -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Package.swift b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Package.swift deleted file mode 100644 index 6072eb004..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Package.swift +++ /dev/null @@ -1,23 +0,0 @@ -import PackageDescription - -let package = Package( - name: "PMKFoundation", - dependencies: [ - .Package(url: "https://github.com/mxcl/PromiseKit.git", majorVersion: 6) - ], - swiftLanguageVersions: [3, 4], - exclude: [ - "Sources/NSNotificationCenter+AnyPromise.m", - "Sources/NSTask+AnyPromise.m", - "Sources/NSURLSession+AnyPromise.m", - "Sources/PMKFoundation.h", - "Tests" // currently SwiftPM is not savvy to having a single test… - ] -) - -#if os(Linux) -package.exclude += [ - "Sources/afterlife.swift", - "Sources/NSObject+Promise.swift" -] -#endif diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Package@swift-4.2.swift b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Package@swift-4.2.swift deleted file mode 100644 index 2b8df6ab7..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Package@swift-4.2.swift +++ /dev/null @@ -1,32 +0,0 @@ -// swift-tools-version:4.2 - -import PackageDescription - -let pkg = Package(name: "PMKFoundation") -pkg.products = [ - .library(name: "PMKFoundation", targets: ["PMKFoundation"]), -] -pkg.dependencies = [ - .package(url: "https://github.com/mxcl/PromiseKit.git", .upToNextMajor(from: "6.0.0")) -] -pkg.swiftLanguageVersions = [.v3, .v4, .v4_2, .version("5")] - -let target: Target = .target(name: "PMKFoundation") -target.path = "Sources" -target.exclude = ["NSNotificationCenter", "NSTask", "NSURLSession"].flatMap { - ["\($0)+AnyPromise.m", "\($0)+AnyPromise.h"] -} -target.exclude.append("PMKFoundation.h") - -target.dependencies = [ - "PromiseKit" -] - -#if os(Linux) -target.exclude += [ - "afterlife.swift", - "NSObject+Promise.swift" -] -#endif - -pkg.targets = [target] diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Package@swift-5.0.swift b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Package@swift-5.0.swift deleted file mode 100644 index 9800d38ef..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Package@swift-5.0.swift +++ /dev/null @@ -1,36 +0,0 @@ -// swift-tools-version:5.0 - -import PackageDescription - -let pkg = Package(name: "PMKFoundation") -pkg.products = [ - .library(name: "PMKFoundation", targets: ["PMKFoundation"]), -] -pkg.dependencies = [ - .package(url: "https://github.com/mxcl/PromiseKit.git", from: "6.8.3") -] -pkg.swiftLanguageVersions = [.v4, .v4_2, .v5] - -let target: Target = .target(name: "PMKFoundation") -target.path = "Sources" -target.exclude = ["NSNotificationCenter", "NSTask", "NSURLSession"].flatMap { - ["\($0)+AnyPromise.m", "\($0)+AnyPromise.h"] -} -target.exclude.append("PMKFoundation.h") - -target.dependencies = [ - "PromiseKit" -] - -#if os(Linux) -target.exclude += [ - "afterlife.swift", - "NSObject+Promise.swift" -] -#endif - -pkg.targets = [target] - -pkg.platforms = [ - .macOS(.v10_10), .iOS(.v8), .tvOS(.v9), .watchOS(.v2) -] diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/README.markdown b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/README.markdown deleted file mode 100644 index d726925a7..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/README.markdown +++ /dev/null @@ -1,47 +0,0 @@ -# PromiseKit Foundation Extensions ![Build Status] - -This project adds promises to the Swift Foundation framework. - -We support iOS, tvOS, watchOS, macOS and Linux, Swift 3.0, 3.1, 3.2, 4.0, 4.1, -4.2 and 5.0. - -## CococaPods - -```ruby -pod "PromiseKit/Foundation", "~> 6.0" -``` - -The extensions are built into `PromiseKit.framework` thus nothing else is -needed. - -## Carthage - -> Note we can no longer support Swift 3 with Carthage due to Xcode 10.2 dropping -it and our only being able to provide a single `.xcodeproj`. - -```ruby -github "PromiseKit/Foundation" ~> 3.0 -``` - -The extensions are built into their own framework: - -```swift -// swift -import PromiseKit -import PMKFoundation -``` - -```objc -// objc -@import PromiseKit; -@import PMKFoundation; -``` - -## SwiftPM - -```swift -package.dependencies.append(.package(url: "https://github.com/PromiseKit/Foundation.git", from: "3.0.0")) -``` - - -[Build Status]: https://travis-ci.org/PromiseKit/Foundation.svg?branch=master diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.h b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.h deleted file mode 100644 index 351a93b97..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.h +++ /dev/null @@ -1,44 +0,0 @@ -#import -#import - - -/** - To import the `NSNotificationCenter` category: - - use_frameworks! - pod "PromiseKit/Foundation" - - Or `NSNotificationCenter` is one of the categories imported by the umbrella pod: - - use_frameworks! - pod "PromiseKit" - - And then in your sources: - - #import -*/ -@interface NSNotificationCenter (PromiseKit) -/** - Observe the named notification once. - - [NSNotificationCenter once:UIKeyboardWillShowNotification].then(^(id note, id userInfo){ - UIViewAnimationCurve curve = [userInfo[UIKeyboardAnimationCurveUserInfoKey] integerValue]; - CGFloat duration = [userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue]; - - return [UIView promiseWithDuration:duration delay:0.0 options:(curve << 16) animations:^{ - - }]; - }); - - @warning *Important* Promises only resolve once. If you need your block to execute more than once then use `-addObserverForName:object:queue:usingBlock:`. - - @param notificationName The name of the notification for which to register the observer. - - @return A promise that fulfills with two parameters: - - 1. The NSNotification object. - 2. The NSNotification’s userInfo property. -*/ -+ (AnyPromise *)once:(NSString *)notificationName NS_REFINED_FOR_SWIFT; - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.m b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.m deleted file mode 100644 index f8aee7109..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.m +++ /dev/null @@ -1,18 +0,0 @@ -#import -#import -#import "PMKFoundation.h" - -@implementation NSNotificationCenter (PromiseKit) - -+ (AnyPromise *)once:(NSString *)name { - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - __block id identifier; - identifier = [[NSNotificationCenter defaultCenter] addObserverForName:name object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *note) { - [[NSNotificationCenter defaultCenter] removeObserver:identifier name:name object:nil]; - identifier = nil; - resolve(PMKManifold(note, note.userInfo)); - }]; - }]; -} - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/NSNotificationCenter+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/NSNotificationCenter+Promise.swift deleted file mode 100644 index 3b7f84345..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/NSNotificationCenter+Promise.swift +++ /dev/null @@ -1,33 +0,0 @@ -import Foundation -#if !PMKCocoaPods -import PromiseKit -#endif - -/** - To import the `NSNotificationCenter` category: - - use_frameworks! - pod "PromiseKit/Foundation" - - Or `NSNotificationCenter` is one of the categories imported by the umbrella pod: - - use_frameworks! - pod "PromiseKit" - - And then in your sources: - - import PromiseKit -*/ -extension NotificationCenter { - /// Observe the named notification once - public func observe(once name: Notification.Name, object: Any? = nil) -> Guarantee { - let (promise, fulfill) = Guarantee.pending() - #if os(Linux) && ((swift(>=4.0) && !swift(>=4.0.1)) || (swift(>=3.0) && !swift(>=3.2.1))) - let id = addObserver(forName: name, object: object, queue: nil, usingBlock: fulfill) - #else - let id = addObserver(forName: name, object: object, queue: nil, using: fulfill) - #endif - promise.done { _ in self.removeObserver(id) } - return promise - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/NSObject+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/NSObject+Promise.swift deleted file mode 100644 index 135719bf6..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/NSObject+Promise.swift +++ /dev/null @@ -1,57 +0,0 @@ -import Foundation -#if !PMKCocoaPods -import PromiseKit -#endif - -/** - To import the `NSObject` category: - - use_frameworks! - pod "PromiseKit/Foundation" - - Or `NSObject` is one of the categories imported by the umbrella pod: - - use_frameworks! - pod "PromiseKit" - - And then in your sources: - - import PromiseKit -*/ -extension NSObject { - /** - - Returns: A promise that resolves when the provided keyPath changes. - - Warning: *Important* The promise must not outlive the object under observation. - - SeeAlso: Apple’s KVO documentation. - */ - public func observe(_: PMKNamespacer, keyPath: String) -> Guarantee { - return Guarantee { KVOProxy(observee: self, keyPath: keyPath, resolve: $0) } - } -} - -private class KVOProxy: NSObject { - var retainCycle: KVOProxy? - let fulfill: (Any?) -> Void - - @discardableResult - init(observee: NSObject, keyPath: String, resolve: @escaping (Any?) -> Void) { - fulfill = resolve - super.init() - observee.addObserver(self, forKeyPath: keyPath, options: NSKeyValueObservingOptions.new, context: pointer) - retainCycle = self - } - - fileprivate override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) { - if let change = change, context == pointer { - defer { retainCycle = nil } - fulfill(change[NSKeyValueChangeKey.newKey]) - if let object = object as? NSObject, let keyPath = keyPath { - object.removeObserver(self, forKeyPath: keyPath) - } - } - } - - private lazy var pointer: UnsafeMutableRawPointer = { - return Unmanaged.passUnretained(self).toOpaque() - }() -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/NSTask+AnyPromise.h b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/NSTask+AnyPromise.h deleted file mode 100644 index 603689778..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/NSTask+AnyPromise.h +++ /dev/null @@ -1,53 +0,0 @@ -#if TARGET_OS_MAC && !TARGET_OS_EMBEDDED && !TARGET_OS_SIMULATOR && !TARGET_OS_UIKITFORMAC - -#import -#import - -#define PMKTaskErrorLaunchPathKey @"PMKTaskErrorLaunchPathKey" -#define PMKTaskErrorArgumentsKey @"PMKTaskErrorArgumentsKey" -#define PMKTaskErrorStandardOutputKey @"PMKTaskErrorStandardOutputKey" -#define PMKTaskErrorStandardErrorKey @"PMKTaskErrorStandardErrorKey" -#define PMKTaskErrorExitStatusKey @"PMKTaskErrorExitStatusKey" - -/** - To import the `NSTask` category: - - use_frameworks! - pod "PromiseKit/Foundation" - - Or `NSTask` is one of the categories imported by the umbrella pod: - - use_frameworks! - pod "PromiseKit" - - And then in your sources: - - #import -*/ -@interface NSTask (PromiseKit) - -/** - Launches the receiver and resolves when it exits. - - If the task fails the promise is rejected with code `PMKTaskError`, and - `userInfo` keys: `PMKTaskErrorStandardOutputKey`, - `PMKTaskErrorStandardErrorKey` and `PMKTaskErrorExitStatusKey`. - - NSTask *task = [NSTask new]; - task.launchPath = @"/usr/bin/basename"; - task.arguments = @[@"/usr/bin/sleep"]; - [task promise].then(^(NSString *stdout){ - //… - }); - - @return A promise that fulfills with three parameters: - - 1) The stdout interpreted as a UTF8 string. - 2) The stderr interpreted as a UTF8 string. - 3) The stdout as `NSData`. -*/ -- (AnyPromise *)promise NS_REFINED_FOR_SWIFT; - -@end - -#endif diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/NSTask+AnyPromise.m b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/NSTask+AnyPromise.m deleted file mode 100644 index fa291d36c..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/NSTask+AnyPromise.m +++ /dev/null @@ -1,59 +0,0 @@ -#import -#import -#import -#import -#import - -#if TARGET_OS_MAC && !TARGET_OS_EMBEDDED && !TARGET_OS_SIMULATOR && !TARGET_OS_UIKITFORMAC - -#import "NSTask+AnyPromise.h" - -@implementation NSTask (PromiseKit) - -- (AnyPromise *)promise { - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - self.standardOutput = [NSPipe pipe]; - self.standardError = [NSPipe pipe]; - self.terminationHandler = ^(NSTask *task){ - id stdoutData = [[task.standardOutput fileHandleForReading] readDataToEndOfFile]; - id stdoutString = [[NSString alloc] initWithData:stdoutData encoding:NSUTF8StringEncoding]; - id stderrData = [[task.standardError fileHandleForReading] readDataToEndOfFile]; - id stderrString = [[NSString alloc] initWithData:stderrData encoding:NSUTF8StringEncoding]; - - if (task.terminationReason == NSTaskTerminationReasonExit && self.terminationStatus == 0) { - resolve(PMKManifold(stdoutString, stderrString, stdoutData)); - } else { - id cmd = [NSMutableArray arrayWithObject:task.launchPath]; - [cmd addObjectsFromArray:task.arguments]; - cmd = [cmd componentsJoinedByString:@" "]; - - id info = @{ - NSLocalizedDescriptionKey:[NSString stringWithFormat:@"Failed executing: %@.", cmd], - PMKTaskErrorStandardOutputKey: stdoutString, - PMKTaskErrorStandardErrorKey: stderrString, - PMKTaskErrorExitStatusKey: @(task.terminationStatus), - }; - - resolve([NSError errorWithDomain:PMKErrorDomain code:PMKTaskError userInfo:info]); - } - }; - - #if __clang_major__ >= 9 - if (@available(macOS 10.13, *)) { - NSError *error = nil; - - if (![self launchAndReturnError:&error]) { - resolve(error); - } - } else { - [self launch]; - } - #else - [self launch]; // might @throw - #endif - }]; -} - -@end - -#endif diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/NSURLSession+AnyPromise.h b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/NSURLSession+AnyPromise.h deleted file mode 100644 index 71952d48c..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/NSURLSession+AnyPromise.h +++ /dev/null @@ -1,79 +0,0 @@ -#import -#import -#import -#import - -#define PMKURLErrorFailingURLResponseKey @"PMKURLErrorFailingURLResponseKey" -#define PMKURLErrorFailingDataKey @"PMKURLErrorFailingDataKey" -#define PMKURLErrorFailingStringKey @"PMKURLErrorFailingStringKey" -#define PMKJSONErrorJSONObjectKey @"PMKJSONErrorJSONObjectKey" - -/** - Really we shouldn’t assume JSON for (application|text)/(x-)javascript, - really we should return a String of Javascript. However in practice - for the apps we write it *will be* JSON. Thus if you actually want - a Javascript String, use the promise variant of our category functions. - */ -#define PMKHTTPURLResponseIsJSON(rsp) [@[@"application/json", @"text/json", @"text/javascript", @"application/x-javascript", @"application/javascript"] containsObject:[rsp MIMEType]] -#define PMKHTTPURLResponseIsImage(rsp) [@[@"image/tiff", @"image/jpeg", @"image/gif", @"image/png", @"image/ico", @"image/x-icon", @"image/bmp", @"image/x-bmp", @"image/x-xbitmap", @"image/x-win-bitmap"] containsObject:[rsp MIMEType]] -#define PMKHTTPURLResponseIsText(rsp) [[rsp MIMEType] hasPrefix:@"text/"] - -#define PMKJSONDeserializationOptions ((NSJSONReadingOptions)(NSJSONReadingAllowFragments | NSJSONReadingMutableContainers)) - - -/** - To import the `NSURLSession` category: - - use_frameworks! - pod "PromiseKit/Foundation" - - Or `NSURLConnection` is one of the categories imported by the umbrella pod: - - use_frameworks! - pod "PromiseKit" - - And then in your sources: - - #import -*/ -@interface NSURLSession (PromiseKit) - -/** - Creates a task that retrieves the contents of a URL based on the - specified URL request object. - - PromiseKit automatically deserializes the raw HTTP data response into the - appropriate rich data type based on the mime type the server provides. - Thus if the response is JSON you will get the deserialized JSON response. - PromiseKit supports decoding into strings, JSON and UIImages. - - However if your server does not provide a rich content-type, you will - just get `NSData`. This is rare, but a good example we came across was - downloading files from Dropbox. - - PromiseKit goes to quite some lengths to provide good `NSError` objects - for error conditions at all stages of the HTTP to rich-data type - pipeline. We provide the following additional `userInfo` keys as - appropriate: - - - `PMKURLErrorFailingDataKey` - - `PMKURLErrorFailingStringKey` - - `PMKURLErrorFailingURLResponseKey` - - [[NSURLConnection sharedSession] promiseDataTaskWithRequest:rq].then(^(id response){ - // response is probably an NSDictionary deserialized from JSON - }); - - @param request The URL request. - - @return A promise that fulfills with three parameters: - - 1) The deserialized data response. - 2) The `NSHTTPURLResponse`. - 3) The raw `NSData` response. - - @see https://github.com/mxcl/OMGHTTPURLRQ -*/ -- (AnyPromise *)promiseDataTaskWithRequest:(NSURLRequest *)request NS_REFINED_FOR_SWIFT; - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/NSURLSession+AnyPromise.m b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/NSURLSession+AnyPromise.m deleted file mode 100644 index 901eb2813..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/NSURLSession+AnyPromise.m +++ /dev/null @@ -1,113 +0,0 @@ -#import -#import -#import -#import "NSURLSession+AnyPromise.h" -#import -#import -#import -#import -#import -#import -#import -#import - -@implementation NSURLSession (PromiseKit) - -- (AnyPromise *)promiseDataTaskWithRequest:(NSURLRequest *)rq { - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - [[self dataTaskWithRequest:rq completionHandler:^(NSData *data, id rsp, NSError *urlError){ - assert(![NSThread isMainThread]); - - PMKResolver fulfiller = ^(id responseObject){ - resolve(PMKManifold(responseObject, rsp, data)); - }; - PMKResolver rejecter = ^(NSError *error){ - id userInfo = error.userInfo.mutableCopy ?: [NSMutableDictionary new]; - if (data) userInfo[PMKURLErrorFailingDataKey] = data; - if (rsp) userInfo[PMKURLErrorFailingURLResponseKey] = rsp; - error = [NSError errorWithDomain:error.domain code:error.code userInfo:userInfo]; - resolve(error); - }; - - NSStringEncoding (^stringEncoding)(void) = ^NSStringEncoding{ - id encodingName = [rsp textEncodingName]; - if (encodingName) { - CFStringEncoding encoding = CFStringConvertIANACharSetNameToEncoding((CFStringRef)encodingName); - if (encoding != kCFStringEncodingInvalidId) - return CFStringConvertEncodingToNSStringEncoding(encoding); - } - return NSUTF8StringEncoding; - }; - - if (urlError) { - rejecter(urlError); - } else if (![rsp isKindOfClass:[NSHTTPURLResponse class]]) { - fulfiller(data); - } else if ([rsp statusCode] < 200 || [rsp statusCode] >= 300) { - id info = @{ - NSLocalizedDescriptionKey: @"The server returned a bad HTTP response code", - NSURLErrorFailingURLStringErrorKey: rq.URL.absoluteString, - NSURLErrorFailingURLErrorKey: rq.URL - }; - id err = [NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorBadServerResponse userInfo:info]; - rejecter(err); - } else if (PMKHTTPURLResponseIsJSON(rsp)) { - // work around ever-so-common Rails workaround: https://github.com/rails/rails/issues/1742 - if ([rsp expectedContentLength] == 1 && [data isEqualToData:[NSData dataWithBytes:" " length:1]]) - return fulfiller(nil); - - NSError *err = nil; - id json = [NSJSONSerialization JSONObjectWithData:data options:PMKJSONDeserializationOptions error:&err]; - if (!err) { - fulfiller(json); - } else { - id userInfo = err.userInfo.mutableCopy; - if (data) { - NSString *string = [[NSString alloc] initWithData:data encoding:stringEncoding()]; - if (string) - userInfo[PMKURLErrorFailingStringKey] = string; - } - long long length = [rsp expectedContentLength]; - id bytes = length <= 0 ? @"" : [NSString stringWithFormat:@"%lld bytes", length]; - id fmt = @"The server claimed a %@ JSON response, but decoding failed with: %@"; - userInfo[NSLocalizedDescriptionKey] = [NSString stringWithFormat:fmt, bytes, userInfo[NSLocalizedDescriptionKey]]; - err = [NSError errorWithDomain:err.domain code:err.code userInfo:userInfo]; - rejecter(err); - } - #ifdef UIKIT_EXTERN - } else if (PMKHTTPURLResponseIsImage(rsp)) { - UIImage *image = [[UIImage alloc] initWithData:data]; - image = [[UIImage alloc] initWithCGImage:[image CGImage] scale:image.scale orientation:image.imageOrientation]; - if (image) - fulfiller(image); - else { - id info = @{ - NSLocalizedDescriptionKey: @"The server returned invalid image data", - NSURLErrorFailingURLStringErrorKey: rq.URL.absoluteString, - NSURLErrorFailingURLErrorKey: rq.URL - }; - id err = [NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorCannotDecodeContentData userInfo:info]; - rejecter(err); - } - #endif - } else if (PMKHTTPURLResponseIsText(rsp)) { - id str = [[NSString alloc] initWithData:data encoding:stringEncoding()]; - if (str) - fulfiller(str); - else { - id info = @{ - NSLocalizedDescriptionKey: @"The server returned invalid string data", - NSURLErrorFailingURLStringErrorKey: rq.URL.absoluteString, - NSURLErrorFailingURLErrorKey: rq.URL - }; - id err = [NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorCannotDecodeContentData userInfo:info]; - rejecter(err); - } - } else { - fulfiller(data); - } - }] resume]; - }]; -} - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/NSURLSession+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/NSURLSession+Promise.swift deleted file mode 100644 index 150654fb0..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/NSURLSession+Promise.swift +++ /dev/null @@ -1,246 +0,0 @@ -import Foundation -#if !PMKCocoaPods -import PromiseKit -#endif -#if swift(>=4.1) -#if canImport(FoundationNetworking) -import FoundationNetworking -#endif -#endif - -/** - To import the `NSURLSession` category: - - use_frameworks! - pod "PromiseKit/Foundation" - - Or `NSURLSession` is one of the categories imported by the umbrella pod: - - use_frameworks! - pod "PromiseKit" - - And then in your sources: - - import PromiseKit -*/ -extension URLSession { - /** - Example usage: - - firstly { - URLSession.shared.dataTask(.promise, with: rq) - }.compactMap { data, _ in - try JSONSerialization.jsonObject(with: data) as? [String: Any] - }.then { json in - //… - } - - We recommend the use of [OMGHTTPURLRQ] which allows you to construct correct REST requests: - - firstly { - let rq = OMGHTTPURLRQ.POST(url, json: parameters) - URLSession.shared.dataTask(.promise, with: rq) - }.then { data, urlResponse in - //… - } - - We provide a convenience initializer for `String` specifically for this promise: - - firstly { - URLSession.shared.dataTask(.promise, with: rq) - }.compactMap(String.init).then { string in - // decoded per the string encoding specified by the server - }.then { string in - print("response: string") - } - - Other common types can be easily decoded using compactMap also: - - firstly { - URLSession.shared.dataTask(.promise, with: rq) - }.compactMap { - UIImage(data: $0) - }.then { - self.imageView.image = $0 - } - - Though if you do decode the image this way, we recommend inflating it on a background thread - first as this will improve main thread performance when rendering the image: - - firstly { - URLSession.shared.dataTask(.promise, with: rq) - }.compactMap(on: QoS.userInitiated) { data, _ in - guard let img = UIImage(data: data) else { return nil } - _ = cgImage?.dataProvider?.data - return img - }.then { - self.imageView.image = $0 - } - - - Parameter convertible: A URL or URLRequest. - - Returns: A promise that represents the URL request. - - SeeAlso: [OMGHTTPURLRQ] - - Remark: We deliberately don’t provide a `URLRequestConvertible` for `String` because in our experience, you should be explicit with this error path to make good apps. - - [OMGHTTPURLRQ]: https://github.com/mxcl/OMGHTTPURLRQ - */ - public func dataTask(_: PMKNamespacer, with convertible: URLRequestConvertible) -> Promise<(data: Data, response: URLResponse)> { - return Promise { dataTask(with: convertible.pmkRequest, completionHandler: adapter($0)).resume() } - } - - public func uploadTask(_: PMKNamespacer, with convertible: URLRequestConvertible, from data: Data) -> Promise<(data: Data, response: URLResponse)> { - return Promise { uploadTask(with: convertible.pmkRequest, from: data, completionHandler: adapter($0)).resume() } - } - - public func uploadTask(_: PMKNamespacer, with convertible: URLRequestConvertible, fromFile file: URL) -> Promise<(data: Data, response: URLResponse)> { - return Promise { uploadTask(with: convertible.pmkRequest, fromFile: file, completionHandler: adapter($0)).resume() } - } - - /// - Remark: we force a `to` parameter because Apple deletes the downloaded file immediately after the underyling completion handler returns. - /// - Note: we do not create the destination directory for you, because we move the file with FileManager.moveItem which changes it behavior depending on the directory status of the URL you provide. So create your own directory first! - public func downloadTask(_: PMKNamespacer, with convertible: URLRequestConvertible, to saveLocation: URL) -> Promise<(saveLocation: URL, response: URLResponse)> { - return Promise { seal in - downloadTask(with: convertible.pmkRequest, completionHandler: { tmp, rsp, err in - if let error = err { - seal.reject(error) - } else if let rsp = rsp, let tmp = tmp { - do { - try FileManager.default.moveItem(at: tmp, to: saveLocation) - seal.fulfill((saveLocation, rsp)) - } catch { - seal.reject(error) - } - } else { - seal.reject(PMKError.invalidCallingConvention) - } - }).resume() - } - } -} - - -public protocol URLRequestConvertible { - var pmkRequest: URLRequest { get } -} -extension URLRequest: URLRequestConvertible { - public var pmkRequest: URLRequest { return self } -} -extension URL: URLRequestConvertible { - public var pmkRequest: URLRequest { return URLRequest(url: self) } -} - - -#if !os(Linux) -public extension String { - /** - - Remark: useful when converting a `URLSession` response into a `String` - - firstly { - URLSession.shared.dataTask(.promise, with: rq) - }.map(String.init).done { - print($0) - } - */ - init?(data: Data, urlResponse: URLResponse) { - guard let str = String(bytes: data, encoding: urlResponse.stringEncoding ?? .utf8) else { - return nil - } - self.init(str) - } -} - -private extension URLResponse { - var stringEncoding: String.Encoding? { - guard let encodingName = textEncodingName else { return nil } - let encoding = CFStringConvertIANACharSetNameToEncoding(encodingName as CFString) - guard encoding != kCFStringEncodingInvalidId else { return nil } - return String.Encoding(rawValue: CFStringConvertEncodingToNSStringEncoding(encoding)) - } -} -#endif - -private func adapter(_ seal: Resolver<(data: T, response: U)>) -> (T?, U?, Error?) -> Void { - return { t, u, e in - if let t = t, let u = u { - seal.fulfill((t, u)) - } else if let e = e { - seal.reject(e) - } else { - seal.reject(PMKError.invalidCallingConvention) - } - } -} - - -#if swift(>=3.1) -public enum PMKHTTPError: Error, LocalizedError, CustomStringConvertible { - case badStatusCode(Int, Data, HTTPURLResponse) - - public var errorDescription: String? { - func url(_ rsp: URLResponse) -> String { - return rsp.url?.absoluteString ?? "nil" - } - switch self { - case .badStatusCode(401, _, let response): - return "Unauthorized (\(url(response))" - case .badStatusCode(let code, _, let response): - return "Invalid HTTP response (\(code)) for \(url(response))." - } - } - -#if swift(>=4.0) - public func decodeResponse(_ t: T.Type, decoder: JSONDecoder = JSONDecoder()) -> T? { - switch self { - case .badStatusCode(_, let data, _): - return try? decoder.decode(t, from: data) - } - } -#endif - - //TODO rename responseJSON - public var jsonDictionary: Any? { - switch self { - case .badStatusCode(_, let data, _): - return try? JSONSerialization.jsonObject(with: data) - } - } - - var responseBodyString: String? { - switch self { - case .badStatusCode(_, let data, _): - return String(data: data, encoding: .utf8) - } - } - - public var failureReason: String? { - return responseBodyString - } - - public var description: String { - switch self { - case .badStatusCode(let code, let data, let response): - var dict: [String: Any] = [ - "Status Code": code, - "Body": String(data: data, encoding: .utf8) ?? "\(data.count) bytes" - ] - dict["URL"] = response.url - dict["Headers"] = response.allHeaderFields - return " \(NSDictionary(dictionary: dict))" // as NSDictionary makes the output look like NSHTTPURLResponse looks - } - } -} - -public extension Promise where T == (data: Data, response: URLResponse) { - func validate() -> Promise { - return map { - guard let response = $0.response as? HTTPURLResponse else { return $0 } - switch response.statusCode { - case 200..<300: - return $0 - case let code: - throw PMKHTTPError.badStatusCode(code, $0.data, response) - } - } - } -} -#endif diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/PMKFoundation.h b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/PMKFoundation.h deleted file mode 100644 index 8796c0d11..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/PMKFoundation.h +++ /dev/null @@ -1,3 +0,0 @@ -#import "NSNotificationCenter+AnyPromise.h" -#import "NSURLSession+AnyPromise.h" -#import "NSTask+AnyPromise.h" diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/Process+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/Process+Promise.swift deleted file mode 100644 index 03cab3cfe..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/Process+Promise.swift +++ /dev/null @@ -1,190 +0,0 @@ -import Foundation -#if !PMKCocoaPods -import PromiseKit -#endif - -#if os(macOS) - -/** - To import the `Process` category: - - use_frameworks! - pod "PromiseKit/Foundation" - - Or `Process` is one of the categories imported by the umbrella pod: - - use_frameworks! - pod "PromiseKit" - - And then in your sources: - - import PromiseKit - */ -extension Process { - /** - Launches the receiver and resolves when it exits. - - let proc = Process() - proc.launchPath = "/bin/ls" - proc.arguments = ["/bin"] - proc.launch(.promise).compactMap { std in - String(data: std.out.fileHandleForReading.readDataToEndOfFile(), encoding: .utf8) - }.then { stdout in - print(str) - } - */ - public func launch(_: PMKNamespacer) -> Promise<(out: Pipe, err: Pipe)> { - let (stdout, stderr) = (Pipe(), Pipe()) - - do { - standardOutput = stdout - standardError = stderr - - #if swift(>=4.0) - if #available(OSX 10.13, *) { - try run() - } else if let path = launchPath, FileManager.default.isExecutableFile(atPath: path) { - launch() - } else { - throw PMKError.notExecutable(launchPath) - } - #else - guard let path = launchPath, FileManager.default.isExecutableFile(atPath: path) else { - throw PMKError.notExecutable(launchPath) - } - launch() - #endif - } catch { - return Promise(error: error) - } - - - var q: DispatchQueue { - if #available(macOS 10.10, iOS 8.0, tvOS 9.0, watchOS 2.0, *) { - return DispatchQueue.global(qos: .default) - } else { - return DispatchQueue.global(priority: .default) - } - } - - return Promise { seal in - q.async { - self.waitUntilExit() - - guard self.terminationReason == .exit, self.terminationStatus == 0 else { - let stdoutData = try? self.readDataFromPipe(stdout) - let stderrData = try? self.readDataFromPipe(stderr) - - let stdoutString = stdoutData.flatMap { (data: Data) -> String? in String(data: data, encoding: .utf8) } - let stderrString = stderrData.flatMap { (data: Data) -> String? in String(data: data, encoding: .utf8) } - - return seal.reject(PMKError.execution(process: self, standardOutput: stdoutString, standardError: stderrString)) - } - seal.fulfill((stdout, stderr)) - } - } - } - - private func readDataFromPipe(_ pipe: Pipe) throws -> Data { - let handle = pipe.fileHandleForReading - defer { handle.closeFile() } - - // Someday, NSFileHandle will probably be updated with throwing equivalents to its read and write methods, - // as NSTask has, to avoid raising exceptions and crashing the app. - // Unfortunately that day has not yet come, so use the underlying BSD calls for now. - - let fd = handle.fileDescriptor - - let bufsize = 1024 * 8 - let buf = UnsafeMutablePointer.allocate(capacity: bufsize) - - #if swift(>=4.1) - defer { buf.deallocate() } - #else - defer { buf.deallocate(capacity: bufsize) } - #endif - - var data = Data() - - while true { - let bytesRead = read(fd, buf, bufsize) - - if bytesRead == 0 { - break - } - - if bytesRead < 0 { - throw POSIXError.Code(rawValue: errno).map { POSIXError($0) } ?? CocoaError(.fileReadUnknown) - } - - data.append(buf, count: bytesRead) - } - - return data - } - - /** - The error generated by PromiseKit’s `Process` extension - */ - public enum PMKError { - /// NOT AVAILABLE ON 10.13 and above because Apple provide this error handling themselves - case notExecutable(String?) - case execution(process: Process, standardOutput: String?, standardError: String?) - } -} - - -extension Process.PMKError: LocalizedError { - public var errorDescription: String? { - switch self { - case .notExecutable(let path?): - return "File not executable: \(path)" - case .notExecutable(nil): - return "No launch path specified" - case .execution(process: let task, standardOutput: _, standardError: _): - return "Failed executing: `\(task)` (\(task.terminationStatus))." - } - } -} - -public extension Promise where T == (out: Pipe, err: Pipe) { - func print() -> Promise { - return tap { result in - switch result { - case .fulfilled(let raw): - let stdout = String(data: raw.out.fileHandleForReading.readDataToEndOfFile(), encoding: .utf8) - let stderr = String(data: raw.err.fileHandleForReading.readDataToEndOfFile(), encoding: .utf8) - Swift.print("stdout: `\(stdout ?? "")`") - Swift.print("stderr: `\(stderr ?? "")`") - case .rejected(let err): - Swift.print(err) - } - } - } -} - -extension Process { - /// Provided because Foundation’s is USELESS - open override var description: String { - let launchPath = self.launchPath ?? "$0" - var args = [launchPath] - arguments.flatMap{ args += $0 } - return args.map { arg in - let contains: Bool - #if swift(>=3.2) - contains = arg.contains(" ") - #else - contains = arg.characters.contains(" ") - #endif - if contains { - return "\"\(arg)\"" - } else if arg == "" { - return "\"\"" - } else { - return arg - } - }.joined(separator: " ") - } -} - -#endif diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/afterlife.swift b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/afterlife.swift deleted file mode 100644 index 232c8da90..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Sources/afterlife.swift +++ /dev/null @@ -1,26 +0,0 @@ -import Foundation -#if !PMKCocoaPods -import PromiseKit -#endif - -/** - - Returns: A promise that resolves when the provided object deallocates - - Important: The promise is not guarenteed to resolve immediately when the provided object is deallocated. So you cannot write code that depends on exact timing. - */ -public func after(life object: NSObject) -> Guarantee { - var reaper = objc_getAssociatedObject(object, &handle) as? GrimReaper - if reaper == nil { - reaper = GrimReaper() - objc_setAssociatedObject(object, &handle, reaper, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - } - return reaper!.promise -} - -private var handle: UInt8 = 0 - -private class GrimReaper: NSObject { - deinit { - fulfill(()) - } - let (promise, fulfill) = Guarantee.pending() -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Tests/TestNSNotificationCenter.swift b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Tests/TestNSNotificationCenter.swift deleted file mode 100644 index 3851029db..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Tests/TestNSNotificationCenter.swift +++ /dev/null @@ -1,22 +0,0 @@ -import PMKFoundation -import Foundation -import PromiseKit -import XCTest - -class NSNotificationCenterTests: XCTestCase { - func test() { - let ex = expectation(description: "") - let userInfo = ["a": 1] - - NotificationCenter.default.observe(once: PMKTestNotification).done { value in - XCTAssertEqual(value.userInfo?.count, 1) - ex.fulfill() - } - - NotificationCenter.default.post(name: PMKTestNotification, object: nil, userInfo: userInfo) - - waitForExpectations(timeout: 1) - } -} - -private let PMKTestNotification = Notification.Name("PMKTestNotification") diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Tests/TestNSObject.swift b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Tests/TestNSObject.swift deleted file mode 100644 index fc8806e6c..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Tests/TestNSObject.swift +++ /dev/null @@ -1,76 +0,0 @@ -import PMKFoundation -import Foundation -import PromiseKit -import XCTest - -class NSObjectTests: XCTestCase { - func testKVO() { - let ex = expectation(description: "") - - let foo = Foo() - foo.observe(.promise, keyPath: "bar").done { newValue in - XCTAssertEqual(newValue as? String, "moo") - ex.fulfill() - }.catch { _ in - XCTFail() - } - foo.bar = "moo" - - waitForExpectations(timeout: 1) - } - - func testAfterlife() { - let ex = expectation(description: "") - var killme: NSObject! - - autoreleasepool { - - func innerScope() { - killme = NSObject() - after(life: killme).done { _ in - //… - ex.fulfill() - } - } - - innerScope() - - after(.milliseconds(200)).done { - killme = nil - } - } - - waitForExpectations(timeout: 1) - } - - func testMultiObserveAfterlife() { - let ex1 = expectation(description: "") - let ex2 = expectation(description: "") - var killme: NSObject! - - autoreleasepool { - - func innerScope() { - killme = NSObject() - after(life: killme).done { _ in - ex1.fulfill() - } - after(life: killme).done { _ in - ex2.fulfill() - } - } - - innerScope() - - after(.milliseconds(200)).done { - killme = nil - } - } - - waitForExpectations(timeout: 1) - } -} - -private class Foo: NSObject { - @objc dynamic var bar: String = "bar" -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Tests/TestNSTask.swift b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Tests/TestNSTask.swift deleted file mode 100644 index 8d94c489a..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Tests/TestNSTask.swift +++ /dev/null @@ -1,50 +0,0 @@ -import PMKFoundation -import Foundation -import PromiseKit -import XCTest - -#if os(macOS) - -class NSTaskTests: XCTestCase { - func test1() { - let ex = expectation(description: "") - let task = Process() - task.launchPath = "/usr/bin/basename" - task.arguments = ["/foo/doe/bar"] - task.launch(.promise).done { stdout, _ in - let stdout = String(data: stdout.fileHandleForReading.readDataToEndOfFile(), encoding: .utf8) - XCTAssertEqual(stdout, "bar\n") - ex.fulfill() - } - waitForExpectations(timeout: 10) - } - - func test2() { - let ex = expectation(description: "") - let dir = "PMKAbsentDirectory" - - let task = Process() - task.launchPath = "/bin/ls" - task.arguments = [dir] - - task.launch(.promise).done { _ in - XCTFail() - }.catch { err in - do { - throw err - } catch Process.PMKError.execution(let proc, let stdout, let stderr) { - let expectedStderr = "ls: \(dir): No such file or directory\n" - - XCTAssertEqual(stderr, expectedStderr) - XCTAssertEqual(proc.terminationStatus, 1) - XCTAssertEqual(stdout?.count ?? 0, 0) - } catch { - XCTFail() - } - ex.fulfill() - } - waitForExpectations(timeout: 10) - } -} - -#endif diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Tests/TestNSURLSession.m b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Tests/TestNSURLSession.m deleted file mode 100644 index 314de699e..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Tests/TestNSURLSession.m +++ /dev/null @@ -1,55 +0,0 @@ -@import PMKFoundation; -@import OHHTTPStubs; -@import Foundation; -@import PromiseKit; -@import XCTest; - -@implementation NSURLSessionTests: XCTestCase - -- (void)tearDown { - [OHHTTPStubs removeAllStubs]; -} - -- (void)test200 { - id stubData = [NSData dataWithBytes:"a" length:1]; - - [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *rq){ - return [rq.URL.host isEqualToString:@"example.com"]; - } withStubResponse:^(NSURLRequest *request){ - return [OHHTTPStubsResponse responseWithData:stubData statusCode:200 headers:@{@"Content-Type": @"text/html"}]; - }]; - - id ex = [self expectationWithDescription:@""]; - id rq = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://example.com"]]; - - [[NSURLSession sharedSession] promiseDataTaskWithRequest:rq].then(^{ - [ex fulfill]; - }); - - [self waitForExpectationsWithTimeout:10 handler:nil]; -} - -- (void)testBadJSON { - id stubData = [NSData dataWithBytes:"[a: 3]" length:1]; - - [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *rq){ - return [rq.URL.host isEqualToString:@"example.com"]; - } withStubResponse:^(NSURLRequest *request){ - return [OHHTTPStubsResponse responseWithData:stubData statusCode:200 headers:@{@"Content-Type": @"application/json"}]; - }]; - - id ex = [self expectationWithDescription:@""]; - id rq = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://example.com"]]; - - [[NSURLSession sharedSession] promiseDataTaskWithRequest:rq].catch(^(NSError *err){ - XCTAssertEqualObjects(err.domain, NSCocoaErrorDomain); //TODO this is why we should replace this domain - XCTAssertEqual(err.code, 3840); - XCTAssertEqualObjects(err.userInfo[PMKURLErrorFailingDataKey], stubData); - XCTAssertNotNil(err.userInfo[PMKURLErrorFailingURLResponseKey]); - [ex fulfill]; - }); - - [self waitForExpectationsWithTimeout:10 handler:nil]; -} - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Tests/TestNSURLSession.swift b/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Tests/TestNSURLSession.swift deleted file mode 100644 index f6906b556..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Foundation/Tests/TestNSURLSession.swift +++ /dev/null @@ -1,76 +0,0 @@ -import PMKFoundation -import OHHTTPStubs -import PromiseKit -import XCTest - -class NSURLSessionTests: XCTestCase { - func test1() { - let json: NSDictionary = ["key1": "value1", "key2": ["value2A", "value2B"]] - - OHHTTPStubs.stubRequests(passingTest: { $0.url!.host == "example.com" }) { _ in - return OHHTTPStubsResponse(jsonObject: json, statusCode: 200, headers: nil) - } - - let ex = expectation(description: "") - let rq = URLRequest(url: URL(string: "http://example.com")!) - firstly { - URLSession.shared.dataTask(.promise, with: rq) - }.compactMap { - try JSONSerialization.jsonObject(with: $0.data) as? NSDictionary - }.done { rsp in - XCTAssertEqual(json, rsp) - ex.fulfill() - } - waitForExpectations(timeout: 1) - } - - func test2() { - - // test that URLDataPromise chains thens - // this test because I don’t trust the Swift compiler - - let dummy = ("fred" as NSString).data(using: String.Encoding.utf8.rawValue)! - - OHHTTPStubs.stubRequests(passingTest: { $0.url!.host == "example.com" }) { _ in - return OHHTTPStubsResponse(data: dummy, statusCode: 200, headers: [:]) - } - - let ex = expectation(description: "") - let rq = URLRequest(url: URL(string: "http://example.com")!) - - after(.milliseconds(100)).then { - URLSession.shared.dataTask(.promise, with: rq) - }.done { x in - XCTAssertEqual(x.data, dummy) - ex.fulfill() - } - - waitForExpectations(timeout: 1) - } - - /// test that our convenience String constructor applies - func test3() { - let dummy = "fred" - - OHHTTPStubs.stubRequests(passingTest: { $0.url!.host == "example.com" }) { _ in - let data = dummy.data(using: .utf8)! - return OHHTTPStubsResponse(data: data, statusCode: 200, headers: [:]) - } - - let ex = expectation(description: "") - let rq = URLRequest(url: URL(string: "http://example.com")!) - - after(.milliseconds(100)).then { - URLSession.shared.dataTask(.promise, with: rq) - }.map(String.init).done { - XCTAssertEqual($0, dummy) - ex.fulfill() - } - - waitForExpectations(timeout: 1) - } - - override func tearDown() { - OHHTTPStubs.removeAllStubs() - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/.gitignore b/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/.gitignore deleted file mode 100644 index bec9c1741..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.xcodeproj/**/xcuserdata/ -*.xcscmblueprint -/Carthage -/.build -.DS_Store \ No newline at end of file diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/.travis.yml b/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/.travis.yml deleted file mode 100644 index 91caf3a78..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/.travis.yml +++ /dev/null @@ -1,76 +0,0 @@ -osx_image: xcode10.2 -language: swift -os: osx - -branches: - only: - - master -stages: - - lint - - test -jobs: - include: - - &pod - stage: lint - osx_image: xcode8.3 - env: SWIFT=3.1 - cache: cocoapods - before_install: - gem install cocoapods --prerelease --version 1.7.0.beta.3 - install: - carthage bootstrap --no-build PromiseKit - script: | - cd Carthage/Checkouts/PromiseKit - mv .github/PromiseKit.podspec . - rm -rf Extensions/HealthKit/Sources - cp -R ../../../Sources Extensions/HealthKit - pod lib lint --subspec=PromiseKit/HealthKit --fail-fast --swift-version=$SWIFT - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=3.2 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=3.3 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=3.4 - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=4.0 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=4.1 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=4.2 - - <<: *pod - osx_image: xcode10.2 - env: SWIFT=4.3 - - <<: *pod - osx_image: xcode10.2 - env: SWIFT=5.0 - - - &carthage - stage: carthage - osx_image: xcode9.2 - script: | - carthage bootstrap --cache-builds --platform iOS,macOS - sed -i '' "s/SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;/SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;/" *.xcodeproj/project.pbxproj - carthage build --no-skip-current - cache.directories: - - Carthage - - <<: *carthage - osx_image: xcode9.4 - - <<: *carthage - osx_image: xcode10.1 - - <<: *carthage - osx_image: xcode10.2 - - - stage: test - xcode_scheme: PMKHealthKit - xcode_project: PMKHealthKit.xcodeproj - xcode_destination: 'platform=iOS Simulator,OS=12.2,name=iPhone SE' - cache.directories: - - Carthage - before_install: - carthage bootstrap --cache-builds --no-use-binaries diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/Cartfile b/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/Cartfile deleted file mode 100644 index d4703e986..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" ~> 6.8.4 diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/Cartfile.resolved b/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/Cartfile.resolved deleted file mode 100644 index f54bbdbf2..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/Cartfile.resolved +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" "6.8.4" diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/Carthage.xcconfig b/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/Carthage.xcconfig deleted file mode 100644 index c8b995651..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/Carthage.xcconfig +++ /dev/null @@ -1,7 +0,0 @@ -// Created by Kevin Ballard on 12/14/15. -// Copyright © 2015 Postmates. All rights reserved. - -FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(SRCROOT)/Carthage/Build/Mac/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=iphone*] = $(SRCROOT)/Carthage/Build/iOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=watch*] = $(SRCROOT)/Carthage/Build/watchOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=appletv*] = $(SRCROOT)/Carthage/Build/tvOS/ $(inherited) diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/Info.plist b/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/Info.plist deleted file mode 100644 index 20b05ecd4..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/LICENSE b/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/LICENSE deleted file mode 100644 index 50f758c89..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2016-present, Max Howell; mxcl@me.com - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/PMKHealthKit.xcodeproj/project.pbxproj b/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/PMKHealthKit.xcodeproj/project.pbxproj deleted file mode 100644 index 8d563879a..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/PMKHealthKit.xcodeproj/project.pbxproj +++ /dev/null @@ -1,450 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 6384FB811D5D4F6D00453755 /* HealthKit+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6384FB801D5D4F6D00453755 /* HealthKit+Promise.swift */; }; - 6384FB831D5D4F8B00453755 /* TestHealthKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6384FB821D5D4F8B00453755 /* TestHealthKit.swift */; }; - 63C7FFF71D5C020D003BAE60 /* PMKHealthKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C7FFA71D5BEE09003BAE60 /* PMKHealthKit.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 63C7FF9E1D5BEE09003BAE60 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 63C7FFA61D5BEE09003BAE60; - remoteInfo = PMKWatchConnectivity; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 6384FB801D5D4F6D00453755 /* HealthKit+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "HealthKit+Promise.swift"; path = "Sources/HealthKit+Promise.swift"; sourceTree = SOURCE_ROOT; }; - 6384FB821D5D4F8B00453755 /* TestHealthKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TestHealthKit.swift; path = Tests/TestHealthKit.swift; sourceTree = SOURCE_ROOT; }; - 63C700091D5C0253003BAE60 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 63C7FFA71D5BEE09003BAE60 /* PMKHealthKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PMKHealthKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 63C7FFF21D5C020D003BAE60 /* PMKHKTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PMKHKTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 63CCF8121D5C0C4E00503216 /* Cartfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile; sourceTree = ""; }; - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Carthage.xcconfig; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 63C7FFA31D5BEE09003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEF1D5C020D003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 63C7FFF71D5C020D003BAE60 /* PMKHealthKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 63C7FF9D1D5BEE09003BAE60 = { - isa = PBXGroup; - children = ( - 63C700091D5C0253003BAE60 /* Info.plist */, - 63CCF8121D5C0C4E00503216 /* Cartfile */, - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */, - 63C7FFA91D5BEE09003BAE60 /* Sources */, - 63C7FFF31D5C020D003BAE60 /* Tests */, - 63C7FFA81D5BEE09003BAE60 /* Products */, - ); - sourceTree = ""; - }; - 63C7FFA81D5BEE09003BAE60 /* Products */ = { - isa = PBXGroup; - children = ( - 63C7FFA71D5BEE09003BAE60 /* PMKHealthKit.framework */, - 63C7FFF21D5C020D003BAE60 /* PMKHKTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 63C7FFA91D5BEE09003BAE60 /* Sources */ = { - isa = PBXGroup; - children = ( - 6384FB801D5D4F6D00453755 /* HealthKit+Promise.swift */, - ); - path = Sources; - sourceTree = SOURCE_ROOT; - }; - 63C7FFF31D5C020D003BAE60 /* Tests */ = { - isa = PBXGroup; - children = ( - 6384FB821D5D4F8B00453755 /* TestHealthKit.swift */, - ); - path = Tests; - sourceTree = SOURCE_ROOT; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 63C7FFA41D5BEE09003BAE60 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 63C7FFA61D5BEE09003BAE60 /* PMKHealthKit */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKHealthKit" */; - buildPhases = ( - 63C7FFA21D5BEE09003BAE60 /* Sources */, - 63C7FFA31D5BEE09003BAE60 /* Frameworks */, - 63C7FFA41D5BEE09003BAE60 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PMKHealthKit; - productName = "PMK+UIKit"; - productReference = 63C7FFA71D5BEE09003BAE60 /* PMKHealthKit.framework */; - productType = "com.apple.product-type.framework"; - }; - 63C7FFF11D5C020D003BAE60 /* PMKHKTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKHKTests" */; - buildPhases = ( - 63C7FFEE1D5C020D003BAE60 /* Sources */, - 63C7FFEF1D5C020D003BAE60 /* Frameworks */, - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */, - ); - name = PMKHKTests; - productName = PMKTests/NS; - productReference = 63C7FFF21D5C020D003BAE60 /* PMKHKTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 63C7FF9E1D5BEE09003BAE60 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = "Max Howell"; - TargetAttributes = { - 63C7FFA61D5BEE09003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - 63C7FFF11D5C020D003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKHealthKit" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 63C7FF9D1D5BEE09003BAE60; - productRefGroup = 63C7FFA81D5BEE09003BAE60 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 63C7FFA61D5BEE09003BAE60 /* PMKHealthKit */, - 63C7FFF11D5C020D003BAE60 /* PMKHKTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXShellScriptBuildPhase section */ - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - PromiseKit, - ); - name = "Embed Carthage Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "case \"$PLATFORM_NAME\" in\nmacosx) plat=Mac;;\niphone*) plat=iOS;;\nwatch*) plat=watchOS;;\nappletv*) plat=tvOS;;\n*) echo \"error: Unknown PLATFORM_NAME: $PLATFORM_NAME\"; exit 1;;\nesac\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nframework=$(basename \"${!VAR}\")\nexport SCRIPT_INPUT_FILE_$n=\"$SRCROOT\"/Carthage/Build/$plat/\"$framework\".framework\ndone\n\n/usr/local/bin/carthage copy-frameworks || exit\n\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nsource=${!VAR}.dSYM\ndest=${BUILT_PRODUCTS_DIR}/$(basename \"$source\")\nditto \"$source\" \"$dest\" || exit\ndone"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 63C7FFA21D5BEE09003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6384FB811D5D4F6D00453755 /* HealthKit+Promise.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEE1D5C020D003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6384FB831D5D4F8B00453755 /* TestHealthKit.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 63C7FFA61D5BEE09003BAE60 /* PMKHealthKit */; - targetProxy = 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 63C7FFAD1D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.Foundation; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos watchsimulator watchos"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Debug; - }; - 63C7FFAE1D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.Foundation; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos watchsimulator watchos"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Release; - }; - 63C7FFB01D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Debug; - }; - 63C7FFB11D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Release; - }; - 63C7FFFB1D5C020D003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SUPPRESS_WARNINGS = YES; - }; - name = Debug; - }; - 63C7FFFC1D5C020D003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SUPPRESS_WARNINGS = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKHealthKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFAD1D5BEE09003BAE60 /* Debug */, - 63C7FFAE1D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKHealthKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFB01D5BEE09003BAE60 /* Debug */, - 63C7FFB11D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKHKTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFFB1D5C020D003BAE60 /* Debug */, - 63C7FFFC1D5C020D003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 63C7FF9E1D5BEE09003BAE60 /* Project object */; -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/PMKHealthKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/PMKHealthKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index b49fefe7f..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/PMKHealthKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/PMKHealthKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/PMKHealthKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/PMKHealthKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/PMKHealthKit.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/PMKHealthKit.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index 08de0be8d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/PMKHealthKit.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/PMKHealthKit.xcodeproj/xcshareddata/xcschemes/PMKHealthKit.xcscheme b/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/PMKHealthKit.xcodeproj/xcshareddata/xcschemes/PMKHealthKit.xcscheme deleted file mode 100644 index 53cd10495..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/PMKHealthKit.xcodeproj/xcshareddata/xcschemes/PMKHealthKit.xcscheme +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/README.markdown b/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/README.markdown deleted file mode 100644 index a457ad4e3..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/README.markdown +++ /dev/null @@ -1,34 +0,0 @@ -# PromiseKit HealthKit Extensions ![Build Status] - -This project adds promises to Apple’s HealthKit framework. - -## CocoaPods - -```ruby -pod "PromiseKit/HealthKit" ~> 6.0 -``` - -The extensions are built into `PromiseKit.framework` thus nothing else is needed. - -## Carthage - -```ruby -github "PromiseKit/PMKHealthKit" ~> 1.0 -``` - -The extensions are built into their own framework: - -```swift -// swift -import PromiseKit -import PMKHealthKit -``` - -```objc -// objc -@import PromiseKit; -@import PMKHealthKit; -``` - - -[Build Status]: https://travis-ci.org/PromiseKit/PMKHealthKit.svg?branch=master diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/Sources/HealthKit+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/Sources/HealthKit+Promise.swift deleted file mode 100644 index b83fb9f87..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/Sources/HealthKit+Promise.swift +++ /dev/null @@ -1,83 +0,0 @@ -import HealthKit -#if !PMKCocoaPods -import PromiseKit -#endif - -public extension HKHealthStore { - func requestAuthorization(toShare typesToShare: Set?, read typesToRead: Set?) -> Promise { - return Promise { seal in - requestAuthorization(toShare: typesToShare, read: typesToRead, completion: seal.resolve) - } - } - -#if os(iOS) - func enableBackgroundDelivery(for type: HKObjectType, frequency: HKUpdateFrequency) -> Promise { - return Promise { seal in - enableBackgroundDelivery(for: type, frequency: frequency, withCompletion: seal.resolve) - } - } -#endif -} - -public extension HKStatisticsQuery { - static func promise(quantityType: HKQuantityType, quantitySamplePredicate: NSPredicate? = nil, options: HKStatisticsOptions = [], healthStore: HKHealthStore = .init()) -> Promise { - return Promise { seal in - let query = HKStatisticsQuery(quantityType: quantityType, quantitySamplePredicate: quantitySamplePredicate, options: options) { - seal.resolve($1, $2) - } - healthStore.execute(query) - } - } -} - -public extension HKAnchoredObjectQuery { - static func promise(type: HKSampleType, predicate: NSPredicate? = nil, anchor: HKQueryAnchor? = nil, limit: Int = HKObjectQueryNoLimit, healthStore: HKHealthStore = .init()) -> Promise<([HKSample], [HKDeletedObject], HKQueryAnchor)> { - return Promise { seal in - let query = HKAnchoredObjectQuery(type: type, predicate: predicate, anchor: anchor, limit: limit) { - if let a = $1, let b = $2, let c = $3 { - seal.fulfill((a, b, c)) - } else if let e = $4 { - seal.reject(e) - } else { - seal.reject(PMKError.invalidCallingConvention) - } - } - healthStore.execute(query) - } - } - -} - -public extension HKStatisticsCollectionQuery { - func promise(healthStore: HKHealthStore = .init()) -> Promise { - return Promise { seal in - initialResultsHandler = { - seal.resolve($1, $2) - } - healthStore.execute(self) - } - } -} - -public extension HKSampleQuery { - static func promise(sampleType: HKSampleType, predicate: NSPredicate? = nil, limit: Int = HKObjectQueryNoLimit, sortDescriptors: [NSSortDescriptor]? = nil, healthStore: HKHealthStore = .init()) -> Promise<[HKSample]> { - return Promise { seal in - let query = HKSampleQuery(sampleType: sampleType, predicate: predicate, limit: limit, sortDescriptors: sortDescriptors) { - seal.resolve($1, $2) - } - healthStore.execute(query) - } - } -} - -@available(iOS 9.3, iOSApplicationExtension 9.3, watchOSApplicationExtension 2.2, *) -public extension HKActivitySummaryQuery { - static func promise(predicate: NSPredicate, healthStore: HKHealthStore = .init()) -> Promise<[HKActivitySummary]> { - return Promise { seal in - let query = HKActivitySummaryQuery(predicate: predicate) { - seal.resolve($1, $2) - } - healthStore.execute(query) - } - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/Tests/TestHealthKit.swift b/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/Tests/TestHealthKit.swift deleted file mode 100644 index 727a09dd8..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HealthKit/Tests/TestHealthKit.swift +++ /dev/null @@ -1,4 +0,0 @@ -import PMKHealthKit -import PromiseKit -import HealthKit -import XCTest diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/.gitignore b/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/.gitignore deleted file mode 100644 index bec9c1741..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.xcodeproj/**/xcuserdata/ -*.xcscmblueprint -/Carthage -/.build -.DS_Store \ No newline at end of file diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/.travis.yml b/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/.travis.yml deleted file mode 100644 index 5a0f7450a..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/.travis.yml +++ /dev/null @@ -1,67 +0,0 @@ -os: osx -language: swift -osx_image: xcode10.2 - -branches: - only: - - master -stages: - - lint - - carthage - - test -jobs: - include: - - &pod - stage: lint - osx_image: xcode9.4 - env: SWIFT=3.3 - before_install: - gem install cocoapods --prerelease --version 1.7.0.beta.3 - install: - carthage bootstrap --no-build PromiseKit - script: | - cd Carthage/Checkouts/PromiseKit - mv .github/PromiseKit.podspec . - rm -rf Extensions/HomeKit/Sources - cp -R ../../../Sources Extensions/HomeKit - pod lib lint --subspec=PromiseKit/HomeKit --fail-fast --swift-version=$SWIFT - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=3.4 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=4.1 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=4.2 - - <<: *pod - osx_image: xcode10.2 - env: SWIFT=5.0 - - - &carthage - stage: carthage - osx_image: xcode9.4 - script: | - carthage bootstrap --cache-builds - sed -i '' "s/SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;/SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;/" *.xcodeproj/project.pbxproj - carthage build --no-skip-current - cache.directories: - - Carthage - - <<: *carthage - osx_image: xcode10.1 - - <<: *carthage - osx_image: xcode10.2 - - - &test - stage: test - xcode_scheme: PMKHomeKit - xcode_project: PMKHomeKit.xcodeproj - xcode_destination: 'platform=iOS Simulator,OS=12.2,name=iPhone SE' - cache.directories: - - Carthage - before_install: - carthage bootstrap --cache-builds --no-use-binaries - after_success: - bash <(curl -s https://codecov.io/bash); - - <<: *test - xcode_destination: 'platform=tvOS Simulator,OS=12.2,name=Apple TV' diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Cartfile b/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Cartfile deleted file mode 100644 index d4703e986..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" ~> 6.8.4 diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Cartfile.resolved b/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Cartfile.resolved deleted file mode 100644 index f54bbdbf2..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Cartfile.resolved +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" "6.8.4" diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Carthage.xcconfig b/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Carthage.xcconfig deleted file mode 100644 index de9f238cd..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Carthage.xcconfig +++ /dev/null @@ -1,6 +0,0 @@ -// Created by Kevin Ballard on 12/14/15. -// Copyright © 2015 Postmates. All rights reserved. - -FRAMEWORK_SEARCH_PATHS[sdk=iphone*] = $(SRCROOT)/Carthage/Build/iOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=watch*] = $(SRCROOT)/Carthage/Build/watchOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=appletv*] = $(SRCROOT)/Carthage/Build/tvOS/ $(inherited) diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Info.plist b/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Info.plist deleted file mode 100644 index fbe1e6b31..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/LICENSE b/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/LICENSE deleted file mode 100644 index 50f758c89..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2016-present, Max Howell; mxcl@me.com - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/PMKHomeKit.xcodeproj/project.pbxproj b/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/PMKHomeKit.xcodeproj/project.pbxproj deleted file mode 100644 index cf1456479..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/PMKHomeKit.xcodeproj/project.pbxproj +++ /dev/null @@ -1,480 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 63C7FFF71D5C020D003BAE60 /* PMKHomeKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C7FFA71D5BEE09003BAE60 /* PMKHomeKit.framework */; }; - 7D619865235E333E001E0F2E /* HMActionSet+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D619864235E333E001E0F2E /* HMActionSet+Promise.swift */; }; - 7D619867235E33AC001E0F2E /* HMTrigger+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D619866235E33AC001E0F2E /* HMTrigger+Promise.swift */; }; - 7D619869235E3401001E0F2E /* HMEventTrigger+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D619868235E3401001E0F2E /* HMEventTrigger+Promise.swift */; }; - 8312EA1521096DF000A47DDF /* HMAccessoryBrowserTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8312EA1421096DF000A47DDF /* HMAccessoryBrowserTests.swift */; }; - 8312EA19210974F600A47DDF /* UtilsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8312EA18210974F600A47DDF /* UtilsTests.swift */; }; - 838C29D32103FB9700CE5309 /* HMAcessoryBrowser+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 838C29CE2103FB9600CE5309 /* HMAcessoryBrowser+Promise.swift */; }; - 838C29D42103FB9700CE5309 /* HMHome+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 838C29CF2103FB9700CE5309 /* HMHome+Promise.swift */; }; - 838C29D52103FB9700CE5309 /* HMCharacteristic+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 838C29D02103FB9700CE5309 /* HMCharacteristic+Promise.swift */; }; - 838C29D62103FB9700CE5309 /* HMHomeManager+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 838C29D12103FB9700CE5309 /* HMHomeManager+Promise.swift */; }; - 838C29D72103FB9700CE5309 /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 838C29D22103FB9700CE5309 /* Utils.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 63C7FF9E1D5BEE09003BAE60 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 63C7FFA61D5BEE09003BAE60; - remoteInfo = PMKCoreLocation; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 63C700091D5C0253003BAE60 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 63C7FFA71D5BEE09003BAE60 /* PMKHomeKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PMKHomeKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 63C7FFF21D5C020D003BAE60 /* PMKHKTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PMKHKTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 63CCF8121D5C0C4E00503216 /* Cartfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile; sourceTree = ""; }; - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Carthage.xcconfig; sourceTree = ""; }; - 7D619864235E333E001E0F2E /* HMActionSet+Promise.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "HMActionSet+Promise.swift"; sourceTree = ""; }; - 7D619866235E33AC001E0F2E /* HMTrigger+Promise.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "HMTrigger+Promise.swift"; sourceTree = ""; }; - 7D619868235E3401001E0F2E /* HMEventTrigger+Promise.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "HMEventTrigger+Promise.swift"; sourceTree = ""; }; - 8312EA1421096DF000A47DDF /* HMAccessoryBrowserTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HMAccessoryBrowserTests.swift; sourceTree = ""; }; - 8312EA18210974F600A47DDF /* UtilsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UtilsTests.swift; sourceTree = ""; }; - 838C29CE2103FB9600CE5309 /* HMAcessoryBrowser+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "HMAcessoryBrowser+Promise.swift"; sourceTree = ""; }; - 838C29CF2103FB9700CE5309 /* HMHome+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "HMHome+Promise.swift"; sourceTree = ""; }; - 838C29D02103FB9700CE5309 /* HMCharacteristic+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "HMCharacteristic+Promise.swift"; sourceTree = ""; }; - 838C29D12103FB9700CE5309 /* HMHomeManager+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "HMHomeManager+Promise.swift"; sourceTree = ""; }; - 838C29D22103FB9700CE5309 /* Utils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Utils.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 63C7FFA31D5BEE09003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEF1D5C020D003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 63C7FFF71D5C020D003BAE60 /* PMKHomeKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 63C7FF9D1D5BEE09003BAE60 = { - isa = PBXGroup; - children = ( - 63C700091D5C0253003BAE60 /* Info.plist */, - 63CCF8121D5C0C4E00503216 /* Cartfile */, - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */, - 63C7FFA91D5BEE09003BAE60 /* Sources */, - 63C7FFF31D5C020D003BAE60 /* Tests */, - 63C7FFA81D5BEE09003BAE60 /* Products */, - ); - sourceTree = ""; - }; - 63C7FFA81D5BEE09003BAE60 /* Products */ = { - isa = PBXGroup; - children = ( - 63C7FFA71D5BEE09003BAE60 /* PMKHomeKit.framework */, - 63C7FFF21D5C020D003BAE60 /* PMKHKTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 63C7FFA91D5BEE09003BAE60 /* Sources */ = { - isa = PBXGroup; - children = ( - 838C29D02103FB9700CE5309 /* HMCharacteristic+Promise.swift */, - 838C29CE2103FB9600CE5309 /* HMAcessoryBrowser+Promise.swift */, - 7D619864235E333E001E0F2E /* HMActionSet+Promise.swift */, - 7D619868235E3401001E0F2E /* HMEventTrigger+Promise.swift */, - 838C29CF2103FB9700CE5309 /* HMHome+Promise.swift */, - 838C29D12103FB9700CE5309 /* HMHomeManager+Promise.swift */, - 7D619866235E33AC001E0F2E /* HMTrigger+Promise.swift */, - 838C29D22103FB9700CE5309 /* Utils.swift */, - ); - path = Sources; - sourceTree = SOURCE_ROOT; - }; - 63C7FFF31D5C020D003BAE60 /* Tests */ = { - isa = PBXGroup; - children = ( - 8312EA1421096DF000A47DDF /* HMAccessoryBrowserTests.swift */, - 8312EA18210974F600A47DDF /* UtilsTests.swift */, - ); - path = Tests; - sourceTree = SOURCE_ROOT; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 63C7FFA41D5BEE09003BAE60 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 63C7FFA61D5BEE09003BAE60 /* PMKHomeKit */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKHomeKit" */; - buildPhases = ( - 63C7FFA21D5BEE09003BAE60 /* Sources */, - 63C7FFA31D5BEE09003BAE60 /* Frameworks */, - 63C7FFA41D5BEE09003BAE60 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PMKHomeKit; - productName = "PMK+UIKit"; - productReference = 63C7FFA71D5BEE09003BAE60 /* PMKHomeKit.framework */; - productType = "com.apple.product-type.framework"; - }; - 63C7FFF11D5C020D003BAE60 /* PMKHKTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKHKTests" */; - buildPhases = ( - 63C7FFEE1D5C020D003BAE60 /* Sources */, - 63C7FFEF1D5C020D003BAE60 /* Frameworks */, - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */, - ); - name = PMKHKTests; - productName = PMKTests/NS; - productReference = 63C7FFF21D5C020D003BAE60 /* PMKHKTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 63C7FF9E1D5BEE09003BAE60 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = "Max Howell"; - TargetAttributes = { - 63C7FFA61D5BEE09003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - 63C7FFF11D5C020D003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKHomeKit" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 63C7FF9D1D5BEE09003BAE60; - productRefGroup = 63C7FFA81D5BEE09003BAE60 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 63C7FFA61D5BEE09003BAE60 /* PMKHomeKit */, - 63C7FFF11D5C020D003BAE60 /* PMKHKTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXShellScriptBuildPhase section */ - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - PromiseKit, - ); - name = "Embed Carthage Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "case \"$PLATFORM_NAME\" in\nmacosx) plat=Mac;;\niphone*) plat=iOS;;\nwatch*) plat=watchOS;;\nappletv*) plat=tvOS;;\n*) echo \"error: Unknown PLATFORM_NAME: $PLATFORM_NAME\"; exit 1;;\nesac\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nframework=$(basename \"${!VAR}\")\nexport SCRIPT_INPUT_FILE_$n=\"$SRCROOT\"/Carthage/Build/$plat/\"$framework\".framework\ndone\n\n/usr/local/bin/carthage copy-frameworks || exit\n\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nsource=${!VAR}.dSYM\ndest=${BUILT_PRODUCTS_DIR}/$(basename \"$source\")\nditto \"$source\" \"$dest\" || exit\ndone"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 63C7FFA21D5BEE09003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 838C29D62103FB9700CE5309 /* HMHomeManager+Promise.swift in Sources */, - 7D619865235E333E001E0F2E /* HMActionSet+Promise.swift in Sources */, - 838C29D52103FB9700CE5309 /* HMCharacteristic+Promise.swift in Sources */, - 838C29D42103FB9700CE5309 /* HMHome+Promise.swift in Sources */, - 7D619869235E3401001E0F2E /* HMEventTrigger+Promise.swift in Sources */, - 7D619867235E33AC001E0F2E /* HMTrigger+Promise.swift in Sources */, - 838C29D32103FB9700CE5309 /* HMAcessoryBrowser+Promise.swift in Sources */, - 838C29D72103FB9700CE5309 /* Utils.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEE1D5C020D003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8312EA1521096DF000A47DDF /* HMAccessoryBrowserTests.swift in Sources */, - 8312EA19210974F600A47DDF /* UtilsTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 63C7FFA61D5BEE09003BAE60 /* PMKHomeKit */; - targetProxy = 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 63C7FFAD1D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.CoreLocation; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos watchsimulator watchos appletvsimulator appletvos"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 3.0; - }; - name = Debug; - }; - 63C7FFAE1D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.CoreLocation; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos watchsimulator watchos appletvsimulator appletvos"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 3.0; - }; - name = Release; - }; - 63C7FFB01D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Debug; - }; - 63C7FFB11D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Release; - }; - 63C7FFFB1D5C020D003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SUPPRESS_WARNINGS = YES; - }; - name = Debug; - }; - 63C7FFFC1D5C020D003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SUPPRESS_WARNINGS = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKHomeKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFAD1D5BEE09003BAE60 /* Debug */, - 63C7FFAE1D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKHomeKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFB01D5BEE09003BAE60 /* Debug */, - 63C7FFB11D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKHKTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFFB1D5C020D003BAE60 /* Debug */, - 63C7FFFC1D5C020D003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 63C7FF9E1D5BEE09003BAE60 /* Project object */; -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/PMKHomeKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/PMKHomeKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index b49fefe7f..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/PMKHomeKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/PMKHomeKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/PMKHomeKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/PMKHomeKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/PMKHomeKit.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/PMKHomeKit.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index 08de0be8d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/PMKHomeKit.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/PMKHomeKit.xcodeproj/xcshareddata/xcschemes/PMKHomeKit.xcscheme b/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/PMKHomeKit.xcodeproj/xcshareddata/xcschemes/PMKHomeKit.xcscheme deleted file mode 100644 index 5134cc689..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/PMKHomeKit.xcodeproj/xcshareddata/xcschemes/PMKHomeKit.xcscheme +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/README.markdown b/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/README.markdown deleted file mode 100644 index b48f5d67c..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/README.markdown +++ /dev/null @@ -1,32 +0,0 @@ -# PromiseKit HomeKit Extensions ![Build Status] - -This project adds promises to Apple’s HomeKit framework. - -* Xcode >= 9.3 required for iOS -* Xcode >= 9.0 required for all other platforms - -Thus, Swift versions supported are: 3.2, 3.3, 3.4, 4.0, 4.1 & 4.2. - -## CocoaPods - -```ruby -pod "PromiseKit/HomeKit", "~> 6.0" -``` - -The extensions are built into PromiseKit.framework thus nothing else is needed. - -## Carthage - -```ruby -github "PromiseKit/HomeKit" ~> 1.0 -``` - -The extension is built into it's own framework: - -```swift -import PromiseKit -import PMKHomeKit -``` - - -[Build Status]: https://travis-ci.org/chrischares/PromiseKit-HomeKit.svg?branch=master diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/HMAcessoryBrowser+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/HMAcessoryBrowser+Promise.swift deleted file mode 100644 index 80d2e521d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/HMAcessoryBrowser+Promise.swift +++ /dev/null @@ -1,78 +0,0 @@ -import Foundation -import HomeKit -#if !PMKCocoaPods -import PromiseKit -#endif - -#if !os(tvOS) && !os(watchOS) - -public enum HMPromiseAccessoryBrowserError: Error { - case noAccessoryFound -} - -public class HMPromiseAccessoryBrowser { - private var proxy: BrowserProxy? - - public func start(scanInterval: ScanInterval) -> Promise<[HMAccessory]> { - proxy = BrowserProxy(scanInterval: scanInterval) - return proxy!.promise - } - - public func stop() { - proxy?.cancel() - } -} - -private class BrowserProxy: PromiseProxy<[HMAccessory]>, HMAccessoryBrowserDelegate { - let browser = HMAccessoryBrowser() - let scanInterval: ScanInterval - - init(scanInterval: ScanInterval) { - self.scanInterval = scanInterval - super.init() - - browser.delegate = self; - browser.startSearchingForNewAccessories() - - //if we have a timeout, set it up - var timeout: TimeInterval? = nil - switch scanInterval { - case .returnAll(let interval): timeout = interval - case .returnFirst(let interval): timeout = interval - } - - if let timeout = timeout { - after(seconds: timeout) - .done { [weak self] () -> Void in - guard let _self = self else { return } - _self.reject(HMPromiseAccessoryBrowserError.noAccessoryFound) - } - } - } - - override func fulfill(_ value: [HMAccessory]) { - browser.stopSearchingForNewAccessories() - super.fulfill(value) - } - - override func reject(_ error: Error ) { - browser.stopSearchingForNewAccessories() - super.reject(error) - } - - override func cancel() { - browser.stopSearchingForNewAccessories() - super.cancel() - } - - /** - HMAccessoryBrowser delegate - */ - func accessoryBrowser(_ browser: HMAccessoryBrowser, didFindNewAccessory accessory: HMAccessory) { - if case .returnFirst = scanInterval { - fulfill([accessory]) - } - } -} - -#endif diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/HMActionSet+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/HMActionSet+Promise.swift deleted file mode 100644 index b56628599..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/HMActionSet+Promise.swift +++ /dev/null @@ -1,26 +0,0 @@ -import Foundation -import HomeKit -#if !PMKCocoaPods -import PromiseKit -#endif - -#if !os(tvOS) && !os(watchOS) - -extension HMActionSet { - - @available(iOS 8.0, *) - public func addAction(_ action: HMAction) -> Promise { - return Promise { seal in - self.addAction(action, completionHandler: seal.resolve) - } - } - - @available(iOS 8.0, *) - public func updateName(_ name: String) -> Promise { - return Promise { seal in - self.updateName(name, completionHandler: seal.resolve) - } - } -} - -#endif diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/HMCharacteristic+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/HMCharacteristic+Promise.swift deleted file mode 100644 index a116536e6..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/HMCharacteristic+Promise.swift +++ /dev/null @@ -1,46 +0,0 @@ -import Foundation -import HomeKit -#if !PMKCocoaPods -import PromiseKit -#endif - -public enum AccessoryError: Error { - case incorrectType - case serviceMissing - case characteristicMissing -} - -@available(iOS 8.0, tvOS 10.0, *) -extension HMCharacteristic { - /** - A simple typesafe promise wrapper around readValue - */ - public func read() -> Promise { - return Promise { seal in - self.readValue { error in - if let error = error { seal.reject(error) } - else if let value = self.value as? T { seal.fulfill(value) } - else { seal.reject(AccessoryError.incorrectType) } - } - } - } - /// Because type inference is great... until you can't compile (thanks Swift) - public func readFloat() -> Promise { return read() } - public func readDouble() -> Promise { return read() } - public func readInt() -> Promise { return read() } - public func readString() -> Promise { return read() } - - /** - A simple promise wrapper around writeValue - */ - public func write(_ value: Any?) -> Promise { - return Promise { seal in - self.writeValue(value, completionHandler: seal.resolve) - } - } - /// Explicit is good - public func writeFloat(_ value: Float) -> Promise { return write(value) } - public func writeDouble(_ value: Double) -> Promise { return write(value) } - public func writeInt(_ value: Int) -> Promise { return write(value) } - public func writeString(_ value: String) -> Promise { return write(value) } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/HMEventTrigger+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/HMEventTrigger+Promise.swift deleted file mode 100644 index 1446d1a2d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/HMEventTrigger+Promise.swift +++ /dev/null @@ -1,21 +0,0 @@ -import Foundation -import HomeKit -#if !PMKCocoaPods -import PromiseKit -#endif - -#if !os(tvOS) && !os(watchOS) - -@available(iOS 9.0, *) -extension HMEventTrigger { - - @available(iOS 11.0, *) - public func updateExecuteOnce(_ executeOnce: Bool) -> Promise { - return Promise { seal in - self.updateExecuteOnce(executeOnce, completionHandler: seal.resolve) - } - } - -} - -#endif diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/HMHome+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/HMHome+Promise.swift deleted file mode 100644 index 02c6a5502..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/HMHome+Promise.swift +++ /dev/null @@ -1,116 +0,0 @@ -import Foundation -import HomeKit -#if !PMKCocoaPods -import PromiseKit -#endif - -#if !os(tvOS) && !os(watchOS) - -extension HMHome { - - @available(iOS 8.0, *) - public func updateName(_ name: String) -> Promise { - return Promise { seal in - self.updateName(name, completionHandler: seal.resolve) - } - } - - // MARK: Accessories - - /// Add and setup a new HMAccessory. Displays it's own UI - @available(iOS 11.3, *) - public func addAndSetupAccessories(with payload: HMAccessorySetupPayload) -> Promise<[HMAccessory]> { - return Promise { seal in - self.addAndSetupAccessories(with: payload, completionHandler: seal.resolve) - } - } - - /// Add and setup a new HMAccessory. Displays it's own UI - @available(iOS 10.0, *) - public func addAndSetupAccessories() -> Promise<[HMAccessory]> { - // We need to compare what we have before the action to after to know what is new - let beforeAccessories = self.accessories - let home = self - - return Promise { seal in - self.addAndSetupAccessories { error in - if let error = error { seal.reject(error) } - else { - let newAccessories = home.accessories.filter { beforeAccessories.contains($0) == false } - seal.fulfill(newAccessories) - } - } - } - } - - @available(iOS 8.0, *) - public func addAccessory(_ accessory: HMAccessory) -> Promise { - return Promise { seal in - self.addAccessory(accessory, completionHandler: seal.resolve) - } - } - - @available(iOS 8.0, *) - public func assignAccessory(_ accessory: HMAccessory, to room: HMRoom) -> Promise { - return Promise { seal in - self.assignAccessory(accessory, to: room, completionHandler: seal.resolve) - } - } - - @available(iOS 8.0, *) - public func removeAccessory(_ accessory: HMAccessory) -> Promise { - return Promise { seal in - self.removeAccessory(accessory, completionHandler: seal.resolve) - } - } - - // MARK: Rooms - - @available(iOS 8.0, *) - public func addRoom(withName name: String) -> Promise { - return Promise { seal in - self.addRoom(withName: name, completionHandler: seal.resolve) - } - } - - @available(iOS 8.0, *) - public func removeRoom(_ room: HMRoom) -> Promise { - return Promise { seal in - self.removeRoom(room, completionHandler: seal.resolve) - } - } - - // MARK: Action Sets - - @available(iOS 8.0, *) - public func addActionSet(withName name: String) -> Promise { - return Promise { seal in - self.addActionSet(withName: name, completionHandler: seal.resolve) - } - } - - @available(iOS 8.0, *) - public func removeActionSet(_ actionSet: HMActionSet) -> Promise { - return Promise { seal in - self.removeActionSet(actionSet, completionHandler: seal.resolve) - } - } - - // MARK: Triggers - - @available(iOS 8.0, *) - public func addTrigger(_ trigger: HMTrigger) -> Promise { - return Promise { seal in - self.addTrigger(trigger, completionHandler: seal.resolve) - } - } - - @available(iOS 8.0, *) - public func removeTrigger(_ trigger: HMTrigger) -> Promise { - return Promise { seal in - self.removeTrigger(trigger, completionHandler: seal.resolve) - } - } -} - -#endif diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/HMHomeManager+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/HMHomeManager+Promise.swift deleted file mode 100644 index 33e6311f2..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/HMHomeManager+Promise.swift +++ /dev/null @@ -1,62 +0,0 @@ -import Foundation -#if !PMKCocoaPods -import PromiseKit -#endif -import HomeKit - -@available(iOS 8.0, tvOS 10.0, *) -public enum HomeKitError: Error { - case permissionDeined -} - -@available(iOS 8.0, tvOS 10.0, *) -extension HMHomeManager { - public func homes() -> Promise<[HMHome]> { - return HMHomeManagerProxy().promise - } - - #if !os(tvOS) && !os(watchOS) - - @available(iOS 8.0, *) - public func addHome(withName name: String) -> Promise { - return Promise { seal in - self.addHome(withName: name, completionHandler: seal.resolve) - } - } - - @available(iOS 8.0, *) - public func removeHome(_ home: HMHome) -> Promise { - return Promise { seal in - self.removeHome(home, completionHandler: seal.resolve) - } - } - - @available(iOS 8.0, *) - public func updatePrimaryHome(_ home: HMHome) -> Promise { - return Promise { seal in - self.updatePrimaryHome(home, completionHandler: seal.resolve) - } - } - - #endif -} - -@available(iOS 8.0, tvOS 10.0, *) -internal class HMHomeManagerProxy: PromiseProxy<[HMHome]>, HMHomeManagerDelegate { - - fileprivate let manager: HMHomeManager - - override init() { - self.manager = HMHomeManager() - super.init() - self.manager.delegate = self - - DispatchQueue.main.asyncAfter(deadline: .now() + 20.0) { [weak self] in - self?.reject(HomeKitError.permissionDeined) - } - } - - func homeManagerDidUpdateHomes(_ manager: HMHomeManager) { - fulfill(manager.homes) - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/HMTrigger+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/HMTrigger+Promise.swift deleted file mode 100644 index edfabf038..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/HMTrigger+Promise.swift +++ /dev/null @@ -1,41 +0,0 @@ -import Foundation -import HomeKit -#if !PMKCocoaPods -import PromiseKit -#endif - -#if !os(tvOS) && !os(watchOS) - -extension HMTrigger { - - @available(iOS 8.0, *) - public func updateName(_ name: String) -> Promise { - return Promise { seal in - self.updateName(name, completionHandler: seal.resolve) - } - } - - @available(iOS 8.0, *) - public func enable(_ enabled: Bool) -> Promise { - return Promise { seal in - self.enable(enabled, completionHandler: seal.resolve) - } - } - - @available(iOS 8.0, *) - public func addActionSet(_ actionSet: HMActionSet) -> Promise { - return Promise { seal in - self.addActionSet(actionSet, completionHandler: seal.resolve) - } - } - - @available(iOS 8.0, *) - public func removeActionSet(_ actionSet: HMActionSet) -> Promise { - return Promise { seal in - self.removeActionSet(actionSet, completionHandler: seal.resolve) - } - } - -} - -#endif diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/Utils.swift b/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/Utils.swift deleted file mode 100644 index 907dbbd33..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Sources/Utils.swift +++ /dev/null @@ -1,45 +0,0 @@ -#if !PMKCocoaPods -import PromiseKit -#endif - -/** - Commonly used functionality when promisifying a delegate pattern -*/ -internal class PromiseProxy: NSObject { - internal let (promise, seal) = Promise.pending(); - - private var retainCycle: PromiseProxy? - - override init() { - super.init() - // Create a retain cycle - self.retainCycle = self - // And ensure we break it when the promise is resolved - _ = promise.ensure { self.retainCycle = nil } - } - - /// These functions ensure we only resolve the promise once - internal func fulfill(_ value: T) { - guard self.promise.isResolved == false else { return } - seal.fulfill(value) - } - internal func reject(_ error: Error) { - guard self.promise.isResolved == false else { return } - seal.reject(error) - } - - /// Cancel helper - internal func cancel() { - self.reject(PMKError.cancelled) - } -} - -/** - Different ways to scan. -*/ -public enum ScanInterval { - // Return after our first item with an optional time limit - case returnFirst(timeout: TimeInterval?) - // Scan for this duration before returning all - case returnAll(interval: TimeInterval) -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Tests/Entitlements.plist b/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Tests/Entitlements.plist deleted file mode 100644 index 76a15bb46..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Tests/Entitlements.plist +++ /dev/null @@ -1,12 +0,0 @@ - - - - - com.apple.private.tcc.allow - - kTCCServiceAddressBook - kTCCServiceCalendar - kTCCServicePhotos - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Tests/HMAccessoryBrowserTests.swift b/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Tests/HMAccessoryBrowserTests.swift deleted file mode 100644 index b6f555f24..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Tests/HMAccessoryBrowserTests.swift +++ /dev/null @@ -1,84 +0,0 @@ -// -// HMAccessoryBrowserTests.swift -// PMKHKTests -// -// Created by Chris Chares on 7/25/18. -// Copyright © 2018 Max Howell. All rights reserved. -// - -import XCTest -import PromiseKit -import HomeKit -@testable import PMKHomeKit - -#if os(iOS) - -class HMAccessoryBrowserTests: XCTestCase { - - func testBrowserScanReturningFirst() { - swizzle(HMAccessoryBrowser.self, #selector(HMAccessoryBrowser.startSearchingForNewAccessories)) { - let ex = expectation(description: "") - - HMPromiseAccessoryBrowser().start(scanInterval: .returnFirst(timeout: 0.5)) - .done { accessories in - XCTAssertEqual(accessories.count, 1) - ex.fulfill() - } - - waitForExpectations(timeout: 1, handler: nil) - } - } - - func testBrowserScanReturningTimeout() { - let ex = expectation(description: "") - - HMPromiseAccessoryBrowser().start(scanInterval: .returnFirst(timeout: 0.5)) - .catch { error in - // Why would we have discovered anything? - ex.fulfill() - } - - waitForExpectations(timeout: 1, handler: nil) - } -} - -extension HMAccessoryBrowser { - @objc func pmk_startSearchingForNewAccessories() { - after(.milliseconds(100)) - .done { swag in - self.delegate!.accessoryBrowser?(self, didFindNewAccessory: MockAccessory()) - } - } -} - -/// Mocks -class MockAccessory: HMAccessory { - var _uniqueID: UUID = UUID() - override var uniqueIdentifier: UUID { return _uniqueID } - - override init() { - super.init() - } -} - -// Utilty taken from https://github.com/PromiseKit/CoreLocation/blob/master/Tests/CLLocationManagerTests.swift -import ObjectiveC - -func swizzle(_ foo: AnyClass, _ from: Selector, isClassMethod: Bool = false, body: () -> Void) { - let originalMethod: Method - let swizzledMethod: Method - - if isClassMethod { - originalMethod = class_getClassMethod(foo, from)! - swizzledMethod = class_getClassMethod(foo, Selector("pmk_\(from)"))! - } else { - originalMethod = class_getInstanceMethod(foo, from)! - swizzledMethod = class_getInstanceMethod(foo, Selector("pmk_\(from)"))! - } - - method_exchangeImplementations(originalMethod, swizzledMethod) - body() - method_exchangeImplementations(swizzledMethod, originalMethod) -} - -#endif diff --git a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Tests/UtilsTests.swift b/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Tests/UtilsTests.swift deleted file mode 100644 index d1c167cdd..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/HomeKit/Tests/UtilsTests.swift +++ /dev/null @@ -1,63 +0,0 @@ -// -// UtilsTests.swift -// PMKHKTests -// -// Created by Chris Chares on 7/25/18. -// Copyright © 2018 Max Howell. All rights reserved. -// - -import XCTest -import PromiseKit -@testable import PMKHomeKit - -class UtilsTests: XCTestCase { - - var strongProxy: PromiseProxy? = PromiseProxy() - - override func setUp() { - strongProxy = PromiseProxy() - } - - override func tearDown() { - strongProxy = nil - } - - // The proxy should create a retain cycle until the promise is resolved - func testRetainCycle() { - weak var weakVar = strongProxy - XCTAssertNotNil(weakVar) - - let exp = expectation(description: "") - strongProxy = nil - after(.milliseconds(50)) - .done { - XCTAssertNotNil(weakVar) - exp.fulfill() - } - waitForExpectations(timeout: 1.0, handler: nil) - } - - // Once resolved, the proxy should break the retain cycle - func testRelease() { - weak var weakVar = strongProxy - XCTAssertNotNil(weakVar) - - let exp = expectation(description: "") - strongProxy!.fulfill(42) - strongProxy = nil - - after(.milliseconds(50)) - .done { - XCTAssertNil(weakVar) - exp.fulfill() - } - waitForExpectations(timeout: 1.0, handler: nil) - } - - // Cancel should reject with a PMKError - func testCancel() { - let proxy = strongProxy! - proxy.cancel() - XCTAssertNotNil(proxy.promise.error) - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/.gitignore b/Carthage/Checkouts/PromiseKit/Extensions/MapKit/.gitignore deleted file mode 100644 index f5554ff63..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -xcuserdata -*.xcscmblueprint -/Carthage -/.build -.DS_Store \ No newline at end of file diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/.travis.yml b/Carthage/Checkouts/PromiseKit/Extensions/MapKit/.travis.yml deleted file mode 100644 index b904ead5f..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/.travis.yml +++ /dev/null @@ -1,80 +0,0 @@ -os: osx -language: swift -osx_image: xcode10.2 - -branches: - only: - - master -stages: - - lint - - carthage - - test -jobs: - include: - - &pod - stage: lint - osx_image: xcode8.3 - env: SWIFT=3.1 - before_install: - gem install cocoapods --prerelease --version 1.7.0.beta.3 - install: - carthage bootstrap --no-build PromiseKit - script: | - cd Carthage/Checkouts/PromiseKit - mv .github/PromiseKit.podspec . - rm -rf Extensions/MapKit/Sources - cp -R ../../../Sources Extensions/MapKit - pod lib lint --subspec=PromiseKit/MapKit --fail-fast --swift-version=$SWIFT - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=3.2 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=3.3 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=3.4 - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=4.0 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=4.1 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=4.2 - - <<: *pod - osx_image: xcode10.2 - env: SWIFT=5.0 - - - &carthage - stage: carthage - osx_image: xcode9.2 - script: | - carthage bootstrap --cache-builds - sed -i '' "s/SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;/SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;/" *.xcodeproj/project.pbxproj - carthage build --no-skip-current - cache: - directories: - - Carthage - - <<: *carthage - osx_image: xcode9.4 - - <<: *carthage - osx_image: xcode10.1 - - <<: *carthage - osx_image: xcode10.2 - - - &test - stage: test - xcode_scheme: PMKMapKit - xcode_project: PMKMapKit.xcodeproj - xcode_destination: 'platform=macOS' - cache: - directories: - - Carthage - before_install: - carthage bootstrap --cache-builds --no-use-binaries - - <<: *test - xcode_destination: 'platform=iOS Simulator,OS=12.2,name=iPhone SE' - - <<: *test - xcode_destination: 'platform=tvOS Simulator,OS=12.2,name=Apple TV' diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Cartfile b/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Cartfile deleted file mode 100644 index 2bfea98d6..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" ~> 6.0 diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Cartfile.resolved b/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Cartfile.resolved deleted file mode 100644 index f54bbdbf2..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Cartfile.resolved +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" "6.8.4" diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Carthage.xcconfig b/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Carthage.xcconfig deleted file mode 100644 index c8b995651..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Carthage.xcconfig +++ /dev/null @@ -1,7 +0,0 @@ -// Created by Kevin Ballard on 12/14/15. -// Copyright © 2015 Postmates. All rights reserved. - -FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(SRCROOT)/Carthage/Build/Mac/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=iphone*] = $(SRCROOT)/Carthage/Build/iOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=watch*] = $(SRCROOT)/Carthage/Build/watchOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=appletv*] = $(SRCROOT)/Carthage/Build/tvOS/ $(inherited) diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Info.plist b/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Info.plist deleted file mode 100644 index fbe1e6b31..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/LICENSE b/Carthage/Checkouts/PromiseKit/Extensions/MapKit/LICENSE deleted file mode 100644 index 50f758c89..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2016-present, Max Howell; mxcl@me.com - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/PMKMapKit.xcodeproj/project.pbxproj b/Carthage/Checkouts/PromiseKit/Extensions/MapKit/PMKMapKit.xcodeproj/project.pbxproj deleted file mode 100644 index 07f81b680..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/PMKMapKit.xcodeproj/project.pbxproj +++ /dev/null @@ -1,474 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 6358AB711D5D4B3A00B9B157 /* MKDirections+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 6358AB6B1D5D4B3A00B9B157 /* MKDirections+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6358AB721D5D4B3A00B9B157 /* MKDirections+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 6358AB6C1D5D4B3A00B9B157 /* MKDirections+AnyPromise.m */; }; - 6358AB731D5D4B3A00B9B157 /* MKDirections+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6358AB6D1D5D4B3A00B9B157 /* MKDirections+Promise.swift */; }; - 6358AB741D5D4B3A00B9B157 /* MKMapSnapshotter+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 6358AB6E1D5D4B3A00B9B157 /* MKMapSnapshotter+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6358AB751D5D4B3A00B9B157 /* MKMapSnapshotter+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 6358AB6F1D5D4B3A00B9B157 /* MKMapSnapshotter+AnyPromise.m */; }; - 6358AB761D5D4B3A00B9B157 /* MKMapSnapshotter+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6358AB701D5D4B3A00B9B157 /* MKMapSnapshotter+Promise.swift */; }; - 6358AB781D5D4B4700B9B157 /* TestMapKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6358AB771D5D4B4700B9B157 /* TestMapKit.swift */; }; - 6358AB7A1D5D4B6700B9B157 /* PMKMapKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 6358AB791D5D4B6700B9B157 /* PMKMapKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 63C7FFF71D5C020D003BAE60 /* PMKMapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C7FFA71D5BEE09003BAE60 /* PMKMapKit.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 63C7FF9E1D5BEE09003BAE60 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 63C7FFA61D5BEE09003BAE60; - remoteInfo = PMKMapKit; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 6358AB6B1D5D4B3A00B9B157 /* MKDirections+AnyPromise.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "MKDirections+AnyPromise.h"; path = "Sources/MKDirections+AnyPromise.h"; sourceTree = SOURCE_ROOT; }; - 6358AB6C1D5D4B3A00B9B157 /* MKDirections+AnyPromise.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "MKDirections+AnyPromise.m"; path = "Sources/MKDirections+AnyPromise.m"; sourceTree = SOURCE_ROOT; }; - 6358AB6D1D5D4B3A00B9B157 /* MKDirections+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "MKDirections+Promise.swift"; path = "Sources/MKDirections+Promise.swift"; sourceTree = SOURCE_ROOT; }; - 6358AB6E1D5D4B3A00B9B157 /* MKMapSnapshotter+AnyPromise.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "MKMapSnapshotter+AnyPromise.h"; path = "Sources/MKMapSnapshotter+AnyPromise.h"; sourceTree = SOURCE_ROOT; }; - 6358AB6F1D5D4B3A00B9B157 /* MKMapSnapshotter+AnyPromise.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "MKMapSnapshotter+AnyPromise.m"; path = "Sources/MKMapSnapshotter+AnyPromise.m"; sourceTree = SOURCE_ROOT; }; - 6358AB701D5D4B3A00B9B157 /* MKMapSnapshotter+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "MKMapSnapshotter+Promise.swift"; path = "Sources/MKMapSnapshotter+Promise.swift"; sourceTree = SOURCE_ROOT; }; - 6358AB771D5D4B4700B9B157 /* TestMapKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TestMapKit.swift; path = Tests/TestMapKit.swift; sourceTree = SOURCE_ROOT; }; - 6358AB791D5D4B6700B9B157 /* PMKMapKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PMKMapKit.h; path = Sources/PMKMapKit.h; sourceTree = SOURCE_ROOT; }; - 63C700091D5C0253003BAE60 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 63C7FFA71D5BEE09003BAE60 /* PMKMapKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PMKMapKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 63C7FFF21D5C020D003BAE60 /* PMKMKTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PMKMKTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 63CCF8121D5C0C4E00503216 /* Cartfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile; sourceTree = ""; }; - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Carthage.xcconfig; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 63C7FFA31D5BEE09003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEF1D5C020D003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 63C7FFF71D5C020D003BAE60 /* PMKMapKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 63C7FF9D1D5BEE09003BAE60 = { - isa = PBXGroup; - children = ( - 63C700091D5C0253003BAE60 /* Info.plist */, - 63CCF8121D5C0C4E00503216 /* Cartfile */, - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */, - 63C7FFA91D5BEE09003BAE60 /* Sources */, - 63C7FFF31D5C020D003BAE60 /* Tests */, - 63C7FFA81D5BEE09003BAE60 /* Products */, - ); - sourceTree = ""; - }; - 63C7FFA81D5BEE09003BAE60 /* Products */ = { - isa = PBXGroup; - children = ( - 63C7FFA71D5BEE09003BAE60 /* PMKMapKit.framework */, - 63C7FFF21D5C020D003BAE60 /* PMKMKTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 63C7FFA91D5BEE09003BAE60 /* Sources */ = { - isa = PBXGroup; - children = ( - 6358AB791D5D4B6700B9B157 /* PMKMapKit.h */, - 6358AB6B1D5D4B3A00B9B157 /* MKDirections+AnyPromise.h */, - 6358AB6C1D5D4B3A00B9B157 /* MKDirections+AnyPromise.m */, - 6358AB6D1D5D4B3A00B9B157 /* MKDirections+Promise.swift */, - 6358AB6E1D5D4B3A00B9B157 /* MKMapSnapshotter+AnyPromise.h */, - 6358AB6F1D5D4B3A00B9B157 /* MKMapSnapshotter+AnyPromise.m */, - 6358AB701D5D4B3A00B9B157 /* MKMapSnapshotter+Promise.swift */, - ); - path = Sources; - sourceTree = SOURCE_ROOT; - }; - 63C7FFF31D5C020D003BAE60 /* Tests */ = { - isa = PBXGroup; - children = ( - 6358AB771D5D4B4700B9B157 /* TestMapKit.swift */, - ); - path = Tests; - sourceTree = SOURCE_ROOT; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 63C7FFA41D5BEE09003BAE60 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 6358AB7A1D5D4B6700B9B157 /* PMKMapKit.h in Headers */, - 6358AB711D5D4B3A00B9B157 /* MKDirections+AnyPromise.h in Headers */, - 6358AB741D5D4B3A00B9B157 /* MKMapSnapshotter+AnyPromise.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 63C7FFA61D5BEE09003BAE60 /* PMKMapKit */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKMapKit" */; - buildPhases = ( - 63C7FFA21D5BEE09003BAE60 /* Sources */, - 63C7FFA31D5BEE09003BAE60 /* Frameworks */, - 63C7FFA41D5BEE09003BAE60 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PMKMapKit; - productName = "PMK+UIKit"; - productReference = 63C7FFA71D5BEE09003BAE60 /* PMKMapKit.framework */; - productType = "com.apple.product-type.framework"; - }; - 63C7FFF11D5C020D003BAE60 /* PMKMKTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKMKTests" */; - buildPhases = ( - 63C7FFEE1D5C020D003BAE60 /* Sources */, - 63C7FFEF1D5C020D003BAE60 /* Frameworks */, - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */, - ); - name = PMKMKTests; - productName = PMKTests/NS; - productReference = 63C7FFF21D5C020D003BAE60 /* PMKMKTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 63C7FF9E1D5BEE09003BAE60 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = "Max Howell"; - TargetAttributes = { - 63C7FFA61D5BEE09003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - 63C7FFF11D5C020D003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKMapKit" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - English, - en, - ); - mainGroup = 63C7FF9D1D5BEE09003BAE60; - productRefGroup = 63C7FFA81D5BEE09003BAE60 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 63C7FFA61D5BEE09003BAE60 /* PMKMapKit */, - 63C7FFF11D5C020D003BAE60 /* PMKMKTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXShellScriptBuildPhase section */ - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - PromiseKit, - ); - name = "Embed Carthage Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "case \"$PLATFORM_NAME\" in\nmacosx) plat=Mac;;\niphone*) plat=iOS;;\nwatch*) plat=watchOS;;\nappletv*) plat=tvOS;;\n*) echo \"error: Unknown PLATFORM_NAME: $PLATFORM_NAME\"; exit 1;;\nesac\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nframework=$(basename \"${!VAR}\")\nexport SCRIPT_INPUT_FILE_$n=\"$SRCROOT\"/Carthage/Build/$plat/\"$framework\".framework\ndone\n\n/usr/local/bin/carthage copy-frameworks || exit\n\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nsource=${!VAR}.dSYM\ndest=${BUILT_PRODUCTS_DIR}/$(basename \"$source\")\nditto \"$source\" \"$dest\" || exit\ndone"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 63C7FFA21D5BEE09003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6358AB761D5D4B3A00B9B157 /* MKMapSnapshotter+Promise.swift in Sources */, - 6358AB751D5D4B3A00B9B157 /* MKMapSnapshotter+AnyPromise.m in Sources */, - 6358AB721D5D4B3A00B9B157 /* MKDirections+AnyPromise.m in Sources */, - 6358AB731D5D4B3A00B9B157 /* MKDirections+Promise.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEE1D5C020D003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6358AB781D5D4B4700B9B157 /* TestMapKit.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 63C7FFA61D5BEE09003BAE60 /* PMKMapKit */; - targetProxy = 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 63C7FFAD1D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.MapKit; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvsimulator appletvos"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.2; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Debug; - }; - 63C7FFAE1D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.MapKit; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvsimulator appletvos"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.2; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Release; - }; - 63C7FFB01D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Debug; - }; - 63C7FFB11D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Release; - }; - 63C7FFFB1D5C020D003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SUPPRESS_WARNINGS = YES; - }; - name = Debug; - }; - 63C7FFFC1D5C020D003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SUPPRESS_WARNINGS = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKMapKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFAD1D5BEE09003BAE60 /* Debug */, - 63C7FFAE1D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKMapKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFB01D5BEE09003BAE60 /* Debug */, - 63C7FFB11D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKMKTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFFB1D5C020D003BAE60 /* Debug */, - 63C7FFFC1D5C020D003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 63C7FF9E1D5BEE09003BAE60 /* Project object */; -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/PMKMapKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Carthage/Checkouts/PromiseKit/Extensions/MapKit/PMKMapKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index b49fefe7f..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/PMKMapKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/PMKMapKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Carthage/Checkouts/PromiseKit/Extensions/MapKit/PMKMapKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/PMKMapKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/PMKMapKit.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Carthage/Checkouts/PromiseKit/Extensions/MapKit/PMKMapKit.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index 08de0be8d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/PMKMapKit.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/PMKMapKit.xcodeproj/xcshareddata/xcschemes/PMKMapKit.xcscheme b/Carthage/Checkouts/PromiseKit/Extensions/MapKit/PMKMapKit.xcodeproj/xcshareddata/xcschemes/PMKMapKit.xcscheme deleted file mode 100644 index 8dcf63026..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/PMKMapKit.xcodeproj/xcshareddata/xcschemes/PMKMapKit.xcscheme +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/README.markdown b/Carthage/Checkouts/PromiseKit/Extensions/MapKit/README.markdown deleted file mode 100644 index e302b4c20..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/README.markdown +++ /dev/null @@ -1,34 +0,0 @@ -# PromiseKit MapKit Extensions ![Build Status] - -This project adds promises to Apple’s MapKit framework. - -## CocoaPods - -```ruby -pod "PromiseKit/MapKit", "~> 6.0" -``` - -The extensions are built into `PromiseKit.framework` thus nothing else is needed. - -## Carthage - -```ruby -github "PromiseKit/MapKit" ~> 3.0 -``` - -The extensions are built into their own framework: - -```swift -// swift -import PromiseKit -import PMKMapKit -``` - -```objc -// objc -@import PromiseKit; -@import PMKMapKit; -``` - - -[Build Status]: https://travis-ci.org/PromiseKit/MapKit.svg?branch=master diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Sources/MKDirections+AnyPromise.h b/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Sources/MKDirections+AnyPromise.h deleted file mode 100644 index e227cfb92..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Sources/MKDirections+AnyPromise.h +++ /dev/null @@ -1,30 +0,0 @@ -#import -#import - -/** - To import the `MKDirections` category: - - use_frameworks! - pod "PromiseKit/MapKit" - - And then in your sources: - - @import PromiseKit; -*/ -@interface MKDirections (PromiseKit) - -/** - Begins calculating the requested route information asynchronously. - - @return A promise that fulfills with a `MKDirectionsResponse`. -*/ -- (AnyPromise *)calculateDirections NS_REFINED_FOR_SWIFT; - -/** - Begins calculating the requested travel-time information asynchronously. - - @return A promise that fulfills with a `MKETAResponse`. -*/ -- (AnyPromise *)calculateETA NS_REFINED_FOR_SWIFT; - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Sources/MKDirections+AnyPromise.m b/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Sources/MKDirections+AnyPromise.m deleted file mode 100644 index 9b84be18c..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Sources/MKDirections+AnyPromise.m +++ /dev/null @@ -1,22 +0,0 @@ -#import "MKDirections+AnyPromise.h" - - -@implementation MKDirections (PromiseKit) - -- (AnyPromise *)calculateDirections { - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - [self calculateDirectionsWithCompletionHandler:^(id rsp, id err){ - resolve(err ?: rsp); - }]; - }]; -} - -- (AnyPromise *)calculateETA { - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - [self calculateETAWithCompletionHandler:^(id rsp, id err){ - resolve(err ?: rsp); - }]; - }]; -} - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Sources/MKDirections+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Sources/MKDirections+Promise.swift deleted file mode 100644 index 2230d4610..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Sources/MKDirections+Promise.swift +++ /dev/null @@ -1,38 +0,0 @@ -import MapKit -#if !PMKCocoaPods -import PromiseKit -#endif - -/** - To import the `MKDirections` category: - - use_frameworks! - pod "PromiseKit/MapKit" - - And then in your sources: - - import PromiseKit -*/ -extension MKDirections { -#if swift(>=4.2) - /// Begins calculating the requested route information asynchronously. - public func calculate() -> Promise { - return Promise { calculate(completionHandler: $0.resolve) } - } - - /// Begins calculating the requested travel-time information asynchronously. - public func calculateETA() -> Promise { - return Promise { calculateETA(completionHandler: $0.resolve) } - } -#else - /// Begins calculating the requested route information asynchronously. - public func calculate() -> Promise { - return Promise { calculate(completionHandler: $0.resolve) } - } - - /// Begins calculating the requested travel-time information asynchronously. - public func calculateETA() -> Promise { - return Promise { calculateETA(completionHandler: $0.resolve) } - } -#endif -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Sources/MKMapSnapshotter+AnyPromise.h b/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Sources/MKMapSnapshotter+AnyPromise.h deleted file mode 100644 index 13f33e9b5..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Sources/MKMapSnapshotter+AnyPromise.h +++ /dev/null @@ -1,23 +0,0 @@ -#import -#import - -/** - To import the `MKMapSnapshotter` category: - - use_frameworks! - pod "PromiseKit/MapKit" - - And then in your sources: - - @import PromiseKit; -*/ -@interface MKMapSnapshotter (PromiseKit) - -/** - Starts generating the snapshot using the options set in this object. - - @return A promise that fulfills with the generated `MKMapSnapshot` object. -*/ -- (AnyPromise *)start NS_REFINED_FOR_SWIFT; - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Sources/MKMapSnapshotter+AnyPromise.m b/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Sources/MKMapSnapshotter+AnyPromise.m deleted file mode 100644 index c732648b2..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Sources/MKMapSnapshotter+AnyPromise.m +++ /dev/null @@ -1,14 +0,0 @@ -#import "MKMapSnapshotter+AnyPromise.h" - - -@implementation MKMapSnapshotter (PromiseKit) - -- (AnyPromise *)start { - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - [self startWithCompletionHandler:^(MKMapSnapshot *snapshot, NSError *error) { - resolve(error ?: snapshot); - }]; - }]; -} - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Sources/MKMapSnapshotter+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Sources/MKMapSnapshotter+Promise.swift deleted file mode 100644 index 768cfb75e..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Sources/MKMapSnapshotter+Promise.swift +++ /dev/null @@ -1,28 +0,0 @@ -import MapKit -#if !PMKCocoaPods -import PromiseKit -#endif - -/** - To import the `MKMapSnapshotter` category: - - use_frameworks! - pod "PromiseKit/MapKit" - - And then in your sources: - - import PromiseKit -*/ -extension MKMapSnapshotter { -#if swift(>=4.2) - /// Starts generating the snapshot using the options set in this object. - public func start() -> Promise { - return Promise { start(completionHandler: $0.resolve) } - } -#else - /// Starts generating the snapshot using the options set in this object. - public func start() -> Promise { - return Promise { start(completionHandler: $0.resolve) } - } -#endif -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Sources/PMKMapKit.h b/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Sources/PMKMapKit.h deleted file mode 100644 index d0babbbea..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Sources/PMKMapKit.h +++ /dev/null @@ -1,2 +0,0 @@ -#import "MKDirections+AnyPromise.h" -#import "MKMapSnapshotter+AnyPromise.h" diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Tests/TestMapKit.swift b/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Tests/TestMapKit.swift deleted file mode 100644 index 41cbdd652..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MapKit/Tests/TestMapKit.swift +++ /dev/null @@ -1,63 +0,0 @@ -import PromiseKit -import PMKMapKit -import MapKit -import XCTest - -class Test_MKDirections_Swift: XCTestCase { - func test_directions_response() { - let ex = expectation(description: "") - - class MockDirections: MKDirections { - override func calculate(completionHandler: @escaping MKDirectionsHandler) { - completionHandler(MKDirectionsResponse(), nil) - } - } - - let rq = MKDirectionsRequest() - let directions = MockDirections(request: rq) - - directions.calculate().done { _ in - ex.fulfill() - } - - waitForExpectations(timeout: 1, handler: nil) - } - - - func test_ETA_response() { - let ex = expectation(description: "") - - class MockDirections: MKDirections { - override func calculateETA(completionHandler: @escaping MKETAHandler) { - completionHandler(MKETAResponse(), nil) - } - } - - let rq = MKDirectionsRequest() - MockDirections(request: rq).calculateETA().done { rsp in - ex.fulfill() - } - - waitForExpectations(timeout: 1, handler: nil) - } - -} - -class Test_MKSnapshotter_Swift: XCTestCase { - func test() { - let ex = expectation(description: "") - - class MockSnapshotter: MKMapSnapshotter { - override func start(completionHandler: @escaping MKMapSnapshotCompletionHandler) { - completionHandler(MKMapSnapshot(), nil) - } - } - - let snapshotter = MockSnapshotter() - snapshotter.start().done { _ in - ex.fulfill() - } - - waitForExpectations(timeout: 1, handler: nil) - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/.gitignore b/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/.gitignore deleted file mode 100644 index bec9c1741..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.xcodeproj/**/xcuserdata/ -*.xcscmblueprint -/Carthage -/.build -.DS_Store \ No newline at end of file diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/.travis.yml b/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/.travis.yml deleted file mode 100644 index 8e774587f..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/.travis.yml +++ /dev/null @@ -1,80 +0,0 @@ -os: osx -language: swift -osx_image: xcode10.2 - -branches: - only: - - master -stages: - - lint - - carthage - - test -jobs: - include: - - &pod - stage: lint - osx_image: xcode8.3 - env: SWIFT=3.1 - cache: cocoapods - before_install: - gem install cocoapods --prerelease --version 1.7.0.beta.3 - install: - carthage bootstrap --no-build PromiseKit - script: | - cd Carthage/Checkouts/PromiseKit - mv .github/PromiseKit.podspec . - rm -rf Extensions/MessagesUI/Sources - cp -R ../../../Sources Extensions/MessagesUI - pod lib lint --subspec=PromiseKit/MessageUI --fail-fast --swift-version=$SWIFT - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=3.2 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=3.3 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=3.4 - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=4.0 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=4.1 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=4.2 - - <<: *pod - osx_image: xcode10.2 - env: SWIFT=4.3 - - <<: *pod - osx_image: xcode10.2 - env: SWIFT=5.0 - - - &carthage - stage: carthage - osx_image: xcode9.2 - script: | - carthage bootstrap --cache-builds --platform iOS,macOS - sed -i '' "s/SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;/SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;/" *.xcodeproj/project.pbxproj - carthage build --no-skip-current - cache: - directories: - - Carthage - - <<: *carthage - osx_image: xcode9.4 - - <<: *carthage - osx_image: xcode10.1 - - <<: *carthage - osx_image: xcode10.2 - - - stage: test - name: macOS Tests - xcode_scheme: PMKMessagesUI - xcode_project: PMKMessagesUI.xcodeproj - xcode_destination: 'platform=iOS Simulator,OS=12.2,name=iPhone SE' - cache: - directories: - - Carthage - before_install: - carthage bootstrap --cache-builds --no-use-binaries diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/Cartfile b/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/Cartfile deleted file mode 100644 index d4703e986..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" ~> 6.8.4 diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/Cartfile.resolved b/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/Cartfile.resolved deleted file mode 100644 index f54bbdbf2..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/Cartfile.resolved +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" "6.8.4" diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/Carthage.xcconfig b/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/Carthage.xcconfig deleted file mode 100644 index c8b995651..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/Carthage.xcconfig +++ /dev/null @@ -1,7 +0,0 @@ -// Created by Kevin Ballard on 12/14/15. -// Copyright © 2015 Postmates. All rights reserved. - -FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(SRCROOT)/Carthage/Build/Mac/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=iphone*] = $(SRCROOT)/Carthage/Build/iOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=watch*] = $(SRCROOT)/Carthage/Build/watchOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=appletv*] = $(SRCROOT)/Carthage/Build/tvOS/ $(inherited) diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/Info.plist b/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/Info.plist deleted file mode 100644 index fbe1e6b31..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/LICENSE b/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/LICENSE deleted file mode 100644 index 50f758c89..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2016-present, Max Howell; mxcl@me.com - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/PMKMessagesUI.xcodeproj/project.pbxproj b/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/PMKMessagesUI.xcodeproj/project.pbxproj deleted file mode 100644 index aebe79702..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/PMKMessagesUI.xcodeproj/project.pbxproj +++ /dev/null @@ -1,452 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 634B8E521D5D534F00D54CED /* MFMailComposeViewController+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 634B8E501D5D534F00D54CED /* MFMailComposeViewController+Promise.swift */; }; - 634B8E531D5D534F00D54CED /* MFMessageComposeViewController+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 634B8E511D5D534F00D54CED /* MFMessageComposeViewController+Promise.swift */; }; - 634B8E551D5D535900D54CED /* TestMessageUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 634B8E541D5D535900D54CED /* TestMessageUI.swift */; }; - 63C7FFF71D5C020D003BAE60 /* PMKMessagesUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C7FFA71D5BEE09003BAE60 /* PMKMessagesUI.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 63C7FF9E1D5BEE09003BAE60 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 63C7FFA61D5BEE09003BAE60; - remoteInfo = PMKMessagesUI; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 634B8E501D5D534F00D54CED /* MFMailComposeViewController+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "MFMailComposeViewController+Promise.swift"; path = "Sources/MFMailComposeViewController+Promise.swift"; sourceTree = SOURCE_ROOT; }; - 634B8E511D5D534F00D54CED /* MFMessageComposeViewController+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "MFMessageComposeViewController+Promise.swift"; path = "Sources/MFMessageComposeViewController+Promise.swift"; sourceTree = SOURCE_ROOT; }; - 634B8E541D5D535900D54CED /* TestMessageUI.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TestMessageUI.swift; path = Tests/TestMessageUI.swift; sourceTree = SOURCE_ROOT; }; - 63C700091D5C0253003BAE60 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 63C7FFA71D5BEE09003BAE60 /* PMKMessagesUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PMKMessagesUI.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 63C7FFF21D5C020D003BAE60 /* PMKMFTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PMKMFTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 63CCF8121D5C0C4E00503216 /* Cartfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile; sourceTree = ""; }; - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Carthage.xcconfig; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 63C7FFA31D5BEE09003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEF1D5C020D003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 63C7FFF71D5C020D003BAE60 /* PMKMessagesUI.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 63C7FF9D1D5BEE09003BAE60 = { - isa = PBXGroup; - children = ( - 63C700091D5C0253003BAE60 /* Info.plist */, - 63CCF8121D5C0C4E00503216 /* Cartfile */, - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */, - 63C7FFA91D5BEE09003BAE60 /* Sources */, - 63C7FFF31D5C020D003BAE60 /* Tests */, - 63C7FFA81D5BEE09003BAE60 /* Products */, - ); - sourceTree = ""; - }; - 63C7FFA81D5BEE09003BAE60 /* Products */ = { - isa = PBXGroup; - children = ( - 63C7FFA71D5BEE09003BAE60 /* PMKMessagesUI.framework */, - 63C7FFF21D5C020D003BAE60 /* PMKMFTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 63C7FFA91D5BEE09003BAE60 /* Sources */ = { - isa = PBXGroup; - children = ( - 634B8E501D5D534F00D54CED /* MFMailComposeViewController+Promise.swift */, - 634B8E511D5D534F00D54CED /* MFMessageComposeViewController+Promise.swift */, - ); - path = Sources; - sourceTree = SOURCE_ROOT; - }; - 63C7FFF31D5C020D003BAE60 /* Tests */ = { - isa = PBXGroup; - children = ( - 634B8E541D5D535900D54CED /* TestMessageUI.swift */, - ); - path = Tests; - sourceTree = SOURCE_ROOT; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 63C7FFA41D5BEE09003BAE60 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 63C7FFA61D5BEE09003BAE60 /* PMKMessagesUI */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKMessagesUI" */; - buildPhases = ( - 63C7FFA21D5BEE09003BAE60 /* Sources */, - 63C7FFA31D5BEE09003BAE60 /* Frameworks */, - 63C7FFA41D5BEE09003BAE60 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PMKMessagesUI; - productName = "PMK+UIKit"; - productReference = 63C7FFA71D5BEE09003BAE60 /* PMKMessagesUI.framework */; - productType = "com.apple.product-type.framework"; - }; - 63C7FFF11D5C020D003BAE60 /* PMKMFTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKMFTests" */; - buildPhases = ( - 63C7FFEE1D5C020D003BAE60 /* Sources */, - 63C7FFEF1D5C020D003BAE60 /* Frameworks */, - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */, - ); - name = PMKMFTests; - productName = PMKTests/NS; - productReference = 63C7FFF21D5C020D003BAE60 /* PMKMFTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 63C7FF9E1D5BEE09003BAE60 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = "Max Howell"; - TargetAttributes = { - 63C7FFA61D5BEE09003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - 63C7FFF11D5C020D003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKMessagesUI" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 63C7FF9D1D5BEE09003BAE60; - productRefGroup = 63C7FFA81D5BEE09003BAE60 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 63C7FFA61D5BEE09003BAE60 /* PMKMessagesUI */, - 63C7FFF11D5C020D003BAE60 /* PMKMFTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXShellScriptBuildPhase section */ - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - PromiseKit, - ); - name = "Embed Carthage Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "case \"$PLATFORM_NAME\" in\nmacosx) plat=Mac;;\niphone*) plat=iOS;;\nwatch*) plat=watchOS;;\nappletv*) plat=tvOS;;\n*) echo \"error: Unknown PLATFORM_NAME: $PLATFORM_NAME\"; exit 1;;\nesac\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nframework=$(basename \"${!VAR}\")\nexport SCRIPT_INPUT_FILE_$n=\"$SRCROOT\"/Carthage/Build/$plat/\"$framework\".framework\ndone\n\n/usr/local/bin/carthage copy-frameworks || exit\n\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nsource=${!VAR}.dSYM\ndest=${BUILT_PRODUCTS_DIR}/$(basename \"$source\")\nditto \"$source\" \"$dest\" || exit\ndone"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 63C7FFA21D5BEE09003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 634B8E531D5D534F00D54CED /* MFMessageComposeViewController+Promise.swift in Sources */, - 634B8E521D5D534F00D54CED /* MFMailComposeViewController+Promise.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEE1D5C020D003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 634B8E551D5D535900D54CED /* TestMessageUI.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 63C7FFA61D5BEE09003BAE60 /* PMKMessagesUI */; - targetProxy = 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 63C7FFAD1D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.MessagesUI; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Debug; - }; - 63C7FFAE1D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.MessagesUI; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Release; - }; - 63C7FFB01D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Debug; - }; - 63C7FFB11D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Release; - }; - 63C7FFFB1D5C020D003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 63C7FFFC1D5C020D003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKMessagesUI" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFAD1D5BEE09003BAE60 /* Debug */, - 63C7FFAE1D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKMessagesUI" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFB01D5BEE09003BAE60 /* Debug */, - 63C7FFB11D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKMFTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFFB1D5C020D003BAE60 /* Debug */, - 63C7FFFC1D5C020D003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 63C7FF9E1D5BEE09003BAE60 /* Project object */; -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/PMKMessagesUI.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/PMKMessagesUI.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index b49fefe7f..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/PMKMessagesUI.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/PMKMessagesUI.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/PMKMessagesUI.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/PMKMessagesUI.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/PMKMessagesUI.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/PMKMessagesUI.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index 08de0be8d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/PMKMessagesUI.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/PMKMessagesUI.xcodeproj/xcshareddata/xcschemes/PMKMessagesUI.xcscheme b/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/PMKMessagesUI.xcodeproj/xcshareddata/xcschemes/PMKMessagesUI.xcscheme deleted file mode 100644 index 1b44cfac3..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/PMKMessagesUI.xcodeproj/xcshareddata/xcschemes/PMKMessagesUI.xcscheme +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/README.markdown b/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/README.markdown deleted file mode 100644 index 323943890..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/README.markdown +++ /dev/null @@ -1,36 +0,0 @@ -# PromiseKit MessagesUI Extensions ![Build Status] - -This project adds promises to Apple’s MessagesUI framework. - -The Objective-C equivalents of this repo are in the UIKit extensions. - -## CocoaPods - -```ruby -pod "PromiseKit/MessageUI", "~> 6.0" -``` - -The extensions are built into `PromiseKit.framework` thus nothing else is needed. - -## Carthage - -```ruby -github "PromiseKit/MessagesUI" ~> 3.0 -``` - -The extensions are built into their own framework: - -```swift -// swift -import PromiseKit -import PMKMessagesUI -``` - -```objc -// objc -@import PromiseKit; -@import PMKMessagesUI; -``` - - -[Build Status]: https://travis-ci.org/PromiseKit/MessagesUI.svg?branch=master diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/Sources/MFMailComposeViewController+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/Sources/MFMailComposeViewController+Promise.swift deleted file mode 100644 index dd0335c33..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/Sources/MFMailComposeViewController+Promise.swift +++ /dev/null @@ -1,81 +0,0 @@ -import MessageUI.MFMailComposeViewController -import UIKit.UIViewController -#if !PMKCocoaPods -import PromiseKit -#endif - -/** - To import this `UIViewController` category: - - use_frameworks! - pod "PromiseKit/MessageUI" - - And then in your sources: - - import PromiseKit -*/ -extension UIViewController { - /// Presents the message view controller and resolves with the user action. - public func promise(_ vc: MFMailComposeViewController, animated: Bool = true, completion:(() -> Void)? = nil) -> Promise { - let proxy = PMKMailComposeViewControllerDelegate() - proxy.retainCycle = proxy - vc.mailComposeDelegate = proxy - present(vc, animated: animated, completion: completion) - _ = proxy.promise.ensure { - self.dismiss(animated: animated, completion: nil) - } - return proxy.promise - } -} - -extension MFMailComposeViewController { - /// Errors representing PromiseKit MFMailComposeViewController failures - public enum PMKError: CancellableError, CustomStringConvertible { - /// The user cancelled sending mail - case cancelled - case failed - - /// - Returns: true - public var isCancelled: Bool { - switch self { - case .cancelled: - return true - case .failed: - return false - } - } - - public var description: String { - switch self { - case .failed: - return "The attempt to save or send the message was unsuccessful." - case .cancelled: - return "The mail was cancelled" - } - - } - } -} - -private class PMKMailComposeViewControllerDelegate: NSObject, MFMailComposeViewControllerDelegate, UINavigationControllerDelegate { - - let (promise, seal) = Promise.pending() - var retainCycle: NSObject? - - @objc func mailComposeController(_ controller: MFMailComposeViewController, didFinishWith result: MFMailComposeResult, error: Error?) { - defer { retainCycle = nil } - - if let error = error { - seal.reject(error) - } else { - switch result { - case .failed: - seal.reject(MFMailComposeViewController.PMKError.failed) - case .cancelled: - seal.reject(MFMailComposeViewController.PMKError.cancelled) - default: - seal.fulfill(result) - } - } - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/Sources/MFMessageComposeViewController+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/Sources/MFMessageComposeViewController+Promise.swift deleted file mode 100644 index f3633664b..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/Sources/MFMessageComposeViewController+Promise.swift +++ /dev/null @@ -1,82 +0,0 @@ -import Foundation -import MessageUI.MFMessageComposeViewController -import UIKit.UIViewController -#if !PMKCocoaPods -import PromiseKit -#endif - -/** - To import this `UIViewController` category: - - use_frameworks! - pod "PromiseKit/MessageUI" - - And then in your sources: - - import PromiseKit -*/ -extension UIViewController { - /// Presents the message view controller and resolves with the user action. - public func promise(_ vc: MFMessageComposeViewController, animated: Bool = true, completion:(() -> Void)? = nil) -> Promise { - let proxy = PMKMessageComposeViewControllerDelegate() - proxy.retainCycle = proxy - vc.messageComposeDelegate = proxy - present(vc, animated: animated, completion: completion) - _ = proxy.promise.ensure { - vc.dismiss(animated: animated, completion: nil) - } - return proxy.promise - } -} - -extension MFMessageComposeViewController { - /// Errors representing PromiseKit MFMailComposeViewController failures - public enum PMKError: CancellableError, CustomStringConvertible { - /// The user cancelled sending the message - case cancelled - case failed - - /// - Returns: true - public var isCancelled: Bool { - switch self { - case .cancelled: - return true - case .failed: - return false - } - } - - public var description: String { - switch self { - case .failed: - return "The attempt to save or send the message was unsuccessful." - case .cancelled: - return "The message was cancelled" - } - - } - } -} - -private class PMKMessageComposeViewControllerDelegate: NSObject, MFMessageComposeViewControllerDelegate, UINavigationControllerDelegate { - - let (promise, seal) = Promise.pending() - var retainCycle: NSObject? - - @objc func messageComposeViewController(_ controller: MFMessageComposeViewController, didFinishWith result: MessageComposeResult) { - defer { retainCycle = nil } - - switch result { - case .sent: - seal.fulfill(()) - case .failed: - seal.reject(MFMessageComposeViewController.PMKError.failed) - case .cancelled: - seal.reject(MFMessageComposeViewController.PMKError.cancelled) - #if swift(>=5) - @unknown default: - seal.reject(MFMessageComposeViewController.PMKError.cancelled) - #endif - } - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/Tests/TestMessageUI.swift b/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/Tests/TestMessageUI.swift deleted file mode 100644 index 082c95ad1..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/MessagesUI/Tests/TestMessageUI.swift +++ /dev/null @@ -1,69 +0,0 @@ -import PMKMessagesUI -import PromiseKit -import MessageUI -import XCTest -import UIKit - - -class MessageUITests: XCTestCase { - var rootvc: UIViewController! - - func test_can_cancel_mail_composer() { - let ex1 = expectation(description: "") - let ex2 = expectation(description: "") - var order = false - - let mailer = MFMailComposeViewController() - mailer.setToRecipients(["mxcl@me.com"]) - - let promise = rootvc.promise(mailer, animated: false, completion: { - after(seconds: 0.25).done { _ in - XCTAssertFalse(order) - let button = mailer.viewControllers[0].navigationItem.leftBarButtonItem! - UIControl().sendAction(button.action!, to: button.target, for: nil) - ex1.fulfill() - } - }) - promise.catch { _ -> Void in - XCTFail() - } - promise.catch(policy: .allErrors) { _ -> Void in - // seems necessary to give vc stack a bit of time - after(seconds: 0.5).done(ex2.fulfill) - order = true - } - waitForExpectations(timeout: 10, handler: nil) - - XCTAssertNil(rootvc.presentedViewController) - } - - func test_can_cancel_message_composer() { - let ex1 = expectation(description: "") - let ex2 = expectation(description: "") - var order = false - - let messager = MFMessageComposeViewController() - - let promise = rootvc.promise(messager, animated: false, completion: { - after(seconds: 0.25).done { _ in - XCTAssertFalse(order) - - let button = messager.viewControllers[0].navigationItem.leftBarButtonItem! - UIControl().sendAction(button.action!, to: button.target, for: nil) - ex1.fulfill() - } - }) - - promise.catch { _ -> Void in - XCTFail() - } - promise.catch(policy: .allErrors) { _ -> Void in - // seems necessary to give vc stack a bit of time - after(seconds: 0.5).done(ex2.fulfill) - order = true - } - waitForExpectations(timeout: 10, handler: nil) - - XCTAssertNil(rootvc.presentedViewController) - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/.gitignore b/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/.gitignore deleted file mode 100644 index bec9c1741..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.xcodeproj/**/xcuserdata/ -*.xcscmblueprint -/Carthage -/.build -.DS_Store \ No newline at end of file diff --git a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/.travis.yml b/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/.travis.yml deleted file mode 100644 index 6337a0581..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/.travis.yml +++ /dev/null @@ -1,42 +0,0 @@ -language: objective-c -os: osx -matrix: - include: - # - {osx_image: xcode8.3, env: 'PLAT=macOS SWFT=3.1 DST="arch=x86_64"'} - # - {osx_image: xcode8.3, env: 'PLAT=iOS SWFT=3.1 DST="OS=10.3.1,name=iPhone SE"'} - # - {osx_image: xcode8.3, env: 'PLAT=tvOS SWFT=3.1 DST="OS=10.2,name=Apple TV 1080p"'} - # - {osx_image: xcode8.3, env: 'PLAT=watchOS SWFT=3.1 DST="OS=3.2,name=Apple Watch - 38mm"'} - - - {osx_image: xcode9.2, env: 'PLAT=macOS SWFT=3.2 DST="arch=x86_64"'} - - {osx_image: xcode9.2, env: 'PLAT=iOS SWFT=3.2 DST="OS=11.2,name=iPhone SE"'} - - {osx_image: xcode9.2, env: 'PLAT=tvOS SWFT=3.2 DST="OS=11.2,name=Apple TV"'} - - {osx_image: xcode9.2, env: 'PLAT=watchOS SWFT=3.2 DST="OS=4.2,name=Apple Watch - 38mm"'} - - - {osx_image: xcode9.4, env: 'PLAT=macOS SWFT=3.3 DST="arch=x86_64"'} - - {osx_image: xcode9.4, env: 'PLAT=iOS SWFT=3.3 DST="OS=11.4,name=iPhone 5s"'} - - {osx_image: xcode9.4, env: 'PLAT=tvOS SWFT=3.3 DST="OS=11.4,name=Apple TV"'} - - {osx_image: xcode9.4, env: 'PLAT=watchOS SWFT=3.3 DST="OS=4.3,name=Apple Watch - 38mm"'} - - - {osx_image: xcode9.2, env: 'PLAT=macOS SWFT=4.0 DST="arch=x86_64"'} - - {osx_image: xcode9.2, env: 'PLAT=iOS SWFT=4.0 DST="OS=11.2,name=iPhone SE"'} - - {osx_image: xcode9.2, env: 'PLAT=tvOS SWFT=4.0 DST="OS=11.2,name=Apple TV"'} - - {osx_image: xcode9.2, env: 'PLAT=watchOS SWFT=4.0 DST="OS=4.2,name=Apple Watch - 38mm"'} - - - {osx_image: xcode9.4, env: 'PLAT=macOS SWFT=4.1 DST="arch=x86_64" TEST=1'} - - {osx_image: xcode9.4, env: 'PLAT=iOS SWFT=4.1 DST="OS=11.4,name=iPhone 5s" TEST=1'} - - {osx_image: xcode9.4, env: 'PLAT=tvOS SWFT=4.1 DST="OS=11.4,name=Apple TV" TEST=1'} - - {osx_image: xcode9.4, env: 'PLAT=watchOS SWFT=4.1 DST="OS=4.3,name=Apple Watch - 38mm"'} -cache: - directories: - - Carthage -before_install: - - carthage bootstrap --cache-builds --no-use-binaries --platform $PLAT --verbose -install: - - xcodebuild -scheme PMKOMGHTTPURLRQ -target PMKOMGHTTPURLRQ -quiet -destination "$DST" SWIFT_VERSION=$SWFT SWIFT_TREAT_WARNINGS_AS_ERRORS=YES build - - if [[ $TEST == "1" ]]; then - xcodebuild -scheme PMKOMGHTTPURLRQ -target PMKOMGTests -quiet -destination "$DST" build; - fi -script: - - if [[ $TEST == "1" ]]; then - xcodebuild -scheme PMKOMGHTTPURLRQ -quiet -destination "$DST" test; - fi diff --git a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/Cartfile b/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/Cartfile deleted file mode 100644 index 62674f61e..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/Cartfile +++ /dev/null @@ -1,3 +0,0 @@ -github "mxcl/PromiseKit" ~> 6.3 -github "mxcl/OMGHTTPURLRQ" ~> 3.2 -github "PromiseKit/Foundation" ~> 3.1 diff --git a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/Cartfile.private b/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/Cartfile.private deleted file mode 100644 index 13f828063..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/Cartfile.private +++ /dev/null @@ -1 +0,0 @@ -github "AliSoftware/OHHTTPStubs" ~> 6.0 diff --git a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/Cartfile.resolved b/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/Cartfile.resolved deleted file mode 100644 index ebbdb140f..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/Cartfile.resolved +++ /dev/null @@ -1,4 +0,0 @@ -github "AliSoftware/OHHTTPStubs" "6.1.0" -github "PromiseKit/Foundation" "3.1.0" -github "mxcl/OMGHTTPURLRQ" "3.2.5" -github "mxcl/PromiseKit" "6.3.3" diff --git a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/Carthage.xcconfig b/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/Carthage.xcconfig deleted file mode 100644 index c8b995651..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/Carthage.xcconfig +++ /dev/null @@ -1,7 +0,0 @@ -// Created by Kevin Ballard on 12/14/15. -// Copyright © 2015 Postmates. All rights reserved. - -FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(SRCROOT)/Carthage/Build/Mac/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=iphone*] = $(SRCROOT)/Carthage/Build/iOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=watch*] = $(SRCROOT)/Carthage/Build/watchOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=appletv*] = $(SRCROOT)/Carthage/Build/tvOS/ $(inherited) diff --git a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/Info.plist b/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/Info.plist deleted file mode 100644 index fbe1e6b31..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/PMKOMGHTTPURLRQ.xcodeproj/project.pbxproj b/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/PMKOMGHTTPURLRQ.xcodeproj/project.pbxproj deleted file mode 100644 index c6190613a..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/PMKOMGHTTPURLRQ.xcodeproj/project.pbxproj +++ /dev/null @@ -1,466 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 6331B3FC1D657CB700544154 /* PMKOMGHTTPURLRQ.h in Headers */ = {isa = PBXBuildFile; fileRef = 6331B3F91D657CB700544154 /* PMKOMGHTTPURLRQ.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6331B3FF1D657DA400544154 /* NSURLSession+OMG+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 6331B3FD1D657DA400544154 /* NSURLSession+OMG+AnyPromise.m */; }; - 6331B4001D657DA400544154 /* NSURLSession+OMG+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6331B3FE1D657DA400544154 /* NSURLSession+OMG+Promise.swift */; }; - 6342D1B51D68E7BB005D7062 /* TestNSURLSession.m in Sources */ = {isa = PBXBuildFile; fileRef = 6331B4011D657DDB00544154 /* TestNSURLSession.m */; }; - 63C700081D5C021F003BAE60 /* TestNSURLSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63C700021D5C021F003BAE60 /* TestNSURLSession.swift */; }; - 63C7FFF71D5C020D003BAE60 /* PMKOMGHTTPURLRQ.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C7FFA71D5BEE09003BAE60 /* PMKOMGHTTPURLRQ.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 63C7FF9E1D5BEE09003BAE60 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 63C7FFA61D5BEE09003BAE60; - remoteInfo = PMKFoundation; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 6331B3F91D657CB700544154 /* PMKOMGHTTPURLRQ.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PMKOMGHTTPURLRQ.h; path = Sources/PMKOMGHTTPURLRQ.h; sourceTree = SOURCE_ROOT; }; - 6331B3FD1D657DA400544154 /* NSURLSession+OMG+AnyPromise.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSURLSession+OMG+AnyPromise.m"; path = "Sources/NSURLSession+OMG+AnyPromise.m"; sourceTree = SOURCE_ROOT; }; - 6331B3FE1D657DA400544154 /* NSURLSession+OMG+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "NSURLSession+OMG+Promise.swift"; path = "Sources/NSURLSession+OMG+Promise.swift"; sourceTree = SOURCE_ROOT; }; - 6331B4011D657DDB00544154 /* TestNSURLSession.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TestNSURLSession.m; path = Tests/TestNSURLSession.m; sourceTree = SOURCE_ROOT; }; - 63C700021D5C021F003BAE60 /* TestNSURLSession.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TestNSURLSession.swift; path = Tests/TestNSURLSession.swift; sourceTree = SOURCE_ROOT; }; - 63C700091D5C0253003BAE60 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 63C7FFA71D5BEE09003BAE60 /* PMKOMGHTTPURLRQ.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PMKOMGHTTPURLRQ.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 63C7FFF21D5C020D003BAE60 /* PMKOMGTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PMKOMGTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 63CCF8121D5C0C4E00503216 /* Cartfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile; sourceTree = ""; }; - 63CCF8131D5C0C4E00503216 /* Cartfile.private */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile.private; sourceTree = ""; }; - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Carthage.xcconfig; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 63C7FFA31D5BEE09003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEF1D5C020D003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 63C7FFF71D5C020D003BAE60 /* PMKOMGHTTPURLRQ.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 63C7FF9D1D5BEE09003BAE60 = { - isa = PBXGroup; - children = ( - 63C700091D5C0253003BAE60 /* Info.plist */, - 63CCF8121D5C0C4E00503216 /* Cartfile */, - 63CCF8131D5C0C4E00503216 /* Cartfile.private */, - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */, - 63C7FFA91D5BEE09003BAE60 /* Sources */, - 63C7FFF31D5C020D003BAE60 /* Tests */, - 63C7FFA81D5BEE09003BAE60 /* Products */, - ); - sourceTree = ""; - }; - 63C7FFA81D5BEE09003BAE60 /* Products */ = { - isa = PBXGroup; - children = ( - 63C7FFA71D5BEE09003BAE60 /* PMKOMGHTTPURLRQ.framework */, - 63C7FFF21D5C020D003BAE60 /* PMKOMGTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 63C7FFA91D5BEE09003BAE60 /* Sources */ = { - isa = PBXGroup; - children = ( - 6331B3F91D657CB700544154 /* PMKOMGHTTPURLRQ.h */, - 6331B3FD1D657DA400544154 /* NSURLSession+OMG+AnyPromise.m */, - 6331B3FE1D657DA400544154 /* NSURLSession+OMG+Promise.swift */, - ); - path = Sources; - sourceTree = SOURCE_ROOT; - }; - 63C7FFF31D5C020D003BAE60 /* Tests */ = { - isa = PBXGroup; - children = ( - 63C700021D5C021F003BAE60 /* TestNSURLSession.swift */, - 6331B4011D657DDB00544154 /* TestNSURLSession.m */, - ); - path = Tests; - sourceTree = SOURCE_ROOT; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 63C7FFA41D5BEE09003BAE60 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 6331B3FC1D657CB700544154 /* PMKOMGHTTPURLRQ.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 63C7FFA61D5BEE09003BAE60 /* PMKOMGHTTPURLRQ */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKOMGHTTPURLRQ" */; - buildPhases = ( - 63C7FFA21D5BEE09003BAE60 /* Sources */, - 63C7FFA31D5BEE09003BAE60 /* Frameworks */, - 63C7FFA41D5BEE09003BAE60 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PMKOMGHTTPURLRQ; - productName = "PMK+UIKit"; - productReference = 63C7FFA71D5BEE09003BAE60 /* PMKOMGHTTPURLRQ.framework */; - productType = "com.apple.product-type.framework"; - }; - 63C7FFF11D5C020D003BAE60 /* PMKOMGTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKOMGTests" */; - buildPhases = ( - 63C7FFEE1D5C020D003BAE60 /* Sources */, - 63C7FFEF1D5C020D003BAE60 /* Frameworks */, - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */, - ); - name = PMKOMGTests; - productName = PMKTests/NS; - productReference = 63C7FFF21D5C020D003BAE60 /* PMKOMGTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 63C7FF9E1D5BEE09003BAE60 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 1000; - ORGANIZATIONNAME = "Max Howell"; - TargetAttributes = { - 63C7FFA61D5BEE09003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 0900; - ProvisioningStyle = Automatic; - }; - 63C7FFF11D5C020D003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 0900; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKOMGHTTPURLRQ" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 63C7FF9D1D5BEE09003BAE60; - productRefGroup = 63C7FFA81D5BEE09003BAE60 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 63C7FFA61D5BEE09003BAE60 /* PMKOMGHTTPURLRQ */, - 63C7FFF11D5C020D003BAE60 /* PMKOMGTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXShellScriptBuildPhase section */ - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - PromiseKit, - OMGHTTPURLRQ, - OHHTTPStubs, - PMKFoundation, - ); - name = "Embed Carthage Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "case \"$PLATFORM_NAME\" in\nmacosx) plat=Mac;;\niphone*) plat=iOS;;\nwatch*) plat=watchOS;;\nappletv*) plat=tvOS;;\n*) echo \"error: Unknown PLATFORM_NAME: $PLATFORM_NAME\"; exit 1;;\nesac\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nframework=$(basename \"${!VAR}\")\nexport SCRIPT_INPUT_FILE_$n=\"$SRCROOT\"/Carthage/Build/$plat/\"$framework\".framework\ndone\n\n/usr/local/bin/carthage copy-frameworks || exit\n\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nsource=${!VAR}.dSYM\ndest=${BUILT_PRODUCTS_DIR}/$(basename \"$source\")\nditto \"$source\" \"$dest\" || exit\ndone"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 63C7FFA21D5BEE09003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6331B3FF1D657DA400544154 /* NSURLSession+OMG+AnyPromise.m in Sources */, - 6331B4001D657DA400544154 /* NSURLSession+OMG+Promise.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEE1D5C020D003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63C700081D5C021F003BAE60 /* TestNSURLSession.swift in Sources */, - 6342D1B51D68E7BB005D7062 /* TestNSURLSession.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 63C7FFA61D5BEE09003BAE60 /* PMKOMGHTTPURLRQ */; - targetProxy = 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 63C7FFAD1D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.OMGHTTPURLRQ; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos watchsimulator watchos macosx appletvsimulator appletvos"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Debug; - }; - 63C7FFAE1D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.OMGHTTPURLRQ; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos watchsimulator watchos macosx appletvsimulator appletvos"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Release; - }; - 63C7FFB01D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 63C7FFB11D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; - 63C7FFFB1D5C020D003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SUPPRESS_WARNINGS = YES; - SWIFT_VERSION = 4.0; - }; - name = Debug; - }; - 63C7FFFC1D5C020D003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SUPPRESS_WARNINGS = YES; - SWIFT_VERSION = 4.0; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKOMGHTTPURLRQ" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFAD1D5BEE09003BAE60 /* Debug */, - 63C7FFAE1D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKOMGHTTPURLRQ" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFB01D5BEE09003BAE60 /* Debug */, - 63C7FFB11D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKOMGTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFFB1D5C020D003BAE60 /* Debug */, - 63C7FFFC1D5C020D003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 63C7FF9E1D5BEE09003BAE60 /* Project object */; -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/PMKOMGHTTPURLRQ.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/PMKOMGHTTPURLRQ.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index b49fefe7f..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/PMKOMGHTTPURLRQ.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/PMKOMGHTTPURLRQ.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/PMKOMGHTTPURLRQ.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/PMKOMGHTTPURLRQ.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/PMKOMGHTTPURLRQ.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/PMKOMGHTTPURLRQ.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index 08de0be8d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/PMKOMGHTTPURLRQ.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/PMKOMGHTTPURLRQ.xcodeproj/xcshareddata/xcschemes/PMKOMGHTTPURLRQ.xcscheme b/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/PMKOMGHTTPURLRQ.xcodeproj/xcshareddata/xcschemes/PMKOMGHTTPURLRQ.xcscheme deleted file mode 100644 index 687cbb281..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/PMKOMGHTTPURLRQ.xcodeproj/xcshareddata/xcschemes/PMKOMGHTTPURLRQ.xcscheme +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/README.markdown b/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/README.markdown deleted file mode 100644 index 078e121dc..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/README.markdown +++ /dev/null @@ -1,65 +0,0 @@ -# DEPRECATED - -Use PMKFoundation or PMKAlamofire, the promises provided by this repository are minimal -and add little value over just using OMG by itself and passing its URLRequests to -URLSession manually. - -# PromiseKit OMGHTTPURLRQ Extensions ![Build Status] - -This project provides convenience methods on NSURLSession using [OMGHTTPURLRQ]. - -## Usage - -```swift -URLSession.shared.POST(url, formData: params).then { data -> Void in - // by default you just get the raw `Data` -} - -URLSession.shared.GET(url).asDictionary().then { json -> Void in - // call `asDictionary()` to have the result decoded - // as JSON with the result being an `NSDictionary` - // the promise is rejected if the JSON can not be - // decoded or the resulting object is not a dictionary -} - -URLSession.shared.PUT(url, json: params).asArray().then { json -> Void in - // json: NSArray -} - -URLSession.shared.DELETE(url).asString().then { string -> Void in - // string: String -} -``` - -## CocoaPods - -```ruby -pod "PromiseKit/OMGHTTPURLRQ", "~> 6.0" -``` - -The extensions are built into `PromiseKit.framework` thus nothing else is needed. - -## Carthage - -```ruby -github "PromiseKit/OMGHTTPURLRQ-" ~> 3.0 -``` - -The extensions are built into their own framework: - -```swift -// swift -import PromiseKit -import OMGHTTPURLRQ -import PMKOMGHTTPURLRQ -``` - -```objc -// objc -@import PromiseKit; -@import OMGHTTPURLRQ; -@import PMKOMGHTTPURLRQ; -``` - - -[Build Status]: https://travis-ci.org/PromiseKit/OMGHTTPURLRQ.svg?branch=master diff --git a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/Sources/NSURLSession+OMG+AnyPromise.m b/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/Sources/NSURLSession+OMG+AnyPromise.m deleted file mode 100644 index 967354c53..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/Sources/NSURLSession+OMG+AnyPromise.m +++ /dev/null @@ -1,100 +0,0 @@ -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import "PMKOMGHTTPURLRQ.h" - -#if !COCOAPODS -#import -#else -#import "NSURLSession+AnyPromise.h" -#endif - -static id PMKURLRequestFromURLFormat(NSError **err, id urlFormat, ...); -static id go(NSURLSession *, NSMutableURLRequest *); - - -@implementation NSURLSession (PMKOMG) - -- (AnyPromise *)GET:(id)urlFormat, ... { - id err; - id rq = PMKURLRequestFromURLFormat(&err, urlFormat); - if (err) return [AnyPromise promiseWithValue:err]; - return go(self, rq); -} - -- (AnyPromise *)GET:(NSString *)url query:(NSDictionary *)params { - id err; - id rq = [OMGHTTPURLRQ GET:url:params error:&err]; - if (err) return [AnyPromise promiseWithValue:err]; - return go(self, rq); -} - -- (AnyPromise *)POST:(NSString *)url formURLEncodedParameters:(NSDictionary *)params { - id err; - id rq = [OMGHTTPURLRQ POST:url:params error:&err]; - if (err) return [AnyPromise promiseWithValue:err]; - return go(self, rq); -} - -- (AnyPromise *)POST:(NSString *)urlString JSON:(NSDictionary *)params { - id err; - id rq = [OMGHTTPURLRQ POST:urlString JSON:params error:&err]; - if (err) return [AnyPromise promiseWithValue:err]; - return go(self, rq); -} - -- (AnyPromise *)PUT:(NSString *)url formURLEncodedParameters:(NSDictionary *)params { - id err; - id rq = [OMGHTTPURLRQ PUT:url:params error:&err]; - if (err) return [AnyPromise promiseWithValue:err]; - return go(self, rq); - -} - -- (AnyPromise *)DELETE:(NSString *)url formURLEncodedParameters:(NSDictionary *)params { - id err; - id rq = [OMGHTTPURLRQ DELETE:url :params error:&err]; - if (err) return [AnyPromise promiseWithValue:err]; - return go(self, rq); -} - -- (AnyPromise *)PATCH:(NSString *)url JSON:(NSDictionary *)params { - id err; - id rq = [OMGHTTPURLRQ PATCH:url JSON:params error:&err]; - if (err) return [AnyPromise promiseWithValue:err]; - return go(self, rq); -} - -@end - - -static id PMKURLRequestFromURLFormat(NSError **err, id urlFormat, ...) { - if ([urlFormat isKindOfClass:[NSString class]]) { - va_list arguments; - va_start(arguments, urlFormat); - urlFormat = [[NSString alloc] initWithFormat:urlFormat arguments:arguments]; - va_end(arguments); - } else if ([urlFormat isKindOfClass:[NSURL class]]) { - NSMutableURLRequest *rq = [[NSMutableURLRequest alloc] initWithURL:urlFormat]; - [rq setValue:OMGUserAgent() forHTTPHeaderField:@"User-Agent"]; - return rq; - } else { - urlFormat = [urlFormat description]; - } - return [OMGHTTPURLRQ GET:urlFormat:nil error:err]; -} - -static id go(NSURLSession *session, NSMutableURLRequest *rq) { - if ([rq valueForHTTPHeaderField:@"User-Agent"] == nil) { - [rq setValue:OMGUserAgent() forHTTPHeaderField:@"User-Agent"]; - } - return [session promiseDataTaskWithRequest:rq]; -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/Sources/NSURLSession+OMG+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/Sources/NSURLSession+OMG+Promise.swift deleted file mode 100644 index eca851210..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/Sources/NSURLSession+OMG+Promise.swift +++ /dev/null @@ -1,170 +0,0 @@ -import OMGHTTPURLRQ -import Foundation -#if !PMKCocoaPods -import PMKFoundation -import PromiseKit -#endif - -/** - To import the `OMGHTTPURLRQ` category: - - use_frameworks! - pod "PromiseKit/OMGHTTPURLRQ" - - And then in your sources: - - import PromiseKit - - We provide convenience categories for the `URLSession.shared`, or - an instance method `promise`. If you need more complicated behavior - we recommend wrapping that usage in a `Promise` initializer. -*/ -extension URLSession { - /** - Makes a **GET** request to the provided URL. - - let p = URLSession.shared.GET("http://example.com", query: ["foo": "bar"]) - p.then { data -> Void in - //… - } - p.asImage().then { image -> Void in - //… - } - p.asDictionary().then { json -> Void in - //… - } - - - Parameter url: The URL to request. - - Parameter query: The parameters to be encoded as the query string for the GET request. - - Returns: A promise that represents the GET request. - */ - public func GET(_ url: String, query: [String: Any]? = nil) -> Promise<(data: Data, response: URLResponse)> { - return start(try OMGHTTPURLRQ.get(url, query) as URLRequest) - } - - /** - Makes a POST request to the provided URL passing form URL encoded - parameters. - - Form URL-encoding is the standard way to POST on the Internet, so - probably this is what you want. If it doesn’t work, try the `+POST:JSON` - variant. - - let url = "http://jsonplaceholder.typicode.com/posts" - let params = ["title": "foo", "body": "bar", "userId": 1] - URLSession.shared.POST(url, formData: params).asDictionary().then { json -> Void in - //… - } - - - Parameter url: The URL to request. - - Parameter formData: The parameters to be form URL-encoded and passed as the POST body. - - Returns: A promise that represents the POST request. - */ - public func POST(_ url: String, formData: [String: Any]? = nil) -> Promise<(data: Data, response: URLResponse)> { - return start(try OMGHTTPURLRQ.post(url, formData) as URLRequest) - } - - /** - Makes a POST request to the provided URL passing multipart form-data. - - let formData = OMGMultipartFormData() - let imgData = Data(contentsOfFile: "image.png") - formData.addFile(imgdata, parameterName: "file1", filename: "myimage1.png", contentType: "image/png") - - URLSession.shared.POST(url, multipartFormData: formData).then { data in - //… - } - - - Parameter url: The URL to request. - - Parameter multipartFormData: The parameters to be multipart form-data encoded and passed as the POST body. - - Returns: A promise that represents the POST request. - - SeeAlso: [https://github.com/mxcl/OMGHTTPURLRQ](OMGHTTPURLRQ) - */ - public func POST(_ url: String, multipartFormData: OMGMultipartFormData) -> Promise<(data: Data, response: URLResponse)> { - return start(try OMGHTTPURLRQ.post(url, multipartFormData) as URLRequest) - } - - /** - Makes a POST request to the provided URL passing JSON encoded - parameters. - - Most web servers nowadays support POST with either JSON or form - URL-encoding. If in doubt try form URL-encoded parameters first. - - let url = "http://jsonplaceholder.typicode.com/posts" - let params = ["title": "foo", "body": "bar", "userId": 1] - URLSession.shared.POST(url, json: params).asDictionary().then { json -> Void in - //… - } - - - Parameter url: The URL to request. - - Parameter json: The parameters to be JSON-encoded and passed as the POST body. - - Returns: A promise that represents the POST request. - */ - public func POST(_ url: String, json: [String: Any]? = nil) -> Promise<(data: Data, response: URLResponse)> { - return start(try OMGHTTPURLRQ.post(url, json: json) as URLRequest) - } - - /** - Makes a PUT request to the provided URL passing JSON encoded parameters. - - let url = "http://jsonplaceholder.typicode.com/posts" - let params = ["title": "foo", "body": "bar", "userId": 1] - URLSession.shared.PUT(url, json: params).asDictionary().then { json -> Void in - //… - } - - - Parameter url: The URL to request. - - Parameter json: The parameters to be JSON-encoded and passed as the PUT body. - - Returns: A promise that represents the PUT request. - */ - public func PUT(_ url: String, json: [String: Any]? = nil) -> Promise<(data: Data, response: URLResponse)> { - return start(try OMGHTTPURLRQ.put(url, json: json) as URLRequest) - } - - /** - Makes a DELETE request to the provided URL passing form URL-encoded - parameters. - - let url = "http://jsonplaceholder.typicode.com/posts/1" - URLSession.shared.DELETE(url).then.asDictionary() { json -> Void in - //… - } - - - Parameter url: The URL to request. - - Returns: A promise that represents the PUT request. - */ - public func DELETE(_ url: String) -> Promise<(data: Data, response: URLResponse)> { - return start(try OMGHTTPURLRQ.delete(url, nil) as URLRequest) - } - - /** - Makes a PATCH request to the provided URL passing the provided JSON parameters. - - let url = "http://jsonplaceholder.typicode.com/posts/1" - let params = ["foo": "bar"] - NSURLConnection.PATCH(url, json: params).asDictionary().then { json -> Void in - //… - } - - Parameter url: The URL to request. - - Parameter json: The JSON parameters to encode as the PATCH body. - - Returns: A promise that represents the PUT request. - */ - public func PATCH(_ url: String, json: [String: Any]? = nil) -> Promise<(data: Data, response: URLResponse)> { - return start(try OMGHTTPURLRQ.patch(url, json: json) as URLRequest) - } - - private func start(_ body: @autoclosure () throws -> URLRequest) -> Promise<(data: Data, response: URLResponse)> { - do { - var request = try body() - - if request.value(forHTTPHeaderField: "User-Agent") == nil { - request.setValue(OMGUserAgent(), forHTTPHeaderField: "User-Agent") - } - - return dataTask(.promise, with: request) - } catch { - return Promise(error: error) - } - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/Sources/PMKOMGHTTPURLRQ.h b/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/Sources/PMKOMGHTTPURLRQ.h deleted file mode 100644 index 3c29f2dfb..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/Sources/PMKOMGHTTPURLRQ.h +++ /dev/null @@ -1,200 +0,0 @@ -#import -#import - -/** - To import the `NSURLSession` category: - - use_frameworks! - pod "PromiseKit/Foundation" - - Or `NSURLSession` is one of the categories imported by the umbrella pod: - - use_frameworks! - pod "PromiseKit" - - And then in your sources: - - #import - - PromiseKit automatically deserializes the raw HTTP data response into the - appropriate rich data type based on the mime type the server provides. - Thus if the response is JSON you will get the deserialized JSON response. - PromiseKit supports decoding into strings, JSON and UIImages. - - However if your server does not provide a rich content-type, you will - just get `NSData`. This is rare, but a good example we came across was - downloading files from Dropbox. - - PromiseKit goes to quite some lengths to provide good `NSError` objects - for error conditions at all stages of the HTTP to rich-data type - pipeline. We provide the following additional `userInfo` keys as - appropriate: - - - `PMKURLErrorFailingDataKey` - - `PMKURLErrorFailingStringKey` - - `PMKURLErrorFailingURLResponseKey` - - PromiseKit uses [OMGHTTPURLRQ](https://github.com/mxcl/OMGHTTPURLRQ) to - make its HTTP requests. PromiseKit only provides a convenience layer - above OMGHTTPURLRQ, thus if you need more power (eg. a multipartFormData - POST), use OMGHTTPURLRQ to generate the `NSURLRequest` and then pass - that request to `+promise:`. - - @see https://github.com/mxcl/OMGHTTPURLRQ - */ -@interface NSURLSession (PMKOMG) - -/** - Makes a GET request to the provided URL. - - [NSURLSession GET:@"http://placekitten.com/320/320"].then(^(UIImage *img){ - // PromiseKit decodes the image (if it’s an image) - }); - - @param urlStringFormatOrURL The `NSURL` or string format to request. - - @return A promise that fulfills with three parameters: - - 1) The deserialized data response. - 2) The `NSHTTPURLResponse`. - 3) The raw `NSData` response. - */ -- (AnyPromise *)GET:(id)urlStringFormatOrURL, ... NS_REFINED_FOR_SWIFT; - -/** - Makes a GET request with the provided query parameters. - - id url = @"http://jsonplaceholder.typicode.com/comments"; - id params = @{@"postId": @1}; - [NSURLSession GET:url query:params].then(^(NSDictionary *jsonResponse){ - // PromiseKit decodes the JSON dictionary (if it’s JSON) - }); - - @param urlString The `NSURL` or URL string format to request. - - @param parameters The parameters to be encoded as the query string for the GET request. - - @return A promise that fulfills with three parameters: - - 1) The deserialized data response. - 2) The `NSHTTPURLResponse`. - 3) The raw `NSData` response. - */ -- (AnyPromise *)GET:(NSString *)urlString query:(NSDictionary *)parameters NS_REFINED_FOR_SWIFT; - -/** - Makes a POST request to the provided URL passing form URL encoded - parameters. - - Form URL-encoding is the standard way to POST on the Internet, so - probably this is what you want. If it doesn’t work, try the `+POST:JSON` - variant. - - id url = @"http://jsonplaceholder.typicode.com/posts"; - id params = @{@"title": @"foo", @"body": @"bar", @"userId": @1}; - [NSURLSession POST:url formURLEncodedParameters:params].then(^(NSDictionary *jsonResponse){ - // PromiseKit decodes the JSON dictionary (if it’s JSON) - }); - - @param urlString The URL to request. - - @param parameters The parameters to be form URL-encoded and passed as the POST body. - - @return A promise that fulfills with three parameters: - - 1) The deserialized data response. - 2) The `NSHTTPURLResponse`. - 3) The raw `NSData` response. - */ -- (AnyPromise *)POST:(NSString *)urlString formURLEncodedParameters:(NSDictionary *)parameters NS_REFINED_FOR_SWIFT; - -/** - Makes a POST request to the provided URL passing JSON encoded parameters. - - Most web servers nowadays support POST with either JSON or form - URL-encoding. If in doubt try form URL-encoded parameters first. - - id url = @"http://jsonplaceholder.typicode.com/posts"; - id params = @{@"title": @"foo", @"body": @"bar", @"userId": @1}; - [NSURLSession POST:url JSON:params].then(^(NSDictionary *jsonResponse){ - // PromiseKit decodes the JSON dictionary (if it’s JSON) - }); - - @param urlString The URL to request. - - @param JSONParameters The parameters to be JSON encoded and passed as the POST body. - - @return A promise that fulfills with three parameters: - - 1) The deserialized data response. - 2) The `NSHTTPURLResponse`. - 3) The raw `NSData` response. - */ -- (AnyPromise *)POST:(NSString *)urlString JSON:(NSDictionary *)JSONParameters NS_REFINED_FOR_SWIFT; - -/** - Makes a PUT request to the provided URL passing form URL-encoded - parameters. - - id url = @"http://jsonplaceholder.typicode.com/posts/1"; - id params = @{@"id": @1, @"title": @"foo", @"body": @"bar", @"userId": @1}; - [NSURLSession PUT:url formURLEncodedParameters:params].then(^(NSDictionary *jsonResponse){ - // PromiseKit decodes the JSON dictionary (if it’s JSON) - }); - - @param urlString The URL to request. - - @param parameters The parameters to be form URL-encoded and passed as the HTTP body. - - @return A promise that fulfills with three parameters: - - 1) The deserialized data response. - 2) The `NSHTTPURLResponse`. - 3) The raw `NSData` response. - */ -- (AnyPromise *)PUT:(NSString *)urlString formURLEncodedParameters:(NSDictionary *)parameters NS_REFINED_FOR_SWIFT; - -/** - Makes a DELETE request to the provided URL passing form URL-encoded - parameters. - - id url = @"http://jsonplaceholder.typicode.com/posts/1"; - id params = nil; - [NSURLSession DELETE:url formURLEncodedParameters:params].then(^(NSDictionary *jsonResponse){ - // PromiseKit decodes the JSON dictionary (if it’s JSON) - }); - - @param urlString The URL to request. - - @param parameters The parameters to be form URL-encoded and passed as the HTTP body. - - @return A promise that fulfills with three parameters: - - 1) The deserialized data response. - 2) The `NSHTTPURLResponse`. - 3) The raw `NSData` response. - */ -- (AnyPromise *)DELETE:(NSString *)urlString formURLEncodedParameters:(NSDictionary *)parameters NS_REFINED_FOR_SWIFT; - -/** - Makes a PATCH request to the provided URL passing the provided JSON parameters. - - id url = @"http://jsonplaceholder.typicode.com/posts/1"; - id params = nil; - [NSURLSession PATCH:url JSON:params].then(^(NSDictionary *jsonResponse){ - // PromiseKit decodes the JSON dictionary (if it’s JSON) - }); - - @param urlString The URL to request. - - @param JSONParameters The JSON parameters. - - @return A promise that fulfills with three parameters: - - 1) The deserialized data response. - 2) The `NSHTTPURLResponse`. - 3) The raw `NSData` response. - */ -- (AnyPromise *)PATCH:(NSString *)urlString JSON:(NSDictionary *)JSONParameters NS_REFINED_FOR_SWIFT; - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/Tests/TestNSURLSession.m b/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/Tests/TestNSURLSession.m deleted file mode 100644 index d8c6d0d28..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/Tests/TestNSURLSession.m +++ /dev/null @@ -1,48 +0,0 @@ -@import PMKOMGHTTPURLRQ; -@import PMKFoundation; -@import OHHTTPStubs; -@import PromiseKit; -@import XCTest; - - -@implementation NSURLSessionTests: XCTestCase - -- (void)tearDown { - [OHHTTPStubs removeAllStubs]; -} - -- (void)test1 { - id stubData = [NSData dataWithBytes:"[a: 3]" length:1]; - - [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *rq){ - return [rq.URL.host isEqualToString:@"example.com"]; - } withStubResponse:^(NSURLRequest *request){ - return [OHHTTPStubsResponse responseWithData:stubData statusCode:200 headers:@{@"Content-Type": @"application/json"}]; - }]; - - id ex = [self expectationWithDescription:@""]; - - [[NSURLSession sharedSession] GET:[NSURL URLWithString:@"http://example.com"]].catch(^(NSError *err){ - XCTAssertEqualObjects(err.domain, NSCocoaErrorDomain); //TODO this is why we should replace this domain - XCTAssertEqual(err.code, 3840); - XCTAssertEqualObjects(err.userInfo[PMKURLErrorFailingDataKey], stubData); - XCTAssertNotNil(err.userInfo[PMKURLErrorFailingURLResponseKey]); - [ex fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test2 { - id ex = [self expectationWithDescription:@""]; - - [[NSURLSession sharedSession] GET:nil].catch(^(NSError *err){ - XCTAssertEqualObjects(err.domain, NSURLErrorDomain); - XCTAssertEqual(err.code, NSURLErrorUnsupportedURL); - [ex fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/Tests/TestNSURLSession.swift b/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/Tests/TestNSURLSession.swift deleted file mode 100644 index 8e3d77e94..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/OMGHTTPURLRQ/Tests/TestNSURLSession.swift +++ /dev/null @@ -1,74 +0,0 @@ -import PMKOMGHTTPURLRQ -import OHHTTPStubs -import PromiseKit -import XCTest - -class NSURLSessionTests: XCTestCase { - func test1() { - let json: NSDictionary = ["key1": "value1", "key2": ["value2A", "value2B"]] - - OHHTTPStubs.stubRequests(passingTest: { $0.url!.host == "example.com" }) { _ in - return OHHTTPStubsResponse(jsonObject: json, statusCode: 200, headers: nil) - } - - let ex = expectation(description: "") - URLSession.shared.GET("http://example.com").compactMap { - try JSONSerialization.jsonObject(with: $0.data) - }.done { - XCTAssertEqual(json, $0 as? NSDictionary) - ex.fulfill() - } - waitForExpectations(timeout: 1) - } - - func test2() { - - // test that Promise chains thens - // this test because I don’t trust the Swift compiler - - let dummy = ("fred" as NSString).data(using: String.Encoding.utf8.rawValue)! - - OHHTTPStubs.stubRequests(passingTest: { $0.url!.host == "example.com" }) { _ in - return OHHTTPStubsResponse(data: dummy, statusCode: 200, headers: [:]) - } - - let ex = expectation(description: "") - - after(seconds: 0.1).then { - URLSession.shared.GET("http://example.com") - }.done { - XCTAssertEqual($0.data, dummy) - ex.fulfill() - } - - waitForExpectations(timeout: 1) - } - - func testSyntax() { - let json: NSDictionary = ["key1": "value1", "key2": ["value2A", "value2B"]] - - OHHTTPStubs.stubRequests(passingTest: { - $0.url!.host == "example.com" - }, withStubResponse: { _ in - OHHTTPStubsResponse(jsonObject: json, statusCode: 200, headers: nil) - }) - - let p = URLSession.shared.GET("http://example.com", query: [ - "1": 1, - "2": 2 - ]) - - let ex = expectation(description: "") - p.compactMap { - try JSONSerialization.jsonObject(with: $0.data) - }.done { - XCTAssertEqual(json, $0 as? NSDictionary) - ex.fulfill() - } - waitForExpectations(timeout: 1) - } - - override func tearDown() { - OHHTTPStubs.removeAllStubs() - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Photos/.gitignore b/Carthage/Checkouts/PromiseKit/Extensions/Photos/.gitignore deleted file mode 100644 index bec9c1741..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Photos/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.xcodeproj/**/xcuserdata/ -*.xcscmblueprint -/Carthage -/.build -.DS_Store \ No newline at end of file diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Photos/.travis.yml b/Carthage/Checkouts/PromiseKit/Extensions/Photos/.travis.yml deleted file mode 100644 index b33720d9e..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Photos/.travis.yml +++ /dev/null @@ -1,73 +0,0 @@ -os: osx -language: swift -osx_image: xcode10.2 - -branches: - only: - - master -stages: - - lint - - carthage - - test -jobs: - include: - - &pod - stage: lint - osx_image: xcode9.2 - env: SWIFT=3.2 - before_install: - gem install cocoapods --prerelease --version 1.7.0.beta.3 - install: - carthage bootstrap --no-build PromiseKit - script: | - cd Carthage/Checkouts/PromiseKit - mv .github/PromiseKit.podspec . - rm -rf Extensions/Photos/Sources - cp -R ../../../Sources Extensions/Photos - pod lib lint --subspec=PromiseKit/Photos --fail-fast --swift-version=$SWIFT - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=3.3 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=3.4 - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=4.0 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=4.1 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=4.2 - - <<: *pod - osx_image: xcode10.2 - env: SWIFT=5.0 - - - &carthage - stage: carthage - osx_image: xcode9.2 - script: | - carthage bootstrap --cache-builds - sed -i '' "s/SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;/SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;/" *.xcodeproj/project.pbxproj - carthage build --no-skip-current - cache.directories: - - Carthage - - <<: *carthage - osx_image: xcode9.4 - - <<: *carthage - osx_image: xcode10.1 - - <<: *carthage - osx_image: xcode10.2 - - - &test - stage: test - xcode_scheme: PMKPhotos - xcode_project: PMKPhotos.xcodeproj - xcode_destination: 'platform=iOS Simulator,OS=12.2,name=iPhone SE' - cache.directories: - - Carthage - before_install: - carthage bootstrap --cache-builds --no-use-binaries - - <<: *test - xcode_destination: 'platform=tvOS Simulator,OS=12.2,name=Apple TV' diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Photos/Cartfile b/Carthage/Checkouts/PromiseKit/Extensions/Photos/Cartfile deleted file mode 100644 index d4703e986..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Photos/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" ~> 6.8.4 diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Photos/Cartfile.resolved b/Carthage/Checkouts/PromiseKit/Extensions/Photos/Cartfile.resolved deleted file mode 100644 index f54bbdbf2..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Photos/Cartfile.resolved +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" "6.8.4" diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Photos/Carthage.xcconfig b/Carthage/Checkouts/PromiseKit/Extensions/Photos/Carthage.xcconfig deleted file mode 100644 index c8b995651..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Photos/Carthage.xcconfig +++ /dev/null @@ -1,7 +0,0 @@ -// Created by Kevin Ballard on 12/14/15. -// Copyright © 2015 Postmates. All rights reserved. - -FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(SRCROOT)/Carthage/Build/Mac/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=iphone*] = $(SRCROOT)/Carthage/Build/iOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=watch*] = $(SRCROOT)/Carthage/Build/watchOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=appletv*] = $(SRCROOT)/Carthage/Build/tvOS/ $(inherited) diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Photos/Info.plist b/Carthage/Checkouts/PromiseKit/Extensions/Photos/Info.plist deleted file mode 100644 index fbe1e6b31..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Photos/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Photos/LICENSE b/Carthage/Checkouts/PromiseKit/Extensions/Photos/LICENSE deleted file mode 100644 index 50f758c89..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Photos/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2016-present, Max Howell; mxcl@me.com - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Photos/PMKPhotos.xcodeproj/project.pbxproj b/Carthage/Checkouts/PromiseKit/Extensions/Photos/PMKPhotos.xcodeproj/project.pbxproj deleted file mode 100644 index 6f6c7027a..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Photos/PMKPhotos.xcodeproj/project.pbxproj +++ /dev/null @@ -1,450 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 63859F4C1D5D4D5F0021C52A /* PHPhotoLibrary+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63859F4B1D5D4D5F0021C52A /* PHPhotoLibrary+Promise.swift */; }; - 63C7FFF71D5C020D003BAE60 /* PMKPhotos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C7FFA71D5BEE09003BAE60 /* PMKPhotos.framework */; }; - 63EE66491D5F8915002F86B0 /* PHPhototLibraryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63EE66481D5F8915002F86B0 /* PHPhototLibraryTests.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 63C7FF9E1D5BEE09003BAE60 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 63C7FFA61D5BEE09003BAE60; - remoteInfo = PMKPhotos; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 63859F4B1D5D4D5F0021C52A /* PHPhotoLibrary+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "PHPhotoLibrary+Promise.swift"; path = "Sources/PHPhotoLibrary+Promise.swift"; sourceTree = SOURCE_ROOT; }; - 63C700091D5C0253003BAE60 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 63C7FFA71D5BEE09003BAE60 /* PMKPhotos.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PMKPhotos.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 63C7FFF21D5C020D003BAE60 /* PMKPHTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PMKPHTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 63CCF8121D5C0C4E00503216 /* Cartfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile; sourceTree = ""; }; - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Carthage.xcconfig; sourceTree = ""; }; - 63EE66481D5F8915002F86B0 /* PHPhototLibraryTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PHPhototLibraryTests.swift; path = Tests/PHPhototLibraryTests.swift; sourceTree = SOURCE_ROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 63C7FFA31D5BEE09003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEF1D5C020D003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 63C7FFF71D5C020D003BAE60 /* PMKPhotos.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 63C7FF9D1D5BEE09003BAE60 = { - isa = PBXGroup; - children = ( - 63C700091D5C0253003BAE60 /* Info.plist */, - 63CCF8121D5C0C4E00503216 /* Cartfile */, - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */, - 63C7FFA91D5BEE09003BAE60 /* Sources */, - 63C7FFF31D5C020D003BAE60 /* Tests */, - 63C7FFA81D5BEE09003BAE60 /* Products */, - ); - sourceTree = ""; - }; - 63C7FFA81D5BEE09003BAE60 /* Products */ = { - isa = PBXGroup; - children = ( - 63C7FFA71D5BEE09003BAE60 /* PMKPhotos.framework */, - 63C7FFF21D5C020D003BAE60 /* PMKPHTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 63C7FFA91D5BEE09003BAE60 /* Sources */ = { - isa = PBXGroup; - children = ( - 63859F4B1D5D4D5F0021C52A /* PHPhotoLibrary+Promise.swift */, - ); - path = Sources; - sourceTree = SOURCE_ROOT; - }; - 63C7FFF31D5C020D003BAE60 /* Tests */ = { - isa = PBXGroup; - children = ( - 63EE66481D5F8915002F86B0 /* PHPhototLibraryTests.swift */, - ); - path = Tests; - sourceTree = SOURCE_ROOT; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 63C7FFA41D5BEE09003BAE60 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 63C7FFA61D5BEE09003BAE60 /* PMKPhotos */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKPhotos" */; - buildPhases = ( - 63C7FFA21D5BEE09003BAE60 /* Sources */, - 63C7FFA31D5BEE09003BAE60 /* Frameworks */, - 63C7FFA41D5BEE09003BAE60 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PMKPhotos; - productName = "PMK+UIKit"; - productReference = 63C7FFA71D5BEE09003BAE60 /* PMKPhotos.framework */; - productType = "com.apple.product-type.framework"; - }; - 63C7FFF11D5C020D003BAE60 /* PMKPHTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKPHTests" */; - buildPhases = ( - 63C7FFEE1D5C020D003BAE60 /* Sources */, - 63C7FFEF1D5C020D003BAE60 /* Frameworks */, - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */, - ); - name = PMKPHTests; - productName = PMKTests/NS; - productReference = 63C7FFF21D5C020D003BAE60 /* PMKPHTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 63C7FF9E1D5BEE09003BAE60 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = "Max Howell"; - TargetAttributes = { - 63C7FFA61D5BEE09003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - 63C7FFF11D5C020D003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKPhotos" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 63C7FF9D1D5BEE09003BAE60; - productRefGroup = 63C7FFA81D5BEE09003BAE60 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 63C7FFA61D5BEE09003BAE60 /* PMKPhotos */, - 63C7FFF11D5C020D003BAE60 /* PMKPHTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXShellScriptBuildPhase section */ - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - PromiseKit, - ); - name = "Embed Carthage Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "case \"$PLATFORM_NAME\" in\nmacosx) plat=Mac;;\niphone*) plat=iOS;;\nwatch*) plat=watchOS;;\nappletv*) plat=tvOS;;\n*) echo \"error: Unknown PLATFORM_NAME: $PLATFORM_NAME\"; exit 1;;\nesac\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nframework=$(basename \"${!VAR}\")\nexport SCRIPT_INPUT_FILE_$n=\"$SRCROOT\"/Carthage/Build/$plat/\"$framework\".framework\ndone\n\n/usr/local/bin/carthage copy-frameworks || exit\n\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nsource=${!VAR}.dSYM\ndest=${BUILT_PRODUCTS_DIR}/$(basename \"$source\")\nditto \"$source\" \"$dest\" || exit\ndone"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 63C7FFA21D5BEE09003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63859F4C1D5D4D5F0021C52A /* PHPhotoLibrary+Promise.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEE1D5C020D003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63EE66491D5F8915002F86B0 /* PHPhototLibraryTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 63C7FFA61D5BEE09003BAE60 /* PMKPhotos */; - targetProxy = 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 63C7FFAD1D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.13; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.Foundation; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvsimulator appletvos macosx"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 10.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Debug; - }; - 63C7FFAE1D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.13; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.Foundation; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvsimulator appletvos macosx"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 10.0; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Release; - }; - 63C7FFB01D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.Photos; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Debug; - }; - 63C7FFB11D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.Photos; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Release; - }; - 63C7FFFB1D5C020D003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 63C7FFFC1D5C020D003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKPhotos" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFAD1D5BEE09003BAE60 /* Debug */, - 63C7FFAE1D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKPhotos" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFB01D5BEE09003BAE60 /* Debug */, - 63C7FFB11D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKPHTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFFB1D5C020D003BAE60 /* Debug */, - 63C7FFFC1D5C020D003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 63C7FF9E1D5BEE09003BAE60 /* Project object */; -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Photos/PMKPhotos.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Carthage/Checkouts/PromiseKit/Extensions/Photos/PMKPhotos.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index b49fefe7f..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Photos/PMKPhotos.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Photos/PMKPhotos.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Carthage/Checkouts/PromiseKit/Extensions/Photos/PMKPhotos.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Photos/PMKPhotos.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Photos/PMKPhotos.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Carthage/Checkouts/PromiseKit/Extensions/Photos/PMKPhotos.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index 08de0be8d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Photos/PMKPhotos.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Photos/PMKPhotos.xcodeproj/xcshareddata/xcschemes/PMKPhotos.xcscheme b/Carthage/Checkouts/PromiseKit/Extensions/Photos/PMKPhotos.xcodeproj/xcshareddata/xcschemes/PMKPhotos.xcscheme deleted file mode 100644 index 3d33c794d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Photos/PMKPhotos.xcodeproj/xcshareddata/xcschemes/PMKPhotos.xcscheme +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Photos/README.markdown b/Carthage/Checkouts/PromiseKit/Extensions/Photos/README.markdown deleted file mode 100644 index a6bad75d7..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Photos/README.markdown +++ /dev/null @@ -1,34 +0,0 @@ -# PromiseKit Photos Extensions ![Build Status] - -This project adds promises to Apple’s Photos framework. - -## CocoaPods - -```ruby -pod "PromiseKit/Photos", "~> 6.0" -``` - -The extensions are built into `PromiseKit.framework` thus nothing else is needed. - -## Carthage - -```ruby -github "PromiseKit/Photos" ~> 3.0 -``` - -The extensions are built into their own framework: - -```swift -// swift -import PromiseKit -import PMKPhotos -``` - -```objc -// objc -@import PromiseKit; -@import PMKPhotos; -``` - - -[Build Status]: https://travis-ci.org/PromiseKit/Photos.svg?branch=master diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Photos/Sources/PHPhotoLibrary+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/Photos/Sources/PHPhotoLibrary+Promise.swift deleted file mode 100644 index 993762fe0..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Photos/Sources/PHPhotoLibrary+Promise.swift +++ /dev/null @@ -1,24 +0,0 @@ -import Photos.PHPhotoLibrary -#if !PMKCocoaPods -import PromiseKit -#endif - -/** - To import the `PHPhotoLibrary` category: - - use_frameworks! - pod "PromiseKit/Photos" - - And then in your sources: - - import PromiseKit -*/ -extension PHPhotoLibrary { - /** - - Returns: A promise that fulfills with the user’s authorization - - Note: This promise cannot reject. - */ - public class func requestAuthorization() -> Guarantee { - return Guarantee(resolver: PHPhotoLibrary.requestAuthorization) - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Photos/Tests/PHPhototLibraryTests.swift b/Carthage/Checkouts/PromiseKit/Extensions/Photos/Tests/PHPhototLibraryTests.swift deleted file mode 100644 index d0c1fec37..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Photos/Tests/PHPhototLibraryTests.swift +++ /dev/null @@ -1,12 +0,0 @@ -import PromiseKit -import PMKPhotos -import Photos -import XCTest - -class PHTestCase: XCTestCase { - func test() { - let ex = expectation(description: "") - PHPhotoLibrary.requestAuthorization().done{ _ in ex.fulfill() } - waitForExpectations(timeout: 10) - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/.gitignore b/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/.gitignore deleted file mode 100644 index bec9c1741..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.xcodeproj/**/xcuserdata/ -*.xcscmblueprint -/Carthage -/.build -.DS_Store \ No newline at end of file diff --git a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/.travis.yml b/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/.travis.yml deleted file mode 100644 index 5fef77889..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/.travis.yml +++ /dev/null @@ -1,82 +0,0 @@ -os: osx -language: swift -osx_image: xcode10.2 - -branches: - only: - - master -stages: - - lint - - carthage - - test -jobs: - include: - - &pod - stage: lint - osx_image: xcode8.3 - env: SWIFT=3.1 - os: osx - language: objective-c - before_install: - gem install cocoapods --prerelease --version 1.7.0.beta.3 - install: - carthage bootstrap --no-build PromiseKit - script: | - cd Carthage/Checkouts/PromiseKit - mv .github/PromiseKit.podspec . - rm -rf Extensions/QuartzCore/Sources - cp -R ../../../Sources Extensions/QuartzCore - pod lib lint --subspec=PromiseKit/QuartzCore --fail-fast --swift-version=$SWIFT - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=3.2 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=3.3 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=3.4 - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=4.0 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=4.1 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=4.2 - - <<: *pod - osx_image: xcode10.2 - env: SWIFT=5.0 - - - &carthage - stage: carthage - osx_image: xcode9.2 - script: | - carthage bootstrap --cache-builds - sed -i '' "s/SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;/SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;/" *.xcodeproj/project.pbxproj - carthage build --no-skip-current - cache: - directories: - - Carthage - - <<: *carthage - osx_image: xcode9.4 - - <<: *carthage - osx_image: xcode10.1 - - <<: *carthage - osx_image: xcode10.2 - - - &test - stage: test - xcode_scheme: PMKQuartzCore - xcode_project: PMKQuartzCore.xcodeproj - xcode_destination: 'platform=macOS' - cache: - directories: - - Carthage - before_install: - carthage bootstrap --cache-builds --no-use-binaries - - <<: *test - xcode_destination: 'platform=iOS Simulator,OS=12.2,name=iPhone SE' - - <<: *test - xcode_destination: 'platform=tvOS Simulator,OS=12.2,name=Apple TV' diff --git a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/Cartfile b/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/Cartfile deleted file mode 100644 index d4703e986..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" ~> 6.8.4 diff --git a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/Cartfile.resolved b/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/Cartfile.resolved deleted file mode 100644 index f54bbdbf2..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/Cartfile.resolved +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" "6.8.4" diff --git a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/Carthage.xcconfig b/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/Carthage.xcconfig deleted file mode 100644 index c8b995651..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/Carthage.xcconfig +++ /dev/null @@ -1,7 +0,0 @@ -// Created by Kevin Ballard on 12/14/15. -// Copyright © 2015 Postmates. All rights reserved. - -FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(SRCROOT)/Carthage/Build/Mac/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=iphone*] = $(SRCROOT)/Carthage/Build/iOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=watch*] = $(SRCROOT)/Carthage/Build/watchOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=appletv*] = $(SRCROOT)/Carthage/Build/tvOS/ $(inherited) diff --git a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/Info.plist b/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/Info.plist deleted file mode 100644 index fbe1e6b31..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/LICENSE b/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/LICENSE deleted file mode 100644 index 50f758c89..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2016-present, Max Howell; mxcl@me.com - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/PMKQCTests/Info.plist b/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/PMKQCTests/Info.plist deleted file mode 100644 index 6c6c23c43..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/PMKQCTests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/PMKQCTests/PMKQCTests.swift b/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/PMKQCTests/PMKQCTests.swift deleted file mode 100644 index 47b21e9f5..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/PMKQCTests/PMKQCTests.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// PMKQCTests.swift -// PMKQCTests -// -// Created by Max Howell on 8/13/16. -// Copyright © 2016 Max Howell. All rights reserved. -// - -import XCTest - -class PMKQCTests: XCTestCase { - - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - - func testExample() { - // This is an example of a functional test case. - // Use XCTAssert and related functions to verify your tests produce the correct results. - } - - func testPerformanceExample() { - // This is an example of a performance test case. - self.measure { - // Put the code you want to measure the time of here. - } - } - -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/PMKQuartzCore.xcodeproj/project.pbxproj b/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/PMKQuartzCore.xcodeproj/project.pbxproj deleted file mode 100644 index ded2d202a..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/PMKQuartzCore.xcodeproj/project.pbxproj +++ /dev/null @@ -1,485 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 637B4A741D5D5FC600E1BC6C /* PMKQuartzCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 637B4A731D5D5FC600E1BC6C /* PMKQuartzCore.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 639E8D041D5D651300D210E4 /* CALayer+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 639E8D021D5D651300D210E4 /* CALayer+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 639E8D051D5D651300D210E4 /* CALayer+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 639E8D031D5D651300D210E4 /* CALayer+AnyPromise.m */; }; - 63D9E6791D6013E7006B2661 /* PMKQCTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63D9E6781D6013E7006B2661 /* PMKQCTests.swift */; }; - 63E15130219F387C003CE725 /* CALayer+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63E1512F219F387C003CE725 /* CALayer+Promise.swift */; }; - 63E15132219F457E003CE725 /* TestQuartzCore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63E15131219F457E003CE725 /* TestQuartzCore.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 63E15133219F45F9003CE725 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 63C7FF9E1D5BEE09003BAE60 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 63C7FFA61D5BEE09003BAE60; - remoteInfo = PMKQuartzCore; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 637B4A731D5D5FC600E1BC6C /* PMKQuartzCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PMKQuartzCore.h; path = Sources/PMKQuartzCore.h; sourceTree = SOURCE_ROOT; }; - 639E8D021D5D651300D210E4 /* CALayer+AnyPromise.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "CALayer+AnyPromise.h"; path = "Sources/CALayer+AnyPromise.h"; sourceTree = SOURCE_ROOT; }; - 639E8D031D5D651300D210E4 /* CALayer+AnyPromise.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "CALayer+AnyPromise.m"; path = "Sources/CALayer+AnyPromise.m"; sourceTree = SOURCE_ROOT; }; - 639E8D061D5D651D00D210E4 /* TestQuartzCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TestQuartzCore.m; path = Tests/TestQuartzCore.m; sourceTree = SOURCE_ROOT; }; - 63C700091D5C0253003BAE60 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 63C7FFA71D5BEE09003BAE60 /* PMKQuartzCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PMKQuartzCore.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 63CCF8121D5C0C4E00503216 /* Cartfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile; sourceTree = ""; }; - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Carthage.xcconfig; sourceTree = ""; }; - 63D9E6761D6013E7006B2661 /* PMKQCTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PMKQCTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 63D9E6781D6013E7006B2661 /* PMKQCTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PMKQCTests.swift; sourceTree = ""; }; - 63D9E67A1D6013E7006B2661 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 63E1512F219F387C003CE725 /* CALayer+Promise.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CALayer+Promise.swift"; sourceTree = ""; }; - 63E15131219F457E003CE725 /* TestQuartzCore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestQuartzCore.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 63C7FFA31D5BEE09003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63D9E6731D6013E7006B2661 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 63C7FF9D1D5BEE09003BAE60 = { - isa = PBXGroup; - children = ( - 63C700091D5C0253003BAE60 /* Info.plist */, - 63CCF8121D5C0C4E00503216 /* Cartfile */, - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */, - 63C7FFA91D5BEE09003BAE60 /* Sources */, - 63C7FFF31D5C020D003BAE60 /* Tests */, - 63D9E6771D6013E7006B2661 /* PMKQCTests */, - 63C7FFA81D5BEE09003BAE60 /* Products */, - ); - sourceTree = ""; - }; - 63C7FFA81D5BEE09003BAE60 /* Products */ = { - isa = PBXGroup; - children = ( - 63C7FFA71D5BEE09003BAE60 /* PMKQuartzCore.framework */, - 63D9E6761D6013E7006B2661 /* PMKQCTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 63C7FFA91D5BEE09003BAE60 /* Sources */ = { - isa = PBXGroup; - children = ( - 637B4A731D5D5FC600E1BC6C /* PMKQuartzCore.h */, - 639E8D021D5D651300D210E4 /* CALayer+AnyPromise.h */, - 639E8D031D5D651300D210E4 /* CALayer+AnyPromise.m */, - 63E1512F219F387C003CE725 /* CALayer+Promise.swift */, - ); - path = Sources; - sourceTree = SOURCE_ROOT; - }; - 63C7FFF31D5C020D003BAE60 /* Tests */ = { - isa = PBXGroup; - children = ( - 639E8D061D5D651D00D210E4 /* TestQuartzCore.m */, - 63E15131219F457E003CE725 /* TestQuartzCore.swift */, - ); - path = Tests; - sourceTree = SOURCE_ROOT; - }; - 63D9E6771D6013E7006B2661 /* PMKQCTests */ = { - isa = PBXGroup; - children = ( - 63D9E6781D6013E7006B2661 /* PMKQCTests.swift */, - 63D9E67A1D6013E7006B2661 /* Info.plist */, - ); - path = PMKQCTests; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 63C7FFA41D5BEE09003BAE60 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 637B4A741D5D5FC600E1BC6C /* PMKQuartzCore.h in Headers */, - 639E8D041D5D651300D210E4 /* CALayer+AnyPromise.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 63C7FFA61D5BEE09003BAE60 /* PMKQuartzCore */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKQuartzCore" */; - buildPhases = ( - 63C7FFA21D5BEE09003BAE60 /* Sources */, - 63C7FFA31D5BEE09003BAE60 /* Frameworks */, - 63C7FFA41D5BEE09003BAE60 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PMKQuartzCore; - productName = "PMK+UIKit"; - productReference = 63C7FFA71D5BEE09003BAE60 /* PMKQuartzCore.framework */; - productType = "com.apple.product-type.framework"; - }; - 63D9E6751D6013E7006B2661 /* PMKQCTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63D9E67B1D6013E7006B2661 /* Build configuration list for PBXNativeTarget "PMKQCTests" */; - buildPhases = ( - 63D9E6721D6013E7006B2661 /* Sources */, - 63D9E6731D6013E7006B2661 /* Frameworks */, - 63D9E6741D6013E7006B2661 /* Resources */, - 63D9E67E1D6013F5006B2661 /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - 63E15134219F45F9003CE725 /* PBXTargetDependency */, - ); - name = PMKQCTests; - productName = PMKQCTests; - productReference = 63D9E6761D6013E7006B2661 /* PMKQCTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 63C7FF9E1D5BEE09003BAE60 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = "Max Howell"; - TargetAttributes = { - 63C7FFA61D5BEE09003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - 63D9E6751D6013E7006B2661 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKQuartzCore" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 63C7FF9D1D5BEE09003BAE60; - productRefGroup = 63C7FFA81D5BEE09003BAE60 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 63C7FFA61D5BEE09003BAE60 /* PMKQuartzCore */, - 63D9E6751D6013E7006B2661 /* PMKQCTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 63D9E6741D6013E7006B2661 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 63D9E67E1D6013F5006B2661 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - PromiseKit, - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "case \"$PLATFORM_NAME\" in\nmacosx) plat=Mac;;\niphone*) plat=iOS;;\nwatch*) plat=watchOS;;\nappletv*) plat=tvOS;;\n*) echo \"error: Unknown PLATFORM_NAME: $PLATFORM_NAME\"; exit 1;;\nesac\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nframework=$(basename \"${!VAR}\")\nexport SCRIPT_INPUT_FILE_$n=\"$SRCROOT\"/Carthage/Build/$plat/\"$framework\".framework\ndone\n\n/usr/local/bin/carthage copy-frameworks || exit\n\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nsource=${!VAR}.dSYM\ndest=${BUILT_PRODUCTS_DIR}/$(basename \"$source\")\nditto \"$source\" \"$dest\" || exit\ndone"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 63C7FFA21D5BEE09003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 639E8D051D5D651300D210E4 /* CALayer+AnyPromise.m in Sources */, - 63E15130219F387C003CE725 /* CALayer+Promise.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63D9E6721D6013E7006B2661 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63D9E6791D6013E7006B2661 /* PMKQCTests.swift in Sources */, - 63E15132219F457E003CE725 /* TestQuartzCore.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 63E15134219F45F9003CE725 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 63C7FFA61D5BEE09003BAE60 /* PMKQuartzCore */; - targetProxy = 63E15133219F45F9003CE725 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 63C7FFAD1D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.QuartzCore; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvsimulator appletvos macosx"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Debug; - }; - 63C7FFAE1D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.QuartzCore; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvsimulator appletvos macosx"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Release; - }; - 63C7FFB01D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Debug; - }; - 63C7FFB11D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Release; - }; - 63D9E67C1D6013E7006B2661 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - INFOPLIST_FILE = PMKQCTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks @loader_path/../Frameworks @executable_path/../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.PMKQCTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 63D9E67D1D6013E7006B2661 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - INFOPLIST_FILE = PMKQCTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks @loader_path/../Frameworks @executable_path/../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.PMKQCTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKQuartzCore" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFAD1D5BEE09003BAE60 /* Debug */, - 63C7FFAE1D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKQuartzCore" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFB01D5BEE09003BAE60 /* Debug */, - 63C7FFB11D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63D9E67B1D6013E7006B2661 /* Build configuration list for PBXNativeTarget "PMKQCTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63D9E67C1D6013E7006B2661 /* Debug */, - 63D9E67D1D6013E7006B2661 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 63C7FF9E1D5BEE09003BAE60 /* Project object */; -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/PMKQuartzCore.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/PMKQuartzCore.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index b49fefe7f..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/PMKQuartzCore.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/PMKQuartzCore.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/PMKQuartzCore.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/PMKQuartzCore.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/PMKQuartzCore.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/PMKQuartzCore.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index 08de0be8d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/PMKQuartzCore.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/PMKQuartzCore.xcodeproj/xcshareddata/xcschemes/PMKQuartzCore.xcscheme b/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/PMKQuartzCore.xcodeproj/xcshareddata/xcschemes/PMKQuartzCore.xcscheme deleted file mode 100644 index ff8daea9a..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/PMKQuartzCore.xcodeproj/xcshareddata/xcschemes/PMKQuartzCore.xcscheme +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/README.markdown b/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/README.markdown deleted file mode 100644 index a122759ba..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/README.markdown +++ /dev/null @@ -1,34 +0,0 @@ -# PromiseKit QuartzCore Extensions ![Build Status] - -This project adds promises to Apple’s QuartzCore framework. - -## CocoaPods - -```ruby -pod "PromiseKit/QuartzCore" ~> 6.0 -``` - -The extensions are built into `PromiseKit.framework` thus nothing else is needed. - -## Carthage - -```ruby -github "PromiseKit/QuartzCore" ~> 3.0 -``` - -The extensions are built into their own framework: - -```swift -// swift -import PromiseKit -import PMKQuartzCore -``` - -```objc -// objc -@import PromiseKit; -@import PMKQuartzCore; -``` - - -[Build Status]: https://travis-ci.org/PromiseKit/QuartzCore.svg?branch=master diff --git a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/Sources/CALayer+AnyPromise.h b/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/Sources/CALayer+AnyPromise.h deleted file mode 100644 index 0026d378c..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/Sources/CALayer+AnyPromise.h +++ /dev/null @@ -1,40 +0,0 @@ -// -// CALayer+AnyPromise.h -// -// Created by María Patricia Montalvo Dzib on 24/11/14. -// Copyright (c) 2014 Aluxoft SCP. All rights reserved. -// - -#import -#import - -/** - To import the `CALayer` category: - - use_frameworks! - pod "PromiseKit/QuartzCore" - - Or `CALayer` is one of the categories imported by the umbrella pod: - - use_frameworks! - pod "PromiseKit" - - And then in your sources: - - @import PromiseKit; -*/ -@interface CALayer (PromiseKit) - -/** - Add the specified animation object to the layer’s render tree. - - @return A promise that thens two parameters: - - 1. `@YES` if the animation progressed entirely to completion. - 2. The `CAAnimation` object. - - @see addAnimation:forKey -*/ -- (AnyPromise *)promiseAnimation:(CAAnimation *)animation forKey:(NSString *)key; - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/Sources/CALayer+AnyPromise.m b/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/Sources/CALayer+AnyPromise.m deleted file mode 100644 index 6ad7e2f13..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/Sources/CALayer+AnyPromise.m +++ /dev/null @@ -1,36 +0,0 @@ -// -// CALayer+PromiseKit.m -// -// Created by María Patricia Montalvo Dzib on 24/11/14. -// Copyright (c) 2014 Aluxoft SCP. All rights reserved. -// - -#import -#import "CALayer+AnyPromise.h" - -@interface PMKCAAnimationDelegate : NSObject { -@public - PMKResolver resolve; - CAAnimation *animation; -} -@end - -@implementation PMKCAAnimationDelegate - -- (void)animationDidStop:(CAAnimation *)ignoreOrRetainCycleHappens finished:(BOOL)flag { - resolve(PMKManifold(@(flag), animation)); - animation.delegate = nil; -} - -@end - -@implementation CALayer (PromiseKit) - -- (AnyPromise *)promiseAnimation:(CAAnimation *)animation forKey:(NSString *)key { - PMKCAAnimationDelegate *d = animation.delegate = [PMKCAAnimationDelegate new]; - d->animation = animation; - [self addAnimation:animation forKey:key]; - return [[AnyPromise alloc] initWithResolver:&d->resolve]; -} - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/Sources/CALayer+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/Sources/CALayer+Promise.swift deleted file mode 100644 index d51372548..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/Sources/CALayer+Promise.swift +++ /dev/null @@ -1,31 +0,0 @@ -#if !PMKCocoaPods -import PromiseKit -#endif -import QuartzCore - -public extension CALayer { - /** - Adds an animation to a layer, returning a Guarantee which resolves when the animation stops. - - layer.add(.promise, animation: animation).done { finished in - //… - } - */ - func add(_: PMKNamespacer, animation: CAAnimation, forKey key: String? = nil) -> Guarantee { - let proxy = Proxy() - proxy.retainCycle = proxy - animation.delegate = proxy - add(animation, forKey: key) - return proxy.pending.guarantee - } -} - -private class Proxy: NSObject, CAAnimationDelegate { - var retainCycle: Proxy? - let pending = Guarantee.pending() - - func animationDidStop(_ anim: CAAnimation, finished flag: Bool) { - pending.resolve(flag) - retainCycle = nil - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/Sources/PMKQuartzCore.h b/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/Sources/PMKQuartzCore.h deleted file mode 100644 index 585f7fddb..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/Sources/PMKQuartzCore.h +++ /dev/null @@ -1 +0,0 @@ -#import "CALayer+AnyPromise.h" diff --git a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/Tests/TestQuartzCore.m b/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/Tests/TestQuartzCore.m deleted file mode 100644 index 249d5f7a9..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/Tests/TestQuartzCore.m +++ /dev/null @@ -1,18 +0,0 @@ -@import PMKQuartzCore; -@import PromiseKit; -@import QuartzCore; -@import XCTest; - -@implementation TestCALayer: XCTestCase - -- (void)test { - id ex = [self expectationWithDescription:@""]; - - [[CALayer layer] promiseAnimation:[CAAnimation new] forKey:@"center"].then(^{ - [ex fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/Tests/TestQuartzCore.swift b/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/Tests/TestQuartzCore.swift deleted file mode 100644 index 9e5492b02..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/QuartzCore/Tests/TestQuartzCore.swift +++ /dev/null @@ -1,16 +0,0 @@ -import PMKQuartzCore -import PromiseKit -import QuartzCore -import XCTest - -class TestCALayer: XCTestCase { - func test() { - let ex = expectation(description: "") - - CALayer().add(.promise, animation: CAAnimation()).done { _ in - ex.fulfill() - } - - wait(for: [ex], timeout: 10) - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Social/.gitignore b/Carthage/Checkouts/PromiseKit/Extensions/Social/.gitignore deleted file mode 100644 index bec9c1741..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Social/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.xcodeproj/**/xcuserdata/ -*.xcscmblueprint -/Carthage -/.build -.DS_Store \ No newline at end of file diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Social/.travis.yml b/Carthage/Checkouts/PromiseKit/Extensions/Social/.travis.yml deleted file mode 100644 index 4c57619e4..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Social/.travis.yml +++ /dev/null @@ -1,78 +0,0 @@ -os: osx -language: swift -osx_image: xcode10.2 - -branches: - only: - - master -stages: - - lint - - carthage - - test -jobs: - include: - - &pod - stage: lint - osx_image: xcode8.3 - env: SWIFT=3.1 - before_install: - gem install cocoapods --prerelease --version 1.7.0.beta.3 - install: - carthage bootstrap --no-build PromiseKit - script: | - cd Carthage/Checkouts/PromiseKit - mv .github/PromiseKit.podspec . - rm -rf Extensions/Social/Sources - cp -R ../../../Sources Extensions/Social - pod lib lint --subspec=PromiseKit/Social --fail-fast --swift-version=$SWIFT - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=3.2 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=3.3 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=3.4 - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=4.0 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=4.1 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=4.2 - - <<: *pod - osx_image: xcode10.2 - env: SWIFT=5.0 - - - &carthage - stage: carthage - osx_image: xcode9.2 - script: | - carthage bootstrap --cache-builds - sed -i '' "s/SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;/SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;/" *.xcodeproj/project.pbxproj - carthage build --no-skip-current - cache: - directories: - - Carthage - - <<: *carthage - osx_image: xcode9.4 - - <<: *carthage - osx_image: xcode10.1 - - <<: *carthage - osx_image: xcode10.2 - - - &test - stage: test - xcode_scheme: PMKSocial - xcode_project: PMKSocial.xcodeproj - xcode_destination: 'platform=macOS' - cache: - directories: - - Carthage - before_install: - carthage bootstrap --cache-builds --no-use-binaries - - <<: *test - xcode_destination: 'platform=iOS Simulator,OS=12.2,name=iPhone SE' diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Social/Cartfile b/Carthage/Checkouts/PromiseKit/Extensions/Social/Cartfile deleted file mode 100644 index 019d387bc..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Social/Cartfile +++ /dev/null @@ -1,2 +0,0 @@ -github "mxcl/PromiseKit" ~> 6.8.4 -github "PromiseKit/Foundation" ~> 3.0 diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Social/Cartfile.resolved b/Carthage/Checkouts/PromiseKit/Extensions/Social/Cartfile.resolved deleted file mode 100644 index 950dfab15..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Social/Cartfile.resolved +++ /dev/null @@ -1,2 +0,0 @@ -github "PromiseKit/Foundation" "3.3.2" -github "mxcl/PromiseKit" "6.8.4" diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Social/Carthage.xcconfig b/Carthage/Checkouts/PromiseKit/Extensions/Social/Carthage.xcconfig deleted file mode 100644 index c8b995651..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Social/Carthage.xcconfig +++ /dev/null @@ -1,7 +0,0 @@ -// Created by Kevin Ballard on 12/14/15. -// Copyright © 2015 Postmates. All rights reserved. - -FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(SRCROOT)/Carthage/Build/Mac/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=iphone*] = $(SRCROOT)/Carthage/Build/iOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=watch*] = $(SRCROOT)/Carthage/Build/watchOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=appletv*] = $(SRCROOT)/Carthage/Build/tvOS/ $(inherited) diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Social/Info.plist b/Carthage/Checkouts/PromiseKit/Extensions/Social/Info.plist deleted file mode 100644 index fbe1e6b31..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Social/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Social/LICENSE b/Carthage/Checkouts/PromiseKit/Extensions/Social/LICENSE deleted file mode 100644 index 50f758c89..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Social/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2016-present, Max Howell; mxcl@me.com - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Social/PMKSocial.xcodeproj/project.pbxproj b/Carthage/Checkouts/PromiseKit/Extensions/Social/PMKSocial.xcodeproj/project.pbxproj deleted file mode 100644 index b27530844..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Social/PMKSocial.xcodeproj/project.pbxproj +++ /dev/null @@ -1,469 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 637B4A741D5D5FC600E1BC6C /* PMKSocial.h in Headers */ = {isa = PBXBuildFile; fileRef = 637B4A731D5D5FC600E1BC6C /* PMKSocial.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 63B8B9A81D5D621F007AAB62 /* SLComposeViewController+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63B8B9A41D5D621F007AAB62 /* SLComposeViewController+Promise.swift */; }; - 63B8B9A91D5D621F007AAB62 /* SLRequest+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 63B8B9A51D5D621F007AAB62 /* SLRequest+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 63B8B9AA1D5D621F007AAB62 /* SLRequest+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 63B8B9A61D5D621F007AAB62 /* SLRequest+AnyPromise.m */; }; - 63B8B9AB1D5D621F007AAB62 /* SLRequest+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63B8B9A71D5D621F007AAB62 /* SLRequest+Promise.swift */; }; - 63B8B9AE1D5D622E007AAB62 /* TestSocial.m in Sources */ = {isa = PBXBuildFile; fileRef = 63B8B9AC1D5D622E007AAB62 /* TestSocial.m */; }; - 63B8B9AF1D5D622E007AAB62 /* TestSocial.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63B8B9AD1D5D622E007AAB62 /* TestSocial.swift */; }; - 63C7FFF71D5C020D003BAE60 /* PMKSocial.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C7FFA71D5BEE09003BAE60 /* PMKSocial.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 63C7FF9E1D5BEE09003BAE60 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 63C7FFA61D5BEE09003BAE60; - remoteInfo = PMKSocial; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 637B4A731D5D5FC600E1BC6C /* PMKSocial.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PMKSocial.h; path = Sources/PMKSocial.h; sourceTree = SOURCE_ROOT; }; - 63B8B9A41D5D621F007AAB62 /* SLComposeViewController+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "SLComposeViewController+Promise.swift"; path = "Sources/SLComposeViewController+Promise.swift"; sourceTree = SOURCE_ROOT; }; - 63B8B9A51D5D621F007AAB62 /* SLRequest+AnyPromise.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "SLRequest+AnyPromise.h"; path = "Sources/SLRequest+AnyPromise.h"; sourceTree = SOURCE_ROOT; }; - 63B8B9A61D5D621F007AAB62 /* SLRequest+AnyPromise.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "SLRequest+AnyPromise.m"; path = "Sources/SLRequest+AnyPromise.m"; sourceTree = SOURCE_ROOT; }; - 63B8B9A71D5D621F007AAB62 /* SLRequest+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "SLRequest+Promise.swift"; path = "Sources/SLRequest+Promise.swift"; sourceTree = SOURCE_ROOT; }; - 63B8B9AC1D5D622E007AAB62 /* TestSocial.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TestSocial.m; path = Tests/TestSocial.m; sourceTree = SOURCE_ROOT; }; - 63B8B9AD1D5D622E007AAB62 /* TestSocial.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TestSocial.swift; path = Tests/TestSocial.swift; sourceTree = SOURCE_ROOT; }; - 63C700091D5C0253003BAE60 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 63C7FFA71D5BEE09003BAE60 /* PMKSocial.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PMKSocial.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 63C7FFF21D5C020D003BAE60 /* PMKSLTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PMKSLTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 63CCF8121D5C0C4E00503216 /* Cartfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile; sourceTree = ""; }; - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Carthage.xcconfig; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 63C7FFA31D5BEE09003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEF1D5C020D003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 63C7FFF71D5C020D003BAE60 /* PMKSocial.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 63C7FF9D1D5BEE09003BAE60 = { - isa = PBXGroup; - children = ( - 63C700091D5C0253003BAE60 /* Info.plist */, - 63CCF8121D5C0C4E00503216 /* Cartfile */, - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */, - 63C7FFA91D5BEE09003BAE60 /* Sources */, - 63C7FFF31D5C020D003BAE60 /* Tests */, - 63C7FFA81D5BEE09003BAE60 /* Products */, - ); - sourceTree = ""; - }; - 63C7FFA81D5BEE09003BAE60 /* Products */ = { - isa = PBXGroup; - children = ( - 63C7FFA71D5BEE09003BAE60 /* PMKSocial.framework */, - 63C7FFF21D5C020D003BAE60 /* PMKSLTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 63C7FFA91D5BEE09003BAE60 /* Sources */ = { - isa = PBXGroup; - children = ( - 637B4A731D5D5FC600E1BC6C /* PMKSocial.h */, - 63B8B9A41D5D621F007AAB62 /* SLComposeViewController+Promise.swift */, - 63B8B9A51D5D621F007AAB62 /* SLRequest+AnyPromise.h */, - 63B8B9A61D5D621F007AAB62 /* SLRequest+AnyPromise.m */, - 63B8B9A71D5D621F007AAB62 /* SLRequest+Promise.swift */, - ); - path = Sources; - sourceTree = SOURCE_ROOT; - }; - 63C7FFF31D5C020D003BAE60 /* Tests */ = { - isa = PBXGroup; - children = ( - 63B8B9AC1D5D622E007AAB62 /* TestSocial.m */, - 63B8B9AD1D5D622E007AAB62 /* TestSocial.swift */, - ); - path = Tests; - sourceTree = SOURCE_ROOT; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 63C7FFA41D5BEE09003BAE60 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 637B4A741D5D5FC600E1BC6C /* PMKSocial.h in Headers */, - 63B8B9A91D5D621F007AAB62 /* SLRequest+AnyPromise.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 63C7FFA61D5BEE09003BAE60 /* PMKSocial */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKSocial" */; - buildPhases = ( - 63C7FFA21D5BEE09003BAE60 /* Sources */, - 63C7FFA31D5BEE09003BAE60 /* Frameworks */, - 63C7FFA41D5BEE09003BAE60 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PMKSocial; - productName = "PMK+UIKit"; - productReference = 63C7FFA71D5BEE09003BAE60 /* PMKSocial.framework */; - productType = "com.apple.product-type.framework"; - }; - 63C7FFF11D5C020D003BAE60 /* PMKSLTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKSLTests" */; - buildPhases = ( - 63C7FFEE1D5C020D003BAE60 /* Sources */, - 63C7FFEF1D5C020D003BAE60 /* Frameworks */, - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */, - ); - name = PMKSLTests; - productName = PMKTests/NS; - productReference = 63C7FFF21D5C020D003BAE60 /* PMKSLTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 63C7FF9E1D5BEE09003BAE60 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = "Max Howell"; - TargetAttributes = { - 63C7FFA61D5BEE09003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - 63C7FFF11D5C020D003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKSocial" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 63C7FF9D1D5BEE09003BAE60; - productRefGroup = 63C7FFA81D5BEE09003BAE60 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 63C7FFA61D5BEE09003BAE60 /* PMKSocial */, - 63C7FFF11D5C020D003BAE60 /* PMKSLTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXShellScriptBuildPhase section */ - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - PromiseKit, - PMKFoundation, - ); - name = "Embed Carthage Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "case \"$PLATFORM_NAME\" in\nmacosx) plat=Mac;;\niphone*) plat=iOS;;\nwatch*) plat=watchOS;;\nappletv*) plat=tvOS;;\n*) echo \"error: Unknown PLATFORM_NAME: $PLATFORM_NAME\"; exit 1;;\nesac\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nframework=$(basename \"${!VAR}\")\nexport SCRIPT_INPUT_FILE_$n=\"$SRCROOT\"/Carthage/Build/$plat/\"$framework\".framework\ndone\n\n/usr/local/bin/carthage copy-frameworks || exit\n\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nsource=${!VAR}.dSYM\ndest=${BUILT_PRODUCTS_DIR}/$(basename \"$source\")\nditto \"$source\" \"$dest\" || exit\ndone"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 63C7FFA21D5BEE09003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63B8B9A81D5D621F007AAB62 /* SLComposeViewController+Promise.swift in Sources */, - 63B8B9AB1D5D621F007AAB62 /* SLRequest+Promise.swift in Sources */, - 63B8B9AA1D5D621F007AAB62 /* SLRequest+AnyPromise.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEE1D5C020D003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63B8B9AF1D5D622E007AAB62 /* TestSocial.swift in Sources */, - 63B8B9AE1D5D622E007AAB62 /* TestSocial.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 63C7FFA61D5BEE09003BAE60 /* PMKSocial */; - targetProxy = 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 63C7FFAD1D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.StoreKit; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Debug; - }; - 63C7FFAE1D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.StoreKit; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Release; - }; - 63C7FFB01D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Debug; - }; - 63C7FFB11D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Release; - }; - 63C7FFFB1D5C020D003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 63C7FFFC1D5C020D003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKSocial" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFAD1D5BEE09003BAE60 /* Debug */, - 63C7FFAE1D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKSocial" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFB01D5BEE09003BAE60 /* Debug */, - 63C7FFB11D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKSLTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFFB1D5C020D003BAE60 /* Debug */, - 63C7FFFC1D5C020D003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 63C7FF9E1D5BEE09003BAE60 /* Project object */; -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Social/PMKSocial.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Carthage/Checkouts/PromiseKit/Extensions/Social/PMKSocial.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index b49fefe7f..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Social/PMKSocial.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Social/PMKSocial.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Carthage/Checkouts/PromiseKit/Extensions/Social/PMKSocial.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Social/PMKSocial.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Social/PMKSocial.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Carthage/Checkouts/PromiseKit/Extensions/Social/PMKSocial.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index 08de0be8d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Social/PMKSocial.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Social/PMKSocial.xcodeproj/xcshareddata/xcschemes/PMKSocial.xcscheme b/Carthage/Checkouts/PromiseKit/Extensions/Social/PMKSocial.xcodeproj/xcshareddata/xcschemes/PMKSocial.xcscheme deleted file mode 100644 index a4bc24a7e..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Social/PMKSocial.xcodeproj/xcshareddata/xcschemes/PMKSocial.xcscheme +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Social/README.markdown b/Carthage/Checkouts/PromiseKit/Extensions/Social/README.markdown deleted file mode 100644 index bd6a9f9e1..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Social/README.markdown +++ /dev/null @@ -1,34 +0,0 @@ -# PromiseKit Social Extensions ![Build Status] - -This project adds promises to Apple’s Social framework. - -## CocoaPods - -```ruby -pod "PromiseKit/Social", "~> 6.0" -``` - -The extensions are built into `PromiseKit.framework` thus nothing else is needed. - -## Carthage - -```ruby -github "PromiseKit/Social" ~> 3.0 -``` - -The extensions are built into their own framework: - -```swift -// swift -import PromiseKit -import PMKSocial -``` - -```objc -// objc -@import PromiseKit; -@import PMKSocial; -``` - - -[Build Status]: https://travis-ci.org/PromiseKit/Social.svg?branch=master diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Social/Sources/PMKSocial.h b/Carthage/Checkouts/PromiseKit/Extensions/Social/Sources/PMKSocial.h deleted file mode 100644 index 8eeb321ca..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Social/Sources/PMKSocial.h +++ /dev/null @@ -1 +0,0 @@ -#import "SLRequest+AnyPromise.h" diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Social/Sources/SLComposeViewController+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/Social/Sources/SLComposeViewController+Promise.swift deleted file mode 100644 index ab23a1056..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Social/Sources/SLComposeViewController+Promise.swift +++ /dev/null @@ -1,48 +0,0 @@ -#if !os(OSX) - -import Social.SLComposeViewController -import UIKit.UIViewController -#if !PMKCocoaPods -import PromiseKit -#endif - -/** - To import this `UIViewController` category: - - use_frameworks! - pod "PromiseKit/Social" - - And then in your sources: - - import PromiseKit -*/ -extension UIViewController { - /// Presents the message view controller and resolves with the user action. - public func promise(_ vc: SLComposeViewController, animated: Bool = true, completion: (() -> Void)? = nil) -> Promise { - present(vc, animated: animated, completion: completion) - return Promise { seal in - vc.completionHandler = { result in - if result == .cancelled { - seal.reject(SLComposeViewController.PMKError.cancelled) - } else { - seal.fulfill(()) - } - } - } - } -} - -extension SLComposeViewController { - /// Errors representing PromiseKit SLComposeViewController failures - public enum PMKError: CancellableError { - /// The user cancelled the view controller. - case cancelled - - /// - Returns: true - public var isCancelled: Bool { - switch self { case .cancelled: return true } - } - } -} - -#endif diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Social/Sources/SLRequest+AnyPromise.h b/Carthage/Checkouts/PromiseKit/Extensions/Social/Sources/SLRequest+AnyPromise.h deleted file mode 100644 index 190417ffe..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Social/Sources/SLRequest+AnyPromise.h +++ /dev/null @@ -1,36 +0,0 @@ -// -// Created by merowing on 09/05/2014. -// -// -// - -#import -#import - -/** - To import the `SLRequest` category: - - use_frameworks! - pod "PromiseKit/Social" - - And then in your sources: - - @import PromiseKit; -*/ -@interface SLRequest (PromiseKit) - -/** - Performs the request asynchronously. - - @return A promise that fulfills with three parameters: - - 1) The response decoded as JSON. - 2) The `NSHTTPURLResponse`. - 3) The raw `NSData` response. - - @warning *Note* If PromiseKit determines the response is not JSON, the first - parameter will instead be plain `NSData`. -*/ -- (AnyPromise *)promise NS_REFINED_FOR_SWIFT; - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Social/Sources/SLRequest+AnyPromise.m b/Carthage/Checkouts/PromiseKit/Extensions/Social/Sources/SLRequest+AnyPromise.m deleted file mode 100644 index 01a1ea946..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Social/Sources/SLRequest+AnyPromise.m +++ /dev/null @@ -1,51 +0,0 @@ -// -// Created by merowing on 09/05/2014. -// -// -// - -#import -#import "SLRequest+AnyPromise.h" - -#if COCOAPODS -#import "NSURLSession+AnyPromise.h" -#else -#import -#endif - -@implementation SLRequest (PromiseKit) - -- (AnyPromise *)promise { - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - [self performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) { - - assert(![NSThread isMainThread]); - - if (error) - return resolve(error); - - NSInteger const statusCode = urlResponse.statusCode; - if (statusCode < 200 || statusCode >= 300) { - id userInfo = [NSMutableDictionary new]; - userInfo[PMKURLErrorFailingURLResponseKey] = urlResponse; - userInfo[NSLocalizedDescriptionKey] = [NSHTTPURLResponse localizedStringForStatusCode:statusCode]; - - if (responseData) { - id str = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding]; - userInfo[PMKURLErrorFailingStringKey] = str; - } - - resolve([NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorBadServerResponse userInfo:userInfo]); - } - else if (PMKHTTPURLResponseIsJSON(urlResponse)) { - id err = nil; - id json = [NSJSONSerialization JSONObjectWithData:responseData options:PMKJSONDeserializationOptions error:&err]; - resolve(err ?: PMKManifold(json, urlResponse, responseData)); - } else { - resolve(PMKManifold(responseData, urlResponse, responseData)); - } - }]; - }]; -} - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Social/Sources/SLRequest+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/Social/Sources/SLRequest+Promise.swift deleted file mode 100644 index c2a043134..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Social/Sources/SLRequest+Promise.swift +++ /dev/null @@ -1,37 +0,0 @@ -#if !PMKCocoaPods -import PMKFoundation -import PromiseKit -#endif -import Social - -/** - To import the `SLRequest` category: - - use_frameworks! - pod "PromiseKit/Social" - - And then in your sources: - - import PromiseKit -*/ -extension SLRequest { - /** - Performs the request asynchronously. - - - Returns: A promise that fulfills with the response. - - SeeAlso: `URLDataPromise` - */ - public func perform() -> Promise<(data: Data, response: HTTPURLResponse)> { - return Promise { seal in - perform { data, rsp, error in - if let data = data, let rsp = rsp { - seal.fulfill((data, rsp)) - } else if let error = error { - seal.reject(error) - } else { - seal.reject(PMKError.invalidCallingConvention) - } - } - } - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Social/Tests/TestSLComposeViewController.swift b/Carthage/Checkouts/PromiseKit/Extensions/Social/Tests/TestSLComposeViewController.swift deleted file mode 100644 index 3ada515f2..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Social/Tests/TestSLComposeViewController.swift +++ /dev/null @@ -1,16 +0,0 @@ -import XCTest - -class UITest_SLComposeViewController_Swift: PMKiOSUITestCase { - func test_can_cancel() { - let app = XCUIApplication() - app.tables.staticTexts["5"].tap() - - sleep(5) // takes longer than usual - - app.alerts.buttons["Cancel"].tap() - - sleep(3) // takes longer than usual (this may only pass when you look at it) - - XCTAssertTrue(value) - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Social/Tests/TestSocial.m b/Carthage/Checkouts/PromiseKit/Extensions/Social/Tests/TestSocial.m deleted file mode 100644 index 61e646b29..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Social/Tests/TestSocial.m +++ /dev/null @@ -1,136 +0,0 @@ -@import PMKSocial; -@import XCTest; - - -@interface MockSLRequest: SLRequest -@property id response; -@property id data; -@property id error; -@end -@implementation MockSLRequest -- (void)performRequestWithHandler:(SLRequestHandler)handler { - dispatch_async(dispatch_get_global_queue(0, 0), ^{ - handler(_data, _response, _error); - }); -} -@end - - -@implementation Test_SLRequest_ObjC: XCTestCase - -- (void)test1 { - id url = [NSURL URLWithString:@"http://example.com"]; - id input = @{@"3": @4}; - - MockSLRequest *request = (id) [MockSLRequest requestForServiceType:SLServiceTypeFacebook requestMethod:SLRequestMethodGET URL:url parameters:@{@"1": @2}]; - request.response = [[NSHTTPURLResponse alloc] initWithURL:url statusCode:200 HTTPVersion:@"1.1" headerFields:@{@"Content-Type": @"application/json"}]; - request.data = [NSJSONSerialization dataWithJSONObject:input options:0 error:nil]; - - id ex = [self expectationWithDescription:@""]; - [request promise].then(^(id json){ - XCTAssertEqualObjects(json, input); - [ex fulfill]; - }); - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test2 { - id url = [NSURL URLWithString:@"http://example.com"]; - - MockSLRequest *request = (id) [MockSLRequest requestForServiceType:SLServiceTypeFacebook requestMethod:SLRequestMethodGET URL:url parameters:@{@"1": @2}]; - request.response = [[NSHTTPURLResponse alloc] initWithURL:url statusCode:500 HTTPVersion:@"1.1" headerFields:@{}]; - - id ex = [self expectationWithDescription:@""]; - [request promise].catch(^(id err){ - XCTAssertEqualObjects(NSURLErrorDomain, [err domain]); - XCTAssertEqual([err code], NSURLErrorBadServerResponse); - [ex fulfill]; - }); - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test3 { - id url = [NSURL URLWithString:@"http://example.com"]; - id data = [NSData dataWithBytes:"abc" length:3]; - - MockSLRequest *request = (id) [MockSLRequest requestForServiceType:SLServiceTypeFacebook requestMethod:SLRequestMethodGET URL:url parameters:@{@"1": @2}]; - request.response = [[NSHTTPURLResponse alloc] initWithURL:url statusCode:200 HTTPVersion:@"1.1" headerFields:@{}]; - request.data = data; - - id ex = [self expectationWithDescription:@""]; - [request promise].then(^(id rspdata){ - XCTAssertEqualObjects(data, rspdata); - [ex fulfill]; - }); - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test4 { - id url = [NSURL URLWithString:@"http://example.com"]; - - MockSLRequest *request = (id) [MockSLRequest requestForServiceType:SLServiceTypeFacebook requestMethod:SLRequestMethodGET URL:url parameters:@{@"1": @2}]; - request.response = [[NSHTTPURLResponse alloc] initWithURL:url statusCode:200 HTTPVersion:@"1.1" headerFields:@{}]; - request.error = [NSError errorWithDomain:@"Cat" code:123 userInfo:nil]; - - id ex = [self expectationWithDescription:@""]; - [request promise].catch(^(NSError *error){ - XCTAssertEqual(error.code, 123); - XCTAssertEqualObjects(error.domain, @"Cat"); - [ex fulfill]; - }); - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -@end - - -#ifndef TARGET_OS_MAC - -#import -@import Social.SLComposeViewController; -@import Stubbilino; -#import "UIViewController+AnyPromise.h" - -@implementation Test_SLComposeViewController_ObjC: XCTestCase - -- (void)__test:(SLComposeViewControllerResult)dummy :(void (^)(AnyPromise *, id expectation))block { - id rootvc = [UIViewController new]; - id ex = [self expectationWithDescription:@""]; - - SLComposeViewController *composevc = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook]; - - id stub = [Stubbilino stubObject:rootvc]; - [stub stubMethod:@selector(presentViewController:animated:completion:) withBlock:^{ - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ - composevc.completionHandler(dummy); - }); - }]; - - block([rootvc promiseViewController:composevc animated:NO completion:nil], ex); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test1 { - NSInteger dummy = SLComposeViewControllerResultDone; - - [self __test:dummy :^(AnyPromise *promise, id expectation) { - promise.then(^(id result){ - XCTAssertEqual([result integerValue], dummy); - [expectation fulfill]; - }); - }]; -} - -- (void)test2 { - [self __test:SLComposeViewControllerResultCancelled :^(AnyPromise *promise, id expectation) { - promise.catchWithPolicy(PMKCatchPolicyAllErrors, ^(NSError *error){ - XCTAssertTrue(error.cancelled); - [expectation fulfill]; - }); - }]; -} - -@end - -#endif diff --git a/Carthage/Checkouts/PromiseKit/Extensions/Social/Tests/TestSocial.swift b/Carthage/Checkouts/PromiseKit/Extensions/Social/Tests/TestSocial.swift deleted file mode 100644 index 9fb188853..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/Social/Tests/TestSocial.swift +++ /dev/null @@ -1,56 +0,0 @@ -import PromiseKit -import PMKSocial -import Social -import XCTest - -class SLRequestTests: XCTestCase { - func testSLRequest() { - // I tried to just override SLRequest, but Swift wouldn't let me - // then use the long initializer, and an exception is thrown inside - // init() - - swizzle(SLRequest.self, #selector(SLRequest.perform(handler:))) { - let url = URL(string: "https://api.twitter.com/1.1/statuses/user_timeline.json") - let params = ["foo": "bar"] - let rq = SLRequest(forServiceType: SLServiceTypeTwitter, requestMethod: .GET, url: url, parameters: params)! - - let ex = expectation(description: "") - rq.perform().done { - XCTAssertEqual($0.data, Data()) - ex.fulfill() - }.catch { - XCTFail("\($0)") - } - waitForExpectations(timeout: 1, handler: nil) - } - } -} - -extension SLRequest { - @objc private func pmk_performRequestWithHandler(_ handler: @escaping SLRequestHandler) { - after(seconds: 0).done { _ in - let rsp = HTTPURLResponse(url: URL(string: "http://example.com")!, statusCode: 200, httpVersion: "2.0", headerFields: [:]) - handler(Data(), rsp, nil) - } - } -} - - -import ObjectiveC - -func swizzle(_ foo: AnyClass, _ from: Selector, isClassMethod: Bool = false, body: () -> Void) { - let originalMethod: Method! - let swizzledMethod: Method! - - if isClassMethod { - originalMethod = class_getClassMethod(foo, from) - swizzledMethod = class_getClassMethod(foo, Selector("pmk_\(from)")) - } else { - originalMethod = class_getInstanceMethod(foo, from) - swizzledMethod = class_getInstanceMethod(foo, Selector("pmk_\(from)")) - } - - method_exchangeImplementations(originalMethod, swizzledMethod) - body() - method_exchangeImplementations(swizzledMethod, originalMethod) -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/.gitignore b/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/.gitignore deleted file mode 100644 index bec9c1741..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.xcodeproj/**/xcuserdata/ -*.xcscmblueprint -/Carthage -/.build -.DS_Store \ No newline at end of file diff --git a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/.travis.yml b/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/.travis.yml deleted file mode 100644 index 76450b19f..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/.travis.yml +++ /dev/null @@ -1,91 +0,0 @@ -os: osx -language: swift -osx_image: xcode10.2 - -branches: - only: - - master -stages: - - lint - - carthage - - swiftPM - - test -jobs: - include: - - &pod - stage: lint - osx_image: xcode8.3 - env: SWIFT=3.1 - before_install: - gem install cocoapods --prerelease --version 1.7.0.beta.3 - install: - carthage bootstrap --no-build PromiseKit - script: | - cd Carthage/Checkouts/PromiseKit - mv .github/PromiseKit.podspec . - rm -rf Extensions/StoreKit/Sources - cp -R ../../../Sources Extensions/StoreKit - pod lib lint --subspec=PromiseKit/StoreKit --fail-fast --swift-version=$SWIFT - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=3.2 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=3.3 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=3.4 - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=4.0 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=4.1 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=4.2 - - <<: *pod - osx_image: xcode10.2 - env: SWIFT=5.0 - - - &carthage - stage: carthage - osx_image: xcode9.2 - script: | - carthage bootstrap --cache-builds - sed -i '' "s/SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;/SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;/" *.xcodeproj/project.pbxproj - carthage build --no-skip-current - cache: - directories: - - Carthage - - <<: *carthage - osx_image: xcode9.4 - - <<: *carthage - osx_image: xcode10.1 - - <<: *carthage - osx_image: xcode10.2 - - - &swiftpm - stage: swiftpm - osx_image: xcode9.2 - script: swift build -Xswiftc -target -Xswiftc x86_64-apple-macosx10.12 - - <<: *swiftpm - osx_image: xcode9.4 - - <<: *swiftpm - osx_image: xcode10.1 - - <<: *swiftpm - osx_image: xcode10.2 - - - &test - stage: test - xcode_scheme: PMKStoreKit - xcode_project: PMKStoreKit.xcodeproj - xcode_destination: 'platform=macOS' - cache.directories: - - Carthage - before_install: - carthage bootstrap --cache-builds --no-use-binaries - - <<: *test - xcode_destination: 'OS=12.2,name=iPhone SE' - - <<: *test - xcode_destination: 'OS=12.2,name=Apple TV' diff --git a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Cartfile b/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Cartfile deleted file mode 100644 index d4703e986..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" ~> 6.8.4 diff --git a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Cartfile.resolved b/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Cartfile.resolved deleted file mode 100644 index f54bbdbf2..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Cartfile.resolved +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" "6.8.4" diff --git a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Carthage.xcconfig b/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Carthage.xcconfig deleted file mode 100644 index c8b995651..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Carthage.xcconfig +++ /dev/null @@ -1,7 +0,0 @@ -// Created by Kevin Ballard on 12/14/15. -// Copyright © 2015 Postmates. All rights reserved. - -FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(SRCROOT)/Carthage/Build/Mac/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=iphone*] = $(SRCROOT)/Carthage/Build/iOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=watch*] = $(SRCROOT)/Carthage/Build/watchOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=appletv*] = $(SRCROOT)/Carthage/Build/tvOS/ $(inherited) diff --git a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Info.plist b/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Info.plist deleted file mode 100644 index fbe1e6b31..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/LICENSE b/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/LICENSE deleted file mode 100644 index 50f758c89..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2016-present, Max Howell; mxcl@me.com - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/PMKStoreKit.xcodeproj/project.pbxproj b/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/PMKStoreKit.xcodeproj/project.pbxproj deleted file mode 100644 index 565dbd55b..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/PMKStoreKit.xcodeproj/project.pbxproj +++ /dev/null @@ -1,480 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 637B4A6C1D5D5F9B00E1BC6C /* SKRequest+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 637B4A691D5D5F9B00E1BC6C /* SKRequest+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 637B4A6D1D5D5F9B00E1BC6C /* SKRequest+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 637B4A6A1D5D5F9B00E1BC6C /* SKRequest+AnyPromise.m */; }; - 637B4A6E1D5D5F9B00E1BC6C /* SKProductsRequest+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 637B4A6B1D5D5F9B00E1BC6C /* SKProductsRequest+Promise.swift */; }; - 637B4A711D5D5FA400E1BC6C /* TestStoreKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 637B4A6F1D5D5FA400E1BC6C /* TestStoreKit.m */; }; - 637B4A721D5D5FA400E1BC6C /* TestStoreKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 637B4A701D5D5FA400E1BC6C /* TestStoreKit.swift */; }; - 637B4A741D5D5FC600E1BC6C /* PMKStoreKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 637B4A731D5D5FC600E1BC6C /* PMKStoreKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 63C7FFF71D5C020D003BAE60 /* PMKStoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C7FFA71D5BEE09003BAE60 /* PMKStoreKit.framework */; }; - B95EDB3B216E07C300963D64 /* SKPaymentQueue+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = B95EDB3A216E07C300963D64 /* SKPaymentQueue+Promise.swift */; }; - D3F6DBF31EA245750013E242 /* SKPayment+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3F6DBF21EA245750013E242 /* SKPayment+Promise.swift */; }; - D3F6DBF51EA246340013E242 /* SKReceiptRefreshRequest+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3F6DBF41EA246340013E242 /* SKReceiptRefreshRequest+Promise.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 63C7FF9E1D5BEE09003BAE60 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 63C7FFA61D5BEE09003BAE60; - remoteInfo = PMKStoreKit; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 637B4A691D5D5F9B00E1BC6C /* SKRequest+AnyPromise.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "SKRequest+AnyPromise.h"; path = "Sources/SKRequest+AnyPromise.h"; sourceTree = SOURCE_ROOT; }; - 637B4A6A1D5D5F9B00E1BC6C /* SKRequest+AnyPromise.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "SKRequest+AnyPromise.m"; path = "Sources/SKRequest+AnyPromise.m"; sourceTree = SOURCE_ROOT; }; - 637B4A6B1D5D5F9B00E1BC6C /* SKProductsRequest+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "SKProductsRequest+Promise.swift"; path = "Sources/SKProductsRequest+Promise.swift"; sourceTree = SOURCE_ROOT; }; - 637B4A6F1D5D5FA400E1BC6C /* TestStoreKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TestStoreKit.m; path = Tests/TestStoreKit.m; sourceTree = SOURCE_ROOT; }; - 637B4A701D5D5FA400E1BC6C /* TestStoreKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TestStoreKit.swift; path = Tests/TestStoreKit.swift; sourceTree = SOURCE_ROOT; }; - 637B4A731D5D5FC600E1BC6C /* PMKStoreKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PMKStoreKit.h; path = Sources/PMKStoreKit.h; sourceTree = SOURCE_ROOT; }; - 63C700091D5C0253003BAE60 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 63C7FFA71D5BEE09003BAE60 /* PMKStoreKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PMKStoreKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 63C7FFF21D5C020D003BAE60 /* PMKSKTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PMKSKTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 63CCF8121D5C0C4E00503216 /* Cartfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile; sourceTree = ""; }; - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Carthage.xcconfig; sourceTree = ""; }; - B95EDB3A216E07C300963D64 /* SKPaymentQueue+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "SKPaymentQueue+Promise.swift"; sourceTree = ""; }; - D3F6DBF21EA245750013E242 /* SKPayment+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "SKPayment+Promise.swift"; path = "Sources/SKPayment+Promise.swift"; sourceTree = SOURCE_ROOT; }; - D3F6DBF41EA246340013E242 /* SKReceiptRefreshRequest+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "SKReceiptRefreshRequest+Promise.swift"; path = "Sources/SKReceiptRefreshRequest+Promise.swift"; sourceTree = SOURCE_ROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 63C7FFA31D5BEE09003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEF1D5C020D003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 63C7FFF71D5C020D003BAE60 /* PMKStoreKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 63C7FF9D1D5BEE09003BAE60 = { - isa = PBXGroup; - children = ( - 63C700091D5C0253003BAE60 /* Info.plist */, - 63CCF8121D5C0C4E00503216 /* Cartfile */, - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */, - 63C7FFA91D5BEE09003BAE60 /* Sources */, - 63C7FFF31D5C020D003BAE60 /* Tests */, - 63C7FFA81D5BEE09003BAE60 /* Products */, - ); - sourceTree = ""; - }; - 63C7FFA81D5BEE09003BAE60 /* Products */ = { - isa = PBXGroup; - children = ( - 63C7FFA71D5BEE09003BAE60 /* PMKStoreKit.framework */, - 63C7FFF21D5C020D003BAE60 /* PMKSKTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 63C7FFA91D5BEE09003BAE60 /* Sources */ = { - isa = PBXGroup; - children = ( - 637B4A731D5D5FC600E1BC6C /* PMKStoreKit.h */, - 637B4A691D5D5F9B00E1BC6C /* SKRequest+AnyPromise.h */, - 637B4A6A1D5D5F9B00E1BC6C /* SKRequest+AnyPromise.m */, - 637B4A6B1D5D5F9B00E1BC6C /* SKProductsRequest+Promise.swift */, - D3F6DBF21EA245750013E242 /* SKPayment+Promise.swift */, - D3F6DBF41EA246340013E242 /* SKReceiptRefreshRequest+Promise.swift */, - B95EDB3A216E07C300963D64 /* SKPaymentQueue+Promise.swift */, - ); - path = Sources; - sourceTree = SOURCE_ROOT; - }; - 63C7FFF31D5C020D003BAE60 /* Tests */ = { - isa = PBXGroup; - children = ( - 637B4A6F1D5D5FA400E1BC6C /* TestStoreKit.m */, - 637B4A701D5D5FA400E1BC6C /* TestStoreKit.swift */, - ); - path = Tests; - sourceTree = SOURCE_ROOT; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 63C7FFA41D5BEE09003BAE60 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 637B4A741D5D5FC600E1BC6C /* PMKStoreKit.h in Headers */, - 637B4A6C1D5D5F9B00E1BC6C /* SKRequest+AnyPromise.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 63C7FFA61D5BEE09003BAE60 /* PMKStoreKit */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKStoreKit" */; - buildPhases = ( - 63C7FFA21D5BEE09003BAE60 /* Sources */, - 63C7FFA31D5BEE09003BAE60 /* Frameworks */, - 63C7FFA41D5BEE09003BAE60 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PMKStoreKit; - productName = "PMK+UIKit"; - productReference = 63C7FFA71D5BEE09003BAE60 /* PMKStoreKit.framework */; - productType = "com.apple.product-type.framework"; - }; - 63C7FFF11D5C020D003BAE60 /* PMKSKTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKSKTests" */; - buildPhases = ( - 63C7FFEE1D5C020D003BAE60 /* Sources */, - 63C7FFEF1D5C020D003BAE60 /* Frameworks */, - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */, - ); - name = PMKSKTests; - productName = PMKTests/NS; - productReference = 63C7FFF21D5C020D003BAE60 /* PMKSKTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 63C7FF9E1D5BEE09003BAE60 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = "Max Howell"; - TargetAttributes = { - 63C7FFA61D5BEE09003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - 63C7FFF11D5C020D003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKStoreKit" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 63C7FF9D1D5BEE09003BAE60; - productRefGroup = 63C7FFA81D5BEE09003BAE60 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 63C7FFA61D5BEE09003BAE60 /* PMKStoreKit */, - 63C7FFF11D5C020D003BAE60 /* PMKSKTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXShellScriptBuildPhase section */ - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - PromiseKit, - ); - name = "Embed Carthage Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "case \"$PLATFORM_NAME\" in\nmacosx) plat=Mac;;\niphone*) plat=iOS;;\nwatch*) plat=watchOS;;\nappletv*) plat=tvOS;;\n*) echo \"error: Unknown PLATFORM_NAME: $PLATFORM_NAME\"; exit 1;;\nesac\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nframework=$(basename \"${!VAR}\")\nexport SCRIPT_INPUT_FILE_$n=\"$SRCROOT\"/Carthage/Build/$plat/\"$framework\".framework\ndone\n\n/usr/local/bin/carthage copy-frameworks || exit\n\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nsource=${!VAR}.dSYM\ndest=${BUILT_PRODUCTS_DIR}/$(basename \"$source\")\nditto \"$source\" \"$dest\" || exit\ndone"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 63C7FFA21D5BEE09003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D3F6DBF51EA246340013E242 /* SKReceiptRefreshRequest+Promise.swift in Sources */, - 637B4A6D1D5D5F9B00E1BC6C /* SKRequest+AnyPromise.m in Sources */, - B95EDB3B216E07C300963D64 /* SKPaymentQueue+Promise.swift in Sources */, - 637B4A6E1D5D5F9B00E1BC6C /* SKProductsRequest+Promise.swift in Sources */, - D3F6DBF31EA245750013E242 /* SKPayment+Promise.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEE1D5C020D003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 637B4A721D5D5FA400E1BC6C /* TestStoreKit.swift in Sources */, - 637B4A711D5D5FA400E1BC6C /* TestStoreKit.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 63C7FFA61D5BEE09003BAE60 /* PMKStoreKit */; - targetProxy = 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 63C7FFAD1D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.StoreKit; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvsimulator appletvos macosx"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Debug; - }; - 63C7FFAE1D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.StoreKit; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvsimulator appletvos macosx"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Release; - }; - 63C7FFB01D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Debug; - }; - 63C7FFB11D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Release; - }; - 63C7FFFB1D5C020D003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SUPPRESS_WARNINGS = YES; - SWIFT_VERSION = 4.0; - }; - name = Debug; - }; - 63C7FFFC1D5C020D003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SUPPRESS_WARNINGS = YES; - SWIFT_VERSION = 4.0; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKStoreKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFAD1D5BEE09003BAE60 /* Debug */, - 63C7FFAE1D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKStoreKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFB01D5BEE09003BAE60 /* Debug */, - 63C7FFB11D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKSKTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFFB1D5C020D003BAE60 /* Debug */, - 63C7FFFC1D5C020D003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 63C7FF9E1D5BEE09003BAE60 /* Project object */; -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/PMKStoreKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/PMKStoreKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index b49fefe7f..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/PMKStoreKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/PMKStoreKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/PMKStoreKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/PMKStoreKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/PMKStoreKit.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/PMKStoreKit.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index 08de0be8d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/PMKStoreKit.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/PMKStoreKit.xcodeproj/xcshareddata/xcschemes/PMKStoreKit.xcscheme b/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/PMKStoreKit.xcodeproj/xcshareddata/xcschemes/PMKStoreKit.xcscheme deleted file mode 100644 index 20c493a4f..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/PMKStoreKit.xcodeproj/xcshareddata/xcschemes/PMKStoreKit.xcscheme +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Package.swift b/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Package.swift deleted file mode 100644 index 32552bed0..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Package.swift +++ /dev/null @@ -1,24 +0,0 @@ -// swift-tools-version:4.0 -import PackageDescription - -let name = "PMKStoreKit" - -let pkg = Package(name: name) -pkg.products = [ - .library(name: name, targets: [name]), -] -pkg.swiftLanguageVersions = [3, 4] -pkg.dependencies = [ - .package(url: "https://github.com/mxcl/PromiseKit.git", from: "6.0.0") -] - -let target: Target = .target(name: name) -target.path = "Sources" -target.exclude = [ - "SKRequest+AnyPromise.h", - "SKRequest+AnyPromise.m", - "\(name).h", -] -target.dependencies = ["PromiseKit"] - -pkg.targets = [target] diff --git a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Package@4.2.swift b/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Package@4.2.swift deleted file mode 100644 index 9054d05ce..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Package@4.2.swift +++ /dev/null @@ -1,24 +0,0 @@ -// swift-tools-version:4.2 -import PackageDescription - -let name = "PMKStoreKit" - -let pkg = Package(name: name) -pkg.products = [ - .library(name: name, targets: [name]), -] -pkg.swiftLanguageVersions = [.v3, .v4, .v4_2, .version("5")] -pkg.dependencies = [ - .package(url: "https://github.com/mxcl/PromiseKit.git", from: "6.0.0") -] - -let target: Target = .target(name: name) -target.path = "Sources" -target.exclude = [ - "SKRequest+AnyPromise.h", - "SKRequest+AnyPromise.m", - "\(name).h", -] -target.dependencies = ["PromiseKit"] - -pkg.targets = [target] diff --git a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/README.markdown b/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/README.markdown deleted file mode 100644 index 95475aa3c..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/README.markdown +++ /dev/null @@ -1,34 +0,0 @@ -# PromiseKit StoreKit Extensions ![Build Status] - -This project adds promises to Apple’s StoreKit framework. - -## CocoaPods - -```ruby -pod "PromiseKit/StoreKit", "~> 6.0" -``` - -The extensions are built into `PromiseKit.framework` thus nothing else is needed. - -## Carthage - -```ruby -github "PromiseKit/StoreKit" ~> 3.0 -``` - -The extensions are built into their own framework: - -```swift -// swift -import PromiseKit -import PMKStoreKit -``` - -```objc -// objc -@import PromiseKit; -@import PMKStoreKit; -``` - - -[Build Status]: https://travis-ci.org/PromiseKit/StoreKit.svg?branch=master diff --git a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Sources/PMKStoreKit.h b/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Sources/PMKStoreKit.h deleted file mode 100644 index fb67b8036..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Sources/PMKStoreKit.h +++ /dev/null @@ -1 +0,0 @@ -#import "SKRequest+AnyPromise.h" diff --git a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Sources/SKPayment+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Sources/SKPayment+Promise.swift deleted file mode 100644 index 63ae4a96d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Sources/SKPayment+Promise.swift +++ /dev/null @@ -1,45 +0,0 @@ -#if !PMKCocoaPods -import PromiseKit -#endif -import StoreKit - -extension SKPayment { - public func promise() -> Promise { - return PaymentObserver(payment: self).promise - } -} - -private class PaymentObserver: NSObject, SKPaymentTransactionObserver { - let (promise, seal) = Promise.pending() - let payment: SKPayment - var retainCycle: PaymentObserver? - - init(payment: SKPayment) { - self.payment = payment - super.init() - SKPaymentQueue.default().add(self) - SKPaymentQueue.default().add(payment) - retainCycle = self - } - - func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) { - guard let transaction = transactions.first(where: { $0.payment.productIdentifier == payment.productIdentifier }) else { - return - } - switch transaction.transactionState { - case .purchased, .restored: - queue.finishTransaction(transaction) - seal.fulfill(transaction) - queue.remove(self) - retainCycle = nil - case .failed: - let error = transaction.error ?? PMKError.cancelled - queue.finishTransaction(transaction) - seal.reject(error) - queue.remove(self) - retainCycle = nil - default: - break - } - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Sources/SKPaymentQueue+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Sources/SKPaymentQueue+Promise.swift deleted file mode 100644 index c60148c5f..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Sources/SKPaymentQueue+Promise.swift +++ /dev/null @@ -1,55 +0,0 @@ -#if !PMKCocoaPods -import PromiseKit -#endif -import StoreKit - -public extension SKPaymentQueue { - func restoreCompletedTransactions(_: PMKNamespacer) -> Promise<[SKPaymentTransaction]> { - return PaymentObserver(self).promise - } - - func restoreCompletedTransactions(_: PMKNamespacer, withApplicationUsername username: String?) -> Promise<[SKPaymentTransaction]> { - return PaymentObserver(self, withApplicationUsername: true, userName: username).promise - } -} - -private class PaymentObserver: NSObject, SKPaymentTransactionObserver { - let (promise, seal) = Promise<[SKPaymentTransaction]>.pending() - var retainCycle: PaymentObserver? - var finishedTransactions = [SKPaymentTransaction]() - - //TODO:PMK7: this is weird, just have a `String?` parameter - init(_ paymentQueue: SKPaymentQueue, withApplicationUsername: Bool = false, userName: String? = nil) { - super.init() - paymentQueue.add(self) - withApplicationUsername ? - paymentQueue.restoreCompletedTransactions() : - paymentQueue.restoreCompletedTransactions(withApplicationUsername: userName) - retainCycle = self - } - - func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) { - for transaction in transactions where transaction.transactionState == .restored { - finishedTransactions.append(transaction) - queue.finishTransaction(transaction) - } - } - - func paymentQueueRestoreCompletedTransactionsFinished(_ queue: SKPaymentQueue) { - resolve(queue, nil) - } - - func paymentQueue(_ queue: SKPaymentQueue, restoreCompletedTransactionsFailedWithError error: Error) { - resolve(queue, error) - } - - func resolve(_ queue: SKPaymentQueue, _ error: Error?) { - if let error = error { - seal.reject(error) - } else { - seal.fulfill(finishedTransactions) - } - queue.remove(self) - retainCycle = nil - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Sources/SKProductsRequest+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Sources/SKProductsRequest+Promise.swift deleted file mode 100644 index 5497fcd2d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Sources/SKProductsRequest+Promise.swift +++ /dev/null @@ -1,52 +0,0 @@ -import StoreKit -#if !PMKCocoaPods -import PromiseKit -#endif - -/** - To import the `SKRequest` category: - - use_frameworks! - pod "PromiseKit/StoreKit" - - And then in your sources: - - import PromiseKit -*/ -extension SKProductsRequest { - /** - Sends the request to the Apple App Store. - - - Returns: A promise that fulfills if the request succeeds. - */ - public func start(_: PMKNamespacer) -> Promise { - let proxy = SKDelegate() - delegate = proxy - proxy.retainCycle = proxy - start() - return proxy.promise - } -} - - -fileprivate class SKDelegate: NSObject, SKProductsRequestDelegate { - let (promise, seal) = Promise.pending() - var retainCycle: SKDelegate? - - @objc fileprivate func request(_ request: SKRequest, didFailWithError error: Error) { - seal.reject(error) - retainCycle = nil - } - - @objc fileprivate func productsRequest(_ request: SKProductsRequest, didReceive response: SKProductsResponse) { - seal.fulfill(response) - retainCycle = nil - } -} - -// perhaps one day Apple will actually make their errors into Errors… -//extension SKError: CancellableError { -// public var isCancelled: Bool { -// return true -// } -//} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Sources/SKReceiptRefreshRequest+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Sources/SKReceiptRefreshRequest+Promise.swift deleted file mode 100644 index 3bbc7848d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Sources/SKReceiptRefreshRequest+Promise.swift +++ /dev/null @@ -1,35 +0,0 @@ -#if !PMKCocoaPods -import PromiseKit -#endif -import StoreKit - -extension SKReceiptRefreshRequest { - public func promise() -> Promise { - return ReceiptRefreshObserver(request: self).promise - } -} - -private class ReceiptRefreshObserver: NSObject, SKRequestDelegate { - let (promise, seal) = Promise.pending() - let request: SKReceiptRefreshRequest - var retainCycle: ReceiptRefreshObserver? - - init(request: SKReceiptRefreshRequest) { - self.request = request - super.init() - request.delegate = self - request.start() - retainCycle = self - } - - - func requestDidFinish(_: SKRequest) { - seal.fulfill(request) - retainCycle = nil - } - - func request(_: SKRequest, didFailWithError error: Error) { - seal.reject(error) - retainCycle = nil - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Sources/SKRequest+AnyPromise.h b/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Sources/SKRequest+AnyPromise.h deleted file mode 100644 index a2f473d4e..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Sources/SKRequest+AnyPromise.h +++ /dev/null @@ -1,31 +0,0 @@ -// -// PromiseKit+StoreKit.h -// Aluxoft SCP -// -// Created by Josejulio Martínez on 16/05/14. - -#import -#import - -/** - To import the `SKRequest` category: - - use_frameworks! - pod "PromiseKit/StoreKit" - - And then in your sources: - - @import PromiseKit; -*/ -@interface SKRequest (PromiseKit) - -/** - Sends the request to the Apple App Store. - - @return A promise that fulfills when the request succeeds. If the - receiver is an SKProductsRequest, the promise fulfills with its - `SKProductsResponse`, otherwise the promise is void. -*/ -- (AnyPromise *)promise NS_REFINED_FOR_SWIFT; - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Sources/SKRequest+AnyPromise.m b/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Sources/SKRequest+AnyPromise.m deleted file mode 100644 index 896807aaf..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Sources/SKRequest+AnyPromise.m +++ /dev/null @@ -1,48 +0,0 @@ -// -// PromiseKit+StoreKit.m -// Aluxoft SCP -// -// Created by Josejulio Martínez on 16/05/14. -// - -#import "SKRequest+AnyPromise.h" -#import - -//TODO do categories work on inherited classes? As would solve our swift SKProductsRequest problem - -@interface PMKSKRequestDelegate : NSObject { -@public - PMKResolver resolve; - id retainCycle; -} -@end - -@implementation PMKSKRequestDelegate - -- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response { - resolve(response); - retainCycle = request.delegate = nil; -} - -- (void)requestDidFinish:(SKRequest *)request { - resolve(nil); - retainCycle = request.delegate = nil; -} - -- (void)request:(SKRequest *)request didFailWithError:(NSError *)error { - resolve(error); - retainCycle = request.delegate = nil; -} - -@end - -@implementation SKProductsRequest (PromiseKit) - -- (AnyPromise *)promise { - PMKSKRequestDelegate *d = [PMKSKRequestDelegate new]; - d->retainCycle = self.delegate = d; - [self start]; - return [[AnyPromise alloc] initWithResolver:&d->resolve]; -} - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Tests/TestStoreKit.m b/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Tests/TestStoreKit.m deleted file mode 100644 index 9be729662..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Tests/TestStoreKit.m +++ /dev/null @@ -1,27 +0,0 @@ -@import PMKStoreKit; -@import PromiseKit; -@import StoreKit; -@import XCTest; - -@implementation PMKSKProductsRequest: SKProductsRequest - -- (void)start { - PMKAfter(0.5).then(^{ - [self.delegate productsRequest:self didReceiveResponse:[SKProductsResponse new]]; - }); -} - -@end - -@implementation SKProductsRequestTests: XCTestCase - -- (void)test { - id ex = [self expectationWithDescription:@""]; - SKProductsRequest *rq = [PMKSKProductsRequest new]; - [rq promise].then(^{ - [ex fulfill]; - }); - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Tests/TestStoreKit.swift b/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Tests/TestStoreKit.swift deleted file mode 100644 index e40ae84fb..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/StoreKit/Tests/TestStoreKit.swift +++ /dev/null @@ -1,22 +0,0 @@ -import PMKStoreKit -import PromiseKit -import StoreKit -import XCTest - -class SKProductsRequestTests: XCTestCase { - func test() { - class MockProductsRequest: SKProductsRequest { - override func start() { - after(seconds: 0.1).done { - self.delegate?.productsRequest(self, didReceive: SKProductsResponse()) - } - } - } - - let ex = expectation(description: "") - MockProductsRequest().start(.promise).done { _ in - ex.fulfill() - } - waitForExpectations(timeout: 1, handler: nil) - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/.gitignore b/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/.gitignore deleted file mode 100644 index bec9c1741..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.xcodeproj/**/xcuserdata/ -*.xcscmblueprint -/Carthage -/.build -.DS_Store \ No newline at end of file diff --git a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/.travis.yml b/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/.travis.yml deleted file mode 100644 index 013749d47..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: objective-c -osx_image: xcode9.3 -env: - - DESTINATION="arch=x86_64" PLATFORM=Mac TEST=1 - - DESTINATION="OS=11.3,name=iPhone SE" PLATFORM=iOS TEST=1 - - DESTINATION="OS=10.3.1,name=iPhone SE" PLATFORM=iOS - - DESTINATION="OS=9.3,name=iPhone 5s" PLATFORM=iOS - - DESTINATION="OS=8.4,name=iPhone 4s" PLATFORM=iOS - - DESTINATION="OS=11.3,name=Apple TV" PLATFORM=tvOS TEST=1 - - DESTINATION="OS=10.2,name=Apple TV 1080p" PLATFORM=tvOS - - DESTINATION="OS=9.2,name=Apple TV 1080p" PLATFORM=tvOS -before_install: - - carthage bootstrap --cache-builds --no-use-binaries --platform $PLATFORM --verbose -install: - - xcodebuild -scheme PMKSystemConfiguration -target PMKSystemConfiguration -destination "$DESTINATION" build - - if [[ $TEST == "1" ]]; then - xcodebuild -scheme PMKSystemConfiguration -target PMKSCTests -destination "$DESTINATION" build; - fi -script: - - if [[ $TEST == "1" ]]; then - xcodebuild -scheme PMKSystemConfiguration -destination "$DESTINATION" test; - fi diff --git a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/Cartfile b/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/Cartfile deleted file mode 100644 index d4703e986..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" ~> 6.8.4 diff --git a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/Cartfile.resolved b/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/Cartfile.resolved deleted file mode 100644 index f54bbdbf2..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/Cartfile.resolved +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" "6.8.4" diff --git a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/Carthage.xcconfig b/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/Carthage.xcconfig deleted file mode 100644 index c8b995651..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/Carthage.xcconfig +++ /dev/null @@ -1,7 +0,0 @@ -// Created by Kevin Ballard on 12/14/15. -// Copyright © 2015 Postmates. All rights reserved. - -FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(SRCROOT)/Carthage/Build/Mac/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=iphone*] = $(SRCROOT)/Carthage/Build/iOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=watch*] = $(SRCROOT)/Carthage/Build/watchOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=appletv*] = $(SRCROOT)/Carthage/Build/tvOS/ $(inherited) diff --git a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/Info.plist b/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/Info.plist deleted file mode 100644 index fbe1e6b31..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/LICENSE b/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/LICENSE deleted file mode 100644 index 50f758c89..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2016-present, Max Howell; mxcl@me.com - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/PMKSystemConfiguration.xcodeproj/project.pbxproj b/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/PMKSystemConfiguration.xcodeproj/project.pbxproj deleted file mode 100644 index f59f77d3a..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/PMKSystemConfiguration.xcodeproj/project.pbxproj +++ /dev/null @@ -1,457 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 6358AB7A1D5D4B6700B9B157 /* PMKSystemConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 6358AB791D5D4B6700B9B157 /* PMKSystemConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6362F84E1D5D934C0021D2DD /* SCNetworkReachability+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 6362F84C1D5D934C0021D2DD /* SCNetworkReachability+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6362F84F1D5D934C0021D2DD /* SCNetworkReachability+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 6362F84D1D5D934C0021D2DD /* SCNetworkReachability+AnyPromise.m */; }; - 6383E14B1D611E0D00897651 /* SCTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6383E14A1D611E0D00897651 /* SCTests.swift */; }; - 63C7FFF71D5C020D003BAE60 /* PMKSystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C7FFA71D5BEE09003BAE60 /* PMKSystemConfiguration.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 63C7FF9E1D5BEE09003BAE60 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 63C7FFA61D5BEE09003BAE60; - remoteInfo = PMKSystemConfiguration; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 6358AB791D5D4B6700B9B157 /* PMKSystemConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PMKSystemConfiguration.h; path = Sources/PMKSystemConfiguration.h; sourceTree = SOURCE_ROOT; }; - 6362F84C1D5D934C0021D2DD /* SCNetworkReachability+AnyPromise.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "SCNetworkReachability+AnyPromise.h"; path = "Sources/SCNetworkReachability+AnyPromise.h"; sourceTree = SOURCE_ROOT; }; - 6362F84D1D5D934C0021D2DD /* SCNetworkReachability+AnyPromise.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "SCNetworkReachability+AnyPromise.m"; path = "Sources/SCNetworkReachability+AnyPromise.m"; sourceTree = SOURCE_ROOT; }; - 6383E14A1D611E0D00897651 /* SCTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SCTests.swift; path = Tests/SCTests.swift; sourceTree = SOURCE_ROOT; }; - 63C700091D5C0253003BAE60 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 63C7FFA71D5BEE09003BAE60 /* PMKSystemConfiguration.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PMKSystemConfiguration.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 63C7FFF21D5C020D003BAE60 /* PMKSCTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PMKSCTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 63CCF8121D5C0C4E00503216 /* Cartfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile; sourceTree = ""; }; - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Carthage.xcconfig; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 63C7FFA31D5BEE09003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEF1D5C020D003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 63C7FFF71D5C020D003BAE60 /* PMKSystemConfiguration.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 63C7FF9D1D5BEE09003BAE60 = { - isa = PBXGroup; - children = ( - 63C700091D5C0253003BAE60 /* Info.plist */, - 63CCF8121D5C0C4E00503216 /* Cartfile */, - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */, - 63C7FFA91D5BEE09003BAE60 /* Sources */, - 63C7FFF31D5C020D003BAE60 /* Tests */, - 63C7FFA81D5BEE09003BAE60 /* Products */, - ); - sourceTree = ""; - }; - 63C7FFA81D5BEE09003BAE60 /* Products */ = { - isa = PBXGroup; - children = ( - 63C7FFA71D5BEE09003BAE60 /* PMKSystemConfiguration.framework */, - 63C7FFF21D5C020D003BAE60 /* PMKSCTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 63C7FFA91D5BEE09003BAE60 /* Sources */ = { - isa = PBXGroup; - children = ( - 6358AB791D5D4B6700B9B157 /* PMKSystemConfiguration.h */, - 6362F84C1D5D934C0021D2DD /* SCNetworkReachability+AnyPromise.h */, - 6362F84D1D5D934C0021D2DD /* SCNetworkReachability+AnyPromise.m */, - ); - path = Sources; - sourceTree = ""; - }; - 63C7FFF31D5C020D003BAE60 /* Tests */ = { - isa = PBXGroup; - children = ( - 6383E14A1D611E0D00897651 /* SCTests.swift */, - ); - path = Tests; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 63C7FFA41D5BEE09003BAE60 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 6358AB7A1D5D4B6700B9B157 /* PMKSystemConfiguration.h in Headers */, - 6362F84E1D5D934C0021D2DD /* SCNetworkReachability+AnyPromise.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 63C7FFA61D5BEE09003BAE60 /* PMKSystemConfiguration */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKSystemConfiguration" */; - buildPhases = ( - 63C7FFA21D5BEE09003BAE60 /* Sources */, - 63C7FFA31D5BEE09003BAE60 /* Frameworks */, - 63C7FFA41D5BEE09003BAE60 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PMKSystemConfiguration; - productName = "PMK+UIKit"; - productReference = 63C7FFA71D5BEE09003BAE60 /* PMKSystemConfiguration.framework */; - productType = "com.apple.product-type.framework"; - }; - 63C7FFF11D5C020D003BAE60 /* PMKSCTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKSCTests" */; - buildPhases = ( - 63C7FFEE1D5C020D003BAE60 /* Sources */, - 63C7FFEF1D5C020D003BAE60 /* Frameworks */, - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */, - ); - name = PMKSCTests; - productName = PMKTests/NS; - productReference = 63C7FFF21D5C020D003BAE60 /* PMKSCTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 63C7FF9E1D5BEE09003BAE60 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 1000; - ORGANIZATIONNAME = "Max Howell"; - TargetAttributes = { - 63C7FFA61D5BEE09003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 0920; - ProvisioningStyle = Automatic; - }; - 63C7FFF11D5C020D003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 0920; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKSystemConfiguration" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 63C7FF9D1D5BEE09003BAE60; - productRefGroup = 63C7FFA81D5BEE09003BAE60 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 63C7FFA61D5BEE09003BAE60 /* PMKSystemConfiguration */, - 63C7FFF11D5C020D003BAE60 /* PMKSCTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXShellScriptBuildPhase section */ - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - PromiseKit, - ); - name = "Embed Carthage Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "case \"$PLATFORM_NAME\" in\nmacosx) plat=Mac;;\niphone*) plat=iOS;;\nwatch*) plat=watchOS;;\nappletv*) plat=tvOS;;\n*) echo \"error: Unknown PLATFORM_NAME: $PLATFORM_NAME\"; exit 1;;\nesac\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nframework=$(basename \"${!VAR}\")\nexport SCRIPT_INPUT_FILE_$n=\"$SRCROOT\"/Carthage/Build/$plat/\"$framework\".framework\ndone\n\n/usr/local/bin/carthage copy-frameworks || exit\n\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nsource=${!VAR}.dSYM\ndest=${BUILT_PRODUCTS_DIR}/$(basename \"$source\")\nditto \"$source\" \"$dest\" || exit\ndone"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 63C7FFA21D5BEE09003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6362F84F1D5D934C0021D2DD /* SCNetworkReachability+AnyPromise.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEE1D5C020D003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6383E14B1D611E0D00897651 /* SCTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 63C7FFA61D5BEE09003BAE60 /* PMKSystemConfiguration */; - targetProxy = 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 63C7FFAD1D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.Foundation; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvsimulator appletvos"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Debug; - }; - 63C7FFAE1D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.Foundation; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvsimulator appletvos"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Release; - }; - 63C7FFB01D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; - }; - name = Debug; - }; - 63C7FFB11D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; - }; - name = Release; - }; - 63C7FFFB1D5C020D003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SUPPRESS_WARNINGS = YES; - SWIFT_VERSION = 4.0; - }; - name = Debug; - }; - 63C7FFFC1D5C020D003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SUPPRESS_WARNINGS = YES; - SWIFT_VERSION = 4.0; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKSystemConfiguration" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFAD1D5BEE09003BAE60 /* Debug */, - 63C7FFAE1D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKSystemConfiguration" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFB01D5BEE09003BAE60 /* Debug */, - 63C7FFB11D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKSCTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFFB1D5C020D003BAE60 /* Debug */, - 63C7FFFC1D5C020D003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 63C7FF9E1D5BEE09003BAE60 /* Project object */; -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/PMKSystemConfiguration.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/PMKSystemConfiguration.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index b49fefe7f..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/PMKSystemConfiguration.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/PMKSystemConfiguration.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/PMKSystemConfiguration.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/PMKSystemConfiguration.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/PMKSystemConfiguration.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/PMKSystemConfiguration.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index 08de0be8d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/PMKSystemConfiguration.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/PMKSystemConfiguration.xcodeproj/xcshareddata/xcschemes/PMKSystemConfiguration.xcscheme b/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/PMKSystemConfiguration.xcodeproj/xcshareddata/xcschemes/PMKSystemConfiguration.xcscheme deleted file mode 100644 index 389fad8ac..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/PMKSystemConfiguration.xcodeproj/xcshareddata/xcschemes/PMKSystemConfiguration.xcscheme +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/README.markdown b/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/README.markdown deleted file mode 100644 index 6c1952c01..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/README.markdown +++ /dev/null @@ -1,34 +0,0 @@ -# PromiseKit SystemConfiguration Extensions ![Build Status] - -This project adds promises to Apple’s SystemConfiguration framework. - -## CocoaPods - -```ruby -pod "PromiseKit/SystemConfiguration" ~> 6.0 -``` - -The extensions are built into `PromiseKit.framework` thus nothing else is needed. - -## Carthage - -```ruby -github "PromiseKit/SystemConfiguration" ~> 3.0 -``` - -The extensions are built into their own framework: - -```swift -// swift -import PromiseKit -import PMKSystemConfiguration -``` - -```objc -// objc -@import PromiseKit; -@import PMKSystemConfiguration; -``` - - -[Build Status]: https://travis-ci.org/PromiseKit/Foundation.svg?branch=master diff --git a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/Sources/PMKSystemConfiguration.h b/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/Sources/PMKSystemConfiguration.h deleted file mode 100644 index a8d32fbda..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/Sources/PMKSystemConfiguration.h +++ /dev/null @@ -1 +0,0 @@ -#import "SCNetworkReachability+AnyPromise.h" diff --git a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/Sources/SCNetworkReachability+AnyPromise.h b/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/Sources/SCNetworkReachability+AnyPromise.h deleted file mode 100644 index 81f86dc47..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/Sources/SCNetworkReachability+AnyPromise.h +++ /dev/null @@ -1,18 +0,0 @@ -#import - -/** - Resolves as soon as the Internet is accessible. If it is already - accessible, resolves immediately. - - To import `SCNetworkReachability`: - - use_frameworks! - pod "PromiseKit/SystemConfiguration" - - And then in your sources: - - @import PromiseKit; - - @return A void promise that fulfills when the Internet becomes accessible. -*/ -AnyPromise *SCNetworkReachability(); diff --git a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/Sources/SCNetworkReachability+AnyPromise.m b/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/Sources/SCNetworkReachability+AnyPromise.m deleted file mode 100644 index 5aaf0b187..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/Sources/SCNetworkReachability+AnyPromise.m +++ /dev/null @@ -1,116 +0,0 @@ -#import -#import -#import -#import -#import -#import -#import -#import - -@interface JTSReachability: NSObject { -@public - PMKResolver resolve; - id retainCycle; -} -- (BOOL)reachable; -- (void)start; -@end - - -AnyPromise *SCNetworkReachability() { - JTSReachability *reach = [JTSReachability new]; - if (reach.reachable) - return [AnyPromise promiseWithValue:nil]; - reach->retainCycle = reach; - [reach start]; - return [[AnyPromise alloc] initWithResolver:&reach->resolve]; -} - - -static void ReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void* info) { - JTSReachability *reachability = (__bridge JTSReachability *)info; - if (reachability.reachable) { - reachability->resolve(nil); - reachability->retainCycle = nil; - } -} - - -@implementation JTSReachability { - SCNetworkReachabilityRef reachabilityRef; -} - -- (instancetype)init { - struct sockaddr_in zeroAddress; - bzero(&zeroAddress, sizeof(zeroAddress)); - zeroAddress.sin_len = sizeof(zeroAddress); - zeroAddress.sin_family = AF_INET; - - reachabilityRef = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, (const struct sockaddr *)&zeroAddress); - - return self; -} - -- (void)start { - SCNetworkReachabilityContext context = {0, (__bridge void *)(self), NULL, NULL, NULL}; - SCNetworkReachabilitySetCallback(reachabilityRef, ReachabilityCallback, &context); - SCNetworkReachabilityScheduleWithRunLoop(reachabilityRef, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode); -} - -- (void)dealloc { - SCNetworkReachabilityUnscheduleFromRunLoop(reachabilityRef, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode); - CFRelease(reachabilityRef); -} - -- (BOOL)reachable { - SCNetworkReachabilityFlags flags; - if (!SCNetworkReachabilityGetFlags(reachabilityRef, &flags)) - return NO; - - if ((flags & kSCNetworkReachabilityFlagsReachable) == 0) - return NO; - - BOOL returnValue = NO; - - if ((flags & kSCNetworkReachabilityFlagsConnectionRequired) == 0) - { - /* - If the target host is reachable and no connection is required then we'll assume (for now) that you're on Wi-Fi... - */ - returnValue = YES; - } - - if ((((flags & kSCNetworkReachabilityFlagsConnectionOnDemand ) != 0) || - (flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) != 0)) - { - /* - ... and the connection is on-demand (or on-traffic) if the calling application is using the CFSocketStream or higher APIs... - */ - - if ((flags & kSCNetworkReachabilityFlagsInterventionRequired) == 0) - { - /* - ... and no [user] intervention is needed... - */ - returnValue = YES; - } - } - -#if TARGET_OS_IPHONE - if ((flags & kSCNetworkReachabilityFlagsIsWWAN) == kSCNetworkReachabilityFlagsIsWWAN) - { - /* - ... but WWAN connections are OK if the calling application is using the CFNetwork APIs. - */ - if (flags & kSCNetworkReachabilityFlagsConnectionRequired) { - returnValue = NO; - } else { - returnValue = YES; - } - } -#endif - - return returnValue; -} - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/Sources/SCNetworkReachability+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/Sources/SCNetworkReachability+Promise.swift deleted file mode 100644 index b751b6676..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/Sources/SCNetworkReachability+Promise.swift +++ /dev/null @@ -1,62 +0,0 @@ -import SystemConfiguration -#if !PMKCocoaPods -import PromiseKit -#endif - -public extension SCNetworkReachability { - - enum PMKError: Error { - case couldNotInitializeReachability - } - - static func promise() -> Promise { - do { - var zeroAddress = sockaddr() - zeroAddress.sa_len = UInt8(MemoryLayout.size) - zeroAddress.sa_family = sa_family_t(AF_INET) - guard let ref = SCNetworkReachabilityCreateWithAddress(nil, &zeroAddress) else { - throw PMKError.couldNotInitializeReachability - } - - var flags = SCNetworkReachabilityFlags() - if SCNetworkReachabilityGetFlags(ref, &flags), flags.contains(.reachable) { - return Promise() - } - - return try Helper(ref: ref).pending.promise - } catch { - return Promise(error: error) - } - } -} - -private func callback(reachability: SCNetworkReachability, flags: SCNetworkReachabilityFlags, info: UnsafeMutableRawPointer?) { - if let info = info, flags.contains(.reachable) { - Unmanaged.fromOpaque(info).takeUnretainedValue().pending.resolver.fulfill(()) - } -} - -private class Helper { - let pending = Promise.pending() - let ref: SCNetworkReachability - - init(ref: SCNetworkReachability) throws { - self.ref = ref - - var context = SCNetworkReachabilityContext(version: 0, info: nil, retain: nil, release: nil, copyDescription: nil) - context.info = UnsafeMutableRawPointer(Unmanaged.passUnretained(self).toOpaque()) - - guard SCNetworkReachabilitySetCallback(ref, callback, &context) else { - throw SCNetworkReachability.PMKError.couldNotInitializeReachability - } - guard SCNetworkReachabilitySetDispatchQueue(ref, .main) else { - SCNetworkReachabilitySetCallback(ref, nil, nil) - throw SCNetworkReachability.PMKError.couldNotInitializeReachability - } - - _ = pending.promise.ensure { - SCNetworkReachabilitySetCallback(self.ref, nil, nil) - SCNetworkReachabilitySetDispatchQueue(self.ref, nil) - } - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/Tests/SCTests.swift b/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/Tests/SCTests.swift deleted file mode 100644 index 94946012f..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/SystemConfiguration/Tests/SCTests.swift +++ /dev/null @@ -1,9 +0,0 @@ -import PMKSystemConfiguration -import XCTest - -class PMKSCTestCase: XCTestCase { - func test() { - // just verify everything links etc. - SCNetworkReachability() - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/.gitignore b/Carthage/Checkouts/PromiseKit/Extensions/UIKit/.gitignore deleted file mode 100644 index 30f50040c..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.xcodeproj/**/xcuserdata/ -*.xcscmblueprint -/Carthage -/.build -.DS_Store diff --git a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/.travis.yml b/Carthage/Checkouts/PromiseKit/Extensions/UIKit/.travis.yml deleted file mode 100644 index fbcb5e19a..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/.travis.yml +++ /dev/null @@ -1,78 +0,0 @@ -os: osx -language: swift -osx_image: xcode10.2 - -branches: - only: - - master -stages: - - lint - - carthage - - test -jobs: - include: - - &pod - stage: lint - osx_image: xcode8.3 - env: SWIFT=3.1 - before_install: - gem install cocoapods --prerelease --version 1.7.0.beta.3 - install: - carthage bootstrap --no-build PromiseKit - script: | - cd Carthage/Checkouts/PromiseKit - mv .github/PromiseKit.podspec . - rm -rf Extensions/UIKit/Sources - cp -R ../../../Sources Extensions/UIKit - pod lib lint --subspec=PromiseKit/UIKit --fail-fast --swift-version=$SWIFT - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=3.2 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=3.3 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=3.4 - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=4.0 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=4.1 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=4.2 - - <<: *pod - osx_image: xcode10.2 - env: SWIFT=5.0 - - - &carthage - stage: carthage - osx_image: xcode9.2 - script: | - carthage bootstrap --cache-builds - sed -i '' "s/SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;/SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;/" *.xcodeproj/project.pbxproj - carthage build --no-skip-current - cache: - directories: - - Carthage - - <<: *carthage - osx_image: xcode9.4 - - <<: *carthage - osx_image: xcode10.1 - - <<: *carthage - osx_image: xcode10.2 - - - &test - stage: test - xcode_scheme: PMKUIKit - xcode_project: PMKUIKit.xcodeproj - xcode_destination: 'platform=iOS Simulator,OS=12.2,name=iPhone SE' - cache: - directories: - - Carthage - before_install: - carthage bootstrap --cache-builds --no-use-binaries - - <<: *test - xcode_destination: 'platform=tvOS Simulator,OS=12.2,name=Apple TV' diff --git a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Cartfile b/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Cartfile deleted file mode 100644 index d4703e986..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" ~> 6.8.4 diff --git a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Cartfile.resolved b/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Cartfile.resolved deleted file mode 100644 index f54bbdbf2..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Cartfile.resolved +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" "6.8.4" diff --git a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Carthage.xcconfig b/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Carthage.xcconfig deleted file mode 100644 index c8b995651..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Carthage.xcconfig +++ /dev/null @@ -1,7 +0,0 @@ -// Created by Kevin Ballard on 12/14/15. -// Copyright © 2015 Postmates. All rights reserved. - -FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(SRCROOT)/Carthage/Build/Mac/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=iphone*] = $(SRCROOT)/Carthage/Build/iOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=watch*] = $(SRCROOT)/Carthage/Build/watchOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=appletv*] = $(SRCROOT)/Carthage/Build/tvOS/ $(inherited) diff --git a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Info.plist b/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Info.plist deleted file mode 100644 index 34dfbc3ce..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - $(BUNDLE_PACKAGE_TYPE) - CFBundleShortVersionString - 1.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/LICENSE b/Carthage/Checkouts/PromiseKit/Extensions/UIKit/LICENSE deleted file mode 100644 index 50f758c89..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2016-present, Max Howell; mxcl@me.com - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/PMKUIKit.xcodeproj/project.pbxproj b/Carthage/Checkouts/PromiseKit/Extensions/UIKit/PMKUIKit.xcodeproj/project.pbxproj deleted file mode 100644 index 267483341..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/PMKUIKit.xcodeproj/project.pbxproj +++ /dev/null @@ -1,757 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 6304D6FE1D5F986A00CE6C99 /* PMKUIKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 6304D6FD1D5F986A00CE6C99 /* PMKUIKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 630B2E161D5D0B3200DC10E9 /* TestUIImagePickerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 630B2DF71D5D0AD400DC10E9 /* TestUIImagePickerController.swift */; }; - 632B573520324C4C00FCD5E1 /* UIViewPropertyAnimator+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 632B573420324C4C00FCD5E1 /* UIViewPropertyAnimator+Promise.swift */; }; - 6332142B1D83CD17009F67CE /* TestUIView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6332142A1D83CD17009F67CE /* TestUIView.swift */; }; - 637E2C841D5C2E0B0043E370 /* UIView+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 637E2C771D5C2E0B0043E370 /* UIView+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 637E2C851D5C2E0B0043E370 /* UIView+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 637E2C781D5C2E0B0043E370 /* UIView+AnyPromise.m */; }; - 637E2C861D5C2E0B0043E370 /* UIView+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 637E2C791D5C2E0B0043E370 /* UIView+Promise.swift */; }; - 637E2C871D5C2E0B0043E370 /* UIViewController+AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 637E2C7A1D5C2E0B0043E370 /* UIViewController+AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 637E2C881D5C2E0B0043E370 /* UIViewController+AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 637E2C7B1D5C2E0B0043E370 /* UIViewController+AnyPromise.m */; }; - 637E2C951D5C2E720043E370 /* TestUIImagePickerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 637E2C8E1D5C2E720043E370 /* TestUIImagePickerController.swift */; }; - 637E2C961D5C2E720043E370 /* TestUIViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 637E2C8F1D5C2E720043E370 /* TestUIViewController.m */; }; - 637E2C9B1D5C2F600043E370 /* infrastructure.swift in Sources */ = {isa = PBXBuildFile; fileRef = 637E2C9A1D5C2F600043E370 /* infrastructure.swift */; }; - 63A686811D88E93300D1C66B /* UIImagePickerController+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63A6867E1D88E93300D1C66B /* UIImagePickerController+Promise.swift */; }; - 63C7FFF71D5C020D003BAE60 /* PMKUIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C7FFA71D5BEE09003BAE60 /* PMKUIKit.framework */; }; - 63C9C4571D5D339900101ECE /* app.swift in Sources */ = {isa = PBXBuildFile; fileRef = 630B2DF41D5D0AD400DC10E9 /* app.swift */; }; - 63C9C4581D5D339B00101ECE /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 630B2DF51D5D0AD400DC10E9 /* Default-568h@2x.png */; }; - 63C9C45E1D5D341600101ECE /* PMKUIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C7FFA71D5BEE09003BAE60 /* PMKUIKit.framework */; }; - 63C9C45F1D5D341600101ECE /* PMKUIKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 63C7FFA71D5BEE09003BAE60 /* PMKUIKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 63C7FF9E1D5BEE09003BAE60 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 63C7FFA61D5BEE09003BAE60; - remoteInfo = PMKUIKit; - }; - 63C9C4591D5D33A900101ECE /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 63C7FF9E1D5BEE09003BAE60 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 63C9C4441D5D334700101ECE; - remoteInfo = PMKTestsHost; - }; - 63C9C45B1D5D33AB00101ECE /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 63C7FF9E1D5BEE09003BAE60 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 63C9C4441D5D334700101ECE; - remoteInfo = PMKTestsHost; - }; - 63C9C4601D5D341600101ECE /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 63C7FF9E1D5BEE09003BAE60 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 63C7FFA61D5BEE09003BAE60; - remoteInfo = PMKUIKit; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 63C9C4621D5D341600101ECE /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - 63C9C45F1D5D341600101ECE /* PMKUIKit.framework in Embed Frameworks */, - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 6304D6FD1D5F986A00CE6C99 /* PMKUIKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PMKUIKit.h; path = Sources/PMKUIKit.h; sourceTree = SOURCE_ROOT; }; - 630B2DF41D5D0AD400DC10E9 /* app.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = app.swift; path = UITests/app.swift; sourceTree = ""; }; - 630B2DF51D5D0AD400DC10E9 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-568h@2x.png"; path = "UITests/Default-568h@2x.png"; sourceTree = ""; }; - 630B2DF71D5D0AD400DC10E9 /* TestUIImagePickerController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TestUIImagePickerController.swift; path = UITests/TestUIImagePickerController.swift; sourceTree = ""; }; - 630B2E131D5D0AF500DC10E9 /* PMKUIUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PMKUIUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 632B573420324C4C00FCD5E1 /* UIViewPropertyAnimator+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIViewPropertyAnimator+Promise.swift"; sourceTree = ""; }; - 6332142A1D83CD17009F67CE /* TestUIView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TestUIView.swift; path = Tests/TestUIView.swift; sourceTree = SOURCE_ROOT; }; - 637E2C771D5C2E0B0043E370 /* UIView+AnyPromise.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIView+AnyPromise.h"; path = "Sources/UIView+AnyPromise.h"; sourceTree = SOURCE_ROOT; }; - 637E2C781D5C2E0B0043E370 /* UIView+AnyPromise.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIView+AnyPromise.m"; path = "Sources/UIView+AnyPromise.m"; sourceTree = SOURCE_ROOT; }; - 637E2C791D5C2E0B0043E370 /* UIView+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "UIView+Promise.swift"; path = "Sources/UIView+Promise.swift"; sourceTree = SOURCE_ROOT; }; - 637E2C7A1D5C2E0B0043E370 /* UIViewController+AnyPromise.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIViewController+AnyPromise.h"; path = "Sources/UIViewController+AnyPromise.h"; sourceTree = SOURCE_ROOT; }; - 637E2C7B1D5C2E0B0043E370 /* UIViewController+AnyPromise.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIViewController+AnyPromise.m"; path = "Sources/UIViewController+AnyPromise.m"; sourceTree = SOURCE_ROOT; }; - 637E2C8E1D5C2E720043E370 /* TestUIImagePickerController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TestUIImagePickerController.swift; path = Tests/TestUIImagePickerController.swift; sourceTree = SOURCE_ROOT; }; - 637E2C8F1D5C2E720043E370 /* TestUIViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TestUIViewController.m; path = Tests/TestUIViewController.m; sourceTree = SOURCE_ROOT; }; - 637E2C9A1D5C2F600043E370 /* infrastructure.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = infrastructure.swift; path = Tests/infrastructure.swift; sourceTree = SOURCE_ROOT; }; - 63A6867E1D88E93300D1C66B /* UIImagePickerController+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "UIImagePickerController+Promise.swift"; path = "Sources/UIImagePickerController+Promise.swift"; sourceTree = SOURCE_ROOT; }; - 63C700091D5C0253003BAE60 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 63C7FFA71D5BEE09003BAE60 /* PMKUIKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PMKUIKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 63C7FFF21D5C020D003BAE60 /* PMKUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PMKUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 63C9C4451D5D334700101ECE /* PMKTestsHost.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PMKTestsHost.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 63CCF8121D5C0C4E00503216 /* Cartfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile; sourceTree = ""; }; - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Carthage.xcconfig; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 630B2E0D1D5D0AF500DC10E9 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFA31D5BEE09003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEF1D5C020D003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 63C7FFF71D5C020D003BAE60 /* PMKUIKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C9C4421D5D334700101ECE /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 63C9C45E1D5D341600101ECE /* PMKUIKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 630B2DF31D5D0ABF00DC10E9 /* TestsHost */ = { - isa = PBXGroup; - children = ( - 630B2DF41D5D0AD400DC10E9 /* app.swift */, - 630B2DF51D5D0AD400DC10E9 /* Default-568h@2x.png */, - 630B2DF71D5D0AD400DC10E9 /* TestUIImagePickerController.swift */, - ); - name = TestsHost; - sourceTree = ""; - }; - 63C7FF9D1D5BEE09003BAE60 = { - isa = PBXGroup; - children = ( - 63C700091D5C0253003BAE60 /* Info.plist */, - 63CCF8121D5C0C4E00503216 /* Cartfile */, - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */, - 63C7FFA91D5BEE09003BAE60 /* Sources */, - 63C7FFF31D5C020D003BAE60 /* Tests */, - 630B2DF31D5D0ABF00DC10E9 /* TestsHost */, - 63C7FFA81D5BEE09003BAE60 /* Products */, - ); - sourceTree = ""; - }; - 63C7FFA81D5BEE09003BAE60 /* Products */ = { - isa = PBXGroup; - children = ( - 63C7FFA71D5BEE09003BAE60 /* PMKUIKit.framework */, - 63C7FFF21D5C020D003BAE60 /* PMKUITests.xctest */, - 630B2E131D5D0AF500DC10E9 /* PMKUIUITests.xctest */, - 63C9C4451D5D334700101ECE /* PMKTestsHost.app */, - ); - name = Products; - sourceTree = ""; - }; - 63C7FFA91D5BEE09003BAE60 /* Sources */ = { - isa = PBXGroup; - children = ( - 6304D6FD1D5F986A00CE6C99 /* PMKUIKit.h */, - 637E2C771D5C2E0B0043E370 /* UIView+AnyPromise.h */, - 637E2C781D5C2E0B0043E370 /* UIView+AnyPromise.m */, - 637E2C791D5C2E0B0043E370 /* UIView+Promise.swift */, - 637E2C7A1D5C2E0B0043E370 /* UIViewController+AnyPromise.h */, - 637E2C7B1D5C2E0B0043E370 /* UIViewController+AnyPromise.m */, - 63A6867E1D88E93300D1C66B /* UIImagePickerController+Promise.swift */, - 632B573420324C4C00FCD5E1 /* UIViewPropertyAnimator+Promise.swift */, - ); - path = Sources; - sourceTree = SOURCE_ROOT; - }; - 63C7FFF31D5C020D003BAE60 /* Tests */ = { - isa = PBXGroup; - children = ( - 637E2C8E1D5C2E720043E370 /* TestUIImagePickerController.swift */, - 637E2C8F1D5C2E720043E370 /* TestUIViewController.m */, - 6332142A1D83CD17009F67CE /* TestUIView.swift */, - 637E2C9A1D5C2F600043E370 /* infrastructure.swift */, - ); - path = Tests; - sourceTree = SOURCE_ROOT; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 63C7FFA41D5BEE09003BAE60 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 6304D6FE1D5F986A00CE6C99 /* PMKUIKit.h in Headers */, - 637E2C871D5C2E0B0043E370 /* UIViewController+AnyPromise.h in Headers */, - 637E2C841D5C2E0B0043E370 /* UIView+AnyPromise.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 630B2DFF1D5D0AF500DC10E9 /* PMKUIUITests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 630B2E101D5D0AF500DC10E9 /* Build configuration list for PBXNativeTarget "PMKUIUITests" */; - buildPhases = ( - 630B2E041D5D0AF500DC10E9 /* Sources */, - 630B2E0D1D5D0AF500DC10E9 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 63C9C45A1D5D33A900101ECE /* PBXTargetDependency */, - ); - name = PMKUIUITests; - productName = PMKUIUITests; - productReference = 630B2E131D5D0AF500DC10E9 /* PMKUIUITests.xctest */; - productType = "com.apple.product-type.bundle.ui-testing"; - }; - 63C7FFA61D5BEE09003BAE60 /* PMKUIKit */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKUIKit" */; - buildPhases = ( - 63C7FFA21D5BEE09003BAE60 /* Sources */, - 63C7FFA31D5BEE09003BAE60 /* Frameworks */, - 63C7FFA41D5BEE09003BAE60 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PMKUIKit; - productName = PMKUIKit; - productReference = 63C7FFA71D5BEE09003BAE60 /* PMKUIKit.framework */; - productType = "com.apple.product-type.framework"; - }; - 63C7FFF11D5C020D003BAE60 /* PMKUITests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKUITests" */; - buildPhases = ( - 63C7FFEE1D5C020D003BAE60 /* Sources */, - 63C7FFEF1D5C020D003BAE60 /* Frameworks */, - 6332EC8D1D5D085F00480270 /* Embed Carthage Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */, - 63C9C45C1D5D33AB00101ECE /* PBXTargetDependency */, - ); - name = PMKUITests; - productName = PMKUITests; - productReference = 63C7FFF21D5C020D003BAE60 /* PMKUITests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 63C9C4441D5D334700101ECE /* PMKTestsHost */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C9C4541D5D334800101ECE /* Build configuration list for PBXNativeTarget "PMKTestsHost" */; - buildPhases = ( - 63C9C4411D5D334700101ECE /* Sources */, - 63C9C4421D5D334700101ECE /* Frameworks */, - 63C9C4431D5D334700101ECE /* Resources */, - 63C9C45D1D5D33E700101ECE /* Embed Carthage Frameworks */, - 63C9C4621D5D341600101ECE /* Embed Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 63C9C4611D5D341600101ECE /* PBXTargetDependency */, - ); - name = PMKTestsHost; - productName = PMKTestsHost; - productReference = 63C9C4451D5D334700101ECE /* PMKTestsHost.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 63C7FF9E1D5BEE09003BAE60 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = "Max Howell"; - TargetAttributes = { - 630B2DFF1D5D0AF500DC10E9 = { - LastSwiftMigration = 1020; - TestTargetID = 63C9C4441D5D334700101ECE; - }; - 63C7FFA61D5BEE09003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - 63C7FFF11D5C020D003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - TestTargetID = 63C9C4441D5D334700101ECE; - }; - 63C9C4441D5D334700101ECE = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKUIKit" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 63C7FF9D1D5BEE09003BAE60; - productRefGroup = 63C7FFA81D5BEE09003BAE60 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 63C7FFA61D5BEE09003BAE60 /* PMKUIKit */, - 63C7FFF11D5C020D003BAE60 /* PMKUITests */, - 630B2DFF1D5D0AF500DC10E9 /* PMKUIUITests */, - 63C9C4441D5D334700101ECE /* PMKTestsHost */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 63C9C4431D5D334700101ECE /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63C9C4581D5D339B00101ECE /* Default-568h@2x.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 6332EC8D1D5D085F00480270 /* Embed Carthage Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - PromiseKit, - ); - name = "Embed Carthage Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "case \"$PLATFORM_NAME\" in\nmacosx) plat=Mac;;\niphone*) plat=iOS;;\nwatch*) plat=watchOS;;\nappletv*) plat=tvOS;;\n*) echo \"error: Unknown PLATFORM_NAME: $PLATFORM_NAME\"; exit 1;;\nesac\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nframework=$(basename \"${!VAR}\")\nexport SCRIPT_INPUT_FILE_$n=\"$SRCROOT\"/Carthage/Build/$plat/\"$framework\".framework\ndone\n\n/usr/local/bin/carthage copy-frameworks || exit\n\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nsource=${!VAR}.dSYM\ndest=${BUILT_PRODUCTS_DIR}/$(basename \"$source\")\nditto \"$source\" \"$dest\" || exit\ndone"; - }; - 63C9C45D1D5D33E700101ECE /* Embed Carthage Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - PromiseKit, - ); - name = "Embed Carthage Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "case \"$PLATFORM_NAME\" in\nmacosx) plat=Mac;;\niphone*) plat=iOS;;\nwatch*) plat=watchOS;;\nappletv*) plat=tvOS;;\n*) echo \"error: Unknown PLATFORM_NAME: $PLATFORM_NAME\"; exit 1;;\nesac\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nframework=$(basename \"${!VAR}\")\nexport SCRIPT_INPUT_FILE_$n=\"$SRCROOT\"/Carthage/Build/$plat/\"$framework\".framework\ndone\n\n/usr/local/bin/carthage copy-frameworks || exit\n\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nsource=${!VAR}.dSYM\ndest=${BUILT_PRODUCTS_DIR}/$(basename \"$source\")\nditto \"$source\" \"$dest\" || exit\ndone"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 630B2E041D5D0AF500DC10E9 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 630B2E161D5D0B3200DC10E9 /* TestUIImagePickerController.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFA21D5BEE09003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63A686811D88E93300D1C66B /* UIImagePickerController+Promise.swift in Sources */, - 637E2C861D5C2E0B0043E370 /* UIView+Promise.swift in Sources */, - 637E2C851D5C2E0B0043E370 /* UIView+AnyPromise.m in Sources */, - 632B573520324C4C00FCD5E1 /* UIViewPropertyAnimator+Promise.swift in Sources */, - 637E2C881D5C2E0B0043E370 /* UIViewController+AnyPromise.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEE1D5C020D003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 637E2C951D5C2E720043E370 /* TestUIImagePickerController.swift in Sources */, - 637E2C961D5C2E720043E370 /* TestUIViewController.m in Sources */, - 637E2C9B1D5C2F600043E370 /* infrastructure.swift in Sources */, - 6332142B1D83CD17009F67CE /* TestUIView.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C9C4411D5D334700101ECE /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63C9C4571D5D339900101ECE /* app.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 63C7FFA61D5BEE09003BAE60 /* PMKUIKit */; - targetProxy = 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */; - }; - 63C9C45A1D5D33A900101ECE /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 63C9C4441D5D334700101ECE /* PMKTestsHost */; - targetProxy = 63C9C4591D5D33A900101ECE /* PBXContainerItemProxy */; - }; - 63C9C45C1D5D33AB00101ECE /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 63C9C4441D5D334700101ECE /* PMKTestsHost */; - targetProxy = 63C9C45B1D5D33AB00101ECE /* PBXContainerItemProxy */; - }; - 63C9C4611D5D341600101ECE /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 63C7FFA61D5BEE09003BAE60 /* PMKUIKit */; - targetProxy = 63C9C4601D5D341600101ECE /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 630B2E111D5D0AF500DC10E9 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_PACKAGE_TYPE = BNDL; - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.tests.ui.UIKit; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SUPPRESS_WARNINGS = YES; - SWIFT_VERSION = 4.0; - TEST_TARGET_NAME = PMKTestsHost; - }; - name = Debug; - }; - 630B2E121D5D0AF500DC10E9 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_PACKAGE_TYPE = BNDL; - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.tests.ui.UIKit; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SUPPRESS_WARNINGS = YES; - SWIFT_VERSION = 4.0; - TEST_TARGET_NAME = PMKTestsHost; - }; - name = Release; - }; - 63C7FFAD1D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - BUNDLE_PACKAGE_TYPE = FMWK; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1.0.3; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.UIKit; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvsimulator appletvos"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Debug; - }; - 63C7FFAE1D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - BUNDLE_PACKAGE_TYPE = FMWK; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1.0.3; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.UIKit; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvsimulator appletvos"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VALIDATE_PRODUCT = YES; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Release; - }; - 63C7FFB01D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Debug; - }; - 63C7FFB11D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Release; - }; - 63C7FFFB1D5C020D003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_PACKAGE_TYPE = BNDL; - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.tests.UIKit; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SUPPRESS_WARNINGS = YES; - SWIFT_VERSION = 4.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PMKTestsHost.app/PMKTestsHost"; - }; - name = Debug; - }; - 63C7FFFC1D5C020D003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_PACKAGE_TYPE = BNDL; - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.tests.UIKit; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SUPPRESS_WARNINGS = YES; - SWIFT_VERSION = 4.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PMKTestsHost.app/PMKTestsHost"; - }; - name = Release; - }; - 63C9C4551D5D334800101ECE /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_PACKAGE_TYPE = APPL; - CODE_SIGN_ENTITLEMENTS = UITests/Entitlements.plist; - COPY_PHASE_STRIP = NO; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.tests.host.UIKit; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_VERSION = 4.0; - }; - name = Debug; - }; - 63C9C4561D5D334800101ECE /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_PACKAGE_TYPE = APPL; - CODE_SIGN_ENTITLEMENTS = UITests/Entitlements.plist; - COPY_PHASE_STRIP = NO; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.tests.host.UIKit; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_VERSION = 4.0; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 630B2E101D5D0AF500DC10E9 /* Build configuration list for PBXNativeTarget "PMKUIUITests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 630B2E111D5D0AF500DC10E9 /* Debug */, - 630B2E121D5D0AF500DC10E9 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKUIKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFAD1D5BEE09003BAE60 /* Debug */, - 63C7FFAE1D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKUIKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFB01D5BEE09003BAE60 /* Debug */, - 63C7FFB11D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKUITests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFFB1D5C020D003BAE60 /* Debug */, - 63C7FFFC1D5C020D003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C9C4541D5D334800101ECE /* Build configuration list for PBXNativeTarget "PMKTestsHost" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C9C4551D5D334800101ECE /* Debug */, - 63C9C4561D5D334800101ECE /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 63C7FF9E1D5BEE09003BAE60 /* Project object */; -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/PMKUIKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Carthage/Checkouts/PromiseKit/Extensions/UIKit/PMKUIKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 07a620571..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/PMKUIKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/PMKUIKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Carthage/Checkouts/PromiseKit/Extensions/UIKit/PMKUIKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/PMKUIKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/PMKUIKit.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Carthage/Checkouts/PromiseKit/Extensions/UIKit/PMKUIKit.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index 08de0be8d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/PMKUIKit.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/PMKUIKit.xcodeproj/xcshareddata/xcschemes/PMKUIKit.xcscheme b/Carthage/Checkouts/PromiseKit/Extensions/UIKit/PMKUIKit.xcodeproj/xcshareddata/xcschemes/PMKUIKit.xcscheme deleted file mode 100644 index 6ac621307..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/PMKUIKit.xcodeproj/xcshareddata/xcschemes/PMKUIKit.xcscheme +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/README.markdown b/Carthage/Checkouts/PromiseKit/Extensions/UIKit/README.markdown deleted file mode 100644 index dafd4e653..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/README.markdown +++ /dev/null @@ -1,48 +0,0 @@ -# PromiseKit UIKit Extensions ![Build Status] - -This project adds promises to Apple’s UIKit framework. - -This project supports Swift 3.0, 3.1, 3.2 and 4.0; iOS 9, 10 and 11; tvOS 10 and -11; CocoaPods and Carthage; Xcode 8.0, 8.1, 8.2, 8.3 and 9.0. - -## CocoaPods - -```ruby -pod "PromiseKit/UIKit", "~> 6.0" -``` - -The extensions are built into `PromiseKit.framework` thus `import PromiseKit` is -all that is needed. - -## Carthage - -```ruby -github "PromiseKit/UIKit" ~> 3.0 -``` - -The extensions are built into their own framework: - -```swift -// swift -import PromiseKit -import PMKUIKit -``` - -```objc -// objc -@import PromiseKit; -@import PMKUIKit; -``` - -# `UIImagePickerController` - -Due to iOS 10 requiring an entry in your app’s `Info.plist` for any usage of `UIImagePickerController` (even if you don’t actually call it directly), we have removed UIImagePickerController from the default `UIKit` pod. To use it you must add an additional subspec: - -```ruby -pod "PromiseKit/UIImagePickerController" -``` - -Sorry, but there’s not an easier way. - - -[Build Status]: https://travis-ci.org/PromiseKit/UIKit.svg?branch=master diff --git a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/PMKUIKit.h b/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/PMKUIKit.h deleted file mode 100644 index 75cbf90f0..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/PMKUIKit.h +++ /dev/null @@ -1,8 +0,0 @@ -#import "UIView+AnyPromise.h" -#import "UIViewController+AnyPromise.h" - -typedef NS_OPTIONS(NSInteger, PMKAnimationOptions) { - PMKAnimationOptionsNone = 1 << 0, - PMKAnimationOptionsAppear = 1 << 1, - PMKAnimationOptionsDisappear = 1 << 2, -}; diff --git a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIImagePickerController+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIImagePickerController+Promise.swift deleted file mode 100644 index d112c64bf..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIImagePickerController+Promise.swift +++ /dev/null @@ -1,80 +0,0 @@ -#if !PMKCocoaPods -import PromiseKit -#endif -import UIKit - -#if !os(tvOS) - -extension UIViewController { -#if swift(>=4.2) - /// Presents the UIImagePickerController, resolving with the user action. - public func promise(_ vc: UIImagePickerController, animate: PMKAnimationOptions = [.appear, .disappear], completion: (() -> Void)? = nil) -> Promise<[UIImagePickerController.InfoKey: Any]> { - let animated = animate.contains(.appear) - let proxy = UIImagePickerControllerProxy() - vc.delegate = proxy - present(vc, animated: animated, completion: completion) - return proxy.promise.ensure { - vc.presentingViewController?.dismiss(animated: animated, completion: nil) - } - } -#else - /// Presents the UIImagePickerController, resolving with the user action. - public func promise(_ vc: UIImagePickerController, animate: PMKAnimationOptions = [.appear, .disappear], completion: (() -> Void)? = nil) -> Promise<[String: Any]> { - let animated = animate.contains(.appear) - let proxy = UIImagePickerControllerProxy() - vc.delegate = proxy - present(vc, animated: animated, completion: completion) - return proxy.promise.ensure { - vc.presentingViewController?.dismiss(animated: animated, completion: nil) - } - } -#endif -} - -@objc private class UIImagePickerControllerProxy: NSObject, UIImagePickerControllerDelegate, UINavigationControllerDelegate { -#if swift(>=4.2) - let (promise, seal) = Promise<[UIImagePickerController.InfoKey: Any]>.pending() -#else - let (promise, seal) = Promise<[String: Any]>.pending() -#endif - var retainCycle: AnyObject? - - required override init() { - super.init() - retainCycle = self - } - -#if swift(>=4.2) - func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey: Any]) { - seal.fulfill(info) - retainCycle = nil - } -#else - func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String: Any]) { - seal.fulfill(info) - retainCycle = nil - } -#endif - - func imagePickerControllerDidCancel(_ picker: UIImagePickerController) { - seal.reject(UIImagePickerController.PMKError.cancelled) - retainCycle = nil - } -} - -extension UIImagePickerController { - /// Errors representing PromiseKit UIImagePickerController failures - public enum PMKError: CancellableError { - /// The user cancelled the UIImagePickerController. - case cancelled - /// - Returns: true - public var isCancelled: Bool { - switch self { - case .cancelled: - return true - } - } - } -} - -#endif diff --git a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIView+AnyPromise.h b/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIView+AnyPromise.h deleted file mode 100644 index 0a19cd6fe..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIView+AnyPromise.h +++ /dev/null @@ -1,80 +0,0 @@ -#import -#import - -// Created by Masafumi Yoshida on 2014/07/11. -// Copyright (c) 2014年 DeNA. All rights reserved. - -/** - To import the `UIView` category: - - use_frameworks! - pod "PromiseKit/UIKit" - - Or `UIKit` is one of the categories imported by the umbrella pod: - - use_frameworks! - pod "PromiseKit" - - And then in your sources: - - @import PromiseKit; -*/ -@interface UIView (PromiseKit) - -/** - Animate changes to one or more views using the specified duration. - - @param duration The total duration of the animations, measured in - seconds. If you specify a negative value or 0, the changes are made - without animating them. - - @param animations A block object containing the changes to commit to the - views. - - @return A promise that fulfills with a boolean NSNumber indicating - whether or not the animations actually finished. -*/ -+ (AnyPromise *)promiseWithDuration:(NSTimeInterval)duration animations:(void (^)(void))animations NS_REFINED_FOR_SWIFT; - -/** - Animate changes to one or more views using the specified duration, delay, - options, and completion handler. - - @param duration The total duration of the animations, measured in - seconds. If you specify a negative value or 0, the changes are made - without animating them. - - @param delay The amount of time (measured in seconds) to wait before - beginning the animations. Specify a value of 0 to begin the animations - immediately. - - @param options A mask of options indicating how you want to perform the - animations. For a list of valid constants, see UIViewAnimationOptions. - - @param animations A block object containing the changes to commit to the - views. - - @return A promise that fulfills with a boolean NSNumber indicating - whether or not the animations actually finished. -*/ -+ (AnyPromise *)promiseWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay options:(UIViewAnimationOptions)options animations:(void (^)(void))animations NS_REFINED_FOR_SWIFT; - -/** - Performs a view animation using a timing curve corresponding to the - motion of a physical spring. - - @return A promise that fulfills with a boolean NSNumber indicating - whether or not the animations actually finished. -*/ -+ (AnyPromise *)promiseWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay usingSpringWithDamping:(CGFloat)dampingRatio initialSpringVelocity:(CGFloat)velocity options:(UIViewAnimationOptions)options animations:(void (^)(void))animations NS_REFINED_FOR_SWIFT; - -/** - Creates an animation block object that can be used to set up - keyframe-based animations for the current view. - - @return A promise that fulfills with a boolean NSNumber indicating - whether or not the animations actually finished. -*/ -+ (AnyPromise *)promiseWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay options:(UIViewKeyframeAnimationOptions)options keyframeAnimations:(void (^)(void))animations NS_REFINED_FOR_SWIFT; - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIView+AnyPromise.m b/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIView+AnyPromise.m deleted file mode 100644 index 04ee94035..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIView+AnyPromise.m +++ /dev/null @@ -1,64 +0,0 @@ -// -// UIView+PromiseKit_UIAnimation.m -// YahooDenaStudy -// -// Created by Masafumi Yoshida on 2014/07/11. -// Copyright (c) 2014年 DeNA. All rights reserved. -// - -#import -#import "UIView+AnyPromise.h" - - -#define CopyPasta \ - NSAssert([NSThread isMainThread], @"UIKit animation must be performed on the main thread"); \ - \ - if (![NSThread isMainThread]) { \ - id error = [NSError errorWithDomain:PMKErrorDomain code:PMKInvalidUsageError userInfo:@{NSLocalizedDescriptionKey: @"Animation was attempted on a background thread"}]; \ - return [AnyPromise promiseWithValue:error]; \ - } \ - \ - PMKResolver resolve = nil; \ - AnyPromise *promise = [[AnyPromise alloc] initWithResolver:&resolve]; - - -@implementation UIView (PromiseKit) - -+ (AnyPromise *)promiseWithDuration:(NSTimeInterval)duration animations:(void (^)(void))animations { - return [self promiseWithDuration:duration delay:0 options:0 animations:animations]; -} - -+ (AnyPromise *)promiseWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay options:(UIViewAnimationOptions)options animations:(void(^)(void))animations -{ - CopyPasta; - - [UIView animateWithDuration:duration delay:delay options:options animations:animations completion:^(BOOL finished) { - resolve(@(finished)); - }]; - - return promise; -} - -+ (AnyPromise *)promiseWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay usingSpringWithDamping:(CGFloat)dampingRatio initialSpringVelocity:(CGFloat)velocity options:(UIViewAnimationOptions)options animations:(void(^)(void))animations -{ - CopyPasta; - - [UIView animateWithDuration:duration delay:delay usingSpringWithDamping:dampingRatio initialSpringVelocity:velocity options:options animations:animations completion:^(BOOL finished) { - resolve(@(finished)); - }]; - - return promise; -} - -+ (AnyPromise *)promiseWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay options:(UIViewKeyframeAnimationOptions)options keyframeAnimations:(void(^)(void))animations -{ - CopyPasta; - - [UIView animateKeyframesWithDuration:duration delay:delay options:options animations:animations completion:^(BOOL finished) { - resolve(@(finished)); - }]; - - return promise; -} - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIView+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIView+Promise.swift deleted file mode 100644 index 1bbb8c649..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIView+Promise.swift +++ /dev/null @@ -1,115 +0,0 @@ -import UIKit.UIView -#if !PMKCocoaPods -import PromiseKit -#endif - -/** - To import the `UIView` category: - - use_frameworks! - pod "PromiseKit/UIKit" - - Or `UIKit` is one of the categories imported by the umbrella pod: - - use_frameworks! - pod "PromiseKit" - - And then in your sources: - - import PromiseKit -*/ -public extension UIView { -#if swift(>=4.2) -/** - Animate changes to one or more views using the specified duration, delay, - options, and completion handler. - - - Parameter duration: The total duration of the animations, measured in - seconds. If you specify a negative value or 0, the changes are made - without animating them. - - - Parameter delay: The amount of time (measured in seconds) to wait before - beginning the animations. Specify a value of 0 to begin the animations - immediately. - - - Parameter options: A mask of options indicating how you want to perform the - animations. For a list of valid constants, see UIViewAnimationOptions. - - - Parameter animations: A block object containing the changes to commit to the - views. - - - Returns: A promise that fulfills with a boolean NSNumber indicating - whether or not the animations actually finished. - */ - @discardableResult - static func animate(_: PMKNamespacer, duration: TimeInterval, delay: TimeInterval = 0, options: UIView.AnimationOptions = [], animations: @escaping () -> Void) -> Guarantee { - return Guarantee { animate(withDuration: duration, delay: delay, options: options, animations: animations, completion: $0) } - } - - @discardableResult - static func animate(_: PMKNamespacer, duration: TimeInterval, delay: TimeInterval, usingSpringWithDamping damping: CGFloat, initialSpringVelocity: CGFloat, options: UIView.AnimationOptions = [], animations: @escaping () -> Void) -> Guarantee { - return Guarantee { animate(withDuration: duration, delay: delay, usingSpringWithDamping: damping, initialSpringVelocity: initialSpringVelocity, options: options, animations: animations, completion: $0) } - } - - @discardableResult - static func transition(_: PMKNamespacer, with view: UIView, duration: TimeInterval, options: UIView.AnimationOptions = [], animations: (() -> Void)?) -> Guarantee { - return Guarantee { transition(with: view, duration: duration, options: options, animations: animations, completion: $0) } - } - - @discardableResult - static func transition(_: PMKNamespacer, from: UIView, to: UIView, duration: TimeInterval, options: UIView.AnimationOptions = []) -> Guarantee { - return Guarantee { transition(from: from, to: to, duration: duration, options: options, completion: $0) } - } - - @discardableResult - static func perform(_: PMKNamespacer, animation: UIView.SystemAnimation, on views: [UIView], options: UIView.AnimationOptions = [], animations: (() -> Void)?) -> Guarantee { - return Guarantee { perform(animation, on: views, options: options, animations: animations, completion: $0) } - } -#else - /** - Animate changes to one or more views using the specified duration, delay, - options, and completion handler. - - - Parameter duration: The total duration of the animations, measured in - seconds. If you specify a negative value or 0, the changes are made - without animating them. - - - Parameter delay: The amount of time (measured in seconds) to wait before - beginning the animations. Specify a value of 0 to begin the animations - immediately. - - - Parameter options: A mask of options indicating how you want to perform the - animations. For a list of valid constants, see UIViewAnimationOptions. - - - Parameter animations: A block object containing the changes to commit to the - views. - - - Returns: A promise that fulfills with a boolean NSNumber indicating - whether or not the animations actually finished. - */ - @discardableResult - static func animate(_: PMKNamespacer, duration: TimeInterval, delay: TimeInterval = 0, options: UIViewAnimationOptions = [], animations: @escaping () -> Void) -> Guarantee { - return Guarantee { animate(withDuration: duration, delay: delay, options: options, animations: animations, completion: $0) } - } - - @discardableResult - static func animate(_: PMKNamespacer, duration: TimeInterval, delay: TimeInterval, usingSpringWithDamping damping: CGFloat, initialSpringVelocity: CGFloat, options: UIViewAnimationOptions = [], animations: @escaping () -> Void) -> Guarantee { - return Guarantee { animate(withDuration: duration, delay: delay, usingSpringWithDamping: damping, initialSpringVelocity: initialSpringVelocity, options: options, animations: animations, completion: $0) } - } - - @discardableResult - static func transition(_: PMKNamespacer, with view: UIView, duration: TimeInterval, options: UIViewAnimationOptions = [], animations: (() -> Void)?) -> Guarantee { - return Guarantee { transition(with: view, duration: duration, options: options, animations: animations, completion: $0) } - } - - @discardableResult - static func transition(_: PMKNamespacer, from: UIView, to: UIView, duration: TimeInterval, options: UIViewAnimationOptions = []) -> Guarantee { - return Guarantee { transition(from: from, to: to, duration: duration, options: options, completion: $0) } - } - - @discardableResult - static func perform(_: PMKNamespacer, animation: UISystemAnimation, on views: [UIView], options: UIViewAnimationOptions = [], animations: (() -> Void)?) -> Guarantee { - return Guarantee { perform(animation, on: views, options: options, animations: animations, completion: $0) } - } -#endif -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIViewController+AnyPromise.h b/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIViewController+AnyPromise.h deleted file mode 100644 index 0e60ca9e7..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIViewController+AnyPromise.h +++ /dev/null @@ -1,71 +0,0 @@ -#import -#import - -/** - To import the `UIViewController` category: - - use_frameworks! - pod "PromiseKit/UIKit" - - Or `UIKit` is one of the categories imported by the umbrella pod: - - use_frameworks! - pod "PromiseKit" - - And then in your sources: - - @import PromiseKit; -*/ -@interface UIViewController (PromiseKit) - -/** - Presents a view controller modally. - - If the view controller is one of the following: - - - MFMailComposeViewController - - MFMessageComposeViewController - - UIImagePickerController - - SLComposeViewController - - Then PromiseKit presents the view controller returning a promise that is - resolved as per the documentation for those classes. Eg. if you present a - `UIImagePickerController` the view controller will be presented for you - and the returned promise will resolve with the media the user selected. - - [self promiseViewController:[MFMailComposeViewController new] animated:YES completion:nil].then(^{ - //… - }); - - Otherwise PromiseKit expects your view controller to implement a - `promise` property. This promise will be returned from this method and - presentation and dismissal of the presented view controller will be - managed for you. - - \@interface MyViewController: UIViewController - @property (readonly) AnyPromise *promise; - @end - - @implementation MyViewController { - PMKResolver resolve; - } - - - (void)viewDidLoad { - _promise = [[AnyPromise alloc] initWithResolver:&resolve]; - } - - - (void)later { - resolve(@"some fulfilled value"); - } - - @end - - [self promiseViewController:[MyViewController new] aniamted:YES completion:nil].then(^(id value){ - // value == @"some fulfilled value" - }); - - @return A promise that can be resolved by the presented view controller. -*/ -- (AnyPromise *)promiseViewController:(UIViewController *)vc animated:(BOOL)animated completion:(void (^)(void))block NS_REFINED_FOR_SWIFT; - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIViewController+AnyPromise.m b/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIViewController+AnyPromise.m deleted file mode 100644 index 5231e55bf..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIViewController+AnyPromise.m +++ /dev/null @@ -1,140 +0,0 @@ -#import -#import "UIViewController+AnyPromise.h" -#import - -#if PMKImagePickerController -#import -#endif - -@interface PMKGenericDelegate : NSObject { -@public - PMKResolver resolve; -} -+ (instancetype)delegateWithPromise:(AnyPromise **)promise; -@end - -@interface UIViewController () -- (AnyPromise*) promise; -@end - -@implementation UIViewController (PromiseKit) - -- (AnyPromise *)promiseViewController:(UIViewController *)vc animated:(BOOL)animated completion:(void (^)(void))block { - __kindof UIViewController *vc2present = vc; - AnyPromise *promise = nil; - - if ([vc isKindOfClass:NSClassFromString(@"MFMailComposeViewController")]) { - PMKGenericDelegate *delegate = [PMKGenericDelegate delegateWithPromise:&promise]; - [vc setValue:delegate forKey:@"mailComposeDelegate"]; - } - else if ([vc isKindOfClass:NSClassFromString(@"MFMessageComposeViewController")]) { - PMKGenericDelegate *delegate = [PMKGenericDelegate delegateWithPromise:&promise]; - [vc setValue:delegate forKey:@"messageComposeDelegate"]; - } -#ifdef PMKImagePickerController - else if ([vc isKindOfClass:[UIImagePickerController class]]) { - PMKGenericDelegate *delegate = [PMKGenericDelegate delegateWithPromise:&promise]; - [vc setValue:delegate forKey:@"delegate"]; - } -#endif - else if ([vc isKindOfClass:NSClassFromString(@"SLComposeViewController")]) { - PMKResolver resolve; - promise = [[AnyPromise alloc] initWithResolver:&resolve]; - [vc setValue:^(NSInteger result){ - if (result == 0) { - resolve([NSError errorWithDomain:NSCocoaErrorDomain code:NSUserCancelledError userInfo:nil]); - } else { - resolve(@(result)); - } - } forKey:@"completionHandler"]; - } - else if ([vc isKindOfClass:[UINavigationController class]]) - vc = [(id)vc viewControllers].firstObject; - - if (!vc) { - id userInfo = @{NSLocalizedDescriptionKey: @"nil or effective nil passed to promiseViewController"}; - id err = [NSError errorWithDomain:PMKErrorDomain code:PMKInvalidUsageError userInfo:userInfo]; - return [AnyPromise promiseWithValue:err]; - } - - if (!promise) { - if (![vc respondsToSelector:@selector(promise)]) { - id userInfo = @{NSLocalizedDescriptionKey: @"ViewController is not promisable"}; - id err = [NSError errorWithDomain:PMKErrorDomain code:PMKInvalidUsageError userInfo:userInfo]; - return [AnyPromise promiseWithValue:err]; - } - - promise = [vc valueForKey:@"promise"]; - - if (![promise isKindOfClass:[AnyPromise class]]) { - id userInfo = @{NSLocalizedDescriptionKey: @"The promise property is nil or not of type AnyPromise"}; - id err = [NSError errorWithDomain:PMKErrorDomain code:PMKInvalidUsageError userInfo:userInfo]; - return [AnyPromise promiseWithValue:err]; - } - } - - if (!promise.pending) - return promise; - - [self presentViewController:vc2present animated:animated completion:block]; - - promise.ensure(^{ - [vc2present.presentingViewController dismissViewControllerAnimated:animated completion:nil]; - }); - - return promise; -} - -@end - - - -@implementation PMKGenericDelegate { - id retainCycle; -} - -+ (instancetype)delegateWithPromise:(AnyPromise **)promise; { - PMKGenericDelegate *d = [PMKGenericDelegate new]; - d->retainCycle = d; - *promise = [[AnyPromise alloc] initWithResolver:&d->resolve]; - return d; -} - -- (void)mailComposeController:(id)controller didFinishWithResult:(int)result error:(NSError *)error { - if (error != nil) { - resolve(error); - } else if (result == 0) { - resolve([NSError errorWithDomain:NSCocoaErrorDomain code:NSUserCancelledError userInfo:nil]); - } else { - resolve(@(result)); - } - retainCycle = nil; -} - -- (void)messageComposeViewController:(id)controller didFinishWithResult:(int)result { - if (result == 2) { - id userInfo = @{NSLocalizedDescriptionKey: @"The attempt to save or send the message was unsuccessful."}; - id error = [NSError errorWithDomain:PMKErrorDomain code:PMKOperationFailed userInfo:userInfo]; - resolve(error); - } else { - resolve(@(result)); - } - retainCycle = nil; -} - -#ifdef PMKImagePickerController - -- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { - id img = info[UIImagePickerControllerEditedImage] ?: info[UIImagePickerControllerOriginalImage]; - resolve(PMKManifold(img, info)); - retainCycle = nil; -} - -- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker { - resolve([NSError errorWithDomain:NSCocoaErrorDomain code:NSUserCancelledError userInfo:nil]); - retainCycle = nil; -} - -#endif - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIViewPropertyAnimator+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIViewPropertyAnimator+Promise.swift deleted file mode 100644 index 34ee14084..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Sources/UIViewPropertyAnimator+Promise.swift +++ /dev/null @@ -1,14 +0,0 @@ -#if !PMKCocoaPods -import PromiseKit -#endif -import UIKit - -@available(iOS 10, tvOS 10, *) -public extension UIViewPropertyAnimator { - func startAnimation(_: PMKNamespacer) -> Guarantee { - return Guarantee { - addCompletion($0) - startAnimation() - } - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Tests/TestUIImagePickerController.swift b/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Tests/TestUIImagePickerController.swift deleted file mode 100644 index abefe68c1..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Tests/TestUIImagePickerController.swift +++ /dev/null @@ -1,34 +0,0 @@ -import PromiseKit -import PMKUIKit -import XCTest -import UIKit - -#if os(iOS) - -class Test_UIImagePickerController_Swift: XCTestCase { - func test() { - class Mock: UIViewController { - var info = [String:AnyObject]() - - override func present(_ vc: UIViewController, animated flag: Bool, completion: (() -> Void)?) { - let ipc = vc as! UIImagePickerController - after(seconds: 0.05).done { - ipc.delegate?.imagePickerController?(ipc, didFinishPickingMediaWithInfo: self.info) - } - } - } - - let (originalImage, editedImage) = (UIImage(), UIImage()) - - let mockvc = Mock() - mockvc.info = [UIImagePickerControllerOriginalImage: originalImage, UIImagePickerControllerEditedImage: editedImage] - - let ex = expectation(description: "") - mockvc.promise(UIImagePickerController(), animate: []).done { _ in - ex.fulfill() - } - waitForExpectations(timeout: 10, handler: nil) - } -} - -#endif diff --git a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Tests/TestUIView.swift b/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Tests/TestUIView.swift deleted file mode 100644 index dd3b4fd5b..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Tests/TestUIView.swift +++ /dev/null @@ -1,19 +0,0 @@ -import PromiseKit -import PMKUIKit -import XCTest -import UIKit - -class UIViewTests: XCTestCase { - func test() { - let ex1 = expectation(description: "") - let ex2 = expectation(description: "") - - UIView.animate(.promise, duration: 0.1) { - ex1.fulfill() - }.done { _ in - ex2.fulfill() - } - - waitForExpectations(timeout: 1) - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Tests/TestUIViewController.m b/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Tests/TestUIViewController.m deleted file mode 100644 index 742660129..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Tests/TestUIViewController.m +++ /dev/null @@ -1,135 +0,0 @@ -@import PromiseKit; -@import PMKUIKit; -@import XCTest; -@import UIKit; - - -@interface MyViewController: UIViewController -@property AnyPromise *promise; -@end -@implementation MyViewController -@end - - -@implementation UIViewControllerTests: XCTestCase { - UIViewController *rootvc; -} - -- (void)setUp { - rootvc = [UIApplication sharedApplication].keyWindow.rootViewController = [UIViewController new]; -} - -- (void)tearDown { - [UIApplication sharedApplication].keyWindow.rootViewController = nil; -} - -// view controller is presented and dismissed when promise is resolved -- (void)test1 { - XCTestExpectation *ex = [self expectationWithDescription:@""]; - - PMKResolver resolve; - - MyViewController *myvc = [MyViewController new]; - myvc.promise = [[AnyPromise alloc] initWithResolver:&resolve]; - [rootvc promiseViewController:myvc animated:NO completion:nil].then(^{ - // seems to take another tick for the dismissal to complete - }).then(^{ - [ex fulfill]; - }); - - XCTAssertNotNil(rootvc.presentedViewController); - - PMKAfter(1).then(^{ - resolve(@1); - }); - - [self waitForExpectationsWithTimeout:10 handler:nil]; - - XCTAssertNil(rootvc.presentedViewController); -} - -// view controller is not presented if promise is resolved -- (void)test2 { - MyViewController *myvc = [MyViewController new]; - myvc.promise = [AnyPromise promiseWithValue:nil]; - [rootvc promiseViewController:myvc animated:NO completion:nil]; - - XCTAssertNil(rootvc.presentedViewController); -} - -// promise property must be promise -- (void)test3 { - XCTestExpectation *ex = [self expectationWithDescription:@""]; - - MyViewController *myvc = [MyViewController new]; - myvc.promise = (id) @1; - [rootvc promiseViewController:myvc animated:NO completion:nil].catch(^(id err){ - [ex fulfill]; - }); - - XCTAssertNil(rootvc.presentedViewController); - - [self waitForExpectationsWithTimeout:10 handler:nil]; - - XCTAssertNil(rootvc.presentedViewController); -} - -// promise property must not be nil -- (void)test4 { - XCTestExpectation *ex = [self expectationWithDescription:@""]; - - MyViewController *myvc = [MyViewController new]; - [rootvc promiseViewController:myvc animated:NO completion:nil].catch(^(id err){ - [ex fulfill]; - }); - - XCTAssertNil(rootvc.presentedViewController); - - [self waitForExpectationsWithTimeout:10 handler:nil]; - - XCTAssertNil(rootvc.presentedViewController); -} - -// view controller must have a promise property -- (void)test5 { - XCTestExpectation *ex = [self expectationWithDescription:@""]; - - UIViewController *vc = [UIViewController new]; - [rootvc promiseViewController:vc animated:NO completion:nil].catch(^(id err){ - [ex fulfill]; - }); - - XCTAssertNil(rootvc.presentedViewController); - - [self waitForExpectationsWithTimeout:10 handler:nil]; - - XCTAssertNil(rootvc.presentedViewController); -} - -// promised nav controllers use their root vc’s promise property -- (void)test6 { - XCTestExpectation *ex = [self expectationWithDescription:@""]; - - PMKResolver resolve; - - MyViewController *myvc = [MyViewController new]; - UINavigationController *nc = [[UINavigationController alloc] initWithRootViewController:myvc]; - myvc.promise = [[AnyPromise alloc] initWithResolver:&resolve]; - [rootvc promiseViewController:nc animated:NO completion:nil].then(^(id obj){ - XCTAssertEqualObjects(@1, obj); - }).then(^{ - [ex fulfill]; - }); - - XCTAssertNotNil(rootvc.presentedViewController); - - PMKAfter(1).then(^{ - resolve(@1); - }); - - [self waitForExpectationsWithTimeout:10 handler:nil]; - - XCTAssertNil(rootvc.presentedViewController); -} - -@end diff --git a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Tests/infrastructure.swift b/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Tests/infrastructure.swift deleted file mode 100644 index 6d384271c..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/Tests/infrastructure.swift +++ /dev/null @@ -1,16 +0,0 @@ -import XCTest -import UIKit - -extension XCTestCase { - var rootvc: UIViewController { - return UIApplication.shared.keyWindow!.rootViewController! - } - - override open func setUp() { - UIApplication.shared.keyWindow!.rootViewController = UIViewController() - } - - override open func tearDown() { - UIApplication.shared.keyWindow!.rootViewController = nil - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/UITests/Default-568h@2x.png b/Carthage/Checkouts/PromiseKit/Extensions/UIKit/UITests/Default-568h@2x.png deleted file mode 100644 index 42d3f4250..000000000 Binary files a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/UITests/Default-568h@2x.png and /dev/null differ diff --git a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/UITests/Entitlements.plist b/Carthage/Checkouts/PromiseKit/Extensions/UIKit/UITests/Entitlements.plist deleted file mode 100644 index 76a15bb46..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/UITests/Entitlements.plist +++ /dev/null @@ -1,12 +0,0 @@ - - - - - com.apple.private.tcc.allow - - kTCCServiceAddressBook - kTCCServiceCalendar - kTCCServicePhotos - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/UITests/TestUIImagePickerController.swift b/Carthage/Checkouts/PromiseKit/Extensions/UIKit/UITests/TestUIImagePickerController.swift deleted file mode 100644 index 43c7bf376..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/UITests/TestUIImagePickerController.swift +++ /dev/null @@ -1,61 +0,0 @@ -import XCTest - -class UIImagePickerControllerTests: XCTestCase { - var button: XCUIElement { - // calling this ensures that any other ViewController has dismissed - // as a side-effect since otherwise the switch won't be found - return XCUIApplication().tables.buttons.element - } - - var value: Bool { - return button.isEnabled - } - - override func setUp() { - super.setUp() - continueAfterFailure = false - XCUIApplication().launch() - XCTAssertFalse(value) - } - -#if !os(tvOS) - // this test works locally but not on travis - // attempting to detect Travis and early-return did not work - func test_rejects_when_cancelled() { - let app = XCUIApplication() - let table = app.tables - table.cells.staticTexts["1"].tap() - table.cells.element(boundBy: 0).tap() - app.navigationBars.buttons["Cancel"].tap() - - XCTAssertTrue(value) - } - - // following two don't seem to work since Xcode 8.1 - // The UI-Testing infrastructure cannot “see” the image picking UI - // And… trying to re-record by hand fails. - - func test_fulfills_with_edited_image() { - let app = XCUIApplication() - app.tables.cells.staticTexts["2"].tap() - app.tables.children(matching: .cell).element(boundBy: 1).tap() - app.collectionViews.children(matching: .cell).element(boundBy: 0).tap() - - // XCUITesting fails to tap this button, hence this test disabled - app.buttons["Choose"].tap() - - XCTAssertTrue(value) - } - - func test_fulfills_with_image() { - let app = XCUIApplication() - let tablesQuery = app.tables - tablesQuery.staticTexts["3"].tap() - tablesQuery.children(matching: .cell).element(boundBy: 1).tap() - - app.collectionViews.children(matching: .cell).element(boundBy: 0).tap() - - XCTAssertTrue(value) - } -#endif -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/UITests/app.swift b/Carthage/Checkouts/PromiseKit/Extensions/UIKit/UITests/app.swift deleted file mode 100644 index f46e00823..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/UIKit/UITests/app.swift +++ /dev/null @@ -1,100 +0,0 @@ -import PromiseKit -import PMKUIKit -import UIKit - -@UIApplicationMain -class App: UITableViewController, UIApplicationDelegate { - var window: UIWindow? = UIWindow(frame: UIScreen.main.bounds) - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]? = nil) -> Bool { - window!.rootViewController = self - window!.backgroundColor = UIColor.purple - window!.makeKeyAndVisible() - UIView.setAnimationsEnabled(false) - return true - } - - override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - return Row.count - } - - override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - let cell = UITableViewCell() - cell.textLabel?.text = Row(indexPath)?.description - return cell - } - - let testSuceededButton = UIButton() - - override func viewDidLoad() { - testSuceededButton.setTitle("unused", for: .normal) - testSuceededButton.sizeToFit() - testSuceededButton.backgroundColor = UIColor.blue - testSuceededButton.isEnabled = false - - view.addSubview(testSuceededButton) - } - - override func viewDidLayoutSubviews() { - testSuceededButton.center = view.center - } - - private func success() { - self.testSuceededButton.isEnabled = true - } - -#if !os(tvOS) - override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { - switch Row(indexPath)! { - case .ImagePickerCancel: - let p = promise(UIImagePickerController()) - p.catch(policy: .allErrors) { error in - guard (error as! CancellableError).isCancelled else { abort() } - self.success() - } - p.catch { error in - abort() - } - case .ImagePickerEditImage: - let picker = UIImagePickerController() - picker.allowsEditing = true - _ = promise(picker).done { _ in - self.success() - } - case .ImagePickerPickImage: - _ = promise(UIImagePickerController()).done { image in - self.success() - } - } - } -#endif -} - -enum Row: Int { - case ImagePickerCancel - case ImagePickerEditImage - case ImagePickerPickImage - - init?(_ indexPath: IndexPath) { - guard let row = Row(rawValue: indexPath.row) else { - return nil - } - self = row - } - - var indexPath: IndexPath { - return IndexPath(row: rawValue, section: 0) - } - - var description: String { - return (rawValue + 1).description - } - - static var count: Int { - var x = 0 - while Row(rawValue: x) != nil { - x += 1 - } - return x - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/.gitignore b/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/.gitignore deleted file mode 100644 index bec9c1741..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.xcodeproj/**/xcuserdata/ -*.xcscmblueprint -/Carthage -/.build -.DS_Store \ No newline at end of file diff --git a/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/.travis.yml b/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/.travis.yml deleted file mode 100644 index 738b34acc..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/.travis.yml +++ /dev/null @@ -1,78 +0,0 @@ -osx_image: xcode10.2 -language: swift -os: osx - -branches: - only: - - master -stages: - - lint - - carthage - - test -jobs: - include: - - &pod - stage: lint - osx_image: xcode8.3 - env: SWIFT=3.1 - cache: cocoapods - before_install: - gem install cocoapods --prerelease --version 1.7.0.beta.3 - install: - carthage bootstrap --no-build PromiseKit - script: | - cd Carthage/Checkouts/PromiseKit - mv .github/PromiseKit.podspec . - rm -rf Extensions/WatchConnectivity/Sources - cp -R ../../../Sources Extensions/WatchConnectivity - pod lib lint --subspec=PromiseKit/WatchConnectivity --fail-fast --swift-version=$SWIFT - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=3.2 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=3.3 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=3.4 - - <<: *pod - osx_image: xcode9.2 - env: SWIFT=4.0 - - <<: *pod - osx_image: xcode9.4 - env: SWIFT=4.1 - - <<: *pod - osx_image: xcode10.1 - env: SWIFT=4.2 - - <<: *pod - osx_image: xcode10.2 - env: SWIFT=4.3 - - <<: *pod - osx_image: xcode10.2 - env: SWIFT=5.0 - - - &carthage - stage: carthage - osx_image: xcode9.2 - script: | - carthage bootstrap --cache-builds --platform iOS,macOS - sed -i '' "s/SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;/SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;/" *.xcodeproj/project.pbxproj - carthage build --no-skip-current - cache: - directories: - - Carthage - - <<: *carthage - osx_image: xcode9.4 - - <<: *carthage - osx_image: xcode10.1 - - <<: *carthage - osx_image: xcode10.2 - - - stage: test - xcode_scheme: PMKWatchConnectivity - xcode_project: PMKWatchConnectivity.xcodeproj - xcode_destination: 'platform=iOS Simulator,OS=12.2,name=iPhone SE' - cache.directories: - - Carthage - before_script: - carthage bootstrap --cache-builds --no-use-binaries diff --git a/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/Cartfile b/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/Cartfile deleted file mode 100644 index d4703e986..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" ~> 6.8.4 diff --git a/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/Cartfile.resolved b/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/Cartfile.resolved deleted file mode 100644 index f54bbdbf2..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/Cartfile.resolved +++ /dev/null @@ -1 +0,0 @@ -github "mxcl/PromiseKit" "6.8.4" diff --git a/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/Carthage.xcconfig b/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/Carthage.xcconfig deleted file mode 100644 index c8b995651..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/Carthage.xcconfig +++ /dev/null @@ -1,7 +0,0 @@ -// Created by Kevin Ballard on 12/14/15. -// Copyright © 2015 Postmates. All rights reserved. - -FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(SRCROOT)/Carthage/Build/Mac/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=iphone*] = $(SRCROOT)/Carthage/Build/iOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=watch*] = $(SRCROOT)/Carthage/Build/watchOS/ $(inherited) -FRAMEWORK_SEARCH_PATHS[sdk=appletv*] = $(SRCROOT)/Carthage/Build/tvOS/ $(inherited) diff --git a/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/Info.plist b/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/Info.plist deleted file mode 100644 index fbe1e6b31..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/LICENSE b/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/LICENSE deleted file mode 100644 index 50f758c89..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2016-present, Max Howell; mxcl@me.com - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/PMKWatchConnectivity.xcodeproj/project.pbxproj b/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/PMKWatchConnectivity.xcodeproj/project.pbxproj deleted file mode 100644 index c0442276c..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/PMKWatchConnectivity.xcodeproj/project.pbxproj +++ /dev/null @@ -1,450 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 6384FB811D5D4F6D00453755 /* WCSession+Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6384FB801D5D4F6D00453755 /* WCSession+Promise.swift */; }; - 6384FB831D5D4F8B00453755 /* TestWatchConnectivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6384FB821D5D4F8B00453755 /* TestWatchConnectivity.swift */; }; - 63C7FFF71D5C020D003BAE60 /* PMKWatchConnectivity.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C7FFA71D5BEE09003BAE60 /* PMKWatchConnectivity.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 63C7FF9E1D5BEE09003BAE60 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 63C7FFA61D5BEE09003BAE60; - remoteInfo = PMKWatchConnectivity; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 6384FB801D5D4F6D00453755 /* WCSession+Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "WCSession+Promise.swift"; path = "Sources/WCSession+Promise.swift"; sourceTree = SOURCE_ROOT; }; - 6384FB821D5D4F8B00453755 /* TestWatchConnectivity.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TestWatchConnectivity.swift; path = Tests/TestWatchConnectivity.swift; sourceTree = SOURCE_ROOT; }; - 63C700091D5C0253003BAE60 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 63C7FFA71D5BEE09003BAE60 /* PMKWatchConnectivity.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PMKWatchConnectivity.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 63C7FFF21D5C020D003BAE60 /* PMKWCTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PMKWCTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 63CCF8121D5C0C4E00503216 /* Cartfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile; sourceTree = ""; }; - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Carthage.xcconfig; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 63C7FFA31D5BEE09003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEF1D5C020D003BAE60 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 63C7FFF71D5C020D003BAE60 /* PMKWatchConnectivity.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 63C7FF9D1D5BEE09003BAE60 = { - isa = PBXGroup; - children = ( - 63C700091D5C0253003BAE60 /* Info.plist */, - 63CCF8121D5C0C4E00503216 /* Cartfile */, - 63CCF8171D5C11B500503216 /* Carthage.xcconfig */, - 63C7FFA91D5BEE09003BAE60 /* Sources */, - 63C7FFF31D5C020D003BAE60 /* Tests */, - 63C7FFA81D5BEE09003BAE60 /* Products */, - ); - sourceTree = ""; - }; - 63C7FFA81D5BEE09003BAE60 /* Products */ = { - isa = PBXGroup; - children = ( - 63C7FFA71D5BEE09003BAE60 /* PMKWatchConnectivity.framework */, - 63C7FFF21D5C020D003BAE60 /* PMKWCTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 63C7FFA91D5BEE09003BAE60 /* Sources */ = { - isa = PBXGroup; - children = ( - 6384FB801D5D4F6D00453755 /* WCSession+Promise.swift */, - ); - path = Sources; - sourceTree = SOURCE_ROOT; - }; - 63C7FFF31D5C020D003BAE60 /* Tests */ = { - isa = PBXGroup; - children = ( - 6384FB821D5D4F8B00453755 /* TestWatchConnectivity.swift */, - ); - path = Tests; - sourceTree = SOURCE_ROOT; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 63C7FFA41D5BEE09003BAE60 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 63C7FFA61D5BEE09003BAE60 /* PMKWatchConnectivity */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKWatchConnectivity" */; - buildPhases = ( - 63C7FFA21D5BEE09003BAE60 /* Sources */, - 63C7FFA31D5BEE09003BAE60 /* Frameworks */, - 63C7FFA41D5BEE09003BAE60 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PMKWatchConnectivity; - productName = "PMK+UIKit"; - productReference = 63C7FFA71D5BEE09003BAE60 /* PMKWatchConnectivity.framework */; - productType = "com.apple.product-type.framework"; - }; - 63C7FFF11D5C020D003BAE60 /* PMKWCTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKWCTests" */; - buildPhases = ( - 63C7FFEE1D5C020D003BAE60 /* Sources */, - 63C7FFEF1D5C020D003BAE60 /* Frameworks */, - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */, - ); - name = PMKWCTests; - productName = PMKTests/NS; - productReference = 63C7FFF21D5C020D003BAE60 /* PMKWCTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 63C7FF9E1D5BEE09003BAE60 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = "Max Howell"; - TargetAttributes = { - 63C7FFA61D5BEE09003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - 63C7FFF11D5C020D003BAE60 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1020; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKWatchConnectivity" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 63C7FF9D1D5BEE09003BAE60; - productRefGroup = 63C7FFA81D5BEE09003BAE60 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 63C7FFA61D5BEE09003BAE60 /* PMKWatchConnectivity */, - 63C7FFF11D5C020D003BAE60 /* PMKWCTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXShellScriptBuildPhase section */ - 639447051D5D011300DDAE3C /* Embed Carthage Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - PromiseKit, - ); - name = "Embed Carthage Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "case \"$PLATFORM_NAME\" in\nmacosx) plat=Mac;;\niphone*) plat=iOS;;\nwatch*) plat=watchOS;;\nappletv*) plat=tvOS;;\n*) echo \"error: Unknown PLATFORM_NAME: $PLATFORM_NAME\"; exit 1;;\nesac\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nframework=$(basename \"${!VAR}\")\nexport SCRIPT_INPUT_FILE_$n=\"$SRCROOT\"/Carthage/Build/$plat/\"$framework\".framework\ndone\n\n/usr/local/bin/carthage copy-frameworks || exit\n\nfor (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do\nVAR=SCRIPT_INPUT_FILE_$n\nsource=${!VAR}.dSYM\ndest=${BUILT_PRODUCTS_DIR}/$(basename \"$source\")\nditto \"$source\" \"$dest\" || exit\ndone"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 63C7FFA21D5BEE09003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6384FB811D5D4F6D00453755 /* WCSession+Promise.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63C7FFEE1D5C020D003BAE60 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6384FB831D5D4F8B00453755 /* TestWatchConnectivity.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 63C7FFF91D5C020D003BAE60 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 63C7FFA61D5BEE09003BAE60 /* PMKWatchConnectivity */; - targetProxy = 63C7FFF81D5C020D003BAE60 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 63C7FFAD1D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.Foundation; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos watchsimulator watchos"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Debug; - }; - 63C7FFAE1D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.Foundation; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos watchsimulator watchos"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - TVOS_DEPLOYMENT_TARGET = 9.0; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Release; - }; - 63C7FFB01D5BEE09003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Debug; - }; - 63C7FFB11D5BEE09003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_MODULE_NAME = "${TARGET_NAME}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - }; - name = Release; - }; - 63C7FFFB1D5C020D003BAE60 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SUPPRESS_WARNINGS = YES; - }; - name = Debug; - }; - 63C7FFFC1D5C020D003BAE60 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SUPPRESS_WARNINGS = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKWatchConnectivity" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFAD1D5BEE09003BAE60 /* Debug */, - 63C7FFAE1D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFAF1D5BEE09003BAE60 /* Build configuration list for PBXNativeTarget "PMKWatchConnectivity" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFB01D5BEE09003BAE60 /* Debug */, - 63C7FFB11D5BEE09003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63C7FFFA1D5C020D003BAE60 /* Build configuration list for PBXNativeTarget "PMKWCTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63C7FFFB1D5C020D003BAE60 /* Debug */, - 63C7FFFC1D5C020D003BAE60 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 63C7FF9E1D5BEE09003BAE60 /* Project object */; -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/PMKWatchConnectivity.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/PMKWatchConnectivity.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index b49fefe7f..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/PMKWatchConnectivity.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/PMKWatchConnectivity.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/PMKWatchConnectivity.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/PMKWatchConnectivity.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/PMKWatchConnectivity.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/PMKWatchConnectivity.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index 08de0be8d..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/PMKWatchConnectivity.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/PMKWatchConnectivity.xcodeproj/xcshareddata/xcschemes/PMKWatchConnectivity.xcscheme b/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/PMKWatchConnectivity.xcodeproj/xcshareddata/xcschemes/PMKWatchConnectivity.xcscheme deleted file mode 100644 index 5ca9a0df5..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/PMKWatchConnectivity.xcodeproj/xcshareddata/xcschemes/PMKWatchConnectivity.xcscheme +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/README.markdown b/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/README.markdown deleted file mode 100644 index 069026f36..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/README.markdown +++ /dev/null @@ -1,34 +0,0 @@ -# PromiseKit WatchConnectivity Extensions ![Build Status] - -This project adds promises to Apple’s WatchConnectivity framework. - -## CocoaPods - -```ruby -pod "PromiseKit/WatchConnectivity" ~> 6.0 -``` - -The extensions are built into `PromiseKit.framework` thus nothing else is needed. - -## Carthage - -```ruby -github "PromiseKit/WatchConnectivity" ~> 3.0 -``` - -The extensions are built into their own framework: - -```swift -// swift -import PromiseKit -import PMKWatchConnectivity -``` - -```objc -// objc -@import PromiseKit; -@import PMKWatchConnectivity; -``` - - -[Build Status]: https://travis-ci.org/PromiseKit/WatchConnectivity.svg?branch=master diff --git a/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/Sources/WCSession+Promise.swift b/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/Sources/WCSession+Promise.swift deleted file mode 100644 index 934d51b5f..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/Sources/WCSession+Promise.swift +++ /dev/null @@ -1,21 +0,0 @@ -import WatchConnectivity -import Foundation -#if !PMKCocoaPods -import PromiseKit -#endif - - -@available(iOS 9.0, *) -@available(iOSApplicationExtension 9.0, *) -extension WCSession { - - /// Sends a message immediately to the paired and active device and optionally handles a response. - public func sendMessage(_ message: [String: Any]) -> Promise<[String: Any]> { - return Promise { sendMessage(message, replyHandler: $0.fulfill, errorHandler: $0.reject) } - } - - /// Sends a data object immediately to the paired and active device and optionally handles a response. - public func sendMessageData(_ data: Data) -> Promise { - return Promise { sendMessageData(data, replyHandler: $0.fulfill, errorHandler: $0.reject) } - } -} diff --git a/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/Tests/TestWatchConnectivity.swift b/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/Tests/TestWatchConnectivity.swift deleted file mode 100644 index d19635e9c..000000000 --- a/Carthage/Checkouts/PromiseKit/Extensions/WatchConnectivity/Tests/TestWatchConnectivity.swift +++ /dev/null @@ -1,52 +0,0 @@ -import PMKWatchConnectivity -import WatchConnectivity -import PromiseKit -import XCTest - -class WatchConnectivityTests: XCTestCase { - class MockSession: WCSession { - - var fail = false - - override func sendMessage(_ message: [String : Any], replyHandler: (([String : Any]) -> Void)?, errorHandler: ((Error) -> Void)?) { - if fail { - errorHandler?(NSError(domain: "Test", code: 1, userInfo: [:])) - } else { - replyHandler?(["response": "Success"]) - } - } - } - - func testSuccess() { - - let ex = expectation(description: "Success callback") - let session = MockSession.default as! MockSession - session.fail = false - session.sendMessage(["message": "test"]).done { response in - XCTAssertEqual(response as! [String: String], ["response": "Success"]) - ex.fulfill() - }.catch { _ in - XCTFail("Should not fail") - } - waitForExpectations(timeout: 1, handler: nil) - } - - func testFailure() { - class MockFailSession: WCSession { - override func sendMessage(_ message: [String : Any], replyHandler: (([String : Any]) -> Void)?, errorHandler: ((Error) -> Void)?) { - errorHandler?(NSError(domain: "Test", code: 1, userInfo: [:])) - } - } - - let ex = expectation(description: "Error callback") - let session = MockSession.default as! MockSession - session.fail = true - session.sendMessage(["message": "test"]).done { response in - XCTFail("Should not succeed") - }.catch { error in - XCTAssertEqual((error as NSError).domain, "Test") - ex.fulfill() - } - waitForExpectations(timeout: 1, handler: nil) - } -} diff --git a/Carthage/Checkouts/PromiseKit/LICENSE b/Carthage/Checkouts/PromiseKit/LICENSE deleted file mode 100644 index 50f758c89..000000000 --- a/Carthage/Checkouts/PromiseKit/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2016-present, Max Howell; mxcl@me.com - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Carthage/Checkouts/PromiseKit/Package.swift b/Carthage/Checkouts/PromiseKit/Package.swift deleted file mode 100644 index d96717491..000000000 --- a/Carthage/Checkouts/PromiseKit/Package.swift +++ /dev/null @@ -1,30 +0,0 @@ -// swift-tools-version:4.0 - -import PackageDescription - -let pkg = Package(name: "PromiseKit") -pkg.products = [ - .library(name: "PromiseKit", targets: ["PromiseKit"]), -] - -let pmk: Target = .target(name: "PromiseKit") -pmk.path = "Sources" -pmk.exclude = [ - "AnyPromise.swift", - "AnyPromise.m", - "PMKCallVariadicBlock.m", - "dispatch_promise.m", - "join.m", - "when.m", - "NSMethodSignatureForBlock.m", - "after.m", - "hang.m", - "race.m", - "Deprecations.swift" -] -pkg.swiftLanguageVersions = [3, 4, 5] -pkg.targets = [ - pmk, - .testTarget(name: "APlus", dependencies: ["PromiseKit"], path: "Tests/A+"), - .testTarget(name: "CorePromise", dependencies: ["PromiseKit"], path: "Tests/CorePromise"), -] diff --git a/Carthage/Checkouts/PromiseKit/Package@swift-4.2.swift b/Carthage/Checkouts/PromiseKit/Package@swift-4.2.swift deleted file mode 100644 index 571ea6b28..000000000 --- a/Carthage/Checkouts/PromiseKit/Package@swift-4.2.swift +++ /dev/null @@ -1,30 +0,0 @@ -// swift-tools-version:4.2 - -import PackageDescription - -let pkg = Package(name: "PromiseKit") -pkg.products = [ - .library(name: "PromiseKit", targets: ["PromiseKit"]), -] - -let pmk: Target = .target(name: "PromiseKit") -pmk.path = "Sources" -pmk.exclude = [ - "AnyPromise.swift", - "AnyPromise.m", - "PMKCallVariadicBlock.m", - "dispatch_promise.m", - "join.m", - "when.m", - "NSMethodSignatureForBlock.m", - "after.m", - "hang.m", - "race.m", - "Deprecations.swift" -] -pkg.swiftLanguageVersions = [.v3, .v4, .v4_2] -pkg.targets = [ - pmk, - .testTarget(name: "APlus", dependencies: ["PromiseKit"], path: "Tests/A+"), - .testTarget(name: "CorePromise", dependencies: ["PromiseKit"], path: "Tests/CorePromise"), -] diff --git a/Carthage/Checkouts/PromiseKit/Package@swift-5.0.swift b/Carthage/Checkouts/PromiseKit/Package@swift-5.0.swift deleted file mode 100644 index 5d1ea438f..000000000 --- a/Carthage/Checkouts/PromiseKit/Package@swift-5.0.swift +++ /dev/null @@ -1,33 +0,0 @@ -// swift-tools-version:5.0 - -import PackageDescription - -let pkg = Package(name: "PromiseKit") -pkg.platforms = [ - .macOS(.v10_10), .iOS(.v8), .tvOS(.v9), .watchOS(.v2) -] -pkg.products = [ - .library(name: "PromiseKit", targets: ["PromiseKit"]), -] - -let pmk: Target = .target(name: "PromiseKit") -pmk.path = "Sources" -pmk.exclude = [ - "AnyPromise.swift", - "AnyPromise.m", - "PMKCallVariadicBlock.m", - "dispatch_promise.m", - "join.m", - "when.m", - "NSMethodSignatureForBlock.m", - "after.m", - "hang.m", - "race.m", - "Deprecations.swift" -] -pkg.swiftLanguageVersions = [.v4, .v4_2, .v5] -pkg.targets = [ - pmk, - .testTarget(name: "APlus", dependencies: ["PromiseKit"], path: "Tests/A+"), - .testTarget(name: "CorePromise", dependencies: ["PromiseKit"], path: "Tests/CorePromise"), -] diff --git a/Carthage/Checkouts/PromiseKit/Package@swift-5.3.swift b/Carthage/Checkouts/PromiseKit/Package@swift-5.3.swift deleted file mode 100644 index 0c4bf4d24..000000000 --- a/Carthage/Checkouts/PromiseKit/Package@swift-5.3.swift +++ /dev/null @@ -1,34 +0,0 @@ -// swift-tools-version:5.3 - -import PackageDescription - -let pkg = Package(name: "PromiseKit") -pkg.platforms = [ - .macOS(.v10_10), .iOS(.v9), .tvOS(.v9), .watchOS(.v2) -] -pkg.products = [ - .library(name: "PromiseKit", targets: ["PromiseKit"]), -] - -let pmk: Target = .target(name: "PromiseKit") -pmk.path = "Sources" -pmk.exclude = [ - "AnyPromise.swift", - "AnyPromise.m", - "PMKCallVariadicBlock.m", - "dispatch_promise.m", - "join.m", - "when.m", - "NSMethodSignatureForBlock.m", - "after.m", - "hang.m", - "race.m", - "Deprecations.swift", - "Info.plist" -] -pkg.swiftLanguageVersions = [.v4, .v4_2, .v5] -pkg.targets = [ - pmk, - .testTarget(name: "APlus", dependencies: ["PromiseKit"], path: "Tests/A+", exclude: ["README.md"]), - .testTarget(name: "CorePromise", dependencies: ["PromiseKit"], path: "Tests/CorePromise"), -] diff --git a/Carthage/Checkouts/PromiseKit/PromiseKit.playground/Contents.swift b/Carthage/Checkouts/PromiseKit/PromiseKit.playground/Contents.swift deleted file mode 100644 index 3ade47e96..000000000 --- a/Carthage/Checkouts/PromiseKit/PromiseKit.playground/Contents.swift +++ /dev/null @@ -1,27 +0,0 @@ -import PlaygroundSupport - -// Is this erroring? If so open the `.xcodeproj` and build the -// framework for a macOS target (usually labeled: “My Mac”). -// Then select `PromiseKit.playground` from inside Xcode. -import PromiseKit - - -func promise3() -> Promise { - return after(.seconds(1)).map{ 3 } -} - -firstly { - Promise.value(1) -}.map { _ in - 2 -}.then { _ in - promise3() -}.done { - print($0) // => 3 -}.catch { error in - // only happens for errors -}.finally { - PlaygroundPage.current.finishExecution() -} - -PlaygroundPage.current.needsIndefiniteExecution = true diff --git a/Carthage/Checkouts/PromiseKit/PromiseKit.playground/contents.xcplayground b/Carthage/Checkouts/PromiseKit/PromiseKit.playground/contents.xcplayground deleted file mode 100644 index e6f503930..000000000 --- a/Carthage/Checkouts/PromiseKit/PromiseKit.playground/contents.xcplayground +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/Carthage/Checkouts/PromiseKit/PromiseKit.podspec b/Carthage/Checkouts/PromiseKit/PromiseKit.podspec deleted file mode 100644 index 8d6679551..000000000 --- a/Carthage/Checkouts/PromiseKit/PromiseKit.podspec +++ /dev/null @@ -1,277 +0,0 @@ -Pod::Spec.new do |s| - s.name = "PromiseKit" - - s.version = '6.16.1' - - s.source = { - :git => "https://github.com/mxcl/#{s.name}.git", - :tag => s.version, - :submodules => true - } - - s.license = 'MIT' - s.summary = 'Promises for Swift & ObjC.' - s.homepage = 'http://mxcl.dev/PromiseKit/' - s.description = 'A thoughtful and complete implementation of promises for iOS, macOS, watchOS and tvOS with first-class support for both Objective-C and Swift.' - s.social_media_url = 'https://twitter.com/mxcl' - s.authors = { 'Max Howell' => 'mxcl@me.com' } - s.documentation_url = 'http://mxcl.dev/PromiseKit/reference/v6/Classes/Promise.html' - s.default_subspecs = 'CorePromise', 'UIKit', 'Foundation' - s.requires_arc = true - - s.swift_versions = ['3.2', '3.3', '3.4', '4.0', '4.1', '4.2', '4.3', '4.4', '5.0', '5.1', '5.2', '5.3', '5.4'] - - # CocoaPods requires us to specify the root deployment targets - # even though for us it is nonsense. Our root spec has no - # sources. - s.ios.deployment_target = '8.0' - s.osx.deployment_target = '10.10' - s.watchos.deployment_target = '2.0' - s.tvos.deployment_target = '9.0' - - s.pod_target_xcconfig = { - 'OTHER_SWIFT_FLAGS' => '-DPMKCocoaPods', - } - - s.subspec 'Accounts' do |ss| - ss.ios.source_files = ss.osx.source_files = 'Extensions/Accounts/Sources/*' - ss.ios.frameworks = ss.osx.frameworks = 'Accounts' - ss.dependency 'PromiseKit/CorePromise' - ss.ios.deployment_target = '8.0' - ss.osx.deployment_target = '10.10' - end - - s.subspec 'Alamofire' do |ss| - ss.source_files = 'Extensions/Alamofire/Sources/*' - ss.dependency 'Alamofire', '~> 4.0' - ss.dependency 'PromiseKit/CorePromise' - ss.ios.deployment_target = '8.0' - ss.osx.deployment_target = '10.11' - ss.watchos.deployment_target = '2.0' - ss.tvos.deployment_target = '9.0' - end - - s.subspec 'AddressBook' do |ss| - ss.ios.source_files = 'Extensions/AddressBook/Sources/*' - ss.ios.frameworks = 'AddressBook' - ss.dependency 'PromiseKit/CorePromise' - ss.ios.deployment_target = '8.0' - end - - s.subspec 'AssetsLibrary' do |ss| - ss.ios.source_files = 'Extensions/AssetsLibrary/Sources/*' - ss.ios.frameworks = 'AssetsLibrary' - ss.dependency 'PromiseKit/CorePromise' - ss.ios.deployment_target = '8.0' - end - - s.subspec 'AVFoundation' do |ss| - ss.ios.source_files = 'Extensions/AVFoundation/Sources/*' - ss.ios.frameworks = 'AVFoundation' - ss.dependency 'PromiseKit/CorePromise' - ss.ios.deployment_target = '8.0' - end - - s.subspec 'Bolts' do |ss| - ss.source_files = 'Extensions/Bolts/Sources/*' - ss.dependency 'PromiseKit/CorePromise' - ss.dependency 'Bolts', '~> 1.9.0' - ss.ios.deployment_target = '8.0' - ss.osx.deployment_target = '10.10' - ss.watchos.deployment_target = '2.0' - ss.tvos.deployment_target = '9.0' - end - - s.subspec 'CloudKit' do |ss| - ss.source_files = 'Extensions/CloudKit/Sources/*' - ss.frameworks = 'CloudKit' - ss.dependency 'PromiseKit/CorePromise' - ss.ios.deployment_target = '10.0' - ss.osx.deployment_target = '10.12' - ss.tvos.deployment_target = '10.0' - ss.watchos.deployment_target = '3.0' - end - - s.subspec 'CoreBluetooth' do |ss| - ss.ios.source_files = ss.osx.source_files = ss.tvos.source_files = 'Extensions/CoreBluetooth/Sources/*' - ss.ios.frameworks = ss.osx.frameworks = ss.tvos.frameworks = 'CoreBluetooth' - ss.dependency 'PromiseKit/CorePromise' - ss.ios.deployment_target = '8.0' - ss.osx.deployment_target = '10.10' - ss.tvos.deployment_target = '9.0' - end - - s.subspec 'CorePromise' do |ss| - hh = Dir['Sources/*.h'] - Dir['Sources/*+Private.h'] - - cc = Dir['Sources/*.swift'] - ['Sources/SwiftPM.swift'] - cc << 'Sources/{after,AnyPromise,GlobalState,dispatch_promise,hang,join,PMKPromise,when,race}.m' - cc += hh - - ss.source_files = cc - ss.public_header_files = hh - ss.preserve_paths = 'Sources/AnyPromise+Private.h', 'Sources/PMKCallVariadicBlock.m', 'Sources/NSMethodSignatureForBlock.m' - ss.frameworks = 'Foundation' - - ss.ios.deployment_target = '8.0' - ss.osx.deployment_target = '10.10' - ss.watchos.deployment_target = '2.0' - ss.tvos.deployment_target = '9.0' - end - - s.subspec 'CoreLocation' do |ss| - ss.source_files = 'Extensions/CoreLocation/Sources/*' - ss.watchos.source_files = 'Extensions/CoreLocation/Sources/CLGeocoder*' - ss.dependency 'PromiseKit/CorePromise' - ss.frameworks = 'CoreLocation' - - ss.ios.deployment_target = '8.0' - ss.osx.deployment_target = '10.10' - ss.watchos.deployment_target = '3.0' - ss.tvos.deployment_target = '9.0' - end - - s.subspec 'EventKit' do |ss| - ss.ios.source_files = ss.osx.source_files = ss.watchos.source_files = 'Extensions/EventKit/Sources/*' - ss.ios.frameworks = ss.osx.frameworks = ss.watchos.frameworks = 'EventKit' - ss.dependency 'PromiseKit/CorePromise' - - ss.ios.deployment_target = '8.0' - ss.osx.deployment_target = '10.10' - ss.watchos.deployment_target = '2.0' - end - - s.subspec 'Foundation' do |ss| - ss.source_files = Dir['Extensions/Foundation/Sources/*'] - ss.dependency 'PromiseKit/CorePromise' - ss.frameworks = 'Foundation' - ss.ios.deployment_target = '8.0' - ss.osx.deployment_target = '10.10' - ss.watchos.deployment_target = '2.0' - ss.tvos.deployment_target = '9.0' - end - - s.subspec 'HealthKit' do |ss| - ss.source_files = Dir['Extensions/HealthKit/Sources/*'] - ss.dependency 'PromiseKit/CorePromise' - ss.frameworks = 'HealthKit' - ss.ios.deployment_target = '9.0' - ss.watchos.deployment_target = '2.0' - end - - s.subspec 'HomeKit' do |ss| - ss.source_files = Dir['Extensions/HomeKit/Sources/*'] - ss.dependency 'PromiseKit/CorePromise' - ss.frameworks = 'HomeKit' - ss.ios.deployment_target = '8.0' - ss.watchos.deployment_target = '3.0' - ss.tvos.deployment_target = '9.0' - end - - s.subspec 'MapKit' do |ss| - ss.ios.source_files = ss.osx.source_files = ss.tvos.source_files = 'Extensions/MapKit/Sources/*' - ss.ios.frameworks = ss.osx.frameworks = ss.tvos.frameworks = 'MapKit' - ss.dependency 'PromiseKit/CorePromise' - ss.ios.deployment_target = '8.0' - ss.osx.deployment_target = '10.10' - ss.watchos.deployment_target = '2.0' - ss.tvos.deployment_target = '9.2' - end - - s.subspec 'MessageUI' do |ss| - ss.ios.source_files = 'Extensions/MessagesUI/Sources/*' - ss.ios.frameworks = 'MessageUI' - ss.dependency 'PromiseKit/CorePromise' - ss.ios.deployment_target = '8.0' - end - - s.subspec 'OMGHTTPURLRQ' do |ss| - ss.source_files = 'Extensions/OMGHTTPURLRQ/Sources/*' - ss.dependency 'PromiseKit/Foundation' - ss.dependency 'OMGHTTPURLRQ', '~> 3.2' - ss.ios.deployment_target = '8.0' - ss.osx.deployment_target = '10.10' - ss.watchos.deployment_target = '2.0' - ss.tvos.deployment_target = '9.0' - end - - s.subspec 'Photos' do |ss| - ss.ios.source_files = ss.tvos.source_files = ss.osx.source_files = 'Extensions/Photos/Sources/*' - ss.ios.frameworks = ss.tvos.frameworks = ss.osx.frameworks = 'Photos' - ss.dependency 'PromiseKit/CorePromise' - - ss.ios.deployment_target = '8.0' - ss.osx.deployment_target = '10.13' - ss.tvos.deployment_target = '10.0' - end - - s.subspec 'QuartzCore' do |ss| - ss.osx.source_files = ss.ios.source_files = ss.tvos.source_files = 'Extensions/QuartzCore/Sources/*' - ss.osx.frameworks = ss.ios.frameworks = ss.tvos.frameworks = 'QuartzCore' - ss.dependency 'PromiseKit/CorePromise' - ss.ios.deployment_target = '8.0' - ss.osx.deployment_target = '10.10' - ss.tvos.deployment_target = '9.0' - end - - s.subspec 'Social' do |ss| - ss.ios.source_files = 'Extensions/Social/Sources/*' - ss.osx.source_files = Dir['Extensions/Social/Sources/*'] - ['Categories/Social/Sources/*SLComposeViewController+Promise.swift'] - ss.ios.frameworks = ss.osx.frameworks = 'Social' - ss.dependency 'PromiseKit/Foundation' - ss.ios.deployment_target = '8.0' - ss.osx.deployment_target = '10.10' - end - - s.subspec 'StoreKit' do |ss| - ss.ios.source_files = ss.osx.source_files = ss.tvos.source_files = 'Extensions/StoreKit/Sources/*' - ss.ios.frameworks = ss.osx.frameworks = ss.tvos.frameworks = 'StoreKit' - ss.dependency 'PromiseKit/CorePromise' - ss.ios.deployment_target = '8.0' - ss.osx.deployment_target = '10.10' - ss.tvos.deployment_target = '9.0' - end - - s.subspec 'SystemConfiguration' do |ss| - ss.ios.source_files = ss.osx.source_files = ss.tvos.source_files = 'Extensions/SystemConfiguration/Sources/*' - ss.ios.frameworks = ss.osx.frameworks = ss.tvos.frameworks = 'SystemConfiguration' - ss.dependency 'PromiseKit/CorePromise' - ss.ios.deployment_target = '8.0' - ss.osx.deployment_target = '10.10' - ss.tvos.deployment_target = '9.0' - end - - picker_cc = 'Extensions/UIKit/Sources/UIImagePickerController+Promise.swift' - - s.subspec 'UIKit' do |ss| - ss.ios.source_files = ss.tvos.source_files = Dir['Extensions/UIKit/Sources/*'] - [picker_cc] - ss.tvos.frameworks = ss.ios.frameworks = 'UIKit' - ss.dependency 'PromiseKit/CorePromise' - ss.ios.deployment_target = '8.0' - ss.tvos.deployment_target = '9.0' - end - - s.subspec 'UIImagePickerController' do |ss| - # Since iOS 10, App Store submissions that contain references to - # UIImagePickerController (even if unused in 3rd party libraries) - # are rejected unless an Info.plist key is specified, thus we - # moved this code to a sub-subspec. - # - # This *was* a subspec of UIKit, but bizarrely CocoaPods would - # include this when specifying *just* UIKit…! - - ss.ios.source_files = picker_cc - ss.ios.frameworks = 'UIKit' - ss.ios.xcconfig = { "GCC_PREPROCESSOR_DEFINITIONS" => '$(inherited) PMKImagePickerController=1' } - ss.dependency 'PromiseKit/UIKit' - ss.ios.deployment_target = '8.0' - end - - s.subspec 'WatchConnectivity' do |ss| - ss.ios.source_files = ss.watchos.source_files = 'Extensions/WatchConnectivity/Sources/*' - ss.ios.frameworks = ss.watchos.frameworks = 'WatchConnectivity' - ss.dependency 'PromiseKit/CorePromise' - ss.ios.deployment_target = '8.0' - ss.watchos.deployment_target = '2.0' - end -end diff --git a/Carthage/Checkouts/PromiseKit/PromiseKit.xcodeproj/project.pbxproj b/Carthage/Checkouts/PromiseKit/PromiseKit.xcodeproj/project.pbxproj deleted file mode 100644 index 87230d543..000000000 --- a/Carthage/Checkouts/PromiseKit/PromiseKit.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1230 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 085B96B321A6359500E5E22F /* LoggingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 085B96B121A6358900E5E22F /* LoggingTests.swift */; }; - 085B96BF21A9B37C00E5E22F /* LogEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 085B96BE21A9B37C00E5E22F /* LogEvent.swift */; }; - 0C42F31B1FCF86320051309C /* HangTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C42F3191FCF86240051309C /* HangTests.swift */; }; - 0CC3AF2B1FCF84F7000E98C9 /* hang.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CC3AF2A1FCF84F7000E98C9 /* hang.swift */; }; - 49A5584D1DC5185900E4D01B /* ResolverTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49A5584B1DC5172F00E4D01B /* ResolverTests.swift */; }; - 630A8056203CEF6800D25F23 /* AnyPromiseTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 630A8051203CEF6800D25F23 /* AnyPromiseTests.m */; settings = {COMPILER_FLAGS = "-fobjc-arc-exceptions"; }; }; - 630A8057203CEF6800D25F23 /* PMKManifoldTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 630A8052203CEF6800D25F23 /* PMKManifoldTests.m */; }; - 630A8058203CEF6800D25F23 /* JoinTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 630A8053203CEF6800D25F23 /* JoinTests.m */; }; - 630A8059203CEF6800D25F23 /* HangTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 630A8054203CEF6800D25F23 /* HangTests.m */; }; - 630A805A203CEF6800D25F23 /* WhenTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 630A8055203CEF6800D25F23 /* WhenTests.m */; }; - 630A805B203CF67800D25F23 /* DefaultDispatchQueueTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 635D641B1D59635300BC0AF5 /* DefaultDispatchQueueTests.swift */; }; - 631411381D59795700E24B9E /* PromiseKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63B0AC571D595E1B00FA21D9 /* PromiseKit.framework */; }; - 631411431D59797100E24B9E /* BridgingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6314113E1D59797100E24B9E /* BridgingTests.m */; }; - 631411441D59797100E24B9E /* BridgingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6314113F1D59797100E24B9E /* BridgingTests.swift */; }; - 631411451D59797100E24B9E /* Infrastructure.m in Sources */ = {isa = PBXBuildFile; fileRef = 631411411D59797100E24B9E /* Infrastructure.m */; }; - 631411461D59797100E24B9E /* Infrastructure.swift in Sources */ = {isa = PBXBuildFile; fileRef = 631411421D59797100E24B9E /* Infrastructure.swift */; }; - 631751A41D59766500A9DDDC /* PromiseKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63B0AC571D595E1B00FA21D9 /* PromiseKit.framework */; }; - 631751B71D59768200A9DDDC /* 0.0.0.swift in Sources */ = {isa = PBXBuildFile; fileRef = 631751AB1D59768200A9DDDC /* 0.0.0.swift */; }; - 631751B81D59768200A9DDDC /* 2.1.2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 631751AC1D59768200A9DDDC /* 2.1.2.swift */; }; - 631751B91D59768200A9DDDC /* 2.1.3.swift in Sources */ = {isa = PBXBuildFile; fileRef = 631751AD1D59768200A9DDDC /* 2.1.3.swift */; }; - 631751BA1D59768200A9DDDC /* 2.2.2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 631751AE1D59768200A9DDDC /* 2.2.2.swift */; }; - 631751BB1D59768200A9DDDC /* 2.2.3.swift in Sources */ = {isa = PBXBuildFile; fileRef = 631751AF1D59768200A9DDDC /* 2.2.3.swift */; }; - 631751BC1D59768200A9DDDC /* 2.2.4.swift in Sources */ = {isa = PBXBuildFile; fileRef = 631751B01D59768200A9DDDC /* 2.2.4.swift */; }; - 631751BD1D59768200A9DDDC /* 2.2.6.swift in Sources */ = {isa = PBXBuildFile; fileRef = 631751B11D59768200A9DDDC /* 2.2.6.swift */; }; - 631751BE1D59768200A9DDDC /* 2.2.7.swift in Sources */ = {isa = PBXBuildFile; fileRef = 631751B21D59768200A9DDDC /* 2.2.7.swift */; }; - 631751BF1D59768200A9DDDC /* 2.3.1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 631751B31D59768200A9DDDC /* 2.3.1.swift */; }; - 631751C01D59768200A9DDDC /* 2.3.2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 631751B41D59768200A9DDDC /* 2.3.2.swift */; }; - 631751C11D59768200A9DDDC /* 2.3.4.swift in Sources */ = {isa = PBXBuildFile; fileRef = 631751B51D59768200A9DDDC /* 2.3.4.swift */; }; - 632FBBE31F33B273008F8FBB /* Catchable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 632FBBE21F33B273008F8FBB /* Catchable.swift */; }; - 632FBBE51F33B338008F8FBB /* CatchableTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 632FBBE41F33B338008F8FBB /* CatchableTests.swift */; }; - 633027E6203CC0060037E136 /* PromiseKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63B0AC571D595E1B00FA21D9 /* PromiseKit.framework */; }; - 6330B5E11F2E991200D60528 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6330B5E01F2E991200D60528 /* Configuration.swift */; }; - 634AAD2B1EAE517C00B17855 /* fwd.h in Headers */ = {isa = PBXBuildFile; fileRef = 634AAD2A1EAE517C00B17855 /* fwd.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 635D641D1D59635300BC0AF5 /* PromiseTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 635D64081D59635300BC0AF5 /* PromiseTests.swift */; }; - 635D641E1D59635300BC0AF5 /* CancellableErrorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 635D64091D59635300BC0AF5 /* CancellableErrorTests.swift */; }; - 635D64221D59635300BC0AF5 /* ZalgoTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 635D640D1D59635300BC0AF5 /* ZalgoTests.swift */; }; - 635D64231D59635300BC0AF5 /* AfterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 635D640E1D59635300BC0AF5 /* AfterTests.swift */; }; - 635D64261D59635300BC0AF5 /* WhenResolvedTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 635D64111D59635300BC0AF5 /* WhenResolvedTests.swift */; }; - 635D64271D59635300BC0AF5 /* RaceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 635D64121D59635300BC0AF5 /* RaceTests.swift */; }; - 635D64281D59635300BC0AF5 /* WhenConcurrentTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 635D64131D59635300BC0AF5 /* WhenConcurrentTests.swift */; }; - 635D642A1D59635300BC0AF5 /* WhenTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 635D64151D59635300BC0AF5 /* WhenTests.swift */; }; - 635D642B1D59635300BC0AF5 /* StressTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 635D64161D59635300BC0AF5 /* StressTests.swift */; }; - 635D642C1D59635300BC0AF5 /* RegressionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 635D64171D59635300BC0AF5 /* RegressionTests.swift */; }; - 635D64301D596E8500BC0AF5 /* PromiseKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63B0AC571D595E1B00FA21D9 /* PromiseKit.framework */; }; - 636A291A1F1C156B001229C2 /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 636A29191F1C156B001229C2 /* Promise.swift */; }; - 636A291F1F1C16FF001229C2 /* Box.swift in Sources */ = {isa = PBXBuildFile; fileRef = 636A291E1F1C16FF001229C2 /* Box.swift */; }; - 636A29211F1C1716001229C2 /* Thenable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 636A29201F1C1716001229C2 /* Thenable.swift */; }; - 636A29231F1C17A6001229C2 /* Guarantee.swift in Sources */ = {isa = PBXBuildFile; fileRef = 636A29221F1C17A6001229C2 /* Guarantee.swift */; }; - 636A29251F1C3089001229C2 /* race.swift in Sources */ = {isa = PBXBuildFile; fileRef = 636A29241F1C3089001229C2 /* race.swift */; }; - 636A29271F1C3927001229C2 /* Resolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 636A29261F1C3927001229C2 /* Resolver.swift */; }; - 639BF757203DF03100FA577B /* Utilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = 639BF755203DF02C00FA577B /* Utilities.swift */; }; - 63B0AC7F1D595E6300FA21D9 /* after.m in Sources */ = {isa = PBXBuildFile; fileRef = 63B0AC611D595E6300FA21D9 /* after.m */; }; - 63B0AC801D595E6300FA21D9 /* after.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63B0AC621D595E6300FA21D9 /* after.swift */; }; - 63B0AC811D595E6300FA21D9 /* AnyPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = 63B0AC631D595E6300FA21D9 /* AnyPromise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 63B0AC821D595E6300FA21D9 /* AnyPromise.m in Sources */ = {isa = PBXBuildFile; fileRef = 63B0AC641D595E6300FA21D9 /* AnyPromise.m */; }; - 63B0AC831D595E6300FA21D9 /* AnyPromise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63B0AC651D595E6300FA21D9 /* AnyPromise.swift */; }; - 63B0AC841D595E6300FA21D9 /* AnyPromise+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 63B0AC661D595E6300FA21D9 /* AnyPromise+Private.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 63B0AC851D595E6300FA21D9 /* dispatch_promise.m in Sources */ = {isa = PBXBuildFile; fileRef = 63B0AC671D595E6300FA21D9 /* dispatch_promise.m */; }; - 63B0AC871D595E6300FA21D9 /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63B0AC691D595E6300FA21D9 /* Error.swift */; }; - 63B0AC891D595E6300FA21D9 /* hang.m in Sources */ = {isa = PBXBuildFile; fileRef = 63B0AC6B1D595E6300FA21D9 /* hang.m */; }; - 63B0AC8B1D595E6300FA21D9 /* join.m in Sources */ = {isa = PBXBuildFile; fileRef = 63B0AC6D1D595E6300FA21D9 /* join.m */; }; - 63B0AC931D595E6300FA21D9 /* PromiseKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 63B0AC761D595E6300FA21D9 /* PromiseKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 63B0AC991D595E6300FA21D9 /* when.m in Sources */ = {isa = PBXBuildFile; fileRef = 63B0AC7C1D595E6300FA21D9 /* when.m */; }; - 63B0AC9A1D595E6300FA21D9 /* when.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63B0AC7D1D595E6300FA21D9 /* when.swift */; }; - 63B18AEC1F2D205C00B79E37 /* CustomStringConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63B18AEB1F2D205C00B79E37 /* CustomStringConvertible.swift */; }; - 63B7C94B203E2B8200FBEC00 /* AnyPromiseTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63B7C94A203E2B8200FBEC00 /* AnyPromiseTests.swift */; }; - 63B912AA1F1D7B1300D49110 /* firstly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63B912A91F1D7B1300D49110 /* firstly.swift */; }; - 63CF6D7A203CC66000EC8927 /* ErrorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63CF6D79203CC66000EC8927 /* ErrorTests.swift */; }; - 63CF6D7C203CCDAB00EC8927 /* GuaranteeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63CF6D7B203CCDAB00EC8927 /* GuaranteeTests.swift */; }; - 63CF6D7E203CD12700EC8927 /* DeprecationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63648C94203CB97400EBA011 /* DeprecationTests.swift */; }; - 63CF6D80203CD19200EC8927 /* ThenableTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63CF6D7F203CD19200EC8927 /* ThenableTests.swift */; }; - 63D9B2EF203385FD0075C00B /* race.m in Sources */ = {isa = PBXBuildFile; fileRef = 63D9B2EE203385FD0075C00B /* race.m */; }; - 63D9B2F120338D5D0075C00B /* Deprecations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63D9B2F020338D5D0075C00B /* Deprecations.swift */; }; - C013F7382048E3B6006B57B1 /* MockNodeEnvironment.swift in Sources */ = {isa = PBXBuildFile; fileRef = C013F7372048E3B6006B57B1 /* MockNodeEnvironment.swift */; }; - C013F73A2049076A006B57B1 /* JSPromise.swift in Sources */ = {isa = PBXBuildFile; fileRef = C013F7392049076A006B57B1 /* JSPromise.swift */; }; - C013F73C20494291006B57B1 /* JSAdapter.swift in Sources */ = {isa = PBXBuildFile; fileRef = C013F73B20494291006B57B1 /* JSAdapter.swift */; }; - C013F740204E5064006B57B1 /* JSUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = C013F73F204E5063006B57B1 /* JSUtils.swift */; }; - C0244E5E2047A6CB00ACB4AC /* PromiseKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63B0AC571D595E1B00FA21D9 /* PromiseKit.framework */; }; - C0244E692047AC9F00ACB4AC /* AllTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0244E682047AC9F00ACB4AC /* AllTests.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 631411341D59795700E24B9E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6399A3721D595D9100D65233 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 63B0AC561D595E1B00FA21D9; - remoteInfo = PromiseKit; - }; - 6317518D1D59766500A9DDDC /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6399A3721D595D9100D65233 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 63B0AC561D595E1B00FA21D9; - remoteInfo = PromiseKit; - }; - 633027E2203CC0060037E136 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6399A3721D595D9100D65233 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 63B0AC561D595E1B00FA21D9; - remoteInfo = PromiseKit; - }; - 635D64041D5962F900BC0AF5 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6399A3721D595D9100D65233 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 63B0AC561D595E1B00FA21D9; - remoteInfo = PromiseKit; - }; - C0244E502047A6CB00ACB4AC /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6399A3721D595D9100D65233 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 63B0AC561D595E1B00FA21D9; - remoteInfo = PromiseKit; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - C0244E6E2047AF0B00ACB4AC /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 7; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 085B96B121A6358900E5E22F /* LoggingTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggingTests.swift; sourceTree = ""; }; - 085B96BE21A9B37C00E5E22F /* LogEvent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = LogEvent.swift; path = Sources/LogEvent.swift; sourceTree = ""; }; - 0C42F3191FCF86240051309C /* HangTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HangTests.swift; sourceTree = ""; }; - 0CC3AF2A1FCF84F7000E98C9 /* hang.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = hang.swift; path = Sources/hang.swift; sourceTree = ""; }; - 49A5584B1DC5172F00E4D01B /* ResolverTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ResolverTests.swift; sourceTree = ""; }; - 630019221D596292003B4E30 /* PMKCoreTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PMKCoreTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 630A8051203CEF6800D25F23 /* AnyPromiseTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AnyPromiseTests.m; sourceTree = ""; }; - 630A8052203CEF6800D25F23 /* PMKManifoldTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PMKManifoldTests.m; sourceTree = ""; }; - 630A8053203CEF6800D25F23 /* JoinTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JoinTests.m; sourceTree = ""; }; - 630A8054203CEF6800D25F23 /* HangTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HangTests.m; sourceTree = ""; }; - 630A8055203CEF6800D25F23 /* WhenTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WhenTests.m; sourceTree = ""; }; - 6314113C1D59795700E24B9E /* PMKBridgeTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PMKBridgeTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 6314113E1D59797100E24B9E /* BridgingTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BridgingTests.m; sourceTree = ""; }; - 6314113F1D59797100E24B9E /* BridgingTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BridgingTests.swift; sourceTree = ""; }; - 631411401D59797100E24B9E /* Infrastructure.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Infrastructure.h; sourceTree = ""; }; - 631411411D59797100E24B9E /* Infrastructure.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Infrastructure.m; sourceTree = ""; }; - 631411421D59797100E24B9E /* Infrastructure.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Infrastructure.swift; sourceTree = ""; }; - 631751A81D59766500A9DDDC /* PMKA+Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "PMKA+Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - 631751AB1D59768200A9DDDC /* 0.0.0.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = 0.0.0.swift; sourceTree = ""; }; - 631751AC1D59768200A9DDDC /* 2.1.2.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = 2.1.2.swift; sourceTree = ""; }; - 631751AD1D59768200A9DDDC /* 2.1.3.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = 2.1.3.swift; sourceTree = ""; }; - 631751AE1D59768200A9DDDC /* 2.2.2.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = 2.2.2.swift; sourceTree = ""; }; - 631751AF1D59768200A9DDDC /* 2.2.3.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = 2.2.3.swift; sourceTree = ""; }; - 631751B01D59768200A9DDDC /* 2.2.4.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = 2.2.4.swift; sourceTree = ""; }; - 631751B11D59768200A9DDDC /* 2.2.6.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = 2.2.6.swift; sourceTree = ""; }; - 631751B21D59768200A9DDDC /* 2.2.7.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = 2.2.7.swift; sourceTree = ""; }; - 631751B31D59768200A9DDDC /* 2.3.1.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = 2.3.1.swift; sourceTree = ""; }; - 631751B41D59768200A9DDDC /* 2.3.2.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = 2.3.2.swift; sourceTree = ""; }; - 631751B51D59768200A9DDDC /* 2.3.4.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = 2.3.4.swift; sourceTree = ""; }; - 631751B61D59768200A9DDDC /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; - 632FBBE21F33B273008F8FBB /* Catchable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Catchable.swift; path = Sources/Catchable.swift; sourceTree = ""; }; - 632FBBE41F33B338008F8FBB /* CatchableTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CatchableTests.swift; sourceTree = ""; }; - 633027EA203CC0060037E136 /* PMKDeprecatedTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PMKDeprecatedTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 6330B5E01F2E991200D60528 /* Configuration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Configuration.swift; path = Sources/Configuration.swift; sourceTree = ""; }; - 634AAD2A1EAE517C00B17855 /* fwd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fwd.h; path = Sources/fwd.h; sourceTree = ""; }; - 635893921D5BE4E000F14B55 /* PromiseKit.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = PromiseKit.playground; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; - 635893941D5BE4F900F14B55 /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; - 635893951D5BE4F900F14B55 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; - 635893961D5BE4F900F14B55 /* PromiseKit.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; name = PromiseKit.podspec; path = .github/PromiseKit.podspec; sourceTree = ""; }; - 635893971D5BE4F900F14B55 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; - 635D64081D59635300BC0AF5 /* PromiseTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PromiseTests.swift; sourceTree = ""; }; - 635D64091D59635300BC0AF5 /* CancellableErrorTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CancellableErrorTests.swift; sourceTree = ""; }; - 635D640D1D59635300BC0AF5 /* ZalgoTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZalgoTests.swift; sourceTree = ""; }; - 635D640E1D59635300BC0AF5 /* AfterTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AfterTests.swift; sourceTree = ""; }; - 635D64111D59635300BC0AF5 /* WhenResolvedTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WhenResolvedTests.swift; sourceTree = ""; }; - 635D64121D59635300BC0AF5 /* RaceTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RaceTests.swift; sourceTree = ""; }; - 635D64131D59635300BC0AF5 /* WhenConcurrentTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WhenConcurrentTests.swift; sourceTree = ""; }; - 635D64151D59635300BC0AF5 /* WhenTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WhenTests.swift; sourceTree = ""; }; - 635D64161D59635300BC0AF5 /* StressTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StressTests.swift; sourceTree = ""; }; - 635D64171D59635300BC0AF5 /* RegressionTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RegressionTests.swift; sourceTree = ""; }; - 635D641B1D59635300BC0AF5 /* DefaultDispatchQueueTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DefaultDispatchQueueTests.swift; sourceTree = ""; }; - 63648C94203CB97400EBA011 /* DeprecationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = DeprecationTests.swift; path = Tests/DeprecationTests.swift; sourceTree = ""; }; - 636A29191F1C156B001229C2 /* Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Promise.swift; path = Sources/Promise.swift; sourceTree = ""; }; - 636A291E1F1C16FF001229C2 /* Box.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Box.swift; path = Sources/Box.swift; sourceTree = ""; }; - 636A29201F1C1716001229C2 /* Thenable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Thenable.swift; path = Sources/Thenable.swift; sourceTree = ""; }; - 636A29221F1C17A6001229C2 /* Guarantee.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Guarantee.swift; path = Sources/Guarantee.swift; sourceTree = ""; }; - 636A29241F1C3089001229C2 /* race.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = race.swift; path = Sources/race.swift; sourceTree = ""; }; - 636A29261F1C3927001229C2 /* Resolver.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Resolver.swift; path = Sources/Resolver.swift; sourceTree = ""; }; - 639BF755203DF02C00FA577B /* Utilities.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Utilities.swift; sourceTree = ""; }; - 63B0AC571D595E1B00FA21D9 /* PromiseKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PromiseKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 63B0AC611D595E6300FA21D9 /* after.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = after.m; path = Sources/after.m; sourceTree = ""; }; - 63B0AC621D595E6300FA21D9 /* after.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = after.swift; path = Sources/after.swift; sourceTree = ""; }; - 63B0AC631D595E6300FA21D9 /* AnyPromise.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AnyPromise.h; path = Sources/AnyPromise.h; sourceTree = ""; }; - 63B0AC641D595E6300FA21D9 /* AnyPromise.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AnyPromise.m; path = Sources/AnyPromise.m; sourceTree = ""; }; - 63B0AC651D595E6300FA21D9 /* AnyPromise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AnyPromise.swift; path = Sources/AnyPromise.swift; sourceTree = ""; }; - 63B0AC661D595E6300FA21D9 /* AnyPromise+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "AnyPromise+Private.h"; path = "Sources/AnyPromise+Private.h"; sourceTree = ""; }; - 63B0AC671D595E6300FA21D9 /* dispatch_promise.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = dispatch_promise.m; path = Sources/dispatch_promise.m; sourceTree = ""; }; - 63B0AC691D595E6300FA21D9 /* Error.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Error.swift; path = Sources/Error.swift; sourceTree = ""; }; - 63B0AC6B1D595E6300FA21D9 /* hang.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = hang.m; path = Sources/hang.m; sourceTree = ""; }; - 63B0AC6C1D595E6300FA21D9 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Sources/Info.plist; sourceTree = ""; }; - 63B0AC6D1D595E6300FA21D9 /* join.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = join.m; path = Sources/join.m; sourceTree = ""; }; - 63B0AC6F1D595E6300FA21D9 /* NSMethodSignatureForBlock.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NSMethodSignatureForBlock.m; path = Sources/NSMethodSignatureForBlock.m; sourceTree = ""; }; - 63B0AC711D595E6300FA21D9 /* PMKCallVariadicBlock.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PMKCallVariadicBlock.m; path = Sources/PMKCallVariadicBlock.m; sourceTree = ""; }; - 63B0AC761D595E6300FA21D9 /* PromiseKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PromiseKit.h; path = Sources/PromiseKit.h; sourceTree = ""; }; - 63B0AC7C1D595E6300FA21D9 /* when.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = when.m; path = Sources/when.m; sourceTree = ""; }; - 63B0AC7D1D595E6300FA21D9 /* when.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = when.swift; path = Sources/when.swift; sourceTree = ""; }; - 63B18AEB1F2D205C00B79E37 /* CustomStringConvertible.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CustomStringConvertible.swift; path = Sources/CustomStringConvertible.swift; sourceTree = ""; }; - 63B7C94A203E2B8200FBEC00 /* AnyPromiseTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnyPromiseTests.swift; sourceTree = ""; }; - 63B912A91F1D7B1300D49110 /* firstly.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = firstly.swift; path = Sources/firstly.swift; sourceTree = ""; }; - 63CF6D79203CC66000EC8927 /* ErrorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ErrorTests.swift; sourceTree = ""; }; - 63CF6D7B203CCDAB00EC8927 /* GuaranteeTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuaranteeTests.swift; sourceTree = ""; }; - 63CF6D7F203CD19200EC8927 /* ThenableTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThenableTests.swift; sourceTree = ""; }; - 63D9B2EE203385FD0075C00B /* race.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = race.m; path = Sources/race.m; sourceTree = ""; }; - 63D9B2F020338D5D0075C00B /* Deprecations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Deprecations.swift; path = Sources/Deprecations.swift; sourceTree = ""; }; - C013F7372048E3B6006B57B1 /* MockNodeEnvironment.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MockNodeEnvironment.swift; path = "Tests/JS-A+/MockNodeEnvironment.swift"; sourceTree = ""; }; - C013F7392049076A006B57B1 /* JSPromise.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = JSPromise.swift; path = "Tests/JS-A+/JSPromise.swift"; sourceTree = ""; }; - C013F73B20494291006B57B1 /* JSAdapter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = JSAdapter.swift; path = "Tests/JS-A+/JSAdapter.swift"; sourceTree = ""; }; - C013F73F204E5063006B57B1 /* JSUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JSUtils.swift; path = "Tests/JS-A+/JSUtils.swift"; sourceTree = ""; }; - C0244E622047A6CB00ACB4AC /* PMKJSA+Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "PMKJSA+Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - C0244E682047AC9F00ACB4AC /* AllTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AllTests.swift; path = "Tests/JS-A+/AllTests.swift"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 630019181D596292003B4E30 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 635D64301D596E8500BC0AF5 /* PromiseKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 631411371D59795700E24B9E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 631411381D59795700E24B9E /* PromiseKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 631751A31D59766500A9DDDC /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 631751A41D59766500A9DDDC /* PromiseKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 633027E5203CC0060037E136 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 633027E6203CC0060037E136 /* PromiseKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63B0AC531D595E1B00FA21D9 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - C0244E5D2047A6CB00ACB4AC /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - C0244E5E2047A6CB00ACB4AC /* PromiseKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 630A8050203CEF6800D25F23 /* CoreObjC */ = { - isa = PBXGroup; - children = ( - 630A8051203CEF6800D25F23 /* AnyPromiseTests.m */, - 63B7C94A203E2B8200FBEC00 /* AnyPromiseTests.swift */, - 630A8052203CEF6800D25F23 /* PMKManifoldTests.m */, - 630A8053203CEF6800D25F23 /* JoinTests.m */, - 630A8054203CEF6800D25F23 /* HangTests.m */, - 630A8055203CEF6800D25F23 /* WhenTests.m */, - ); - name = CoreObjC; - path = Tests/CoreObjC; - sourceTree = ""; - }; - 630B60BF1F2F739E00A1AEFE /* Features */ = { - isa = PBXGroup; - children = ( - 63B0AC611D595E6300FA21D9 /* after.m */, - 63B0AC6B1D595E6300FA21D9 /* hang.m */, - 63B0AC6D1D595E6300FA21D9 /* join.m */, - 63B0AC7C1D595E6300FA21D9 /* when.m */, - 63D9B2EE203385FD0075C00B /* race.m */, - ); - name = Features; - sourceTree = ""; - }; - 630B60C01F2F73B000A1AEFE /* Headers */ = { - isa = PBXGroup; - children = ( - 634AAD2A1EAE517C00B17855 /* fwd.h */, - 63B0AC631D595E6300FA21D9 /* AnyPromise.h */, - ); - name = Headers; - sourceTree = ""; - }; - 6314113D1D59797100E24B9E /* Bridging */ = { - isa = PBXGroup; - children = ( - 6314113E1D59797100E24B9E /* BridgingTests.m */, - 6314113F1D59797100E24B9E /* BridgingTests.swift */, - 631411401D59797100E24B9E /* Infrastructure.h */, - 631411411D59797100E24B9E /* Infrastructure.m */, - 631411421D59797100E24B9E /* Infrastructure.swift */, - ); - name = Bridging; - path = Tests/Bridging; - sourceTree = ""; - }; - 6317518A1D59765700A9DDDC /* Core */ = { - isa = PBXGroup; - children = ( - 63CF6D7F203CD19200EC8927 /* ThenableTests.swift */, - 632FBBE41F33B338008F8FBB /* CatchableTests.swift */, - 635D64081D59635300BC0AF5 /* PromiseTests.swift */, - 49A5584B1DC5172F00E4D01B /* ResolverTests.swift */, - 63CF6D7B203CCDAB00EC8927 /* GuaranteeTests.swift */, - 635D64091D59635300BC0AF5 /* CancellableErrorTests.swift */, - 63CF6D79203CC66000EC8927 /* ErrorTests.swift */, - 635D64151D59635300BC0AF5 /* WhenTests.swift */, - 635D64131D59635300BC0AF5 /* WhenConcurrentTests.swift */, - 635D64111D59635300BC0AF5 /* WhenResolvedTests.swift */, - 635D640E1D59635300BC0AF5 /* AfterTests.swift */, - 0C42F3191FCF86240051309C /* HangTests.swift */, - 635D64121D59635300BC0AF5 /* RaceTests.swift */, - 635D641B1D59635300BC0AF5 /* DefaultDispatchQueueTests.swift */, - 635D64171D59635300BC0AF5 /* RegressionTests.swift */, - 635D64161D59635300BC0AF5 /* StressTests.swift */, - 635D640D1D59635300BC0AF5 /* ZalgoTests.swift */, - 639BF755203DF02C00FA577B /* Utilities.swift */, - 085B96B121A6358900E5E22F /* LoggingTests.swift */, - ); - name = Core; - path = Tests/CorePromise; - sourceTree = ""; - }; - 631751AA1D59768200A9DDDC /* A+ */ = { - isa = PBXGroup; - children = ( - 631751AB1D59768200A9DDDC /* 0.0.0.swift */, - 631751AC1D59768200A9DDDC /* 2.1.2.swift */, - 631751AD1D59768200A9DDDC /* 2.1.3.swift */, - 631751AE1D59768200A9DDDC /* 2.2.2.swift */, - 631751AF1D59768200A9DDDC /* 2.2.3.swift */, - 631751B01D59768200A9DDDC /* 2.2.4.swift */, - 631751B11D59768200A9DDDC /* 2.2.6.swift */, - 631751B21D59768200A9DDDC /* 2.2.7.swift */, - 631751B31D59768200A9DDDC /* 2.3.1.swift */, - 631751B41D59768200A9DDDC /* 2.3.2.swift */, - 631751B51D59768200A9DDDC /* 2.3.4.swift */, - 631751B61D59768200A9DDDC /* README.md */, - ); - name = "A+"; - path = "Tests/A+"; - sourceTree = ""; - }; - 635893991D5BE51700F14B55 /* … */ = { - isa = PBXGroup; - children = ( - 63B0AC581D595E1B00FA21D9 /* Products */, - 63B0AC6C1D595E6300FA21D9 /* Info.plist */, - 635893941D5BE4F900F14B55 /* LICENSE */, - 635893951D5BE4F900F14B55 /* Package.swift */, - 635893961D5BE4F900F14B55 /* PromiseKit.podspec */, - ); - name = "…"; - sourceTree = ""; - }; - 635D64061D59630200BC0AF5 /* Tests */ = { - isa = PBXGroup; - children = ( - C0244E6B2047ACAF00ACB4AC /* JS/A+ */, - 631751AA1D59768200A9DDDC /* A+ */, - 6314113D1D59797100E24B9E /* Bridging */, - 6317518A1D59765700A9DDDC /* Core */, - 630A8050203CEF6800D25F23 /* CoreObjC */, - 63648C94203CB97400EBA011 /* DeprecationTests.swift */, - ); - name = Tests; - sourceTree = ""; - }; - 6399A3711D595D9100D65233 = { - isa = PBXGroup; - children = ( - 635893971D5BE4F900F14B55 /* README.md */, - 635893921D5BE4E000F14B55 /* PromiseKit.playground */, - 63B0AC761D595E6300FA21D9 /* PromiseKit.h */, - 63B0AC601D595E4C00FA21D9 /* Sources.swift */, - 63B912AB1F1E657400D49110 /* Sources.objc */, - 635D64061D59630200BC0AF5 /* Tests */, - 635893991D5BE51700F14B55 /* … */, - ); - sourceTree = ""; - }; - 63B0AC581D595E1B00FA21D9 /* Products */ = { - isa = PBXGroup; - children = ( - 63B0AC571D595E1B00FA21D9 /* PromiseKit.framework */, - 630019221D596292003B4E30 /* PMKCoreTests.xctest */, - 631751A81D59766500A9DDDC /* PMKA+Tests.xctest */, - 6314113C1D59795700E24B9E /* PMKBridgeTests.xctest */, - 633027EA203CC0060037E136 /* PMKDeprecatedTests.xctest */, - C0244E622047A6CB00ACB4AC /* PMKJSA+Tests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 63B0AC601D595E4C00FA21D9 /* Sources.swift */ = { - isa = PBXGroup; - children = ( - 636A29191F1C156B001229C2 /* Promise.swift */, - 636A29221F1C17A6001229C2 /* Guarantee.swift */, - 636A29201F1C1716001229C2 /* Thenable.swift */, - 632FBBE21F33B273008F8FBB /* Catchable.swift */, - 63B912AC1F1E663E00D49110 /* Features */, - 63B0AC691D595E6300FA21D9 /* Error.swift */, - 636A29261F1C3927001229C2 /* Resolver.swift */, - 636A291E1F1C16FF001229C2 /* Box.swift */, - 6330B5E01F2E991200D60528 /* Configuration.swift */, - 63B18AEB1F2D205C00B79E37 /* CustomStringConvertible.swift */, - 63D9B2F020338D5D0075C00B /* Deprecations.swift */, - 085B96BE21A9B37C00E5E22F /* LogEvent.swift */, - ); - name = Sources.swift; - sourceTree = ""; - }; - 63B0AC9D1D595E6E00FA21D9 /* Internal Utilities */ = { - isa = PBXGroup; - children = ( - 63B0AC661D595E6300FA21D9 /* AnyPromise+Private.h */, - 63B0AC6F1D595E6300FA21D9 /* NSMethodSignatureForBlock.m */, - 63B0AC711D595E6300FA21D9 /* PMKCallVariadicBlock.m */, - ); - name = "Internal Utilities"; - sourceTree = ""; - }; - 63B912AB1F1E657400D49110 /* Sources.objc */ = { - isa = PBXGroup; - children = ( - 63B0AC641D595E6300FA21D9 /* AnyPromise.m */, - 63B0AC651D595E6300FA21D9 /* AnyPromise.swift */, - 63B0AC671D595E6300FA21D9 /* dispatch_promise.m */, - 630B60C01F2F73B000A1AEFE /* Headers */, - 630B60BF1F2F739E00A1AEFE /* Features */, - 63B0AC9D1D595E6E00FA21D9 /* Internal Utilities */, - ); - name = Sources.objc; - sourceTree = ""; - }; - 63B912AC1F1E663E00D49110 /* Features */ = { - isa = PBXGroup; - children = ( - 0CC3AF2A1FCF84F7000E98C9 /* hang.swift */, - 63B0AC621D595E6300FA21D9 /* after.swift */, - 63B912A91F1D7B1300D49110 /* firstly.swift */, - 636A29241F1C3089001229C2 /* race.swift */, - 63B0AC7D1D595E6300FA21D9 /* when.swift */, - ); - name = Features; - sourceTree = ""; - }; - C0244E6B2047ACAF00ACB4AC /* JS/A+ */ = { - isa = PBXGroup; - children = ( - C0244E682047AC9F00ACB4AC /* AllTests.swift */, - C013F7372048E3B6006B57B1 /* MockNodeEnvironment.swift */, - C013F7392049076A006B57B1 /* JSPromise.swift */, - C013F73B20494291006B57B1 /* JSAdapter.swift */, - C013F73F204E5063006B57B1 /* JSUtils.swift */, - ); - name = "JS/A+"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 63B0AC541D595E1B00FA21D9 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 63B0AC931D595E6300FA21D9 /* PromiseKit.h in Headers */, - 634AAD2B1EAE517C00B17855 /* fwd.h in Headers */, - 63B0AC811D595E6300FA21D9 /* AnyPromise.h in Headers */, - 63B0AC841D595E6300FA21D9 /* AnyPromise+Private.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 630019011D596292003B4E30 /* PMKCoreTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 6300191F1D596292003B4E30 /* Build configuration list for PBXNativeTarget "PMKCoreTests" */; - buildPhases = ( - 630019021D596292003B4E30 /* Sources */, - 630019181D596292003B4E30 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 635D64051D5962F900BC0AF5 /* PBXTargetDependency */, - ); - name = PMKCoreTests; - productName = PromiseKit; - productReference = 630019221D596292003B4E30 /* PMKCoreTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 631411321D59795700E24B9E /* PMKBridgeTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 631411391D59795700E24B9E /* Build configuration list for PBXNativeTarget "PMKBridgeTests" */; - buildPhases = ( - 631411351D59795700E24B9E /* Sources */, - 631411371D59795700E24B9E /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 631411331D59795700E24B9E /* PBXTargetDependency */, - ); - name = PMKBridgeTests; - productName = PromiseKit; - productReference = 6314113C1D59795700E24B9E /* PMKBridgeTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 6317518B1D59766500A9DDDC /* PMKA+Tests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 631751A51D59766500A9DDDC /* Build configuration list for PBXNativeTarget "PMKA+Tests" */; - buildPhases = ( - 6317518E1D59766500A9DDDC /* Sources */, - 631751A31D59766500A9DDDC /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 6317518C1D59766500A9DDDC /* PBXTargetDependency */, - ); - name = "PMKA+Tests"; - productName = PromiseKit; - productReference = 631751A81D59766500A9DDDC /* PMKA+Tests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 633027E0203CC0060037E136 /* PMKDeprecatedTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 633027E7203CC0060037E136 /* Build configuration list for PBXNativeTarget "PMKDeprecatedTests" */; - buildPhases = ( - 633027E3203CC0060037E136 /* Sources */, - 633027E5203CC0060037E136 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 633027E1203CC0060037E136 /* PBXTargetDependency */, - ); - name = PMKDeprecatedTests; - productName = PromiseKit; - productReference = 633027EA203CC0060037E136 /* PMKDeprecatedTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 63B0AC561D595E1B00FA21D9 /* PromiseKit */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63B0AC5F1D595E1B00FA21D9 /* Build configuration list for PBXNativeTarget "PromiseKit" */; - buildPhases = ( - 63B0AC521D595E1B00FA21D9 /* Sources */, - 63B0AC531D595E1B00FA21D9 /* Frameworks */, - 63B0AC541D595E1B00FA21D9 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PromiseKit; - productName = PromiseKit; - productReference = 63B0AC571D595E1B00FA21D9 /* PromiseKit.framework */; - productType = "com.apple.product-type.framework"; - }; - C0244E4E2047A6CB00ACB4AC /* PMKJSA+Tests */ = { - isa = PBXNativeTarget; - buildConfigurationList = C0244E5F2047A6CB00ACB4AC /* Build configuration list for PBXNativeTarget "PMKJSA+Tests" */; - buildPhases = ( - C0244E512047A6CB00ACB4AC /* Sources */, - C0244E5D2047A6CB00ACB4AC /* Frameworks */, - C0244E6E2047AF0B00ACB4AC /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - C0244E4F2047A6CB00ACB4AC /* PBXTargetDependency */, - ); - name = "PMKJSA+Tests"; - productName = PromiseKit; - productReference = C0244E622047A6CB00ACB4AC /* PMKJSA+Tests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 6399A3721D595D9100D65233 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1250; - TargetAttributes = { - 630019011D596292003B4E30 = { - LastSwiftMigration = 1100; - }; - 631411321D59795700E24B9E = { - LastSwiftMigration = 1100; - }; - 6317518B1D59766500A9DDDC = { - LastSwiftMigration = 1100; - }; - 633027E0203CC0060037E136 = { - LastSwiftMigration = 1100; - }; - 63B0AC561D595E1B00FA21D9 = { - CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 1100; - ProvisioningStyle = Automatic; - }; - C0244E4E2047A6CB00ACB4AC = { - LastSwiftMigration = 1100; - }; - }; - }; - buildConfigurationList = 6399A3751D595D9100D65233 /* Build configuration list for PBXProject "PromiseKit" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 6399A3711D595D9100D65233; - productRefGroup = 63B0AC581D595E1B00FA21D9 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 63B0AC561D595E1B00FA21D9 /* PromiseKit */, - 6317518B1D59766500A9DDDC /* PMKA+Tests */, - 631411321D59795700E24B9E /* PMKBridgeTests */, - 630019011D596292003B4E30 /* PMKCoreTests */, - 633027E0203CC0060037E136 /* PMKDeprecatedTests */, - C0244E4E2047A6CB00ACB4AC /* PMKJSA+Tests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - 630019021D596292003B4E30 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 0C42F31B1FCF86320051309C /* HangTests.swift in Sources */, - 635D641E1D59635300BC0AF5 /* CancellableErrorTests.swift in Sources */, - 630A8056203CEF6800D25F23 /* AnyPromiseTests.m in Sources */, - 635D64221D59635300BC0AF5 /* ZalgoTests.swift in Sources */, - 635D64271D59635300BC0AF5 /* RaceTests.swift in Sources */, - 632FBBE51F33B338008F8FBB /* CatchableTests.swift in Sources */, - 63CF6D80203CD19200EC8927 /* ThenableTests.swift in Sources */, - 635D642B1D59635300BC0AF5 /* StressTests.swift in Sources */, - 630A805A203CEF6800D25F23 /* WhenTests.m in Sources */, - 630A805B203CF67800D25F23 /* DefaultDispatchQueueTests.swift in Sources */, - 635D641D1D59635300BC0AF5 /* PromiseTests.swift in Sources */, - 63CF6D7C203CCDAB00EC8927 /* GuaranteeTests.swift in Sources */, - 639BF757203DF03100FA577B /* Utilities.swift in Sources */, - 635D64261D59635300BC0AF5 /* WhenResolvedTests.swift in Sources */, - 635D64231D59635300BC0AF5 /* AfterTests.swift in Sources */, - 63CF6D7A203CC66000EC8927 /* ErrorTests.swift in Sources */, - 49A5584D1DC5185900E4D01B /* ResolverTests.swift in Sources */, - 630A8057203CEF6800D25F23 /* PMKManifoldTests.m in Sources */, - 085B96B321A6359500E5E22F /* LoggingTests.swift in Sources */, - 63B7C94B203E2B8200FBEC00 /* AnyPromiseTests.swift in Sources */, - 630A8059203CEF6800D25F23 /* HangTests.m in Sources */, - 635D642A1D59635300BC0AF5 /* WhenTests.swift in Sources */, - 630A8058203CEF6800D25F23 /* JoinTests.m in Sources */, - 635D64281D59635300BC0AF5 /* WhenConcurrentTests.swift in Sources */, - 635D642C1D59635300BC0AF5 /* RegressionTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 631411351D59795700E24B9E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 631411461D59797100E24B9E /* Infrastructure.swift in Sources */, - 631411431D59797100E24B9E /* BridgingTests.m in Sources */, - 631411441D59797100E24B9E /* BridgingTests.swift in Sources */, - 631411451D59797100E24B9E /* Infrastructure.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 6317518E1D59766500A9DDDC /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 631751C11D59768200A9DDDC /* 2.3.4.swift in Sources */, - 631751BA1D59768200A9DDDC /* 2.2.2.swift in Sources */, - 631751BF1D59768200A9DDDC /* 2.3.1.swift in Sources */, - 631751B91D59768200A9DDDC /* 2.1.3.swift in Sources */, - 631751BD1D59768200A9DDDC /* 2.2.6.swift in Sources */, - 631751B71D59768200A9DDDC /* 0.0.0.swift in Sources */, - 631751C01D59768200A9DDDC /* 2.3.2.swift in Sources */, - 631751B81D59768200A9DDDC /* 2.1.2.swift in Sources */, - 631751BE1D59768200A9DDDC /* 2.2.7.swift in Sources */, - 631751BC1D59768200A9DDDC /* 2.2.4.swift in Sources */, - 631751BB1D59768200A9DDDC /* 2.2.3.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 633027E3203CC0060037E136 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63CF6D7E203CD12700EC8927 /* DeprecationTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63B0AC521D595E1B00FA21D9 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 636A29251F1C3089001229C2 /* race.swift in Sources */, - 63B0AC9A1D595E6300FA21D9 /* when.swift in Sources */, - 636A29271F1C3927001229C2 /* Resolver.swift in Sources */, - 63B0AC991D595E6300FA21D9 /* when.m in Sources */, - 63D9B2EF203385FD0075C00B /* race.m in Sources */, - 63B0AC801D595E6300FA21D9 /* after.swift in Sources */, - 63B18AEC1F2D205C00B79E37 /* CustomStringConvertible.swift in Sources */, - 085B96BF21A9B37C00E5E22F /* LogEvent.swift in Sources */, - 6330B5E11F2E991200D60528 /* Configuration.swift in Sources */, - 63B912AA1F1D7B1300D49110 /* firstly.swift in Sources */, - 636A29211F1C1716001229C2 /* Thenable.swift in Sources */, - 632FBBE31F33B273008F8FBB /* Catchable.swift in Sources */, - 63B0AC851D595E6300FA21D9 /* dispatch_promise.m in Sources */, - 636A291F1F1C16FF001229C2 /* Box.swift in Sources */, - 63B0AC821D595E6300FA21D9 /* AnyPromise.m in Sources */, - 636A29231F1C17A6001229C2 /* Guarantee.swift in Sources */, - 636A291A1F1C156B001229C2 /* Promise.swift in Sources */, - 63B0AC8B1D595E6300FA21D9 /* join.m in Sources */, - 63B0AC891D595E6300FA21D9 /* hang.m in Sources */, - 63B0AC831D595E6300FA21D9 /* AnyPromise.swift in Sources */, - 63D9B2F120338D5D0075C00B /* Deprecations.swift in Sources */, - 63B0AC871D595E6300FA21D9 /* Error.swift in Sources */, - 0CC3AF2B1FCF84F7000E98C9 /* hang.swift in Sources */, - 63B0AC7F1D595E6300FA21D9 /* after.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - C0244E512047A6CB00ACB4AC /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - C013F73C20494291006B57B1 /* JSAdapter.swift in Sources */, - C0244E692047AC9F00ACB4AC /* AllTests.swift in Sources */, - C013F740204E5064006B57B1 /* JSUtils.swift in Sources */, - C013F73A2049076A006B57B1 /* JSPromise.swift in Sources */, - C013F7382048E3B6006B57B1 /* MockNodeEnvironment.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 631411331D59795700E24B9E /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 63B0AC561D595E1B00FA21D9 /* PromiseKit */; - targetProxy = 631411341D59795700E24B9E /* PBXContainerItemProxy */; - }; - 6317518C1D59766500A9DDDC /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 63B0AC561D595E1B00FA21D9 /* PromiseKit */; - targetProxy = 6317518D1D59766500A9DDDC /* PBXContainerItemProxy */; - }; - 633027E1203CC0060037E136 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 63B0AC561D595E1B00FA21D9 /* PromiseKit */; - targetProxy = 633027E2203CC0060037E136 /* PBXContainerItemProxy */; - }; - 635D64051D5962F900BC0AF5 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 63B0AC561D595E1B00FA21D9 /* PromiseKit */; - targetProxy = 635D64041D5962F900BC0AF5 /* PBXContainerItemProxy */; - }; - C0244E4F2047A6CB00ACB4AC /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 63B0AC561D595E1B00FA21D9 /* PromiseKit */; - targetProxy = C0244E502047A6CB00ACB4AC /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 630019201D596292003B4E30 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.12; - SWIFT_INSTALL_OBJC_HEADER = NO; - TVOS_DEPLOYMENT_TARGET = 10.1; - }; - name = Debug; - }; - 630019211D596292003B4E30 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.12; - SWIFT_INSTALL_OBJC_HEADER = NO; - TVOS_DEPLOYMENT_TARGET = 10.1; - }; - name = Release; - }; - 6314113A1D59795700E24B9E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - SWIFT_INSTALL_OBJC_HEADER = NO; - SWIFT_OBJC_BRIDGING_HEADER = Tests/Bridging/Infrastructure.h; - }; - name = Debug; - }; - 6314113B1D59795700E24B9E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - SWIFT_INSTALL_OBJC_HEADER = NO; - SWIFT_OBJC_BRIDGING_HEADER = Tests/Bridging/Infrastructure.h; - }; - name = Release; - }; - 631751A61D59766500A9DDDC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - SWIFT_INSTALL_OBJC_HEADER = NO; - }; - name = Debug; - }; - 631751A71D59766500A9DDDC /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - SWIFT_INSTALL_OBJC_HEADER = NO; - }; - name = Release; - }; - 633027E8203CC0060037E136 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_INSTALL_OBJC_HEADER = NO; - SWIFT_SUPPRESS_WARNINGS = YES; - }; - name = Debug; - }; - 633027E9203CC0060037E136 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_INSTALL_OBJC_HEADER = NO; - SWIFT_SUPPRESS_WARNINGS = YES; - }; - name = Release; - }; - 6399A3761D595D9100D65233 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 6.16.1; - DEBUG_INFORMATION_FORMAT = dwarf; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1"; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_DYLIB_INSTALL_NAME = "@rpath"; - MACOSX_DEPLOYMENT_TARGET = 10.10; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit; - PRODUCT_BUNDLE_PACKAGE_TYPE = BNDL; - PRODUCT_NAME = "$(TARGET_NAME)"; - SUPPORTED_PLATFORMS = "macosx appletvsimulator appletvos watchsimulator iphonesimulator watchos iphoneos"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - TVOS_DEPLOYMENT_TARGET = 9.0; - VERSIONING_SYSTEM = "apple-generic"; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Debug; - }; - 6399A3771D595D9100D65233 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 6.16.1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_DYLIB_INSTALL_NAME = "@rpath"; - MACOSX_DEPLOYMENT_TARGET = 10.10; - PRODUCT_BUNDLE_IDENTIFIER = org.promisekit; - PRODUCT_BUNDLE_PACKAGE_TYPE = BNDL; - PRODUCT_NAME = "$(TARGET_NAME)"; - SUPPORTED_PLATFORMS = "macosx appletvsimulator appletvos watchsimulator iphonesimulator watchos iphoneos"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - TVOS_DEPLOYMENT_TARGET = 9.0; - VERSIONING_SYSTEM = "apple-generic"; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Release; - }; - 63B0AC5D1D595E1B00FA21D9 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_WARN_ASSIGN_ENUM = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_CXX0X_EXTENSIONS = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES; - CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = YES; - CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES; - CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; - CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE; - CLANG_WARN__EXIT_TIME_DESTRUCTORS = YES; - DEFINES_MODULE = YES; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_TESTABILITY = YES; - GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; - GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES; - GCC_TREAT_WARNINGS_AS_ERRORS = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; - GCC_WARN_ABOUT_MISSING_NEWLINE = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES; - GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES; - GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; - GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; - GCC_WARN_SIGN_COMPARE = YES; - GCC_WARN_STRICT_SELECTOR_MATCH = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNKNOWN_PRAGMAS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_LABEL = YES; - GCC_WARN_UNUSED_PARAMETER = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - LD_DYLIB_INSTALL_NAME = "$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_PACKAGE_TYPE = FMWK; - SKIP_INSTALL = YES; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - }; - name = Debug; - }; - 63B0AC5E1D595E1B00FA21D9 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - BITCODE_GENERATION_MODE = bitcode; - CLANG_WARN_ASSIGN_ENUM = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_CXX0X_EXTENSIONS = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES; - CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = YES; - CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES; - CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; - CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE; - CLANG_WARN__EXIT_TIME_DESTRUCTORS = YES; - DEFINES_MODULE = YES; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; - GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES; - GCC_TREAT_WARNINGS_AS_ERRORS = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; - GCC_WARN_ABOUT_MISSING_NEWLINE = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES; - GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES; - GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; - GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; - GCC_WARN_SIGN_COMPARE = YES; - GCC_WARN_STRICT_SELECTOR_MATCH = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNKNOWN_PRAGMAS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_LABEL = YES; - GCC_WARN_UNUSED_PARAMETER = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - LD_DYLIB_INSTALL_NAME = "$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_PACKAGE_TYPE = FMWK; - SKIP_INSTALL = YES; - SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; - TARGETED_DEVICE_FAMILY = "1,2,3,4"; - }; - name = Release; - }; - C0244E602047A6CB00ACB4AC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CLANG_ENABLE_MODULES = YES; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_INSTALL_OBJC_HEADER = NO; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - C0244E612047A6CB00ACB4AC /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CLANG_ENABLE_MODULES = YES; - LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks @loader_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_INSTALL_OBJC_HEADER = NO; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 6300191F1D596292003B4E30 /* Build configuration list for PBXNativeTarget "PMKCoreTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 630019201D596292003B4E30 /* Debug */, - 630019211D596292003B4E30 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 631411391D59795700E24B9E /* Build configuration list for PBXNativeTarget "PMKBridgeTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 6314113A1D59795700E24B9E /* Debug */, - 6314113B1D59795700E24B9E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 631751A51D59766500A9DDDC /* Build configuration list for PBXNativeTarget "PMKA+Tests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 631751A61D59766500A9DDDC /* Debug */, - 631751A71D59766500A9DDDC /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 633027E7203CC0060037E136 /* Build configuration list for PBXNativeTarget "PMKDeprecatedTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 633027E8203CC0060037E136 /* Debug */, - 633027E9203CC0060037E136 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 6399A3751D595D9100D65233 /* Build configuration list for PBXProject "PromiseKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 6399A3761D595D9100D65233 /* Debug */, - 6399A3771D595D9100D65233 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63B0AC5F1D595E1B00FA21D9 /* Build configuration list for PBXNativeTarget "PromiseKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63B0AC5D1D595E1B00FA21D9 /* Debug */, - 63B0AC5E1D595E1B00FA21D9 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C0244E5F2047A6CB00ACB4AC /* Build configuration list for PBXNativeTarget "PMKJSA+Tests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C0244E602047A6CB00ACB4AC /* Debug */, - C0244E612047A6CB00ACB4AC /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 6399A3721D595D9100D65233 /* Project object */; -} diff --git a/Carthage/Checkouts/PromiseKit/PromiseKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Carthage/Checkouts/PromiseKit/PromiseKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/Carthage/Checkouts/PromiseKit/PromiseKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Carthage/Checkouts/PromiseKit/PromiseKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Carthage/Checkouts/PromiseKit/PromiseKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/Carthage/Checkouts/PromiseKit/PromiseKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Carthage/Checkouts/PromiseKit/PromiseKit.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Carthage/Checkouts/PromiseKit/PromiseKit.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index 08de0be8d..000000000 --- a/Carthage/Checkouts/PromiseKit/PromiseKit.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded - - - diff --git a/Carthage/Checkouts/PromiseKit/PromiseKit.xcodeproj/xcshareddata/xcschemes/PromiseKit.xcscheme b/Carthage/Checkouts/PromiseKit/PromiseKit.xcodeproj/xcshareddata/xcschemes/PromiseKit.xcscheme deleted file mode 100644 index 288d4a273..000000000 --- a/Carthage/Checkouts/PromiseKit/PromiseKit.xcodeproj/xcshareddata/xcschemes/PromiseKit.xcscheme +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/PromiseKit/README.md b/Carthage/Checkouts/PromiseKit/README.md deleted file mode 100644 index b3bbd8011..000000000 --- a/Carthage/Checkouts/PromiseKit/README.md +++ /dev/null @@ -1,206 +0,0 @@ -![PromiseKit](../gh-pages/public/img/logo-tight.png) - -[![badge-pod][]][cocoapods] ![badge-languages][] ![badge-pms][] ![badge-platforms][] [![badge-travis][]][travis] - ---- - -Promises simplify asynchronous programming, freeing you up to focus on the more -important things. They are easy to learn, easy to master and result in clearer, -more readable code. Your co-workers will thank you. - -```swift -UIApplication.shared.isNetworkActivityIndicatorVisible = true - -let fetchImage = URLSession.shared.dataTask(.promise, with: url).compactMap{ UIImage(data: $0.data) } -let fetchLocation = CLLocationManager.requestLocation().lastValue - -firstly { - when(fulfilled: fetchImage, fetchLocation) -}.done { image, location in - self.imageView.image = image - self.label.text = "\(location)" -}.ensure { - UIApplication.shared.isNetworkActivityIndicatorVisible = false -}.catch { error in - self.show(UIAlertController(for: error), sender: self) -} -``` - -PromiseKit is a thoughtful and complete implementation of promises for any -platform that has a `swiftc`. It has *excellent* Objective-C bridging and -*delightful* specializations for iOS, macOS, tvOS and watchOS. It is a top-100 -pod used in many of the most popular apps in the world. - -[![codecov](https://codecov.io/gh/mxcl/PromiseKit/branch/master/graph/badge.svg)](https://codecov.io/gh/mxcl/PromiseKit) - -# PromiseKit 6 - -[Release notes and migration guide][PMK6]. - -# Quick Start - -In your [Podfile]: - -```ruby -use_frameworks! - -target "Change Me!" do - pod "PromiseKit", "~> 6.8" -end -``` - -> The above gives an Xcode warning? See our [Installation Guide]. - -PromiseKit 6, 5 and 4 support Xcode 8.3, 9.x and 10.0; Swift 3.1, -3.2, 3.3, 3.4, 4.0, 4.1, 4.2, 4.3 and 5.0 (development snapshots); iOS, macOS, -tvOS, watchOS, Linux and Android; CocoaPods, Carthage and SwiftPM; -([CI Matrix](https://travis-ci.org/mxcl/PromiseKit)). - -For Carthage, SwiftPM, Accio, etc., or for instructions when using older Swifts or Xcodes, see our [Installation Guide]. We recommend -[Carthage](https://github.com/Carthage/Carthage) or -[Accio](https://github.com/JamitLabs/Accio). - -# Professionally Supported PromiseKit is Now Available - -TideLift gives software development teams a single source for purchasing -and maintaining their software, with professional grade assurances from -the experts who know it best, while seamlessly integrating with existing -tools. - -[Get Professional Support for PromiseKit with TideLift](https://tidelift.com/subscription/pkg/cocoapods-promisekit?utm_source=cocoapods-promisekit&utm_medium=referral&utm_campaign=readme). - -# PromiseKit is Thousands of Hours of Work - -Hey there, I’m Max Howell. I’m a prolific producer of open source software and -probably you already use some of it (I created [`brew`]). I work full-time on -open source and it’s hard; currently *I earn less than minimum wage*. Please -help me continue my work, I appreciate it 🙏🏻 - - - - - -[Other ways to say thanks](http://mxcl.dev/#donate). - -[`brew`]: https://brew.sh - -# Documentation - -* Handbook - * [Getting Started](Documentation/GettingStarted.md) - * [Promises: Common Patterns](Documentation/CommonPatterns.md) - * [Frequently Asked Questions](Documentation/FAQ.md) -* Manual - * [Installation Guide](Documentation/Installation.md) - * [Objective-C Guide](Documentation/ObjectiveC.md) - * [Troubleshooting](Documentation/Troubleshooting.md) (e.g., solutions to common compile errors) - * [Appendix](Documentation/Appendix.md) -* [API Reference](https://mxcl.dev/PromiseKit/reference/v6/Classes/Promise.html) - -# Extensions - -Promises are only as useful as the asynchronous tasks they represent. Thus, we -have converted (almost) all of Apple’s APIs to promises. The default CocoaPod -provides Promises and the extensions for Foundation and UIKit. The other -extensions are available by specifying additional subspecs in your `Podfile`, -e.g.: - -```ruby -pod "PromiseKit/MapKit" # MKDirections().calculate().then { /*…*/ } -pod "PromiseKit/CoreLocation" # CLLocationManager.requestLocation().then { /*…*/ } -``` - -All our extensions are separate repositories at the [PromiseKit organization]. - -## I don't want the extensions! - -Then don’t have them: - -```ruby -pod "PromiseKit/CorePromise", "~> 6.8" -``` - -> *Note:* Carthage installations come with no extensions by default. - -## Choose Your Networking Library - -Promise chains commonly start with a network operation. Thus, we offer -extensions for `URLSession`: - -```swift -// pod 'PromiseKit/Foundation' # https://github.com/PromiseKit/Foundation - -firstly { - URLSession.shared.dataTask(.promise, with: try makeUrlRequest()).validate() - // ^^ we provide `.validate()` so that eg. 404s get converted to errors -}.map { - try JSONDecoder().decode(Foo.self, with: $0.data) -}.done { foo in - //… -}.catch { error in - //… -} - -func makeUrlRequest() throws -> URLRequest { - var rq = URLRequest(url: url) - rq.httpMethod = "POST" - rq.addValue("application/json", forHTTPHeaderField: "Content-Type") - rq.addValue("application/json", forHTTPHeaderField: "Accept") - rq.httpBody = try JSONEncoder().encode(obj) - return rq -} -``` - -And [Alamofire]: - -```swift -// pod 'PromiseKit/Alamofire' # https://github.com/PromiseKit/Alamofire- - -firstly { - Alamofire - .request("http://example.com", method: .post, parameters: params) - .responseDecodable(Foo.self) -}.done { foo in - //… -}.catch { error in - //… -} -``` - -Nowadays, considering that: - -* We almost always POST JSON -* We now have `JSONDecoder` -* PromiseKit now has `map` and other functional primitives -* PromiseKit (like Alamofire, but not raw-`URLSession`) also defaults to having - callbacks go to the main thread - -We recommend vanilla `URLSession`. It uses fewer black boxes and sticks closer to the metal. Alamofire was essential until the three bullet points above -became true, but nowadays it isn’t really necessary. - -# Support - -Please check our [Troubleshooting Guide](Documentation/Troubleshooting.md), and -if after that you still have a question, ask at our [Gitter chat channel] or on [our bug tracker]. - -## Security & Vulnerability Reporting or Disclosure - -https://tidelift.com/security - - -[badge-pod]: https://img.shields.io/cocoapods/v/PromiseKit.svg?label=version -[badge-pms]: https://img.shields.io/badge/supports-CocoaPods%20%7C%20Carthage%20%7C%20Accio%20%7C%20SwiftPM-green.svg -[badge-languages]: https://img.shields.io/badge/languages-Swift%20%7C%20ObjC-orange.svg -[badge-platforms]: https://img.shields.io/badge/platforms-macOS%20%7C%20iOS%20%7C%20watchOS%20%7C%20tvOS%20%7C%20Linux-lightgrey.svg -[badge-mit]: https://img.shields.io/badge/license-MIT-blue.svg -[OMGHTTPURLRQ]: https://github.com/PromiseKit/OMGHTTPURLRQ -[Alamofire]: http://github.com/PromiseKit/Alamofire- -[PromiseKit organization]: https://github.com/PromiseKit -[Gitter chat channel]: https://gitter.im/mxcl/PromiseKit -[our bug tracker]: https://github.com/mxcl/PromiseKit/issues/new -[Podfile]: https://guides.cocoapods.org/syntax/podfile.html -[PMK6]: http://mxcl.dev/PromiseKit/news/2018/02/PromiseKit-6.0-Released/ -[Installation Guide]: Documentation/Installation.md -[badge-travis]: https://travis-ci.org/mxcl/PromiseKit.svg?branch=master -[travis]: https://travis-ci.org/mxcl/PromiseKit -[cocoapods]: https://cocoapods.org/pods/PromiseKit diff --git a/Carthage/Checkouts/PromiseKit/Sources/AnyPromise+Private.h b/Carthage/Checkouts/PromiseKit/Sources/AnyPromise+Private.h deleted file mode 100644 index cd28c4183..000000000 --- a/Carthage/Checkouts/PromiseKit/Sources/AnyPromise+Private.h +++ /dev/null @@ -1,32 +0,0 @@ -@import Foundation.NSError; -@import Foundation.NSPointerArray; - -#if TARGET_OS_IPHONE - #define NSPointerArrayMake(N) ({ \ - NSPointerArray *aa = [NSPointerArray strongObjectsPointerArray]; \ - aa.count = N; \ - aa; \ - }) -#else - static inline NSPointerArray * __nonnull NSPointerArrayMake(NSUInteger count) { - #pragma clang diagnostic push - #pragma clang diagnostic ignored "-Wdeprecated-declarations" - NSPointerArray *aa = [[NSPointerArray class] respondsToSelector:@selector(strongObjectsPointerArray)] - ? [NSPointerArray strongObjectsPointerArray] - : [NSPointerArray pointerArrayWithStrongObjects]; - #pragma clang diagnostic pop - aa.count = count; - return aa; - } -#endif - -#define IsError(o) [o isKindOfClass:[NSError class]] -#define IsPromise(o) [o isKindOfClass:[AnyPromise class]] - -#import "AnyPromise.h" - -@class PMKArray; - -@interface AnyPromise () -- (void)__pipe:(void(^ __nonnull)(__nullable id))block NS_REFINED_FOR_SWIFT; -@end diff --git a/Carthage/Checkouts/PromiseKit/Sources/AnyPromise.h b/Carthage/Checkouts/PromiseKit/Sources/AnyPromise.h deleted file mode 100644 index 75352d55c..000000000 --- a/Carthage/Checkouts/PromiseKit/Sources/AnyPromise.h +++ /dev/null @@ -1,308 +0,0 @@ -#import -#import -#import - -/// INTERNAL DO NOT USE -@class __AnyPromise; - -/// Provided to simplify some usage sites -typedef void (^PMKResolver)(id __nullable) NS_REFINED_FOR_SWIFT; - - -/// An Objective-C implementation of the promise pattern. -@interface AnyPromise: NSObject - -/** - Create a new promise that resolves with the provided block. - - Use this method when wrapping asynchronous code that does *not* use promises so that this code can be used in promise chains. - - If `resolve` is called with an `NSError` object, the promise is rejected, otherwise the promise is fulfilled. - - Don’t use this method if you already have promises! Instead, just return your promise. - - Should you need to fulfill a promise but have no sensical value to use: your promise is a `void` promise: fulfill with `nil`. - - The block you pass is executed immediately on the calling thread. - - - Parameter block: The provided block is immediately executed, inside the block call `resolve` to resolve this promise and cause any attached handlers to execute. If you are wrapping a delegate-based system, we recommend instead to use: initWithResolver: - - Returns: A new promise. - - Warning: Resolving a promise with `nil` fulfills it. - - SeeAlso: https://github.com/mxcl/PromiseKit/blob/master/Documentation/GettingStarted.md#making-promises - - SeeAlso: https://github.com/mxcl/PromiseKit/blob/master/Documentation/CommonPatterns.md#wrapping-delegate-systems - */ -+ (instancetype __nonnull)promiseWithResolverBlock:(void (^ __nonnull)(__nonnull PMKResolver))resolveBlock NS_REFINED_FOR_SWIFT; - - -/// INTERNAL DO NOT USE -- (instancetype __nonnull)initWith__D:(__AnyPromise * __nonnull)d; - -/** - Creates a resolved promise. - - When developing your own promise systems, it is occasionally useful to be able to return an already resolved promise. - - - Parameter value: The value with which to resolve this promise. Passing an `NSError` will cause the promise to be rejected, passing an AnyPromise will return a new AnyPromise bound to that promise, otherwise the promise will be fulfilled with the value passed. - - Returns: A resolved promise. - */ -+ (instancetype __nonnull)promiseWithValue:(__nullable id)value NS_REFINED_FOR_SWIFT; - -/** - The value of the asynchronous task this promise represents. - - A promise has `nil` value if the asynchronous task it represents has not finished. If the value is `nil` the promise is still `pending`. - - - Warning: *Note* Our Swift variant’s value property returns nil if the promise is rejected where AnyPromise will return the error object. This fits with the pattern where AnyPromise is not strictly typed and is more dynamic, but you should be aware of the distinction. - - - Note: If the AnyPromise was fulfilled with a `PMKManifold`, returns only the first fulfillment object. - - - Returns: The value with which this promise was resolved or `nil` if this promise is pending. - */ -@property (nonatomic, readonly) __nullable id value NS_REFINED_FOR_SWIFT; - -/// - Returns: if the promise is pending resolution. -@property (nonatomic, readonly) BOOL pending NS_REFINED_FOR_SWIFT; - -/// - Returns: if the promise is resolved and fulfilled. -@property (nonatomic, readonly) BOOL fulfilled NS_REFINED_FOR_SWIFT; - -/// - Returns: if the promise is resolved and rejected. -@property (nonatomic, readonly) BOOL rejected NS_REFINED_FOR_SWIFT; - - -/** - The provided block is executed when its receiver is fulfilled. - - If you provide a block that takes a parameter, the value of the receiver will be passed as that parameter. - - [NSURLSession GET:url].then(^(NSData *data){ - // do something with data - }); - - @return A new promise that is resolved with the value returned from the provided block. For example: - - [NSURLSession GET:url].then(^(NSData *data){ - return data.length; - }).then(^(NSNumber *number){ - //… - }); - - @warning *Important* The block passed to `then` may take zero, one, two or three arguments, and return an object or return nothing. This flexibility is why the method signature for then is `id`, which means you will not get completion for the block parameter, and must type it yourself. It is safe to type any block syntax here, so to start with try just: `^{}`. - - @warning *Important* If an `NSError` or `NSString` is thrown inside your block, or you return an `NSError` object the next `Promise` will be rejected. See `catch` for documentation on error handling. - - @warning *Important* `then` is always executed on the main queue. - - @see thenOn - @see thenInBackground -*/ -- (AnyPromise * __nonnull (^ __nonnull)(id __nonnull))then NS_REFINED_FOR_SWIFT; - - -/** - The provided block is executed on the default queue when the receiver is fulfilled. - - This method is provided as a convenience for `thenOn`. - - @see then - @see thenOn -*/ -- (AnyPromise * __nonnull(^ __nonnull)(id __nonnull))thenInBackground NS_REFINED_FOR_SWIFT; - -/** - The provided block is executed on the dispatch queue of your choice when the receiver is fulfilled. - - @see then - @see thenInBackground -*/ -- (AnyPromise * __nonnull(^ __nonnull)(dispatch_queue_t __nonnull, id __nonnull))thenOn NS_REFINED_FOR_SWIFT; - -#ifndef __cplusplus -/** - The provided block is executed when the receiver is rejected. - - Provide a block of form `^(NSError *){}` or simply `^{}`. The parameter has type `id` to give you the freedom to choose either. - - The provided block always runs on the main queue. - - @warning *Note* Cancellation errors are not caught. - - @warning *Note* Since catch is a c++ keyword, this method is not available in Objective-C++ files. Instead use catchOn. - - @see catchOn - @see catchInBackground -*/ -- (AnyPromise * __nonnull(^ __nonnull)(id __nonnull))catch NS_REFINED_FOR_SWIFT; -#endif - -/** - The provided block is executed when the receiver is rejected. - - Provide a block of form `^(NSError *){}` or simply `^{}`. The parameter has type `id` to give you the freedom to choose either. - - The provided block always runs on the global background queue. - - @warning *Note* Cancellation errors are not caught. - - @warning *Note* Since catch is a c++ keyword, this method is not available in Objective-C++ files. Instead use catchWithPolicy. - - @see catch - @see catchOn - */ -- (AnyPromise * __nonnull(^ __nonnull)(id __nonnull))catchInBackground NS_REFINED_FOR_SWIFT; - - -/** - The provided block is executed when the receiver is rejected. - - Provide a block of form `^(NSError *){}` or simply `^{}`. The parameter has type `id` to give you the freedom to choose either. - - The provided block always runs on queue provided. - - @warning *Note* Cancellation errors are not caught. - - @see catch - @see catchInBackground - */ -- (AnyPromise * __nonnull(^ __nonnull)(dispatch_queue_t __nonnull, id __nonnull))catchOn NS_REFINED_FOR_SWIFT; - -/** - The provided block is executed when the receiver is resolved. - - The provided block always runs on the main queue. - - @see ensureOn -*/ -- (AnyPromise * __nonnull(^ __nonnull)(dispatch_block_t __nonnull))ensure NS_REFINED_FOR_SWIFT; - -/** - The provided block is executed on the dispatch queue of your choice when the receiver is resolved. - - @see ensure - */ -- (AnyPromise * __nonnull(^ __nonnull)(dispatch_queue_t __nonnull, dispatch_block_t __nonnull))ensureOn NS_REFINED_FOR_SWIFT; - -/** - Wait until the promise is resolved. - - @return Value if fulfilled or error if rejected. - */ -- (id __nullable)wait NS_REFINED_FOR_SWIFT; - -/** - Create a new promise with an associated resolver. - - Use this method when wrapping asynchronous code that does *not* use - promises so that this code can be used in promise chains. Generally, - prefer `promiseWithResolverBlock:` as the resulting code is more elegant. - - PMKResolver resolve; - AnyPromise *promise = [[AnyPromise alloc] initWithResolver:&resolve]; - - // later - resolve(@"foo"); - - @param resolver A reference to a block pointer of PMKResolver type. - You can then call your resolver to resolve this promise. - - @return A new promise. - - @warning *Important* The resolver strongly retains the promise. - - @see promiseWithResolverBlock: -*/ -- (instancetype __nonnull)initWithResolver:(PMKResolver __strong __nonnull * __nonnull)resolver NS_REFINED_FOR_SWIFT; - -/** - Unavailable methods - */ - -- (instancetype __nonnull)init __attribute__((unavailable("It is illegal to create an unresolvable promise."))); -+ (instancetype __nonnull)new __attribute__((unavailable("It is illegal to create an unresolvable promise."))); -- (AnyPromise * __nonnull(^ __nonnull)(dispatch_block_t __nonnull))always __attribute__((unavailable("See -ensure"))); -- (AnyPromise * __nonnull(^ __nonnull)(dispatch_block_t __nonnull))alwaysOn __attribute__((unavailable("See -ensureOn"))); -- (AnyPromise * __nonnull(^ __nonnull)(dispatch_block_t __nonnull))finally __attribute__((unavailable("See -ensure"))); -- (AnyPromise * __nonnull(^ __nonnull)(dispatch_block_t __nonnull, dispatch_block_t __nonnull))finallyOn __attribute__((unavailable("See -ensureOn"))); - -@end - - -typedef void (^PMKAdapter)(id __nullable, NSError * __nullable) NS_REFINED_FOR_SWIFT; -typedef void (^PMKIntegerAdapter)(NSInteger, NSError * __nullable) NS_REFINED_FOR_SWIFT; -typedef void (^PMKBooleanAdapter)(BOOL, NSError * __nullable) NS_REFINED_FOR_SWIFT; - - -@interface AnyPromise (Adapters) - -/** - Create a new promise by adapting an existing asynchronous system. - - The pattern of a completion block that passes two parameters, the first - the result and the second an `NSError` object is so common that we - provide this convenience adapter to make wrapping such systems more - elegant. - - return [PMKPromise promiseWithAdapterBlock:^(PMKAdapter adapter){ - PFQuery *query = [PFQuery …]; - [query findObjectsInBackgroundWithBlock:adapter]; - }]; - - @warning *Important* If both parameters are nil, the promise fulfills, - if both are non-nil the promise rejects. This is per the convention. - - @see https://github.com/mxcl/PromiseKit/blob/master/Documentation/GettingStarted.md#making-promises - */ -+ (instancetype __nonnull)promiseWithAdapterBlock:(void (^ __nonnull)(PMKAdapter __nonnull adapter))block NS_REFINED_FOR_SWIFT; - -/** - Create a new promise by adapting an existing asynchronous system. - - Adapts asynchronous systems that complete with `^(NSInteger, NSError *)`. - NSInteger will cast to enums provided the enum has been wrapped with - `NS_ENUM`. All of Apple’s enums are, so if you find one that hasn’t you - may need to make a pull-request. - - @see promiseWithAdapter - */ -+ (instancetype __nonnull)promiseWithIntegerAdapterBlock:(void (^ __nonnull)(PMKIntegerAdapter __nonnull adapter))block NS_REFINED_FOR_SWIFT; - -/** - Create a new promise by adapting an existing asynchronous system. - - Adapts asynchronous systems that complete with `^(BOOL, NSError *)`. - - @see promiseWithAdapter - */ -+ (instancetype __nonnull)promiseWithBooleanAdapterBlock:(void (^ __nonnull)(PMKBooleanAdapter __nonnull adapter))block NS_REFINED_FOR_SWIFT; - -@end - - -#ifdef __cplusplus -extern "C" { -#endif - -/** - Whenever resolving a promise you may resolve with a tuple, eg. - returning from a `then` or `catch` handler or resolving a new promise. - - Consumers of your Promise are not compelled to consume any arguments and - in fact will often only consume the first parameter. Thus ensure the - order of parameters is: from most-important to least-important. - - Currently PromiseKit limits you to THREE parameters to the manifold. -*/ -#define PMKManifold(...) __PMKManifold(__VA_ARGS__, 3, 2, 1) -#define __PMKManifold(_1, _2, _3, N, ...) __PMKArrayWithCount(N, _1, _2, _3) -extern id __nonnull __PMKArrayWithCount(NSUInteger, ...); - -#ifdef __cplusplus -} // Extern C -#endif - - - - -__attribute__((unavailable("See AnyPromise"))) -@interface PMKPromise -@end diff --git a/Carthage/Checkouts/PromiseKit/Sources/AnyPromise.m b/Carthage/Checkouts/PromiseKit/Sources/AnyPromise.m deleted file mode 100644 index 3725beacd..000000000 --- a/Carthage/Checkouts/PromiseKit/Sources/AnyPromise.m +++ /dev/null @@ -1,179 +0,0 @@ -#if __has_include("PromiseKit-Swift.h") - #import "PromiseKit-Swift.h" -#else - #import -#endif -#import "PMKCallVariadicBlock.m" -#import "AnyPromise+Private.h" -#import "AnyPromise.h" - -NSString *const PMKErrorDomain = @"PMKErrorDomain"; - - -@implementation AnyPromise { - __AnyPromise *d; -} - -- (instancetype)initWith__D:(__AnyPromise *)dd { - self = [super init]; - if (self) self->d = dd; - return self; -} - -- (instancetype)initWithResolver:(PMKResolver __strong *)resolver { - self = [super init]; - if (self) - d = [[__AnyPromise alloc] initWithResolver:^(void (^resolve)(id)) { - *resolver = resolve; - }]; - return self; -} - -+ (instancetype)promiseWithResolverBlock:(void (^)(PMKResolver _Nonnull))resolveBlock { - id d = [[__AnyPromise alloc] initWithResolver:resolveBlock]; - return [[self alloc] initWith__D:d]; -} - -+ (instancetype)promiseWithValue:(id)value { - //TODO provide a more efficient route for sealed promises - id d = [[__AnyPromise alloc] initWithResolver:^(void (^resolve)(id)) { - resolve(value); - }]; - return [[self alloc] initWith__D:d]; -} - -//TODO remove if possible, but used by when.m -- (void)__pipe:(void (^)(id _Nullable))block { - [d __pipe:block]; -} - -//NOTE used by AnyPromise.swift -- (id)__d { - return d; -} - -- (AnyPromise *(^)(id))then { - return ^(id block) { - return [self->d __thenOn:dispatch_get_main_queue() execute:^(id obj) { - return PMKCallVariadicBlock(block, obj); - }]; - }; -} - -- (AnyPromise *(^)(dispatch_queue_t, id))thenOn { - return ^(dispatch_queue_t queue, id block) { - return [self->d __thenOn:queue execute:^(id obj) { - return PMKCallVariadicBlock(block, obj); - }]; - }; -} - -- (AnyPromise *(^)(id))thenInBackground { - return ^(id block) { - return [self->d __thenOn:dispatch_get_global_queue(0, 0) execute:^(id obj) { - return PMKCallVariadicBlock(block, obj); - }]; - }; -} - -- (AnyPromise *(^)(dispatch_queue_t, id))catchOn { - return ^(dispatch_queue_t q, id block) { - return [self->d __catchOn:q execute:^(id obj) { - return PMKCallVariadicBlock(block, obj); - }]; - }; -} - -- (AnyPromise *(^)(id))catch { - return ^(id block) { - return [self->d __catchOn:dispatch_get_main_queue() execute:^(id obj) { - return PMKCallVariadicBlock(block, obj); - }]; - }; -} - -- (AnyPromise *(^)(id))catchInBackground { - return ^(id block) { - return [self->d __catchOn:dispatch_get_global_queue(0, 0) execute:^(id obj) { - return PMKCallVariadicBlock(block, obj); - }]; - }; -} - -- (AnyPromise *(^)(dispatch_block_t))ensure { - return ^(dispatch_block_t block) { - return [self->d __ensureOn:dispatch_get_main_queue() execute:block]; - }; -} - -- (AnyPromise *(^)(dispatch_queue_t, dispatch_block_t))ensureOn { - return ^(dispatch_queue_t queue, dispatch_block_t block) { - return [self->d __ensureOn:queue execute:block]; - }; -} - -- (id)wait { - return [d __wait]; -} - -- (BOOL)pending { - return [[d valueForKey:@"__pending"] boolValue]; -} - -- (BOOL)rejected { - return IsError([d __value]); -} - -- (BOOL)fulfilled { - return !self.rejected; -} - -- (id)value { - id obj = [d __value]; - - if ([obj isKindOfClass:[PMKArray class]]) { - return obj[0]; - } else { - return obj; - } -} - -@end - - - -@implementation AnyPromise (Adapters) - -+ (instancetype)promiseWithAdapterBlock:(void (^)(PMKAdapter))block { - return [self promiseWithResolverBlock:^(PMKResolver resolve) { - block(^(id value, id error){ - resolve(error ?: value); - }); - }]; -} - -+ (instancetype)promiseWithIntegerAdapterBlock:(void (^)(PMKIntegerAdapter))block { - return [self promiseWithResolverBlock:^(PMKResolver resolve) { - block(^(NSInteger value, id error){ - if (error) { - resolve(error); - } else { - resolve(@(value)); - } - }); - }]; -} - -+ (instancetype)promiseWithBooleanAdapterBlock:(void (^)(PMKBooleanAdapter adapter))block { - return [self promiseWithResolverBlock:^(PMKResolver resolve) { - block(^(BOOL value, id error){ - if (error) { - resolve(error); - } else { - resolve(@(value)); - } - }); - }]; -} - -@end diff --git a/Carthage/Checkouts/PromiseKit/Sources/AnyPromise.swift b/Carthage/Checkouts/PromiseKit/Sources/AnyPromise.swift deleted file mode 100644 index d7e575d2d..000000000 --- a/Carthage/Checkouts/PromiseKit/Sources/AnyPromise.swift +++ /dev/null @@ -1,224 +0,0 @@ -import Foundation - -/** - __AnyPromise is an implementation detail. - - Because of how ObjC/Swift compatibility work we have to compose our AnyPromise - with this internal object, however this is still part of the public interface. - Sadly. Please don’t use it. -*/ -@objc(__AnyPromise) public class __AnyPromise: NSObject { - fileprivate let box: Box - - @objc public init(resolver body: (@escaping (Any?) -> Void) -> Void) { - box = EmptyBox() - super.init() - body { - if let p = $0 as? AnyPromise { - p.d.__pipe(self.box.seal) - } else { - self.box.seal($0) - } - } - } - - @objc public func __thenOn(_ q: DispatchQueue, execute: @escaping (Any?) -> Any?) -> AnyPromise { - return AnyPromise(__D: __AnyPromise(resolver: { resolve in - self.__pipe { obj in - if !(obj is NSError) { - q.async { - resolve(execute(obj)) - } - } else { - resolve(obj) - } - } - })) - } - - @objc public func __catchOn(_ q: DispatchQueue, execute: @escaping (Any?) -> Any?) -> AnyPromise { - return AnyPromise(__D: __AnyPromise(resolver: { resolve in - self.__pipe { obj in - if obj is NSError { - q.async { - resolve(execute(obj)) - } - } else { - resolve(obj) - } - } - })) - } - - @objc public func __ensureOn(_ q: DispatchQueue, execute: @escaping () -> Void) -> AnyPromise { - return AnyPromise(__D: __AnyPromise(resolver: { resolve in - self.__pipe { obj in - q.async { - execute() - resolve(obj) - } - } - })) - } - - @objc public func __wait() -> Any? { - if Thread.isMainThread { - conf.logHandler(.waitOnMainThread) - } - - var result = __value - - if result == nil { - let group = DispatchGroup() - group.enter() - self.__pipe { obj in - result = obj - group.leave() - } - group.wait() - } - - return result - } - - /// Internal, do not use! Some behaviors undefined. - @objc public func __pipe(_ to: @escaping (Any?) -> Void) { - let to = { (obj: Any?) -> Void in - if obj is NSError { - to(obj) // or we cannot determine if objects are errors in objc land - } else { - to(obj) - } - } - switch box.inspect() { - case .pending: - box.inspect { - switch $0 { - case .pending(let handlers): - handlers.append { obj in - to(obj) - } - case .resolved(let obj): - to(obj) - } - } - case .resolved(let obj): - to(obj) - } - } - - @objc public var __value: Any? { - switch box.inspect() { - case .resolved(let obj): - return obj - default: - return nil - } - } - - @objc public var __pending: Bool { - switch box.inspect() { - case .pending: - return true - case .resolved: - return false - } - } -} - -extension AnyPromise: Thenable, CatchMixin { - - /// - Returns: A new `AnyPromise` bound to a `Promise`. - public convenience init(_ bridge: U) { - self.init(__D: __AnyPromise(resolver: { resolve in - bridge.pipe { - switch $0 { - case .rejected(let error): - resolve(error as NSError) - case .fulfilled(let value): - resolve(value) - } - } - })) - } - - public func pipe(to body: @escaping (Result) -> Void) { - - func fulfill() { - // calling through to the ObjC `value` property unwraps (any) PMKManifold - // and considering this is the Swift pipe; we want that. - body(.fulfilled(self.value(forKey: "value"))) - } - - switch box.inspect() { - case .pending: - box.inspect { - switch $0 { - case .pending(let handlers): - handlers.append { - if let error = $0 as? Error { - body(.rejected(error)) - } else { - fulfill() - } - } - case .resolved(let error as Error): - body(.rejected(error)) - case .resolved: - fulfill() - } - } - case .resolved(let error as Error): - body(.rejected(error)) - case .resolved: - fulfill() - } - } - - fileprivate var d: __AnyPromise { - return value(forKey: "__d") as! __AnyPromise - } - - var box: Box { - return d.box - } - - public var result: Result? { - guard let value = __value else { - return nil - } - if let error = value as? Error { - return .rejected(error) - } else { - return .fulfilled(value) - } - } - - public typealias T = Any? -} - - -#if swift(>=3.1) -public extension Promise where T == Any? { - convenience init(_ anyPromise: AnyPromise) { - self.init { - anyPromise.pipe(to: $0.resolve) - } - } -} -#else -extension AnyPromise { - public func asPromise() -> Promise { - return Promise(.pending, resolver: { resolve in - pipe { result in - switch result { - case .rejected(let error): - resolve.reject(error) - case .fulfilled(let obj): - resolve.fulfill(obj) - } - } - }) - } -} -#endif diff --git a/Carthage/Checkouts/PromiseKit/Sources/Box.swift b/Carthage/Checkouts/PromiseKit/Sources/Box.swift deleted file mode 100644 index 43cd3d1b0..000000000 --- a/Carthage/Checkouts/PromiseKit/Sources/Box.swift +++ /dev/null @@ -1,101 +0,0 @@ -import Dispatch - -enum Sealant { - case pending(Handlers) - case resolved(R) -} - -final class Handlers { - var bodies: [(R) -> Void] = [] - func append(_ item: @escaping(R) -> Void) { bodies.append(item) } -} - -/// - Remark: not protocol ∵ http://www.russbishop.net/swift-associated-types-cont -class Box { - func inspect() -> Sealant { fatalError() } - func inspect(_: (Sealant) -> Void) { fatalError() } - func seal(_: T) {} -} - -final class SealedBox: Box { - let value: T - - init(value: T) { - self.value = value - } - - override func inspect() -> Sealant { - return .resolved(value) - } -} - -class EmptyBox: Box { - private var sealant = Sealant.pending(.init()) - private let barrier = DispatchQueue(label: "org.promisekit.barrier", attributes: .concurrent) - - override func seal(_ value: T) { - var handlers: Handlers! - barrier.sync(flags: .barrier) { - guard case .pending(let _handlers) = self.sealant else { - return // already fulfilled! - } - handlers = _handlers - self.sealant = .resolved(value) - } - - //FIXME we are resolved so should `pipe(to:)` be called at this instant, “thens are called in order” would be invalid - //NOTE we don’t do this in the above `sync` because that could potentially deadlock - //THOUGH since `then` etc. typically invoke after a run-loop cycle, this issue is somewhat less severe - - if let handlers = handlers { - handlers.bodies.forEach{ $0(value) } - } - - //TODO solution is an unfortunate third state “sealed” where then's get added - // to a separate handler pool for that state - // any other solution has potential races - } - - override func inspect() -> Sealant { - var rv: Sealant! - barrier.sync { - rv = self.sealant - } - return rv - } - - override func inspect(_ body: (Sealant) -> Void) { - var sealed = false - barrier.sync(flags: .barrier) { - switch sealant { - case .pending: - // body will append to handlers, so we must stay barrier’d - body(sealant) - case .resolved: - sealed = true - } - } - if sealed { - // we do this outside the barrier to prevent potential deadlocks - // it's safe because we never transition away from this state - body(sealant) - } - } -} - - -extension Optional where Wrapped: DispatchQueue { - @inline(__always) - func async(flags: DispatchWorkItemFlags?, _ body: @escaping() -> Void) { - switch self { - case .none: - body() - case .some(let q): - if let flags = flags { - q.async(flags: flags, execute: body) - } else { - q.async(execute: body) - } - } - } -} diff --git a/Carthage/Checkouts/PromiseKit/Sources/Catchable.swift b/Carthage/Checkouts/PromiseKit/Sources/Catchable.swift deleted file mode 100644 index 596abdcba..000000000 --- a/Carthage/Checkouts/PromiseKit/Sources/Catchable.swift +++ /dev/null @@ -1,256 +0,0 @@ -import Dispatch - -/// Provides `catch` and `recover` to your object that conforms to `Thenable` -public protocol CatchMixin: Thenable -{} - -public extension CatchMixin { - - /** - The provided closure executes when this promise rejects. - - Rejecting a promise cascades: rejecting all subsequent promises (unless - recover is invoked) thus you will typically place your catch at the end - of a chain. Often utility promises will not have a catch, instead - delegating the error handling to the caller. - - - Parameter on: The queue to which the provided closure dispatches. - - Parameter policy: The default policy does not execute your handler for cancellation errors. - - Parameter execute: The handler to execute if this promise is rejected. - - Returns: A promise finalizer. - - SeeAlso: [Cancellation](https://github.com/mxcl/PromiseKit/blob/master/Documentation/CommonPatterns.md#cancellation) - */ - @discardableResult - func `catch`(on: DispatchQueue? = conf.Q.return, flags: DispatchWorkItemFlags? = nil, policy: CatchPolicy = conf.catchPolicy, _ body: @escaping(Error) -> Void) -> PMKFinalizer { - let finalizer = PMKFinalizer() - pipe { - switch $0 { - case .rejected(let error): - guard policy == .allErrors || !error.isCancelled else { - fallthrough - } - on.async(flags: flags) { - body(error) - finalizer.pending.resolve(()) - } - case .fulfilled: - finalizer.pending.resolve(()) - } - } - return finalizer - } -} - -public class PMKFinalizer { - let pending = Guarantee.pending() - - /// `finally` is the same as `ensure`, but it is not chainable - public func finally(on: DispatchQueue? = conf.Q.return, flags: DispatchWorkItemFlags? = nil, _ body: @escaping () -> Void) { - pending.guarantee.done(on: on, flags: flags) { - body() - } - } -} - - -public extension CatchMixin { - - /** - The provided closure executes when this promise rejects. - - Unlike `catch`, `recover` continues the chain. - Use `recover` in circumstances where recovering the chain from certain errors is a possibility. For example: - - firstly { - CLLocationManager.requestLocation() - }.recover { error in - guard error == CLError.unknownLocation else { throw error } - return .value(CLLocation.chicago) - } - - - Parameter on: The queue to which the provided closure dispatches. - - Parameter body: The handler to execute if this promise is rejected. - - SeeAlso: [Cancellation](https://github.com/mxcl/PromiseKit/blob/master/Documentation/CommonPatterns.md#cancellation) - */ - func recover(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, policy: CatchPolicy = conf.catchPolicy, _ body: @escaping(Error) throws -> U) -> Promise where U.T == T { - let rp = Promise(.pending) - pipe { - switch $0 { - case .fulfilled(let value): - rp.box.seal(.fulfilled(value)) - case .rejected(let error): - if policy == .allErrors || !error.isCancelled { - on.async(flags: flags) { - do { - let rv = try body(error) - guard rv !== rp else { throw PMKError.returnedSelf } - rv.pipe(to: rp.box.seal) - } catch { - rp.box.seal(.rejected(error)) - } - } - } else { - rp.box.seal(.rejected(error)) - } - } - } - return rp - } - - /** - The provided closure executes when this promise rejects. - This variant of `recover` requires the handler to return a Guarantee, thus it returns a Guarantee itself and your closure cannot `throw`. - - Note it is logically impossible for this to take a `catchPolicy`, thus `allErrors` are handled. - - Parameter on: The queue to which the provided closure dispatches. - - Parameter body: The handler to execute if this promise is rejected. - - SeeAlso: [Cancellation](https://github.com/mxcl/PromiseKit/blob/master/Documentation/CommonPatterns.md#cancellation) - */ - @discardableResult - func recover(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ body: @escaping(Error) -> Guarantee) -> Guarantee { - let rg = Guarantee(.pending) - pipe { - switch $0 { - case .fulfilled(let value): - rg.box.seal(value) - case .rejected(let error): - on.async(flags: flags) { - body(error).pipe(to: rg.box.seal) - } - } - } - return rg - } - - /** - The provided closure executes when this promise resolves, whether it rejects or not. - - firstly { - UIApplication.shared.networkActivityIndicatorVisible = true - }.done { - //… - }.ensure { - UIApplication.shared.networkActivityIndicatorVisible = false - }.catch { - //… - } - - - Parameter on: The queue to which the provided closure dispatches. - - Parameter body: The closure that executes when this promise resolves. - - Returns: A new promise, resolved with this promise’s resolution. - */ - func ensure(on: DispatchQueue? = conf.Q.return, flags: DispatchWorkItemFlags? = nil, _ body: @escaping () -> Void) -> Promise { - let rp = Promise(.pending) - pipe { result in - on.async(flags: flags) { - body() - rp.box.seal(result) - } - } - return rp - } - - /** - The provided closure executes when this promise resolves, whether it rejects or not. - The chain waits on the returned `Guarantee`. - - firstly { - setup() - }.done { - //… - }.ensureThen { - teardown() // -> Guarante - }.catch { - //… - } - - - Parameter on: The queue to which the provided closure dispatches. - - Parameter body: The closure that executes when this promise resolves. - - Returns: A new promise, resolved with this promise’s resolution. - */ - func ensureThen(on: DispatchQueue? = conf.Q.return, flags: DispatchWorkItemFlags? = nil, _ body: @escaping () -> Guarantee) -> Promise { - let rp = Promise(.pending) - pipe { result in - on.async(flags: flags) { - body().done { - rp.box.seal(result) - } - } - } - return rp - } - - - - /** - Consumes the Swift unused-result warning. - - Note: You should `catch`, but in situations where you know you don’t need a `catch`, `cauterize` makes your intentions clear. - */ - @discardableResult - func cauterize() -> PMKFinalizer { - return self.catch { - conf.logHandler(.cauterized($0)) - } - } -} - - -public extension CatchMixin where T == Void { - - /** - The provided closure executes when this promise rejects. - - This variant of `recover` is specialized for `Void` promises and de-errors your chain returning a `Guarantee`, thus you cannot `throw` and you must handle all errors including cancellation. - - - Parameter on: The queue to which the provided closure dispatches. - - Parameter body: The handler to execute if this promise is rejected. - - SeeAlso: [Cancellation](https://github.com/mxcl/PromiseKit/blob/master/Documentation/CommonPatterns.md#cancellation) - */ - @discardableResult - func recover(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ body: @escaping(Error) -> Void) -> Guarantee { - let rg = Guarantee(.pending) - pipe { - switch $0 { - case .fulfilled: - rg.box.seal(()) - case .rejected(let error): - on.async(flags: flags) { - body(error) - rg.box.seal(()) - } - } - } - return rg - } - - /** - The provided closure executes when this promise rejects. - - This variant of `recover` ensures that no error is thrown from the handler and allows specifying a catch policy. - - - Parameter on: The queue to which the provided closure dispatches. - - Parameter body: The handler to execute if this promise is rejected. - - SeeAlso: [Cancellation](https://github.com/mxcl/PromiseKit/blob/master/Documentation/CommonPatterns.md#cancellation) - */ - func recover(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, policy: CatchPolicy = conf.catchPolicy, _ body: @escaping(Error) throws -> Void) -> Promise { - let rg = Promise(.pending) - pipe { - switch $0 { - case .fulfilled: - rg.box.seal(.fulfilled(())) - case .rejected(let error): - if policy == .allErrors || !error.isCancelled { - on.async(flags: flags) { - do { - rg.box.seal(.fulfilled(try body(error))) - } catch { - rg.box.seal(.rejected(error)) - } - } - } else { - rg.box.seal(.rejected(error)) - } - } - } - return rg - } -} diff --git a/Carthage/Checkouts/PromiseKit/Sources/Configuration.swift b/Carthage/Checkouts/PromiseKit/Sources/Configuration.swift deleted file mode 100644 index 4db523237..000000000 --- a/Carthage/Checkouts/PromiseKit/Sources/Configuration.swift +++ /dev/null @@ -1,35 +0,0 @@ -import Dispatch - -/** - PromiseKit’s configurable parameters. - - Do not change these after any Promise machinery executes as the configuration object is not thread-safe. - - We would like it to be, but sadly `Swift` does not expose `dispatch_once` et al. which is what we used to use in order to make the configuration immutable once first used. -*/ -public struct PMKConfiguration { - /// The default queues that promises handlers dispatch to - public var Q: (map: DispatchQueue?, return: DispatchQueue?) = (map: DispatchQueue.main, return: DispatchQueue.main) - - /// The default catch-policy for all `catch` and `resolve` - public var catchPolicy = CatchPolicy.allErrorsExceptCancellation - - /// The closure used to log PromiseKit events. - /// Not thread safe; change before processing any promises. - /// - Note: The default handler calls `print()` - public var logHandler: (LogEvent) -> Void = { event in - switch event { - case .waitOnMainThread: - print("PromiseKit: warning: `wait()` called on main thread!") - case .pendingPromiseDeallocated: - print("PromiseKit: warning: pending promise deallocated") - case .pendingGuaranteeDeallocated: - print("PromiseKit: warning: pending guarantee deallocated") - case .cauterized (let error): - print("PromiseKit:cauterized-error: \(error)") - } - } -} - -/// Modify this as soon as possible in your application’s lifetime -public var conf = PMKConfiguration() diff --git a/Carthage/Checkouts/PromiseKit/Sources/CustomStringConvertible.swift b/Carthage/Checkouts/PromiseKit/Sources/CustomStringConvertible.swift deleted file mode 100644 index eee0b020a..000000000 --- a/Carthage/Checkouts/PromiseKit/Sources/CustomStringConvertible.swift +++ /dev/null @@ -1,44 +0,0 @@ - -extension Promise: CustomStringConvertible { - /// - Returns: A description of the state of this promise. - public var description: String { - switch result { - case nil: - return "Promise(…\(T.self))" - case .rejected(let error)?: - return "Promise(\(error))" - case .fulfilled(let value)?: - return "Promise(\(value))" - } - } -} - -extension Promise: CustomDebugStringConvertible { - /// - Returns: A debug-friendly description of the state of this promise. - public var debugDescription: String { - switch box.inspect() { - case .pending(let handlers): - return "Promise<\(T.self)>.pending(handlers: \(handlers.bodies.count))" - case .resolved(.rejected(let error)): - return "Promise<\(T.self)>.rejected(\(type(of: error)).\(error))" - case .resolved(.fulfilled(let value)): - return "Promise<\(T.self)>.fulfilled(\(value))" - } - } -} - -#if !SWIFT_PACKAGE -extension AnyPromise { - /// - Returns: A description of the state of this promise. - override open var description: String { - switch box.inspect() { - case .pending: - return "AnyPromise(…)" - case .resolved(let obj?): - return "AnyPromise(\(obj))" - case .resolved(nil): - return "AnyPromise(nil)" - } - } -} -#endif diff --git a/Carthage/Checkouts/PromiseKit/Sources/Deprecations.swift b/Carthage/Checkouts/PromiseKit/Sources/Deprecations.swift deleted file mode 100644 index a837dcb8d..000000000 --- a/Carthage/Checkouts/PromiseKit/Sources/Deprecations.swift +++ /dev/null @@ -1,93 +0,0 @@ -import Dispatch - -@available(*, deprecated, message: "See `init(resolver:)`") -public func wrap(_ body: (@escaping (T?, Error?) -> Void) throws -> Void) -> Promise { - return Promise { seal in - try body(seal.resolve) - } -} - -@available(*, deprecated, message: "See `init(resolver:)`") -public func wrap(_ body: (@escaping (T, Error?) -> Void) throws -> Void) -> Promise { - return Promise { seal in - try body(seal.resolve) - } -} - -@available(*, deprecated, message: "See `init(resolver:)`") -public func wrap(_ body: (@escaping (Error?, T?) -> Void) throws -> Void) -> Promise { - return Promise { seal in - try body(seal.resolve) - } -} - -@available(*, deprecated, message: "See `init(resolver:)`") -public func wrap(_ body: (@escaping (Error?) -> Void) throws -> Void) -> Promise { - return Promise { seal in - try body(seal.resolve) - } -} - -@available(*, deprecated, message: "See `init(resolver:)`") -public func wrap(_ body: (@escaping (T) -> Void) throws -> Void) -> Promise { - return Promise { seal in - try body(seal.fulfill) - } -} - -public extension Promise { - @available(*, deprecated, message: "See `ensure`") - func always(on q: DispatchQueue = .main, execute body: @escaping () -> Void) -> Promise { - return ensure(on: q, body) - } -} - -public extension Thenable { -#if PMKFullDeprecations - /// disabled due to ambiguity with the other `.flatMap` - @available(*, deprecated, message: "See: `compactMap`") - func flatMap(on: DispatchQueue? = conf.Q.map, _ transform: @escaping(T) throws -> U?) -> Promise { - return compactMap(on: on, transform) - } -#endif -} - -public extension Thenable where T: Sequence { -#if PMKFullDeprecations - /// disabled due to ambiguity with the other `.map` - @available(*, deprecated, message: "See: `mapValues`") - func map(on: DispatchQueue? = conf.Q.map, _ transform: @escaping(T.Iterator.Element) throws -> U) -> Promise<[U]> { - return mapValues(on: on, transform) - } - - /// disabled due to ambiguity with the other `.flatMap` - @available(*, deprecated, message: "See: `flatMapValues`") - func flatMap(on: DispatchQueue? = conf.Q.map, _ transform: @escaping(T.Iterator.Element) throws -> U) -> Promise<[U.Iterator.Element]> { - return flatMapValues(on: on, transform) - } -#endif - - @available(*, deprecated, message: "See: `filterValues`") - func filter(on: DispatchQueue? = conf.Q.map, test: @escaping (T.Iterator.Element) -> Bool) -> Promise<[T.Iterator.Element]> { - return filterValues(on: on, test) - } -} - -public extension Thenable where T: Collection { - @available(*, deprecated, message: "See: `firstValue`") - var first: Promise { - return firstValue - } - - @available(*, deprecated, message: "See: `lastValue`") - var last: Promise { - return lastValue - } -} - -public extension Thenable where T: Sequence, T.Iterator.Element: Comparable { - @available(*, deprecated, message: "See: `sortedValues`") - func sorted(on: DispatchQueue? = conf.Q.map) -> Promise<[T.Iterator.Element]> { - return sortedValues(on: on) - } -} diff --git a/Carthage/Checkouts/PromiseKit/Sources/Error.swift b/Carthage/Checkouts/PromiseKit/Sources/Error.swift deleted file mode 100644 index be22f6b4b..000000000 --- a/Carthage/Checkouts/PromiseKit/Sources/Error.swift +++ /dev/null @@ -1,111 +0,0 @@ -import Foundation - -public enum PMKError: Error { - /** - The completionHandler with form `(T?, Error?)` was called with `(nil, nil)`. - This is invalid as per Cocoa/Apple calling conventions. - */ - case invalidCallingConvention - - /** - A handler returned its own promise. 99% of the time, this is likely a - programming error. It is also invalid per Promises/A+. - */ - case returnedSelf - - /** `when()`, `race()` etc. were called with invalid parameters, eg. an empty array. */ - case badInput - - /// The operation was cancelled - case cancelled - - /// `nil` was returned from `flatMap` - @available(*, deprecated, message: "See: `compactMap`") - case flatMap(Any, Any.Type) - - /// `nil` was returned from `compactMap` - case compactMap(Any, Any.Type) - - /** - The lastValue or firstValue of a sequence was requested but the sequence was empty. - - Also used if all values of this collection failed the test passed to `firstValue(where:)`. - */ - case emptySequence - - /// no winner in `race(fulfilled:)` - case noWinner -} - -extension PMKError: CustomDebugStringConvertible { - public var debugDescription: String { - switch self { - case .flatMap(let obj, let type): - return "Could not `flatMap<\(type)>`: \(obj)" - case .compactMap(let obj, let type): - return "Could not `compactMap<\(type)>`: \(obj)" - case .invalidCallingConvention: - return "A closure was called with an invalid calling convention, probably (nil, nil)" - case .returnedSelf: - return "A promise handler returned itself" - case .badInput: - return "Bad input was provided to a PromiseKit function" - case .cancelled: - return "The asynchronous sequence was cancelled" - case .emptySequence: - return "The first or last element was requested for an empty sequence" - case .noWinner: - return "All thenables passed to race(fulfilled:) were rejected" - } - } -} - -extension PMKError: LocalizedError { - public var errorDescription: String? { - return debugDescription - } -} - - -//////////////////////////////////////////////////////////// Cancellation - -/// An error that may represent the cancelled condition -public protocol CancellableError: Error { - /// returns true if this Error represents a cancelled condition - var isCancelled: Bool { get } -} - -extension Error { - public var isCancelled: Bool { - do { - throw self - } catch PMKError.cancelled { - return true - } catch let error as CancellableError { - return error.isCancelled - } catch URLError.cancelled { - return true - } catch CocoaError.userCancelled { - return true - } catch let error as NSError { - #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) - let domain = error.domain - let code = error.code - return ("SKErrorDomain", 2) == (domain, code) - #else - return false - #endif - } catch { - return false - } - } -} - -/// Used by `catch` and `recover` -public enum CatchPolicy { - /// Indicates that `catch` or `recover` handle all error types including cancellable-errors. - case allErrors - - /// Indicates that `catch` or `recover` handle all error except cancellable-errors. - case allErrorsExceptCancellation -} diff --git a/Carthage/Checkouts/PromiseKit/Sources/Guarantee.swift b/Carthage/Checkouts/PromiseKit/Sources/Guarantee.swift deleted file mode 100644 index ce887cdc3..000000000 --- a/Carthage/Checkouts/PromiseKit/Sources/Guarantee.swift +++ /dev/null @@ -1,390 +0,0 @@ -import class Foundation.Thread -import Dispatch - -/** - A `Guarantee` is a functional abstraction around an asynchronous operation that cannot error. - - See: `Thenable` -*/ -public final class Guarantee: Thenable { - let box: PromiseKit.Box - - fileprivate init(box: SealedBox) { - self.box = box - } - - /// Returns a `Guarantee` sealed with the provided value. - public static func value(_ value: T) -> Guarantee { - return .init(box: SealedBox(value: value)) - } - - /// Returns a pending `Guarantee` that can be resolved with the provided closure’s parameter. - public init(resolver body: (@escaping(T) -> Void) -> Void) { - box = Box() - body(box.seal) - } - - /// - See: `Thenable.pipe` - public func pipe(to: @escaping(Result) -> Void) { - pipe{ to(.fulfilled($0)) } - } - - func pipe(to: @escaping(T) -> Void) { - switch box.inspect() { - case .pending: - box.inspect { - switch $0 { - case .pending(let handlers): - handlers.append(to) - case .resolved(let value): - to(value) - } - } - case .resolved(let value): - to(value) - } - } - - /// - See: `Thenable.result` - public var result: Result? { - switch box.inspect() { - case .pending: - return nil - case .resolved(let value): - return .fulfilled(value) - } - } - - final private class Box: EmptyBox { - deinit { - switch inspect() { - case .pending: - PromiseKit.conf.logHandler(.pendingGuaranteeDeallocated) - case .resolved: - break - } - } - } - - init(_: PMKUnambiguousInitializer) { - box = Box() - } - - /// Returns a tuple of a pending `Guarantee` and a function that resolves it. - public class func pending() -> (guarantee: Guarantee, resolve: (T) -> Void) { - return { ($0, $0.box.seal) }(Guarantee(.pending)) - } -} - -public extension Guarantee { - @discardableResult - func done(on: DispatchQueue? = conf.Q.return, flags: DispatchWorkItemFlags? = nil, _ body: @escaping(T) -> Void) -> Guarantee { - let rg = Guarantee(.pending) - pipe { (value: T) in - on.async(flags: flags) { - body(value) - rg.box.seal(()) - } - } - return rg - } - - func get(on: DispatchQueue? = conf.Q.return, flags: DispatchWorkItemFlags? = nil, _ body: @escaping (T) -> Void) -> Guarantee { - return map(on: on, flags: flags) { - body($0) - return $0 - } - } - - func map(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ body: @escaping(T) -> U) -> Guarantee { - let rg = Guarantee(.pending) - pipe { value in - on.async(flags: flags) { - rg.box.seal(body(value)) - } - } - return rg - } - - #if swift(>=4) && !swift(>=5.2) - func map(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ keyPath: KeyPath) -> Guarantee { - let rg = Guarantee(.pending) - pipe { value in - on.async(flags: flags) { - rg.box.seal(value[keyPath: keyPath]) - } - } - return rg - } - #endif - - @discardableResult - func then(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ body: @escaping(T) -> Guarantee) -> Guarantee { - let rg = Guarantee(.pending) - pipe { value in - on.async(flags: flags) { - body(value).pipe(to: rg.box.seal) - } - } - return rg - } - - func asVoid() -> Guarantee { - return map(on: nil) { _ in } - } - - /** - Blocks this thread, so you know, don’t call this on a serial thread that - any part of your chain may use. Like the main thread for example. - */ - func wait() -> T { - - if Thread.isMainThread { - conf.logHandler(.waitOnMainThread) - } - - var result = value - - if result == nil { - let group = DispatchGroup() - group.enter() - pipe { (foo: T) in result = foo; group.leave() } - group.wait() - } - - return result! - } -} - -public extension Guarantee where T: Sequence { - /** - `Guarantee<[T]>` => `T` -> `U` => `Guarantee<[U]>` - - Guarantee.value([1,2,3]) - .mapValues { integer in integer * 2 } - .done { - // $0 => [2,4,6] - } - */ - func mapValues(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ transform: @escaping(T.Iterator.Element) -> U) -> Guarantee<[U]> { - return map(on: on, flags: flags) { $0.map(transform) } - } - - #if swift(>=4) && !swift(>=5.2) - /** - `Guarantee<[T]>` => `KeyPath` => `Guarantee<[U]>` - - Guarantee.value([Person(name: "Max"), Person(name: "Roman"), Person(name: "John")]) - .mapValues(\.name) - .done { - // $0 => ["Max", "Roman", "John"] - } - */ - func mapValues(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ keyPath: KeyPath) -> Guarantee<[U]> { - return map(on: on, flags: flags) { $0.map { $0[keyPath: keyPath] } } - } - #endif - - /** - `Guarantee<[T]>` => `T` -> `[U]` => `Guarantee<[U]>` - - Guarantee.value([1,2,3]) - .flatMapValues { integer in [integer, integer] } - .done { - // $0 => [1,1,2,2,3,3] - } - */ - func flatMapValues(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ transform: @escaping(T.Iterator.Element) -> U) -> Guarantee<[U.Iterator.Element]> { - return map(on: on, flags: flags) { (foo: T) in - foo.flatMap { transform($0) } - } - } - - /** - `Guarantee<[T]>` => `T` -> `U?` => `Guarantee<[U]>` - - Guarantee.value(["1","2","a","3"]) - .compactMapValues { Int($0) } - .done { - // $0 => [1,2,3] - } - */ - func compactMapValues(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ transform: @escaping(T.Iterator.Element) -> U?) -> Guarantee<[U]> { - return map(on: on, flags: flags) { foo -> [U] in - #if !swift(>=3.3) || (swift(>=4) && !swift(>=4.1)) - return foo.flatMap(transform) - #else - return foo.compactMap(transform) - #endif - } - } - - #if swift(>=4) && !swift(>=5.2) - /** - `Guarantee<[T]>` => `KeyPath` => `Guarantee<[U]>` - - Guarantee.value([Person(name: "Max"), Person(name: "Roman", age: 26), Person(name: "John", age: 23)]) - .compactMapValues(\.age) - .done { - // $0 => [26, 23] - } - */ - func compactMapValues(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ keyPath: KeyPath) -> Guarantee<[U]> { - return map(on: on, flags: flags) { foo -> [U] in - #if !swift(>=4.1) - return foo.flatMap { $0[keyPath: keyPath] } - #else - return foo.compactMap { $0[keyPath: keyPath] } - #endif - } - } - #endif - - /** - `Guarantee<[T]>` => `T` -> `Guarantee` => `Guaranetee<[U]>` - - Guarantee.value([1,2,3]) - .thenMap { .value($0 * 2) } - .done { - // $0 => [2,4,6] - } - */ - func thenMap(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ transform: @escaping(T.Iterator.Element) -> Guarantee) -> Guarantee<[U]> { - return then(on: on, flags: flags) { - when(fulfilled: $0.map(transform)) - }.recover { - // if happens then is bug inside PromiseKit - fatalError(String(describing: $0)) - } - } - - /** - `Guarantee<[T]>` => `T` -> `Guarantee<[U]>` => `Guarantee<[U]>` - - Guarantee.value([1,2,3]) - .thenFlatMap { integer in .value([integer, integer]) } - .done { - // $0 => [1,1,2,2,3,3] - } - */ - func thenFlatMap(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ transform: @escaping(T.Iterator.Element) -> U) -> Guarantee<[U.T.Iterator.Element]> where U.T: Sequence { - return then(on: on, flags: flags) { - when(fulfilled: $0.map(transform)) - }.map(on: nil) { - $0.flatMap { $0 } - }.recover { - // if happens then is bug inside PromiseKit - fatalError(String(describing: $0)) - } - } - - /** - `Guarantee<[T]>` => `T` -> Bool => `Guarantee<[T]>` - - Guarantee.value([1,2,3]) - .filterValues { $0 > 1 } - .done { - // $0 => [2,3] - } - */ - func filterValues(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ isIncluded: @escaping(T.Iterator.Element) -> Bool) -> Guarantee<[T.Iterator.Element]> { - return map(on: on, flags: flags) { - $0.filter(isIncluded) - } - } - - #if swift(>=4) && !swift(>=5.2) - /** - `Guarantee<[T]>` => `KeyPath` => `Guarantee<[T]>` - - Guarantee.value([Person(name: "Max"), Person(name: "Roman", age: 26, isStudent: false), Person(name: "John", age: 23, isStudent: true)]) - .filterValues(\.isStudent) - .done { - // $0 => [Person(name: "John", age: 23, isStudent: true)] - } - */ - func filterValues(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ keyPath: KeyPath) -> Guarantee<[T.Iterator.Element]> { - return map(on: on, flags: flags) { - $0.filter { $0[keyPath: keyPath] } - } - } - #endif - - /** - `Guarantee<[T]>` => (`T`, `T`) -> Bool => `Guarantee<[T]>` - - Guarantee.value([5,2,3,4,1]) - .sortedValues { $0 > $1 } - .done { - // $0 => [5,4,3,2,1] - } - */ - func sortedValues(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ areInIncreasingOrder: @escaping(T.Iterator.Element, T.Iterator.Element) -> Bool) -> Guarantee<[T.Iterator.Element]> { - return map(on: on, flags: flags) { - $0.sorted(by: areInIncreasingOrder) - } - } -} - -public extension Guarantee where T: Sequence, T.Iterator.Element: Comparable { - /** - `Guarantee<[T]>` => `Guarantee<[T]>` - - Guarantee.value([5,2,3,4,1]) - .sortedValues() - .done { - // $0 => [1,2,3,4,5] - } - */ - func sortedValues(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil) -> Guarantee<[T.Iterator.Element]> { - return map(on: on, flags: flags) { $0.sorted() } - } -} - -#if swift(>=3.1) -public extension Guarantee where T == Void { - convenience init() { - self.init(box: SealedBox(value: Void())) - } - - static var value: Guarantee { - return .value(Void()) - } -} -#endif - - -public extension DispatchQueue { - /** - Asynchronously executes the provided closure on a dispatch queue. - - DispatchQueue.global().async(.promise) { - md5(input) - }.done { md5 in - //… - } - - - Parameter body: The closure that resolves this promise. - - Returns: A new `Guarantee` resolved by the result of the provided closure. - - Note: There is no Promise/Thenable version of this due to Swift compiler ambiguity issues. - */ - @available(macOS 10.10, iOS 2.0, tvOS 10.0, watchOS 2.0, *) - final func async(_: PMKNamespacer, group: DispatchGroup? = nil, qos: DispatchQoS = .default, flags: DispatchWorkItemFlags = [], execute body: @escaping () -> T) -> Guarantee { - let rg = Guarantee(.pending) - async(group: group, qos: qos, flags: flags) { - rg.box.seal(body()) - } - return rg - } -} - - -#if os(Linux) -import func CoreFoundation._CFIsMainThread - -extension Thread { - // `isMainThread` is not implemented yet in swift-corelibs-foundation. - static var isMainThread: Bool { - return _CFIsMainThread() - } -} -#endif diff --git a/Carthage/Checkouts/PromiseKit/Sources/Info.plist b/Carthage/Checkouts/PromiseKit/Sources/Info.plist deleted file mode 100644 index 3a619de4d..000000000 --- a/Carthage/Checkouts/PromiseKit/Sources/Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - $(PRODUCT_BUNDLE_PACKAGE_TYPE) - CFBundleShortVersionString - $(CURRENT_PROJECT_VERSION) - CFBundleSignature - ???? - CFBundleVersion - 1 - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - - - diff --git a/Carthage/Checkouts/PromiseKit/Sources/LogEvent.swift b/Carthage/Checkouts/PromiseKit/Sources/LogEvent.swift deleted file mode 100644 index 99683bdb6..000000000 --- a/Carthage/Checkouts/PromiseKit/Sources/LogEvent.swift +++ /dev/null @@ -1,30 +0,0 @@ -/** - The PromiseKit events which may be logged. - - ```` - /// A promise or guarantee has blocked the main thread - case waitOnMainThread - - /// A promise has been deallocated without being resolved - case pendingPromiseDeallocated - - /// An error which occurred while fulfilling a promise was swallowed - case cauterized(Error) - - /// Errors which give a string error message - case misc (String) - ```` -*/ -public enum LogEvent { - /// A promise or guarantee has blocked the main thread - case waitOnMainThread - - /// A promise has been deallocated without being resolved - case pendingPromiseDeallocated - - /// A guarantee has been deallocated without being resolved - case pendingGuaranteeDeallocated - - /// An error which occurred while resolving a promise was swallowed - case cauterized(Error) -} diff --git a/Carthage/Checkouts/PromiseKit/Sources/NSMethodSignatureForBlock.m b/Carthage/Checkouts/PromiseKit/Sources/NSMethodSignatureForBlock.m deleted file mode 100644 index 700c1b37e..000000000 --- a/Carthage/Checkouts/PromiseKit/Sources/NSMethodSignatureForBlock.m +++ /dev/null @@ -1,77 +0,0 @@ -#import - -struct PMKBlockLiteral { - void *isa; // initialized to &_NSConcreteStackBlock or &_NSConcreteGlobalBlock - int flags; - int reserved; - void (*invoke)(void *, ...); - struct block_descriptor { - unsigned long int reserved; // NULL - unsigned long int size; // sizeof(struct Block_literal_1) - // optional helper functions - void (*copy_helper)(void *dst, void *src); // IFF (1<<25) - void (*dispose_helper)(void *src); // IFF (1<<25) - // required ABI.2010.3.16 - const char *signature; // IFF (1<<30) - } *descriptor; - // imported variables -}; - -typedef NS_OPTIONS(NSUInteger, PMKBlockDescriptionFlags) { - PMKBlockDescriptionFlagsHasCopyDispose = (1 << 25), - PMKBlockDescriptionFlagsHasCtor = (1 << 26), // helpers have C++ code - PMKBlockDescriptionFlagsIsGlobal = (1 << 28), - PMKBlockDescriptionFlagsHasStret = (1 << 29), // IFF BLOCK_HAS_SIGNATURE - PMKBlockDescriptionFlagsHasSignature = (1 << 30) -}; - -// It appears 10.7 doesn't support quotes in method signatures. Remove them -// via @rabovik's method. See https://github.com/OliverLetterer/SLObjectiveCRuntimeAdditions/pull/2 -#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_8 -NS_INLINE static const char * pmk_removeQuotesFromMethodSignature(const char *str){ - char *result = malloc(strlen(str) + 1); - BOOL skip = NO; - char *to = result; - char c; - while ((c = *str++)) { - if ('"' == c) { - skip = !skip; - continue; - } - if (skip) continue; - *to++ = c; - } - *to = '\0'; - return result; -} -#endif - -static NSMethodSignature *NSMethodSignatureForBlock(id block) { - if (!block) - return nil; - - struct PMKBlockLiteral *blockRef = (__bridge struct PMKBlockLiteral *)block; - PMKBlockDescriptionFlags flags = (PMKBlockDescriptionFlags)blockRef->flags; - - if (flags & PMKBlockDescriptionFlagsHasSignature) { - void *signatureLocation = blockRef->descriptor; - signatureLocation += sizeof(unsigned long int); - signatureLocation += sizeof(unsigned long int); - - if (flags & PMKBlockDescriptionFlagsHasCopyDispose) { - signatureLocation += sizeof(void(*)(void *dst, void *src)); - signatureLocation += sizeof(void (*)(void *src)); - } - - const char *signature = (*(const char **)signatureLocation); -#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_8 - signature = pmk_removeQuotesFromMethodSignature(signature); - NSMethodSignature *nsSignature = [NSMethodSignature signatureWithObjCTypes:signature]; - free((void *)signature); - - return nsSignature; -#endif - return [NSMethodSignature signatureWithObjCTypes:signature]; - } - return 0; -} diff --git a/Carthage/Checkouts/PromiseKit/Sources/PMKCallVariadicBlock.m b/Carthage/Checkouts/PromiseKit/Sources/PMKCallVariadicBlock.m deleted file mode 100644 index 1453a7d26..000000000 --- a/Carthage/Checkouts/PromiseKit/Sources/PMKCallVariadicBlock.m +++ /dev/null @@ -1,120 +0,0 @@ -#import "NSMethodSignatureForBlock.m" -#import -#import -#import "AnyPromise+Private.h" -#import -#import -#import - -#ifndef PMKLog -#define PMKLog NSLog -#endif - -@interface PMKArray : NSObject { -@public - id objs[3]; - NSUInteger count; -} @end - -@implementation PMKArray - -- (id)objectAtIndexedSubscript:(NSUInteger)idx { - if (count <= idx) { - // this check is necessary due to lack of checks in `pmk_safely_call_block` - return nil; - } - return objs[idx]; -} - -@end - -id __PMKArrayWithCount(NSUInteger count, ...) { - PMKArray *this = [PMKArray new]; - this->count = count; - va_list args; - va_start(args, count); - for (NSUInteger x = 0; x < count; ++x) - this->objs[x] = va_arg(args, id); - va_end(args); - return this; -} - - -static inline id _PMKCallVariadicBlock(id frock, id result) { - NSCAssert(frock, @""); - - NSMethodSignature *sig = NSMethodSignatureForBlock(frock); - const NSUInteger nargs = sig.numberOfArguments; - const char rtype = sig.methodReturnType[0]; - - #define call_block_with_rtype(type) ({^type{ \ - switch (nargs) { \ - case 1: \ - return ((type(^)(void))frock)(); \ - case 2: { \ - const id arg = [result class] == [PMKArray class] ? result[0] : result; \ - return ((type(^)(id))frock)(arg); \ - } \ - case 3: { \ - type (^block)(id, id) = frock; \ - return [result class] == [PMKArray class] \ - ? block(result[0], result[1]) \ - : block(result, nil); \ - } \ - case 4: { \ - type (^block)(id, id, id) = frock; \ - return [result class] == [PMKArray class] \ - ? block(result[0], result[1], result[2]) \ - : block(result, nil, nil); \ - } \ - default: \ - @throw [NSException exceptionWithName:NSInvalidArgumentException reason:@"PromiseKit: The provided block’s argument count is unsupported." userInfo:nil]; \ - }}();}) - - switch (rtype) { - case 'v': - call_block_with_rtype(void); - return nil; - case '@': - return call_block_with_rtype(id) ?: nil; - case '*': { - char *str = call_block_with_rtype(char *); - return str ? @(str) : nil; - } - case 'c': return @(call_block_with_rtype(char)); - case 'i': return @(call_block_with_rtype(int)); - case 's': return @(call_block_with_rtype(short)); - case 'l': return @(call_block_with_rtype(long)); - case 'q': return @(call_block_with_rtype(long long)); - case 'C': return @(call_block_with_rtype(unsigned char)); - case 'I': return @(call_block_with_rtype(unsigned int)); - case 'S': return @(call_block_with_rtype(unsigned short)); - case 'L': return @(call_block_with_rtype(unsigned long)); - case 'Q': return @(call_block_with_rtype(unsigned long long)); - case 'f': return @(call_block_with_rtype(float)); - case 'd': return @(call_block_with_rtype(double)); - case 'B': return @(call_block_with_rtype(_Bool)); - case '^': - if (strcmp(sig.methodReturnType, "^v") == 0) { - call_block_with_rtype(void); - return nil; - } - // else fall through! - default: - @throw [NSException exceptionWithName:@"PromiseKit" reason:@"PromiseKit: Unsupported method signature." userInfo:nil]; - } -} - -static id PMKCallVariadicBlock(id frock, id result) { - @try { - return _PMKCallVariadicBlock(frock, result); - } @catch (id thrown) { - if ([thrown isKindOfClass:[NSString class]]) - return thrown; - if ([thrown isKindOfClass:[NSError class]]) - return thrown; - - // we don’t catch objc exceptions: they are meant to crash your app - @throw thrown; - } -} diff --git a/Carthage/Checkouts/PromiseKit/Sources/Promise.swift b/Carthage/Checkouts/PromiseKit/Sources/Promise.swift deleted file mode 100644 index ef5735224..000000000 --- a/Carthage/Checkouts/PromiseKit/Sources/Promise.swift +++ /dev/null @@ -1,184 +0,0 @@ -import class Foundation.Thread -import Dispatch - -/** - A `Promise` is a functional abstraction around a failable asynchronous operation. - - See: `Thenable` - */ -public final class Promise: Thenable, CatchMixin { - let box: Box> - - fileprivate init(box: SealedBox>) { - self.box = box - } - - /** - Initialize a new fulfilled promise. - - We do not provide `init(value:)` because Swift is “greedy” - and would pick that initializer in cases where it should pick - one of the other more specific options leading to Promises with - `T` that is eg: `Error` or worse `(T->Void,Error->Void)` for - uses of our PMK < 4 pending initializer due to Swift trailing - closure syntax (nothing good comes without pain!). - - Though often easy to detect, sometimes these issues would be - hidden by other type inference leading to some nasty bugs in - production. - - In PMK5 we tried to work around this by making the pending - initializer take the form `Promise(.pending)` but this led to - bad migration errors for PMK4 users. Hence instead we quickly - released PMK6 and now only provide this initializer for making - sealed & fulfilled promises. - - Usage is still (usually) good: - - guard foo else { - return .value(bar) - } - */ - public static func value(_ value: T) -> Promise { - return Promise(box: SealedBox(value: .fulfilled(value))) - } - - /// Initialize a new rejected promise. - public init(error: Error) { - box = SealedBox(value: .rejected(error)) - } - - /// Initialize a new promise bound to the provided `Thenable`. - public init(_ bridge: U) where U.T == T { - box = EmptyBox() - bridge.pipe(to: box.seal) - } - - /// Initialize a new promise that can be resolved with the provided `Resolver`. - public init(resolver body: (Resolver) throws -> Void) { - box = EmptyBox() - let resolver = Resolver(box) - do { - try body(resolver) - } catch { - resolver.reject(error) - } - } - - /// - Returns: a tuple of a new pending promise and its `Resolver`. - public class func pending() -> (promise: Promise, resolver: Resolver) { - return { ($0, Resolver($0.box)) }(Promise(.pending)) - } - - /// - See: `Thenable.pipe` - public func pipe(to: @escaping(Result) -> Void) { - switch box.inspect() { - case .pending: - box.inspect { - switch $0 { - case .pending(let handlers): - handlers.append(to) - case .resolved(let value): - to(value) - } - } - case .resolved(let value): - to(value) - } - } - - /// - See: `Thenable.result` - public var result: Result? { - switch box.inspect() { - case .pending: - return nil - case .resolved(let result): - return result - } - } - - init(_: PMKUnambiguousInitializer) { - box = EmptyBox() - } -} - -public extension Promise { - /** - Blocks this thread, so—you know—don’t call this on a serial thread that - any part of your chain may use. Like the main thread for example. - */ - func wait() throws -> T { - - if Thread.isMainThread { - conf.logHandler(LogEvent.waitOnMainThread) - } - - var result = self.result - - if result == nil { - let group = DispatchGroup() - group.enter() - pipe { result = $0; group.leave() } - group.wait() - } - - switch result! { - case .rejected(let error): - throw error - case .fulfilled(let value): - return value - } - } -} - -#if swift(>=3.1) -extension Promise where T == Void { - /// Initializes a new promise fulfilled with `Void` - public convenience init() { - self.init(box: SealedBox(value: .fulfilled(Void()))) - } - - /// Returns a new promise fulfilled with `Void` - public static var value: Promise { - return .value(Void()) - } -} -#endif - - -public extension DispatchQueue { - /** - Asynchronously executes the provided closure on a dispatch queue. - - DispatchQueue.global().async(.promise) { - try md5(input) - }.done { md5 in - //… - } - - - Parameter body: The closure that resolves this promise. - - Returns: A new `Promise` resolved by the result of the provided closure. - - Note: There is no Promise/Thenable version of this due to Swift compiler ambiguity issues. - */ - @available(macOS 10.10, iOS 8.0, tvOS 9.0, watchOS 2.0, *) - final func async(_: PMKNamespacer, group: DispatchGroup? = nil, qos: DispatchQoS = .default, flags: DispatchWorkItemFlags = [], execute body: @escaping () throws -> T) -> Promise { - let promise = Promise(.pending) - async(group: group, qos: qos, flags: flags) { - do { - promise.box.seal(.fulfilled(try body())) - } catch { - promise.box.seal(.rejected(error)) - } - } - return promise - } -} - - -/// used by our extensions to provide unambiguous functions with the same name as the original function -public enum PMKNamespacer { - case promise -} - -enum PMKUnambiguousInitializer { - case pending -} diff --git a/Carthage/Checkouts/PromiseKit/Sources/PromiseKit.h b/Carthage/Checkouts/PromiseKit/Sources/PromiseKit.h deleted file mode 100644 index c30d9376a..000000000 --- a/Carthage/Checkouts/PromiseKit/Sources/PromiseKit.h +++ /dev/null @@ -1,7 +0,0 @@ -#import -#import - -#import // `FOUNDATION_EXPORT` - -FOUNDATION_EXPORT double PromiseKitVersionNumber; -FOUNDATION_EXPORT const unsigned char PromiseKitVersionString[]; diff --git a/Carthage/Checkouts/PromiseKit/Sources/Resolver.swift b/Carthage/Checkouts/PromiseKit/Sources/Resolver.swift deleted file mode 100644 index c6b339fcd..000000000 --- a/Carthage/Checkouts/PromiseKit/Sources/Resolver.swift +++ /dev/null @@ -1,111 +0,0 @@ -/// An object for resolving promises -public final class Resolver { - let box: Box> - - init(_ box: Box>) { - self.box = box - } - - deinit { - if case .pending = box.inspect() { - conf.logHandler(.pendingPromiseDeallocated) - } - } -} - -public extension Resolver { - /// Fulfills the promise with the provided value - func fulfill(_ value: T) { - box.seal(.fulfilled(value)) - } - - /// Rejects the promise with the provided error - func reject(_ error: Error) { - box.seal(.rejected(error)) - } - - /// Resolves the promise with the provided result - func resolve(_ result: Result) { - box.seal(result) - } - - /// Resolves the promise with the provided value or error - func resolve(_ obj: T?, _ error: Error?) { - if let error = error { - reject(error) - } else if let obj = obj { - fulfill(obj) - } else { - reject(PMKError.invalidCallingConvention) - } - } - - /// Fulfills the promise with the provided value unless the provided error is non-nil - func resolve(_ obj: T, _ error: Error?) { - if let error = error { - reject(error) - } else { - fulfill(obj) - } - } - - /// Resolves the promise, provided for non-conventional value-error ordered completion handlers. - func resolve(_ error: Error?, _ obj: T?) { - resolve(obj, error) - } -} - -#if swift(>=3.1) -extension Resolver where T == Void { - /// Fulfills the promise unless error is non-nil - public func resolve(_ error: Error?) { - if let error = error { - reject(error) - } else { - fulfill(()) - } - } -#if false - // disabled ∵ https://github.com/mxcl/PromiseKit/issues/990 - - /// Fulfills the promise - public func fulfill() { - self.fulfill(()) - } -#else - /// Fulfills the promise - /// - Note: underscore is present due to: https://github.com/mxcl/PromiseKit/issues/990 - public func fulfill_() { - self.fulfill(()) - } -#endif -} -#endif - -#if swift(>=5.0) -extension Resolver { - /// Resolves the promise with the provided result - public func resolve(_ result: Swift.Result) { - switch result { - case .failure(let error): self.reject(error) - case .success(let value): self.fulfill(value) - } - } -} -#endif - -public enum Result { - case fulfilled(T) - case rejected(Error) -} - -public extension PromiseKit.Result { - var isFulfilled: Bool { - switch self { - case .fulfilled: - return true - case .rejected: - return false - } - } -} diff --git a/Carthage/Checkouts/PromiseKit/Sources/Thenable.swift b/Carthage/Checkouts/PromiseKit/Sources/Thenable.swift deleted file mode 100644 index 7d88ea6e8..000000000 --- a/Carthage/Checkouts/PromiseKit/Sources/Thenable.swift +++ /dev/null @@ -1,533 +0,0 @@ -import Dispatch - -/// Thenable represents an asynchronous operation that can be chained. -public protocol Thenable: AnyObject { - /// The type of the wrapped value - associatedtype T - - /// `pipe` is immediately executed when this `Thenable` is resolved - func pipe(to: @escaping(Result) -> Void) - - /// The resolved result or nil if pending. - var result: Result? { get } -} - -public extension Thenable { - /** - The provided closure executes when this promise is fulfilled. - - This allows chaining promises. The promise returned by the provided closure is resolved before the promise returned by this closure resolves. - - - Parameter on: The queue to which the provided closure dispatches. - - Parameter body: The closure that executes when this promise is fulfilled. It must return a promise. - - Returns: A new promise that resolves when the promise returned from the provided closure resolves. For example: - - firstly { - URLSession.shared.dataTask(.promise, with: url1) - }.then { response in - transform(data: response.data) - }.done { transformation in - //… - } - */ - func then(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ body: @escaping(T) throws -> U) -> Promise { - let rp = Promise(.pending) - pipe { - switch $0 { - case .fulfilled(let value): - on.async(flags: flags) { - do { - let rv = try body(value) - guard rv !== rp else { throw PMKError.returnedSelf } - rv.pipe(to: rp.box.seal) - } catch { - rp.box.seal(.rejected(error)) - } - } - case .rejected(let error): - rp.box.seal(.rejected(error)) - } - } - return rp - } - - /** - The provided closure is executed when this promise is fulfilled. - - This is like `then` but it requires the closure to return a non-promise. - - - Parameter on: The queue to which the provided closure dispatches. - - Parameter transform: The closure that is executed when this Promise is fulfilled. It must return a non-promise. - - Returns: A new promise that is fulfilled with the value returned from the provided closure or rejected if the provided closure throws. For example: - - firstly { - URLSession.shared.dataTask(.promise, with: url1) - }.map { response in - response.data.length - }.done { length in - //… - } - */ - func map(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ transform: @escaping(T) throws -> U) -> Promise { - let rp = Promise(.pending) - pipe { - switch $0 { - case .fulfilled(let value): - on.async(flags: flags) { - do { - rp.box.seal(.fulfilled(try transform(value))) - } catch { - rp.box.seal(.rejected(error)) - } - } - case .rejected(let error): - rp.box.seal(.rejected(error)) - } - } - return rp - } - - #if swift(>=4) && !swift(>=5.2) - /** - Similar to func `map(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ transform: @escaping(T) throws -> U) -> Promise`, but accepts a key path instead of a closure. - - - Parameter on: The queue to which the provided key path for value dispatches. - - Parameter keyPath: The key path to the value that is using when this Promise is fulfilled. - - Returns: A new promise that is fulfilled with the value for the provided key path. - */ - func map(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ keyPath: KeyPath) -> Promise { - let rp = Promise(.pending) - pipe { - switch $0 { - case .fulfilled(let value): - on.async(flags: flags) { - rp.box.seal(.fulfilled(value[keyPath: keyPath])) - } - case .rejected(let error): - rp.box.seal(.rejected(error)) - } - } - return rp - } - #endif - - /** - The provided closure is executed when this promise is fulfilled. - - In your closure return an `Optional`, if you return `nil` the resulting promise is rejected with `PMKError.compactMap`, otherwise the promise is fulfilled with the unwrapped value. - - firstly { - URLSession.shared.dataTask(.promise, with: url) - }.compactMap { - try JSONSerialization.jsonObject(with: $0.data) as? [String: String] - }.done { dictionary in - //… - }.catch { - // either `PMKError.compactMap` or a `JSONError` - } - */ - func compactMap(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ transform: @escaping(T) throws -> U?) -> Promise { - let rp = Promise(.pending) - pipe { - switch $0 { - case .fulfilled(let value): - on.async(flags: flags) { - do { - if let rv = try transform(value) { - rp.box.seal(.fulfilled(rv)) - } else { - throw PMKError.compactMap(value, U.self) - } - } catch { - rp.box.seal(.rejected(error)) - } - } - case .rejected(let error): - rp.box.seal(.rejected(error)) - } - } - return rp - } - - #if swift(>=4) && !swift(>=5.2) - /** - Similar to func `compactMap(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ transform: @escaping(T) throws -> U?) -> Promise`, but accepts a key path instead of a closure. - - - Parameter on: The queue to which the provided key path for value dispatches. - - Parameter keyPath: The key path to the value that is using when this Promise is fulfilled. If the value for `keyPath` is `nil` the resulting promise is rejected with `PMKError.compactMap`. - - Returns: A new promise that is fulfilled with the value for the provided key path. - */ - func compactMap(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ keyPath: KeyPath) -> Promise { - let rp = Promise(.pending) - pipe { - switch $0 { - case .fulfilled(let value): - on.async(flags: flags) { - do { - if let rv = value[keyPath: keyPath] { - rp.box.seal(.fulfilled(rv)) - } else { - throw PMKError.compactMap(value, U.self) - } - } catch { - rp.box.seal(.rejected(error)) - } - } - case .rejected(let error): - rp.box.seal(.rejected(error)) - } - } - return rp - } - #endif - - /** - The provided closure is executed when this promise is fulfilled. - - Equivalent to `map { x -> Void in`, but since we force the `Void` return Swift - is happier and gives you less hassle about your closure’s qualification. - - - Parameter on: The queue to which the provided closure dispatches. - - Parameter body: The closure that is executed when this Promise is fulfilled. - - Returns: A new promise fulfilled as `Void` or rejected if the provided closure throws. - - firstly { - URLSession.shared.dataTask(.promise, with: url) - }.done { response in - print(response.data) - } - */ - func done(on: DispatchQueue? = conf.Q.return, flags: DispatchWorkItemFlags? = nil, _ body: @escaping(T) throws -> Void) -> Promise { - let rp = Promise(.pending) - pipe { - switch $0 { - case .fulfilled(let value): - on.async(flags: flags) { - do { - try body(value) - rp.box.seal(.fulfilled(())) - } catch { - rp.box.seal(.rejected(error)) - } - } - case .rejected(let error): - rp.box.seal(.rejected(error)) - } - } - return rp - } - - /** - The provided closure is executed when this promise is fulfilled. - - This is like `done` but it returns the same value that the handler is fed. - `get` immutably accesses the fulfilled value; the returned Promise maintains that value. - - - Parameter on: The queue to which the provided closure dispatches. - - Parameter body: The closure that is executed when this Promise is fulfilled. - - Returns: A new promise that is fulfilled with the value that the handler is fed or rejected if the provided closure throws. For example: - - firstly { - .value(1) - }.get { foo in - print(foo, " is 1") - }.done { foo in - print(foo, " is 1") - }.done { foo in - print(foo, " is Void") - } - */ - func get(on: DispatchQueue? = conf.Q.return, flags: DispatchWorkItemFlags? = nil, _ body: @escaping (T) throws -> Void) -> Promise { - return map(on: on, flags: flags) { - try body($0) - return $0 - } - } - - /** - The provided closure is executed with promise result. - - This is like `get` but provides the Result of the Promise so you can inspect the value of the chain at this point without causing any side effects. - - - Parameter on: The queue to which the provided closure dispatches. - - Parameter body: The closure that is executed with Result of Promise. - - Returns: A new promise that is resolved with the result that the handler is fed. For example: - - promise.tap{ print($0) }.then{ /*…*/ } - */ - func tap(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ body: @escaping(Result) -> Void) -> Promise { - return Promise { seal in - pipe { result in - on.async(flags: flags) { - body(result) - seal.resolve(result) - } - } - } - } - - /// - Returns: a new promise chained off this promise but with its value discarded. - func asVoid() -> Promise { - return map(on: nil) { _ in } - } -} - -public extension Thenable { - /** - - Returns: The error with which this promise was rejected; `nil` if this promise is not rejected. - */ - var error: Error? { - switch result { - case .none: - return nil - case .some(.fulfilled): - return nil - case .some(.rejected(let error)): - return error - } - } - - /** - - Returns: `true` if the promise has not yet resolved. - */ - var isPending: Bool { - return result == nil - } - - /** - - Returns: `true` if the promise has resolved. - */ - var isResolved: Bool { - return !isPending - } - - /** - - Returns: `true` if the promise was fulfilled. - */ - var isFulfilled: Bool { - return value != nil - } - - /** - - Returns: `true` if the promise was rejected. - */ - var isRejected: Bool { - return error != nil - } - - /** - - Returns: The value with which this promise was fulfilled or `nil` if this promise is pending or rejected. - */ - var value: T? { - switch result { - case .none: - return nil - case .some(.fulfilled(let value)): - return value - case .some(.rejected): - return nil - } - } -} - -public extension Thenable where T: Sequence { - /** - `Promise<[T]>` => `T` -> `U` => `Promise<[U]>` - - firstly { - .value([1,2,3]) - }.mapValues { integer in - integer * 2 - }.done { - // $0 => [2,4,6] - } - */ - func mapValues(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ transform: @escaping(T.Iterator.Element) throws -> U) -> Promise<[U]> { - return map(on: on, flags: flags){ try $0.map(transform) } - } - - #if swift(>=4) && !swift(>=5.2) - /** - `Promise<[T]>` => `KeyPath` => `Promise<[U]>` - - firstly { - .value([Person(name: "Max"), Person(name: "Roman"), Person(name: "John")]) - }.mapValues(\.name).done { - // $0 => ["Max", "Roman", "John"] - } - */ - func mapValues(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ keyPath: KeyPath) -> Promise<[U]> { - return map(on: on, flags: flags){ $0.map { $0[keyPath: keyPath] } } - } - #endif - - /** - `Promise<[T]>` => `T` -> `[U]` => `Promise<[U]>` - - firstly { - .value([1,2,3]) - }.flatMapValues { integer in - [integer, integer] - }.done { - // $0 => [1,1,2,2,3,3] - } - */ - func flatMapValues(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ transform: @escaping(T.Iterator.Element) throws -> U) -> Promise<[U.Iterator.Element]> { - return map(on: on, flags: flags){ (foo: T) in - try foo.flatMap{ try transform($0) } - } - } - - /** - `Promise<[T]>` => `T` -> `U?` => `Promise<[U]>` - - firstly { - .value(["1","2","a","3"]) - }.compactMapValues { - Int($0) - }.done { - // $0 => [1,2,3] - } - */ - func compactMapValues(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ transform: @escaping(T.Iterator.Element) throws -> U?) -> Promise<[U]> { - return map(on: on, flags: flags) { foo -> [U] in - #if !swift(>=3.3) || (swift(>=4) && !swift(>=4.1)) - return try foo.flatMap(transform) - #else - return try foo.compactMap(transform) - #endif - } - } - - #if swift(>=4) && !swift(>=5.2) - /** - `Promise<[T]>` => `KeyPath` => `Promise<[U]>` - - firstly { - .value([Person(name: "Max"), Person(name: "Roman", age: 26), Person(name: "John", age: 23)]) - }.compactMapValues(\.age).done { - // $0 => [26, 23] - } - */ - func compactMapValues(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ keyPath: KeyPath) -> Promise<[U]> { - return map(on: on, flags: flags) { foo -> [U] in - #if !swift(>=4.1) - return foo.flatMap { $0[keyPath: keyPath] } - #else - return foo.compactMap { $0[keyPath: keyPath] } - #endif - } - } - #endif - - /** - `Promise<[T]>` => `T` -> `Promise` => `Promise<[U]>` - - firstly { - .value([1,2,3]) - }.thenMap { integer in - .value(integer * 2) - }.done { - // $0 => [2,4,6] - } - */ - func thenMap(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ transform: @escaping(T.Iterator.Element) throws -> U) -> Promise<[U.T]> { - return then(on: on, flags: flags) { - when(fulfilled: try $0.map(transform)) - } - } - - /** - `Promise<[T]>` => `T` -> `Promise<[U]>` => `Promise<[U]>` - - firstly { - .value([1,2,3]) - }.thenFlatMap { integer in - .value([integer, integer]) - }.done { - // $0 => [1,1,2,2,3,3] - } - */ - func thenFlatMap(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ transform: @escaping(T.Iterator.Element) throws -> U) -> Promise<[U.T.Iterator.Element]> where U.T: Sequence { - return then(on: on, flags: flags) { - when(fulfilled: try $0.map(transform)) - }.map(on: nil) { - $0.flatMap{ $0 } - } - } - - /** - `Promise<[T]>` => `T` -> Bool => `Promise<[T]>` - - firstly { - .value([1,2,3]) - }.filterValues { - $0 > 1 - }.done { - // $0 => [2,3] - } - */ - func filterValues(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ isIncluded: @escaping (T.Iterator.Element) -> Bool) -> Promise<[T.Iterator.Element]> { - return map(on: on, flags: flags) { - $0.filter(isIncluded) - } - } - - #if swift(>=4) && !swift(>=5.2) - /** - `Promise<[T]>` => `KeyPath` => `Promise<[T]>` - - firstly { - .value([Person(name: "Max"), Person(name: "Roman", age: 26, isStudent: false), Person(name: "John", age: 23, isStudent: true)]) - }.filterValues(\.isStudent).done { - // $0 => [Person(name: "John", age: 23, isStudent: true)] - } - */ - func filterValues(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, _ keyPath: KeyPath) -> Promise<[T.Iterator.Element]> { - return map(on: on, flags: flags) { - $0.filter { $0[keyPath: keyPath] } - } - } - #endif -} - -public extension Thenable where T: Collection { - /// - Returns: a promise fulfilled with the first value of this `Collection` or, if empty, a promise rejected with PMKError.emptySequence. - var firstValue: Promise { - return map(on: nil) { aa in - if let a1 = aa.first { - return a1 - } else { - throw PMKError.emptySequence - } - } - } - - func firstValue(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil, where test: @escaping (T.Iterator.Element) -> Bool) -> Promise { - return map(on: on, flags: flags) { - for x in $0 where test(x) { - return x - } - throw PMKError.emptySequence - } - } - - /// - Returns: a promise fulfilled with the last value of this `Collection` or, if empty, a promise rejected with PMKError.emptySequence. - var lastValue: Promise { - return map(on: nil) { aa in - if aa.isEmpty { - throw PMKError.emptySequence - } else { - let i = aa.index(aa.endIndex, offsetBy: -1) - return aa[i] - } - } - } -} - -public extension Thenable where T: Sequence, T.Iterator.Element: Comparable { - /// - Returns: a promise fulfilled with the sorted values of this `Sequence`. - func sortedValues(on: DispatchQueue? = conf.Q.map, flags: DispatchWorkItemFlags? = nil) -> Promise<[T.Iterator.Element]> { - return map(on: on, flags: flags){ $0.sorted() } - } -} diff --git a/Carthage/Checkouts/PromiseKit/Sources/after.m b/Carthage/Checkouts/PromiseKit/Sources/after.m deleted file mode 100644 index 25f9966fc..000000000 --- a/Carthage/Checkouts/PromiseKit/Sources/after.m +++ /dev/null @@ -1,14 +0,0 @@ -#import "AnyPromise.h" -@import Dispatch; -@import Foundation.NSDate; -@import Foundation.NSValue; - -/// @return A promise that fulfills after the specified duration. -AnyPromise *PMKAfter(NSTimeInterval duration) { - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - dispatch_time_t time = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(duration * NSEC_PER_SEC)); - dispatch_after(time, dispatch_get_global_queue(0, 0), ^{ - resolve(@(duration)); - }); - }]; -} diff --git a/Carthage/Checkouts/PromiseKit/Sources/after.swift b/Carthage/Checkouts/PromiseKit/Sources/after.swift deleted file mode 100644 index cdaeccd9e..000000000 --- a/Carthage/Checkouts/PromiseKit/Sources/after.swift +++ /dev/null @@ -1,46 +0,0 @@ -import struct Foundation.TimeInterval -import Dispatch - -/** - after(seconds: 1.5).then { - //… - } - -- Returns: A guarantee that resolves after the specified duration. -*/ -public func after(seconds: TimeInterval) -> Guarantee { - let (rg, seal) = Guarantee.pending() - let when = DispatchTime.now() + seconds -#if swift(>=4.0) - q.asyncAfter(deadline: when) { seal(()) } -#else - q.asyncAfter(deadline: when, execute: seal) -#endif - return rg -} - -/** - after(.seconds(2)).then { - //… - } - - - Returns: A guarantee that resolves after the specified duration. -*/ -public func after(_ interval: DispatchTimeInterval) -> Guarantee { - let (rg, seal) = Guarantee.pending() - let when = DispatchTime.now() + interval -#if swift(>=4.0) - q.asyncAfter(deadline: when) { seal(()) } -#else - q.asyncAfter(deadline: when, execute: seal) -#endif - return rg -} - -private var q: DispatchQueue { - if #available(macOS 10.10, iOS 8.0, tvOS 9.0, watchOS 2.0, *) { - return DispatchQueue.global(qos: .default) - } else { - return DispatchQueue.global(priority: .default) - } -} diff --git a/Carthage/Checkouts/PromiseKit/Sources/dispatch_promise.m b/Carthage/Checkouts/PromiseKit/Sources/dispatch_promise.m deleted file mode 100644 index ecb89f711..000000000 --- a/Carthage/Checkouts/PromiseKit/Sources/dispatch_promise.m +++ /dev/null @@ -1,10 +0,0 @@ -#import "AnyPromise.h" -@import Dispatch; - -AnyPromise *dispatch_promise_on(dispatch_queue_t queue, id block) { - return [AnyPromise promiseWithValue:nil].thenOn(queue, block); -} - -AnyPromise *dispatch_promise(id block) { - return dispatch_promise_on(dispatch_get_global_queue(0, 0), block); -} diff --git a/Carthage/Checkouts/PromiseKit/Sources/firstly.swift b/Carthage/Checkouts/PromiseKit/Sources/firstly.swift deleted file mode 100644 index 4bfc03858..000000000 --- a/Carthage/Checkouts/PromiseKit/Sources/firstly.swift +++ /dev/null @@ -1,39 +0,0 @@ -import Dispatch - -/** - Judicious use of `firstly` *may* make chains more readable. - - Compare: - - URLSession.shared.dataTask(url: url1).then { - URLSession.shared.dataTask(url: url2) - }.then { - URLSession.shared.dataTask(url: url3) - } - - With: - - firstly { - URLSession.shared.dataTask(url: url1) - }.then { - URLSession.shared.dataTask(url: url2) - }.then { - URLSession.shared.dataTask(url: url3) - } - - - Note: the block you pass executes immediately on the current thread/queue. - */ -public func firstly(execute body: () throws -> U) -> Promise { - do { - let rp = Promise(.pending) - try body().pipe(to: rp.box.seal) - return rp - } catch { - return Promise(error: error) - } -} - -/// - See: firstly() -public func firstly(execute body: () -> Guarantee) -> Guarantee { - return body() -} diff --git a/Carthage/Checkouts/PromiseKit/Sources/fwd.h b/Carthage/Checkouts/PromiseKit/Sources/fwd.h deleted file mode 100644 index 8c049f769..000000000 --- a/Carthage/Checkouts/PromiseKit/Sources/fwd.h +++ /dev/null @@ -1,171 +0,0 @@ -#import -#import - -@class AnyPromise; -extern NSString * __nonnull const PMKErrorDomain; - -#define PMKFailingPromiseIndexKey @"PMKFailingPromiseIndexKey" -#define PMKJoinPromisesKey @"PMKJoinPromisesKey" - -#define PMKUnexpectedError 1l -#define PMKInvalidUsageError 3l -#define PMKAccessDeniedError 4l -#define PMKOperationFailed 8l -#define PMKTaskError 9l -#define PMKJoinError 10l -#define PMKNoWinnerError 11l - - -#ifdef __cplusplus -extern "C" { -#endif - -/** - @return A new promise that resolves after the specified duration. - - @parameter duration The duration in seconds to wait before this promise is resolve. - - For example: - - PMKAfter(1).then(^{ - //… - }); -*/ -extern AnyPromise * __nonnull PMKAfter(NSTimeInterval duration) NS_REFINED_FOR_SWIFT; - - - -/** - `when` is a mechanism for waiting more than one asynchronous task and responding when they are all complete. - - `PMKWhen` accepts varied input. If an array is passed then when those promises fulfill, when’s promise fulfills with an array of fulfillment values. If a dictionary is passed then the same occurs, but when’s promise fulfills with a dictionary of fulfillments keyed as per the input. - - Interestingly, if a single promise is passed then when waits on that single promise, and if a single non-promise object is passed then when fulfills immediately with that object. If the array or dictionary that is passed contains objects that are not promises, then these objects are considered fulfilled promises. The reason we do this is to allow a pattern know as "abstracting away asynchronicity". - - If *any* of the provided promises reject, the returned promise is immediately rejected with that promise’s rejection. The error’s `userInfo` object is supplemented with `PMKFailingPromiseIndexKey`. - - For example: - - PMKWhen(@[promise1, promise2]).then(^(NSArray *results){ - //… - }); - - @warning *Important* In the event of rejection the other promises will continue to resolve and as per any other promise will either fulfill or reject. This is the right pattern for `getter` style asynchronous tasks, but often for `setter` tasks (eg. storing data on a server), you most likely will need to wait on all tasks and then act based on which have succeeded and which have failed. In such situations use `PMKJoin`. - - @param input The input upon which to wait before resolving this promise. - - @return A promise that is resolved with either: - - 1. An array of values from the provided array of promises. - 2. The value from the provided promise. - 3. The provided non-promise object. - - @see PMKJoin - -*/ -extern AnyPromise * __nonnull PMKWhen(id __nonnull input) NS_REFINED_FOR_SWIFT; - - - -/** - Creates a new promise that resolves only when all provided promises have resolved. - - Typically, you should use `PMKWhen`. - - For example: - - PMKJoin(@[promise1, promise2]).then(^(NSArray *resultingValues){ - //… - }).catch(^(NSError *error){ - assert(error.domain == PMKErrorDomain); - assert(error.code == PMKJoinError); - - NSArray *promises = error.userInfo[PMKJoinPromisesKey]; - for (AnyPromise *promise in promises) { - if (promise.rejected) { - //… - } - } - }); - - @param promises An array of promises. - - @return A promise that thens three parameters: - - 1) An array of mixed values and errors from the resolved input. - 2) An array of values from the promises that fulfilled. - 3) An array of errors from the promises that rejected or nil if all promises fulfilled. - - @see when -*/ -AnyPromise *__nonnull PMKJoin(NSArray * __nonnull promises) NS_REFINED_FOR_SWIFT; - - - -/** - Literally hangs this thread until the promise has resolved. - - Do not use hang… unless you are testing, playing or debugging. - - If you use it in production code I will literally and honestly cry like a child. - - @return The resolved value of the promise. - - @warning T SAFE. IT IS NOT SAFE. IT IS NOT SAFE. IT IS NOT SAFE. IT IS NO -*/ -extern id __nullable PMKHang(AnyPromise * __nonnull promise); - - - -/** - Executes the provided block on a background queue. - - dispatch_promise is a convenient way to start a promise chain where the - first step needs to run synchronously on a background queue. - - dispatch_promise(^{ - return md5(input); - }).then(^(NSString *md5){ - NSLog(@"md5: %@", md5); - }); - - @param block The block to be executed in the background. Returning an `NSError` will reject the promise, everything else (including void) fulfills the promise. - - @return A promise resolved with the return value of the provided block. - - @see dispatch_async -*/ -extern AnyPromise * __nonnull dispatch_promise(id __nonnull block) NS_SWIFT_UNAVAILABLE("Use our `DispatchQueue.async` override instead"); - - - -/** - Executes the provided block on the specified background queue. - - dispatch_promise_on(myDispatchQueue, ^{ - return md5(input); - }).then(^(NSString *md5){ - NSLog(@"md5: %@", md5); - }); - - @param block The block to be executed in the background. Returning an `NSError` will reject the promise, everything else (including void) fulfills the promise. - - @return A promise resolved with the return value of the provided block. - - @see dispatch_promise -*/ -extern AnyPromise * __nonnull dispatch_promise_on(dispatch_queue_t __nonnull queue, id __nonnull block) NS_SWIFT_UNAVAILABLE("Use our `DispatchQueue.async` override instead"); - -/** - Returns a new promise that resolves when the value of the first resolved promise in the provided array of promises. -*/ -extern AnyPromise * __nonnull PMKRace(NSArray * __nonnull promises) NS_REFINED_FOR_SWIFT; - -/** - Returns a new promise that resolves with the value of the first fulfilled promise in the provided array of promises. -*/ -extern AnyPromise * __nonnull PMKRaceFulfilled(NSArray * __nonnull promises) NS_REFINED_FOR_SWIFT; - -#ifdef __cplusplus -} // Extern C -#endif diff --git a/Carthage/Checkouts/PromiseKit/Sources/hang.m b/Carthage/Checkouts/PromiseKit/Sources/hang.m deleted file mode 100644 index 913339e51..000000000 --- a/Carthage/Checkouts/PromiseKit/Sources/hang.m +++ /dev/null @@ -1,29 +0,0 @@ -#import "AnyPromise.h" -#import "AnyPromise+Private.h" -@import CoreFoundation.CFRunLoop; - -/** - Suspends the active thread waiting on the provided promise. - - @return The value of the provided promise once resolved. - */ -id PMKHang(AnyPromise *promise) { - if (promise.pending) { - static CFRunLoopSourceContext context; - - CFRunLoopRef runLoop = CFRunLoopGetCurrent(); - CFRunLoopSourceRef runLoopSource = CFRunLoopSourceCreate(NULL, 0, &context); - CFRunLoopAddSource(runLoop, runLoopSource, kCFRunLoopDefaultMode); - - promise.ensure(^{ - CFRunLoopStop(runLoop); - }); - while (promise.pending) { - CFRunLoopRun(); - } - CFRunLoopRemoveSource(runLoop, runLoopSource, kCFRunLoopDefaultMode); - CFRelease(runLoopSource); - } - - return promise.value; -} diff --git a/Carthage/Checkouts/PromiseKit/Sources/hang.swift b/Carthage/Checkouts/PromiseKit/Sources/hang.swift deleted file mode 100644 index 1022dcad7..000000000 --- a/Carthage/Checkouts/PromiseKit/Sources/hang.swift +++ /dev/null @@ -1,55 +0,0 @@ -import Foundation -import CoreFoundation - -/** - Runs the active run-loop until the provided promise resolves. - - This is for debug and is not a generally safe function to use in your applications. We mostly provide it for use in testing environments. - - Still if you like, study how it works (by reading the sources!) and use at your own risk. - - - Returns: The value of the resolved promise - - Throws: An error, should the promise be rejected - - See: `wait()` -*/ -public func hang(_ promise: Promise) throws -> T { -#if os(Linux) || os(Android) -#if swift(>=4) - let runLoopMode: CFRunLoopMode = kCFRunLoopDefaultMode -#else - // isMainThread is not yet implemented on Linux. - let runLoopModeRaw = RunLoopMode.defaultRunLoopMode.rawValue._bridgeToObjectiveC() - let runLoopMode: CFString = unsafeBitCast(runLoopModeRaw, to: CFString.self) -#endif -#else - guard Thread.isMainThread else { - // hang doesn't make sense on threads that aren't the main thread. - // use `.wait()` on those threads. - fatalError("Only call hang() on the main thread.") - } - let runLoopMode: CFRunLoopMode = CFRunLoopMode.defaultMode -#endif - - if promise.isPending { - var context = CFRunLoopSourceContext() - let runLoop = CFRunLoopGetCurrent() - let runLoopSource = CFRunLoopSourceCreate(nil, 0, &context) - CFRunLoopAddSource(runLoop, runLoopSource, runLoopMode) - - _ = promise.ensure { - CFRunLoopStop(runLoop) - } - - while promise.isPending { - CFRunLoopRun() - } - CFRunLoopRemoveSource(runLoop, runLoopSource, runLoopMode) - } - - switch promise.result! { - case .rejected(let error): - throw error - case .fulfilled(let value): - return value - } -} diff --git a/Carthage/Checkouts/PromiseKit/Sources/join.m b/Carthage/Checkouts/PromiseKit/Sources/join.m deleted file mode 100644 index 979f092df..000000000 --- a/Carthage/Checkouts/PromiseKit/Sources/join.m +++ /dev/null @@ -1,54 +0,0 @@ -@import Foundation.NSDictionary; -#import "AnyPromise+Private.h" -#import -@import Foundation.NSError; -@import Foundation.NSNull; -#import "PromiseKit.h" -#import - -/** - Waits on all provided promises. - - `PMKWhen` rejects as soon as one of the provided promises rejects. `PMKJoin` waits on all provided promises, then rejects if any of those promises rejects, otherwise it fulfills with values from the provided promises. - - - Returns: A new promise that resolves once all the provided promises resolve. -*/ -AnyPromise *PMKJoin(NSArray *promises) { - if (promises == nil) - return [AnyPromise promiseWithValue:[NSError errorWithDomain:PMKErrorDomain code:PMKInvalidUsageError userInfo:@{NSLocalizedDescriptionKey: @"PMKJoin(nil)"}]]; - - if (promises.count == 0) - return [AnyPromise promiseWithValue:promises]; - - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - NSPointerArray *results = NSPointerArrayMake(promises.count); - __block atomic_int countdown = promises.count; - __block BOOL rejected = NO; - - [promises enumerateObjectsUsingBlock:^(AnyPromise *promise, NSUInteger ii, BOOL *stop) { - [promise __pipe:^(id value) { - - if (IsError(value)) { - rejected = YES; - } - - //FIXME surely this isn't thread safe on multiple cores? - [results replacePointerAtIndex:ii withPointer:(__bridge void *)(value ?: [NSNull null])]; - - atomic_fetch_sub_explicit(&countdown, 1, memory_order_relaxed); - - if (countdown == 0) { - if (!rejected) { - resolve(results.allObjects); - } else { - id userInfo = @{PMKJoinPromisesKey: promises}; - id err = [NSError errorWithDomain:PMKErrorDomain code:PMKJoinError userInfo:userInfo]; - resolve(err); - } - } - }]; - - (void) stop; - }]; - }]; -} diff --git a/Carthage/Checkouts/PromiseKit/Sources/race.m b/Carthage/Checkouts/PromiseKit/Sources/race.m deleted file mode 100644 index accf80dc9..000000000 --- a/Carthage/Checkouts/PromiseKit/Sources/race.m +++ /dev/null @@ -1,42 +0,0 @@ -#import "AnyPromise+Private.h" -#import - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" -// ^^ OSAtomicDecrement32 is deprecated on watchOS - -AnyPromise *PMKRace(NSArray *promises) { - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - for (AnyPromise *promise in promises) { - [promise __pipe:resolve]; - } - }]; -} - -/** - Waits for one promise to fulfill - - @note If there are no fulfilled promises, the returned promise is rejected with `PMKNoWinnerError`. - @param promises The promises to fulfill. - @return The promise that was fulfilled first. -*/ -AnyPromise *PMKRaceFulfilled(NSArray *promises) { - __block int32_t countdown = (int32_t)[promises count]; - - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - for (__strong AnyPromise* promise in promises) { - [promise __pipe:^(id value) { - if (IsError(value)) { - if (OSAtomicDecrement32(&countdown) == 0) { - id err = [NSError errorWithDomain:PMKErrorDomain code:PMKNoWinnerError userInfo:@{NSLocalizedDescriptionKey: @"PMKRaceFulfilled(nil)"}]; - resolve(err); - } - } else { - resolve(value); - } - }]; - } - }]; -} - -#pragma GCC diagnostic pop diff --git a/Carthage/Checkouts/PromiseKit/Sources/race.swift b/Carthage/Checkouts/PromiseKit/Sources/race.swift deleted file mode 100644 index 76ae96d06..000000000 --- a/Carthage/Checkouts/PromiseKit/Sources/race.swift +++ /dev/null @@ -1,102 +0,0 @@ -import Dispatch - -@inline(__always) -private func _race(_ thenables: [U]) -> Promise { - let rp = Promise(.pending) - for thenable in thenables { - thenable.pipe(to: rp.box.seal) - } - return rp -} - -/** - Waits for one promise to resolve - - race(promise1, promise2, promise3).then { winner in - //… - } - - - Returns: The promise that resolves first - - Warning: If the first resolution is a rejection, the returned promise is rejected -*/ -public func race(_ thenables: U...) -> Promise { - return _race(thenables) -} - -/** - Waits for one promise to resolve - - race(promise1, promise2, promise3).then { winner in - //… - } - - - Returns: The promise that resolves first - - Warning: If the first resolution is a rejection, the returned promise is rejected - - Remark: If the provided array is empty the returned promise is rejected with PMKError.badInput -*/ -public func race(_ thenables: [U]) -> Promise { - guard !thenables.isEmpty else { - return Promise(error: PMKError.badInput) - } - return _race(thenables) -} - -/** - Waits for one guarantee to resolve - - race(promise1, promise2, promise3).then { winner in - //… - } - - - Returns: The guarantee that resolves first -*/ -public func race(_ guarantees: Guarantee...) -> Guarantee { - let rg = Guarantee(.pending) - for guarantee in guarantees { - guarantee.pipe(to: rg.box.seal) - } - return rg -} - -/** - Waits for one promise to fulfill - - race(fulfilled: [promise1, promise2, promise3]).then { winner in - //… - } - - - Returns: The promise that was fulfilled first. - - Warning: Skips all rejected promises. - - Remark: If the provided array is empty, the returned promise is rejected with `PMKError.badInput`. If there are no fulfilled promises, the returned promise is rejected with `PMKError.noWinner`. -*/ -public func race(fulfilled thenables: [U]) -> Promise { - var countdown = thenables.count - guard countdown > 0 else { - return Promise(error: PMKError.badInput) - } - - let rp = Promise(.pending) - - let barrier = DispatchQueue(label: "org.promisekit.barrier.race", attributes: .concurrent) - - for promise in thenables { - promise.pipe { result in - barrier.sync(flags: .barrier) { - switch result { - case .rejected: - guard rp.isPending else { return } - countdown -= 1 - if countdown == 0 { - rp.box.seal(.rejected(PMKError.noWinner)) - } - case .fulfilled(let value): - guard rp.isPending else { return } - countdown = 0 - rp.box.seal(.fulfilled(value)) - } - } - } - } - - return rp -} diff --git a/Carthage/Checkouts/PromiseKit/Sources/when.m b/Carthage/Checkouts/PromiseKit/Sources/when.m deleted file mode 100644 index 43e5feddc..000000000 --- a/Carthage/Checkouts/PromiseKit/Sources/when.m +++ /dev/null @@ -1,107 +0,0 @@ -@import Foundation.NSDictionary; -#import "AnyPromise+Private.h" -@import Foundation.NSProgress; -#import -@import Foundation.NSError; -@import Foundation.NSNull; -#import "PromiseKit.h" - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" -// ^^ OSAtomicDecrement32 is deprecated on watchOS - - -// NSProgress resources: -// * https://robots.thoughtbot.com/asynchronous-nsprogress -// * http://oleb.net/blog/2014/03/nsprogress/ -// NSProgress! Beware! -// * https://github.com/AFNetworking/AFNetworking/issues/2261 - -/** - Wait for all promises in a set to resolve. - - @note If *any* of the provided promises reject, the returned promise is immediately rejected with that error. - @warning In the event of rejection the other promises will continue to resolve and, as per any other promise, will either fulfill or reject. This is the right pattern for `getter` style asynchronous tasks, but often for `setter` tasks (eg. storing data on a server), you most likely will need to wait on all tasks and then act based on which have succeeded and which have failed, in such situations use `when(resolved:)`. - @param promises The promises upon which to wait before the returned promise resolves. - @note PMKWhen provides NSProgress. - @return A new promise that resolves when all the provided promises fulfill or one of the provided promises rejects. -*/ -AnyPromise *PMKWhen(id promises) { - if (promises == nil) - return [AnyPromise promiseWithValue:[NSError errorWithDomain:PMKErrorDomain code:PMKInvalidUsageError userInfo:@{NSLocalizedDescriptionKey: @"PMKWhen(nil)"}]]; - - if ([promises isKindOfClass:[NSArray class]] || [promises isKindOfClass:[NSDictionary class]]) { - if ([promises count] == 0) - return [AnyPromise promiseWithValue:promises]; - } else if ([promises isKindOfClass:[AnyPromise class]]) { - promises = @[promises]; - } else { - return [AnyPromise promiseWithValue:promises]; - } - -#ifndef PMKDisableProgress - NSProgress *progress = [NSProgress progressWithTotalUnitCount:(int64_t)[promises count]]; - progress.pausable = NO; - progress.cancellable = NO; -#else - struct PMKProgress { - int completedUnitCount; - int totalUnitCount; - double fractionCompleted; - }; - __block struct PMKProgress progress; -#endif - - __block int32_t countdown = (int32_t)[promises count]; - BOOL const isdict = [promises isKindOfClass:[NSDictionary class]]; - - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - NSInteger index = 0; - - for (__strong id key in promises) { - AnyPromise *promise = isdict ? promises[key] : key; - if (!isdict) key = @(index); - - if (![promise isKindOfClass:[AnyPromise class]]) - promise = [AnyPromise promiseWithValue:promise]; - - [promise __pipe:^(id value){ - if (progress.fractionCompleted >= 1) - return; - - if (IsError(value)) { - progress.completedUnitCount = progress.totalUnitCount; - - NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithDictionary:[(NSError *)value userInfo] ?: @{}]; - userInfo[PMKFailingPromiseIndexKey] = key; - [userInfo setObject:value forKey:NSUnderlyingErrorKey]; - id err = [[NSError alloc] initWithDomain:[value domain] code:[value code] userInfo:userInfo]; - resolve(err); - } - else if (OSAtomicDecrement32(&countdown) == 0) { - progress.completedUnitCount = progress.totalUnitCount; - - id results; - if (isdict) { - results = [NSMutableDictionary new]; - for (id key in promises) { - id promise = promises[key]; - results[key] = IsPromise(promise) ? ((AnyPromise *)promise).value : promise; - } - } else { - results = [NSMutableArray new]; - for (AnyPromise *promise in promises) { - id value = IsPromise(promise) ? (promise.value ?: [NSNull null]) : promise; - [results addObject:value]; - } - } - resolve(results); - } else { - progress.completedUnitCount++; - } - }]; - } - }]; -} - -#pragma GCC diagnostic pop diff --git a/Carthage/Checkouts/PromiseKit/Sources/when.swift b/Carthage/Checkouts/PromiseKit/Sources/when.swift deleted file mode 100644 index 44335b84f..000000000 --- a/Carthage/Checkouts/PromiseKit/Sources/when.swift +++ /dev/null @@ -1,363 +0,0 @@ -import Foundation -import Dispatch - -private func _when(_ thenables: [U]) -> Promise { - var countdown = thenables.count - guard countdown > 0 else { - return .value(Void()) - } - - let rp = Promise(.pending) - -#if PMKDisableProgress || os(Linux) - var progress: (completedUnitCount: Int, totalUnitCount: Int) = (0, 0) -#else - let progress = Progress(totalUnitCount: Int64(thenables.count)) - progress.isCancellable = false - progress.isPausable = false -#endif - - let barrier = DispatchQueue(label: "org.promisekit.barrier.when", attributes: .concurrent) - - for promise in thenables { - promise.pipe { result in - barrier.sync(flags: .barrier) { - switch result { - case .rejected(let error): - if rp.isPending { - progress.completedUnitCount = progress.totalUnitCount - rp.box.seal(.rejected(error)) - } - case .fulfilled: - guard rp.isPending else { return } - progress.completedUnitCount += 1 - countdown -= 1 - if countdown == 0 { - rp.box.seal(.fulfilled(())) - } - } - } - } - } - - return rp -} - -/** - Wait for all promises in a set to fulfill. - - For example: - - when(fulfilled: promise1, promise2).then { results in - //… - }.catch { error in - switch error { - case URLError.notConnectedToInternet: - //… - case CLError.denied: - //… - } - } - - - Note: If *any* of the provided promises reject, the returned promise is immediately rejected with that error. - - Warning: In the event of rejection the other promises will continue to resolve and, as per any other promise, will either fulfill or reject. This is the right pattern for `getter` style asynchronous tasks, but often for `setter` tasks (eg. storing data on a server), you most likely will need to wait on all tasks and then act based on which have succeeded and which have failed, in such situations use `when(resolved:)`. - - Parameter promises: The promises upon which to wait before the returned promise resolves. - - Returns: A new promise that resolves when all the provided promises fulfill or one of the provided promises rejects. - - Note: `when` provides `NSProgress`. - - SeeAlso: `when(resolved:)` -*/ -public func when(fulfilled thenables: [U]) -> Promise<[U.T]> { - return _when(thenables).map(on: nil) { thenables.map{ $0.value! } } -} - -/// Wait for all promises in a set to fulfill. -public func when(fulfilled promises: U...) -> Promise where U.T == Void { - return _when(promises) -} - -/// Wait for all promises in a set to fulfill. -public func when(fulfilled promises: [U]) -> Promise where U.T == Void { - return _when(promises) -} - -/// Wait for all promises in a set to fulfill. -public func when(fulfilled pu: U, _ pv: V) -> Promise<(U.T, V.T)> { - return _when([pu.asVoid(), pv.asVoid()]).map(on: nil) { (pu.value!, pv.value!) } -} - -/// Wait for all promises in a set to fulfill. -public func when(fulfilled pu: U, _ pv: V, _ pw: W) -> Promise<(U.T, V.T, W.T)> { - return _when([pu.asVoid(), pv.asVoid(), pw.asVoid()]).map(on: nil) { (pu.value!, pv.value!, pw.value!) } -} - -/// Wait for all promises in a set to fulfill. -public func when(fulfilled pu: U, _ pv: V, _ pw: W, _ px: X) -> Promise<(U.T, V.T, W.T, X.T)> { - return _when([pu.asVoid(), pv.asVoid(), pw.asVoid(), px.asVoid()]).map(on: nil) { (pu.value!, pv.value!, pw.value!, px.value!) } -} - -/// Wait for all promises in a set to fulfill. -public func when(fulfilled pu: U, _ pv: V, _ pw: W, _ px: X, _ py: Y) -> Promise<(U.T, V.T, W.T, X.T, Y.T)> { - return _when([pu.asVoid(), pv.asVoid(), pw.asVoid(), px.asVoid(), py.asVoid()]).map(on: nil) { (pu.value!, pv.value!, pw.value!, px.value!, py.value!) } -} - -/** - Generate promises at a limited rate and wait for all to fulfill. - - For example: - - func downloadFile(url: URL) -> Promise { - // ... - } - - let urls: [URL] = /*…*/ - let urlGenerator = urls.makeIterator() - - let generator = AnyIterator> { - guard url = urlGenerator.next() else { - return nil - } - return downloadFile(url) - } - - when(generator, concurrently: 3).done { datas in - // ... - } - - No more than three downloads will occur simultaneously. - - - Note: The generator is called *serially* on a *background* queue. - - Warning: Refer to the warnings on `when(fulfilled:)` - - Parameter promiseGenerator: Generator of promises. - - Returns: A new promise that resolves when all the provided promises fulfill or one of the provided promises rejects. - - SeeAlso: `when(resolved:)` - */ - -public func when(fulfilled promiseIterator: It, concurrently: Int) -> Promise<[It.Element.T]> where It.Element: Thenable { - - guard concurrently > 0 else { - return Promise(error: PMKError.badInput) - } - - var generator = promiseIterator - let root = Promise<[It.Element.T]>.pending() - var pendingPromises = 0 - var promises: [It.Element] = [] - - let barrier = DispatchQueue(label: "org.promisekit.barrier.when", attributes: [.concurrent]) - - func dequeue() { - guard root.promise.isPending else { return } // don’t continue dequeueing if root has been rejected - - var shouldDequeue = false - barrier.sync { - shouldDequeue = pendingPromises < concurrently - } - guard shouldDequeue else { return } - - var promise: It.Element! - - barrier.sync(flags: .barrier) { - guard let next = generator.next() else { return } - promise = next - pendingPromises += 1 - promises.append(next) - } - - func testDone() { - barrier.sync { - if pendingPromises == 0 { - #if !swift(>=3.3) || (swift(>=4) && !swift(>=4.1)) - root.resolver.fulfill(promises.flatMap{ $0.value }) - #else - root.resolver.fulfill(promises.compactMap{ $0.value }) - #endif - } - } - } - - guard promise != nil else { - return testDone() - } - - promise.pipe { resolution in - barrier.sync(flags: .barrier) { - pendingPromises -= 1 - } - - switch resolution { - case .fulfilled: - dequeue() - testDone() - case .rejected(let error): - root.resolver.reject(error) - } - } - - dequeue() - } - - dequeue() - - return root.promise -} - -/** - Waits on all provided promises. - - `when(fulfilled:)` rejects as soon as one of the provided promises rejects. `when(resolved:)` waits on all provided promises whatever their result, and then provides an array of `Result` so you can individually inspect the results. As a consequence this function returns a `Guarantee`, ie. errors are lifted from the individual promises into the results array of the returned `Guarantee`. - - when(resolved: promise1, promise2, promise3).then { results in - for result in results where case .fulfilled(let value) { - //… - } - }.catch { error in - // invalid! Never rejects - } - - - Returns: A new promise that resolves once all the provided promises resolve. The array is ordered the same as the input, ie. the result order is *not* resolution order. - - Note: we do not provide tuple variants for `when(resolved:)` but will accept a pull-request - - Remark: Doesn't take Thenable due to protocol `associatedtype` paradox -*/ -public func when(resolved promises: Promise...) -> Guarantee<[Result]> { - return when(resolved: promises) -} - -/// - See: `when(resolved: Promise...)` -public func when(resolved promises: [Promise]) -> Guarantee<[Result]> { - guard !promises.isEmpty else { - return .value([]) - } - - var countdown = promises.count - let barrier = DispatchQueue(label: "org.promisekit.barrier.join", attributes: .concurrent) - - let rg = Guarantee<[Result]>(.pending) - for promise in promises { - promise.pipe { result in - barrier.sync(flags: .barrier) { - countdown -= 1 - } - barrier.sync { - if countdown == 0 { - rg.box.seal(promises.map{ $0.result! }) - } - } - } - } - return rg -} - -/** -Generate promises at a limited rate and wait for all to resolve. - -For example: - - func downloadFile(url: URL) -> Promise { - // ... - } - - let urls: [URL] = /*…*/ - let urlGenerator = urls.makeIterator() - - let generator = AnyIterator> { - guard url = urlGenerator.next() else { - return nil - } - return downloadFile(url) - } - - when(resolved: generator, concurrently: 3).done { results in - // ... - } - -No more than three downloads will occur simultaneously. Downloads will continue if one of them fails - -- Note: The generator is called *serially* on a *background* queue. -- Warning: Refer to the warnings on `when(resolved:)` -- Parameter promiseGenerator: Generator of promises. -- Returns: A new promise that resolves once all the provided promises resolve. The array is ordered the same as the input, ie. the result order is *not* resolution order. -- SeeAlso: `when(resolved:)` -*/ -#if swift(>=5.3) -public func when(resolved promiseIterator: It, concurrently: Int) - -> Guarantee<[Result]> where It.Element: Thenable { - guard concurrently > 0 else { - return Guarantee.value([Result.rejected(PMKError.badInput)]) - } - - var generator = promiseIterator - let root = Guarantee<[Result]>.pending() - var pendingPromises = 0 - var promises: [It.Element] = [] - - let barrier = DispatchQueue(label: "org.promisekit.barrier.when", attributes: [.concurrent]) - - func dequeue() { - guard root.guarantee.isPending else { - return - } // don’t continue dequeueing if root has been rejected - - var shouldDequeue = false - barrier.sync { - shouldDequeue = pendingPromises < concurrently - } - guard shouldDequeue else { - return - } - - var promise: It.Element! - - barrier.sync(flags: .barrier) { - guard let next = generator.next() else { - return - } - - promise = next - - pendingPromises += 1 - promises.append(next) - } - - func testDone() { - barrier.sync { - if pendingPromises == 0 { - #if !swift(>=3.3) || (swift(>=4) && !swift(>=4.1)) - root.resolve(promises.flatMap { $0.result }) - #else - root.resolve(promises.compactMap { $0.result }) - #endif - } - } - } - - guard promise != nil else { - return testDone() - } - - promise.pipe { _ in - barrier.sync(flags: .barrier) { - pendingPromises -= 1 - } - - dequeue() - testDone() - } - - dequeue() - } - - dequeue() - - return root.guarantee -} -#endif - -/// Waits on all provided Guarantees. -public func when(_ guarantees: Guarantee...) -> Guarantee { - return when(guarantees: guarantees) -} - -// Waits on all provided Guarantees. -public func when(guarantees: [Guarantee]) -> Guarantee { - return when(fulfilled: guarantees).recover{ _ in }.asVoid() -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/A+/0.0.0.swift b/Carthage/Checkouts/PromiseKit/Tests/A+/0.0.0.swift deleted file mode 100644 index 5962caa0a..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/A+/0.0.0.swift +++ /dev/null @@ -1,185 +0,0 @@ -import PromiseKit -import Dispatch -import XCTest - -enum Error: Swift.Error { - case dummy // we reject with this when we don't intend to test against it - case sentinel(UInt32) -} - -private let timeout: TimeInterval = 10 - -extension XCTestCase { - func describe(_ description: String, file: StaticString = #file, line: UInt = #line, body: () throws -> Void) { - - PromiseKit.conf.Q.map = .main - - do { - try body() - } catch { - XCTFail(description, file: file, line: line) - } - } - - func specify(_ description: String, file: StaticString = #file, line: UInt = #line, body: ((promise: Promise, fulfill: () -> Void, reject: (Error) -> Void), XCTestExpectation) throws -> Void) { - let expectation = self.expectation(description: description) - let (pending, seal) = Promise.pending() - - do { - try body((pending, seal.fulfill_, seal.reject), expectation) - waitForExpectations(timeout: timeout) { err in - if let _ = err { - XCTFail("wait failed: \(description)", file: file, line: line) - } - } - } catch { - XCTFail(description, file: file, line: line) - } - } - - func testFulfilled(file: StaticString = #file, line: UInt = #line, body: @escaping (Promise, XCTestExpectation, UInt32) -> Void) { - testFulfilled(withExpectationCount: 1, file: file, line: line) { - body($0, $1.first!, $2) - } - } - - func testRejected(file: StaticString = #file, line: UInt = #line, body: @escaping (Promise, XCTestExpectation, UInt32) -> Void) { - testRejected(withExpectationCount: 1, file: file, line: line) { - body($0, $1.first!, $2) - } - } - - func testFulfilled(withExpectationCount: Int, file: StaticString = #file, line: UInt = #line, body: @escaping (Promise, [XCTestExpectation], UInt32) -> Void) { - - let specify = mkspecify(withExpectationCount, file: file, line: line, body: body) - - specify("already-fulfilled") { value in - return (.value(value), {}) - } - specify("immediately-fulfilled") { value in - let (promise, seal) = Promise.pending() - return (promise, { - seal.fulfill(value) - }) - } - specify("eventually-fulfilled") { value in - let (promise, seal) = Promise.pending() - return (promise, { - after(ticks: 5) { - seal.fulfill(value) - } - }) - } - } - - func testRejected(withExpectationCount: Int, file: StaticString = #file, line: UInt = #line, body: @escaping (Promise, [XCTestExpectation], UInt32) -> Void) { - - let specify = mkspecify(withExpectationCount, file: file, line: line, body: body) - - specify("already-rejected") { sentinel in - return (Promise(error: Error.sentinel(sentinel)), {}) - } - specify("immediately-rejected") { sentinel in - let (promise, seal) = Promise.pending() - return (promise, { - seal.reject(Error.sentinel(sentinel)) - }) - } - specify("eventually-rejected") { sentinel in - let (promise, seal) = Promise.pending() - return (promise, { - after(ticks: 50) { - seal.reject(Error.sentinel(sentinel)) - } - }) - } - } - - -///////////////////////////////////////////////////////////////////////// - - private func mkspecify(_ numberOfExpectations: Int, file: StaticString, line: UInt, body: @escaping (Promise, [XCTestExpectation], UInt32) -> Void) -> (String, _ feed: (UInt32) -> (Promise, () -> Void)) -> Void { - return { desc, feed in - let value = arc4random() - let (promise, executeAfter) = feed(value) - let expectations = (1...numberOfExpectations).map { - self.expectation(description: "\(desc) (\($0))") - } - body(promise, expectations, value) - - executeAfter() - - self.waitForExpectations(timeout: timeout) { err in - if let _ = err { - XCTFail("timed out: \(desc)", file: file, line: line) - } - } - } - } - - func mkex() -> XCTestExpectation { - return expectation(description: "") - } -} - -func after(ticks: Int, execute body: @escaping () -> Void) { - precondition(ticks > 0) - - var ticks = ticks - func f() { - DispatchQueue.main.async { - ticks -= 1 - if ticks == 0 { - body() - } else { - f() - } - } - } - f() -} - -extension Promise { - func test(onFulfilled: @escaping () -> Void, onRejected: @escaping () -> Void) { - tap { result in - switch result { - case .fulfilled: - onFulfilled() - case .rejected: - onRejected() - } - }.silenceWarning() - } -} - -prefix func ++(a: inout Int) -> Int { - a += 1 - return a -} - -extension Promise { - func silenceWarning() {} -} - -#if os(Linux) -import func Glibc.random - -func arc4random() -> UInt32 { - return UInt32(random()) -} - -extension XCTestExpectation { - func fulfill() { - fulfill(#file, line: #line) - } -} - -extension XCTestCase { - func wait(for: [XCTestExpectation], timeout: TimeInterval, file: StaticString = #file, line: UInt = #line) { - #if !(swift(>=4.0) && !swift(>=4.1)) - let line = Int(line) - #endif - waitForExpectations(timeout: timeout, file: file, line: line) - } -} -#endif diff --git a/Carthage/Checkouts/PromiseKit/Tests/A+/2.1.2.swift b/Carthage/Checkouts/PromiseKit/Tests/A+/2.1.2.swift deleted file mode 100644 index c895c2f93..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/A+/2.1.2.swift +++ /dev/null @@ -1,26 +0,0 @@ -import PromiseKit -import XCTest - -class Test212: XCTestCase { - func test() { - describe("2.1.2.1: When fulfilled, a promise: must not transition to any other state.") { - testFulfilled { promise, expectation, _ in - promise.test(onFulfilled: expectation.fulfill, onRejected: { XCTFail() }) - } - - specify("trying to fulfill then immediately reject") { d, expectation in - d.promise.test(onFulfilled: expectation.fulfill, onRejected: { XCTFail() }) - d.fulfill() - d.reject(Error.dummy) - } - - specify("trying to fulfill then reject, delayed") { d, expectation in - d.promise.test(onFulfilled: expectation.fulfill, onRejected: { XCTFail() }) - after(ticks: 1) { - d.fulfill() - d.reject(Error.dummy) - } - } - } - } -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/A+/2.1.3.swift b/Carthage/Checkouts/PromiseKit/Tests/A+/2.1.3.swift deleted file mode 100644 index d24ae683f..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/A+/2.1.3.swift +++ /dev/null @@ -1,34 +0,0 @@ -import PromiseKit -import XCTest - -class Test213: XCTestCase { - func test() { - describe("2.1.3.1: When rejected, a promise: must not transition to any other state.") { - testRejected { promise, expectation, _ in - promise.test(onFulfilled: { XCTFail() }, onRejected: expectation.fulfill) - } - - specify("trying to reject then immediately fulfill") { d, expectation in - d.promise.test(onFulfilled: { XCTFail() }, onRejected: expectation.fulfill) - d.reject(Error.dummy) - d.fulfill() - } - - specify("trying to reject then fulfill, delayed") { d, expectation in - d.promise.test(onFulfilled: { XCTFail() }, onRejected: expectation.fulfill) - after(ticks: 1) { - d.reject(Error.dummy) - d.fulfill() - } - } - - specify("trying to reject immediately then fulfill delayed") { d, expectation in - d.promise.test(onFulfilled: { XCTFail() }, onRejected: expectation.fulfill) - d.reject(Error.dummy) - after(ticks: 1) { - d.fulfill() - } - } - } - } -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/A+/2.2.2.swift b/Carthage/Checkouts/PromiseKit/Tests/A+/2.2.2.swift deleted file mode 100644 index f1ba89917..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/A+/2.2.2.swift +++ /dev/null @@ -1,92 +0,0 @@ -import PromiseKit -import XCTest - -class Test222: XCTestCase { - func test() { - describe("2.2.2: If `onFulfilled` is a function,") { - describe("2.2.2.1: it must be called after `promise` is fulfilled, with `promise`’s fulfillment value as its first argument.") { - testFulfilled { promise, expectation, sentinel in - promise.done { - XCTAssertEqual(sentinel, $0) - expectation.fulfill() - }.silenceWarning() - } - } - - describe("2.2.2.2: it must not be called before `promise` is fulfilled") { - specify("fulfilled after a delay") { d, expectation in - var called = false - d.promise.done { - called = true - expectation.fulfill() - }.silenceWarning() - after(ticks: 5) { - XCTAssertFalse(called) - d.fulfill() - } - } - specify("never fulfilled") { d, expectation in - d.promise.done{ XCTFail() }.silenceWarning() - after(ticks: 1000, execute: expectation.fulfill) - } - } - - describe("2.2.2.3: it must not be called more than once.") { - specify("already-fulfilled") { _, expectation in - let ex = (expectation, mkex()) - Promise().done { - ex.0.fulfill() - }.silenceWarning() - after(ticks: 1000) { - ex.1.fulfill() - } - } - specify("trying to fulfill a pending promise more than once, immediately") { d, expectation in - d.promise.done(expectation.fulfill).silenceWarning() - d.fulfill() - d.fulfill() - } - specify("trying to fulfill a pending promise more than once, delayed") { d, expectation in - d.promise.done(expectation.fulfill).silenceWarning() - after(ticks: 5) { - d.fulfill() - d.fulfill() - } - } - specify("trying to fulfill a pending promise more than once, immediately then delayed") { d, expectation in - let ex = (expectation, mkex()) - d.promise.done(ex.0.fulfill).silenceWarning() - d.fulfill() - after(ticks: 5) { - d.fulfill() - } - after(ticks: 10, execute: ex.1.fulfill) - } - specify("when multiple `then` calls are made, spaced apart in time") { d, expectation in - let ex = (expectation, self.expectation(description: ""), self.expectation(description: ""), self.expectation(description: "")) - - do { - d.promise.done(ex.0.fulfill).silenceWarning() - } - after(ticks: 5) { - d.promise.done(ex.1.fulfill).silenceWarning() - } - after(ticks: 10) { - d.promise.done(ex.2.fulfill).silenceWarning() - } - after(ticks: 15) { - d.fulfill() - ex.3.fulfill() - } - } - specify("when `then` is interleaved with fulfillment") { d, expectation in - let ex = (expectation, self.expectation(description: ""), self) - - d.promise.done(ex.0.fulfill).silenceWarning() - d.fulfill() - d.promise.done(ex.1.fulfill).silenceWarning() - } - } - } - } -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/A+/2.2.3.swift b/Carthage/Checkouts/PromiseKit/Tests/A+/2.2.3.swift deleted file mode 100644 index 996d6a226..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/A+/2.2.3.swift +++ /dev/null @@ -1,93 +0,0 @@ -import PromiseKit -import XCTest - -class Test223: XCTestCase { - func test() { - describe("2.2.3: If `onRejected` is a function,") { - describe("2.2.3.1: it must be called after `promise` is rejected, with `promise`’s rejection reason as its first argument.") { - testRejected { promise, expectation, sentinel in - promise.catch { error in - if case Error.sentinel(let value) = error { - XCTAssertEqual(value, sentinel) - } else { - XCTFail() - } - expectation.fulfill() - } - } - } - describe("2.2.3.2: it must not be called before `promise` is rejected") { - specify("rejected after a delay") { d, expectation in - var called = false - d.promise.catch { _ in - called = true - expectation.fulfill() - } - after(ticks: 1) { - XCTAssertFalse(called) - d.reject(Error.dummy) - } - } - specify("never rejected") { d, expectation in - d.promise.catch { _ in XCTFail() } - after(ticks: 1, execute: expectation.fulfill) - } - } - describe("2.2.3.3: it must not be called more than once.") { - specify("already-rejected") { d, expectation in - var timesCalled = 0 - Promise(error: Error.dummy).catch { _ in - XCTAssertEqual(++timesCalled, 1) - } - after(ticks: 2) { - XCTAssertEqual(timesCalled, 1) - expectation.fulfill() - } - } - specify("trying to reject a pending promise more than once, immediately") { d, expectation in - d.promise.catch{_ in expectation.fulfill() } - d.reject(Error.dummy) - d.reject(Error.dummy) - } - specify("trying to reject a pending promise more than once, delayed") { d, expectation in - d.promise.catch{_ in expectation.fulfill() } - after(ticks: 1) { - d.reject(Error.dummy) - d.reject(Error.dummy) - } - } - specify("trying to reject a pending promise more than once, immediately then delayed") { d, expectation in - d.promise.catch{_ in expectation.fulfill() } - d.reject(Error.dummy) - after(ticks: 1) { - d.reject(Error.dummy) - } - } - specify("when multiple `then` calls are made, spaced apart in time") { d, expectation in - let mk = { self.expectation(description: "") } - let ex = (expectation, mk(), mk(), mk()) - - do { - d.promise.catch{ _ in ex.0.fulfill() } - } - after(ticks: 1) { - d.promise.catch{ _ in ex.1.fulfill() } - } - after(ticks: 2) { - d.promise.catch{ _ in ex.2.fulfill() } - } - after(ticks: 3) { - d.reject(Error.dummy) - ex.3.fulfill() - } - } - specify("when `then` is interleaved with rejection") { d, expectation in - let ex = (expectation, self.expectation(description: "")) - d.promise.catch{ _ in ex.0.fulfill() } - d.reject(Error.dummy) - d.promise.catch{ _ in ex.1.fulfill() } - } - } - } - } -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/A+/2.2.4.swift b/Carthage/Checkouts/PromiseKit/Tests/A+/2.2.4.swift deleted file mode 100644 index 0472b13f3..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/A+/2.2.4.swift +++ /dev/null @@ -1,146 +0,0 @@ -import PromiseKit -import XCTest - -class Test224: XCTestCase { - func test() { - describe("2.2.4: `onFulfilled` or `onRejected` must not be called until the execution context stack contains only platform code.") { - - describe("`then` returns before the promise becomes fulfilled or rejected") { - testFulfilled { promise, expectation, dummy in - var thenHasReturned = false - promise.done { _ in - XCTAssert(thenHasReturned) - expectation.fulfill() - }.silenceWarning() - thenHasReturned = true - } - testRejected { promise, expectation, memo in - var catchHasReturned = false - promise.catch { _->() in - XCTAssert(catchHasReturned) - expectation.fulfill() - } - catchHasReturned = true - } - - } - - describe("Clean-stack execution ordering tests (fulfillment case)") { - specify("when `onFulfilled` is added immediately before the promise is fulfilled") { d, expectation in - var onFulfilledCalled = false - d.promise.done { - onFulfilledCalled = true - expectation.fulfill() - }.silenceWarning() - d.fulfill() - XCTAssertFalse(onFulfilledCalled) - } - specify("when `onFulfilled` is added immediately after the promise is fulfilled") { d, expectation in - var onFulfilledCalled = false - d.fulfill() - d.promise.done { - onFulfilledCalled = true - expectation.fulfill() - }.silenceWarning() - XCTAssertFalse(onFulfilledCalled) - } - specify("when one `onFulfilled` is added inside another `onFulfilled`") { _, expectation in - var firstOnFulfilledFinished = false - let promise = Promise() - promise.done { - promise.done { - XCTAssertTrue(firstOnFulfilledFinished) - expectation.fulfill() - }.silenceWarning() - firstOnFulfilledFinished = true - }.silenceWarning() - } - - specify("when `onFulfilled` is added inside an `onRejected`") { _, expectation in - let promise1 = Promise(error: Error.dummy) - let promise2 = Promise() - var firstOnRejectedFinished = false - - promise1.catch { _ in - promise2.done { - XCTAssertTrue(firstOnRejectedFinished) - expectation.fulfill() - }.silenceWarning() - firstOnRejectedFinished = true - } - } - - specify("when the promise is fulfilled asynchronously") { d, expectation in - var firstStackFinished = false - - after(ticks: 1) { - d.fulfill() - firstStackFinished = true - } - - d.promise.done { - XCTAssertTrue(firstStackFinished) - expectation.fulfill() - }.silenceWarning() - } - } - - describe("Clean-stack execution ordering tests (rejection case)") { - specify("when `onRejected` is added immediately before the promise is rejected") { d, expectation in - var onRejectedCalled = false - d.promise.catch { _ in - onRejectedCalled = true - expectation.fulfill() - } - d.reject(Error.dummy) - XCTAssertFalse(onRejectedCalled) - } - specify("when `onRejected` is added immediately after the promise is rejected") { d, expectation in - var onRejectedCalled = false - d.reject(Error.dummy) - d.promise.catch { _ in - onRejectedCalled = true - expectation.fulfill() - } - XCTAssertFalse(onRejectedCalled) - } - specify("when `onRejected` is added inside an `onFulfilled`") { d, expectation in - let promise1 = Promise() - let promise2 = Promise(error: Error.dummy) - var firstOnFulfilledFinished = false - - promise1.done { _ in - promise2.catch { _ in - XCTAssertTrue(firstOnFulfilledFinished) - expectation.fulfill() - } - firstOnFulfilledFinished = true - }.silenceWarning() - } - specify("when one `onRejected` is added inside another `onRejected`") { d, expectation in - let promise = Promise(error: Error.dummy) - var firstOnRejectedFinished = false; - - promise.catch { _ in - promise.catch { _ in - XCTAssertTrue(firstOnRejectedFinished) - expectation.fulfill() - } - firstOnRejectedFinished = true - } - } - specify("when the promise is rejected asynchronously") { d, expectation in - var firstStackFinished = false - after(ticks: 1) { - d.reject(Error.dummy) - firstStackFinished = true - } - d.promise.catch { _ in - XCTAssertTrue(firstStackFinished) - expectation.fulfill() - } - } - } - } - } -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/A+/2.2.6.swift b/Carthage/Checkouts/PromiseKit/Tests/A+/2.2.6.swift deleted file mode 100644 index 95cfe7b23..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/A+/2.2.6.swift +++ /dev/null @@ -1,275 +0,0 @@ -import PromiseKit -import XCTest - -class Test226: XCTestCase { - func test() { - describe("2.2.6: `then` may be called multiple times on the same promise.") { - describe("2.2.6.1: If/when `promise` is fulfilled, all respective `onFulfilled` callbacks must execute in the order of their originating calls to `then`.") { - describe("multiple boring fulfillment handlers") { - testFulfilled(withExpectationCount: 4) { promise, exes, sentinel -> Void in - var orderValidator = 0 - promise.done { - XCTAssertEqual($0, sentinel) - XCTAssertEqual(++orderValidator, 1) - exes[0].fulfill() - }.silenceWarning() - promise.catch { _ in XCTFail() } - promise.done { - XCTAssertEqual($0, sentinel) - XCTAssertEqual(++orderValidator, 2) - exes[1].fulfill() - }.silenceWarning() - promise.catch { _ in XCTFail() } - promise.done { - XCTAssertEqual($0, sentinel) - XCTAssertEqual(++orderValidator, 3) - exes[2].fulfill() - }.silenceWarning() - promise.catch { _ in XCTFail() } - promise.done { - XCTAssertEqual($0, sentinel) - XCTAssertEqual(++orderValidator, 4) - exes[3].fulfill() - }.silenceWarning() - } - } - describe("multiple fulfillment handlers, one of which throws") { - testFulfilled(withExpectationCount: 4) { promise, exes, sentinel in - var orderValidator = 0 - promise.done { - XCTAssertEqual($0, sentinel) - XCTAssertEqual(++orderValidator, 1) - exes[0].fulfill() - }.silenceWarning() - promise.catch { _ in XCTFail() } - promise.done { - XCTAssertEqual($0, sentinel) - XCTAssertEqual(++orderValidator, 2) - exes[1].fulfill() - }.silenceWarning() - promise.catch { _ in XCTFail() } - promise.done { - XCTAssertEqual($0, sentinel) - XCTAssertEqual(++orderValidator, 3) - exes[2].fulfill() - throw Error.dummy - }.silenceWarning() - promise.catch { value in XCTFail() } - promise.done { - XCTAssertEqual($0, sentinel) - XCTAssertEqual(++orderValidator, 4) - exes[3].fulfill() - }.silenceWarning() - } - } - describe("results in multiple branching chains with their own fulfillment values") { - testFulfilled(withExpectationCount: 3) { promise, exes, memo in - let sentinel1 = 671 - let sentinel2: UInt32 = 672 - let sentinel3 = 673 - - promise.map { _ in - return sentinel1 - }.done { value in - XCTAssertEqual(sentinel1, value) - exes[0].fulfill() - }.silenceWarning() - - promise.done { _ in - throw Error.sentinel(sentinel2) - }.catch { err in - switch err { - case Error.sentinel(let err) where err == sentinel2: - break - default: - XCTFail() - } - exes[1].fulfill() - } - - promise.map { _ in - sentinel3 - }.done { - XCTAssertEqual($0, sentinel3) - exes[2].fulfill() - }.silenceWarning() - } - } - describe("`onFulfilled` handlers are called in the original order") { - testFulfilled(withExpectationCount: 3) { promise, exes, memo in - var orderValidator = 0 - - promise.done { _ in - XCTAssertEqual(++orderValidator, 1) - exes[0].fulfill() - }.silenceWarning() - promise.done { _ in - XCTAssertEqual(++orderValidator, 2) - exes[1].fulfill() - }.silenceWarning() - promise.done { _ in - XCTAssertEqual(++orderValidator, 3) - exes[2].fulfill() - }.silenceWarning() - } - } - describe("even when one handler is added inside another handler") { - testFulfilled(withExpectationCount: 3) { promise, exes, memo in - var x = 0 - promise.done { _ in - XCTAssertEqual(x, 0) - x += 1 - exes[0].fulfill() - promise.done { _ in - XCTAssertEqual(x, 2) - x += 1 - exes[1].fulfill() - }.silenceWarning() - }.silenceWarning() - promise.done { _ in - XCTAssertEqual(x, 1) - x += 1 - exes[2].fulfill() - }.silenceWarning() - } - } - } - describe("2.2.6.2: If/when `promise` is rejected, all respective `onRejected` callbacks must execute in the order of their originating calls to `then`.") { - describe("multiple boring rejection handlers") { - testRejected(withExpectationCount: 4) { promise, exes, sentinel in - var ticket = 0 - - promise.catch { err in - guard case Error.sentinel(let x) = err, x == sentinel else { return XCTFail() } - XCTAssertEqual(++ticket, 1) - exes[0].fulfill() - } - promise.done { _ in XCTFail() }.silenceWarning() - promise.catch { err in - guard case Error.sentinel(let x) = err, x == sentinel else { return XCTFail() } - XCTAssertEqual(++ticket, 2) - exes[1].fulfill() - } - promise.done { _ in XCTFail() }.silenceWarning() - promise.catch { err in - guard case Error.sentinel(let x) = err, x == sentinel else { return XCTFail() } - XCTAssertEqual(++ticket, 3) - exes[2].fulfill() - } - promise.done { _ in XCTFail() }.silenceWarning() - promise.catch { err in - guard case Error.sentinel(let x) = err, x == sentinel else { return XCTFail() } - XCTAssertEqual(++ticket, 4) - exes[3].fulfill() - } - } - } - describe("multiple rejection handlers, one of which throws") { - testRejected(withExpectationCount: 4) { promise, exes, sentinel in - var orderValidator = 0 - - promise.catch { err in - guard case Error.sentinel(let x) = err, x == sentinel else { return XCTFail() } - XCTAssertEqual(++orderValidator, 1) - exes[0].fulfill() - } - promise.done { _ in XCTFail() }.silenceWarning() - promise.catch { err in - guard case Error.sentinel(let x) = err, x == sentinel else { return XCTFail() } - XCTAssertEqual(++orderValidator, 2) - exes[1].fulfill() - } - promise.done { _ in XCTFail() }.silenceWarning() - promise.recover { err -> Promise in - if case Error.sentinel(let x) = err { - XCTAssertEqual(x, sentinel) - } else { - XCTFail() - } - XCTAssertEqual(++orderValidator, 3) - exes[2].fulfill() - throw Error.dummy - }.silenceWarning() - promise.done { _ in XCTFail() }.silenceWarning() - promise.catch { err in - guard case Error.sentinel(let x) = err, x == sentinel else { return XCTFail() } - XCTAssertEqual(++orderValidator, 4) - exes[3].fulfill() - } - } - } - describe("results in multiple branching chains with their own fulfillment values") { - testRejected(withExpectationCount: 3) { promise, exes, memo in - let sentinel1 = arc4random() - let sentinel2 = arc4random() - let sentinel3 = arc4random() - - promise.recover { _ in - return .value(sentinel1) - }.done { value in - XCTAssertEqual(sentinel1, value) - exes[0].fulfill() - } - - promise.recover { _ -> Promise in - throw Error.sentinel(sentinel2) - }.catch { err in - if case Error.sentinel(let x) = err, x == sentinel2 { - exes[1].fulfill() - } - } - - promise.recover { _ in - .value(sentinel3) - }.done { value in - XCTAssertEqual(value, sentinel3) - exes[2].fulfill() - } - } - } - describe("`onRejected` handlers are called in the original order") { - testRejected(withExpectationCount: 3) { promise, exes, memo in - var x = 0 - - promise.catch { _ in - XCTAssertEqual(x, 0) - x += 1 - exes[0].fulfill() - } - promise.catch { _ in - XCTAssertEqual(x, 1) - x += 1 - exes[1].fulfill() - } - promise.catch { _ in - XCTAssertEqual(x, 2) - x += 1 - exes[2].fulfill() - } - } - } - describe("even when one handler is added inside another handler") { - testRejected(withExpectationCount: 3) { promise, exes, memo in - var x = 0 - - promise.catch { _ in - XCTAssertEqual(x, 0) - x += 1 - exes[0].fulfill() - promise.catch { _ in - XCTAssertEqual(x, 2) - x += 1 - exes[1].fulfill() - } - } - promise.catch { _ in - XCTAssertEqual(x, 1) - x += 1 - exes[2].fulfill() - } - } - } - } - } - } -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/A+/2.2.7.swift b/Carthage/Checkouts/PromiseKit/Tests/A+/2.2.7.swift deleted file mode 100644 index ad9052d42..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/A+/2.2.7.swift +++ /dev/null @@ -1,33 +0,0 @@ -import PromiseKit -import XCTest - -class Test227: XCTestCase { - func test() { - describe("2.2.7: `then` must return a promise: `promise2 = promise1.then(onFulfilled, onRejected)") { - describe("2.2.7.2: If either `onFulfilled` or `onRejected` throws an exception `e`, `promise2` must be rejected with `e` as the reason.") { - - testFulfilled { promise1, expectation, _ in - let sentinel = arc4random() - let promise2 = promise1.done { _ in throw Error.sentinel(sentinel) } - - promise2.catch { - if case Error.sentinel(let x) = $0, x == sentinel { - expectation.fulfill() - } - } - } - - testRejected { promise1, expectation, _ in - let sentinel = arc4random() - let promise2 = promise1.recover { _ -> Promise in throw Error.sentinel(sentinel) } - - promise2.catch { error in - if case Error.sentinel(let x) = error, x == sentinel { - expectation.fulfill() - } - } - } - } - } - } -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/A+/2.3.1.swift b/Carthage/Checkouts/PromiseKit/Tests/A+/2.3.1.swift deleted file mode 100644 index d526a672d..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/A+/2.3.1.swift +++ /dev/null @@ -1,31 +0,0 @@ -import PromiseKit -import XCTest - -class Test231: XCTestCase { - func test() { - describe("2.3.1: If `promise` and `x` refer to the same object, reject `promise` with a `TypeError' as the reason.") { - specify("via return from a fulfilled promise") { d, expectation in - var promise: Promise! - promise = Promise().then { () -> Promise in - return promise - } - promise.catch { err in - if case PMKError.returnedSelf = err { - expectation.fulfill() - } - } - } - specify("via return from a rejected promise") { d, expectation in - var promise: Promise! - promise = Promise(error: Error.dummy).recover { _ -> Promise in - return promise - } - promise.catch { err in - if case PMKError.returnedSelf = err { - expectation.fulfill() - } - } - } - } - } -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/A+/2.3.2.swift b/Carthage/Checkouts/PromiseKit/Tests/A+/2.3.2.swift deleted file mode 100644 index cf4ceb0b2..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/A+/2.3.2.swift +++ /dev/null @@ -1,116 +0,0 @@ -import PromiseKit -import XCTest - -class Test232: XCTestCase { - func test() { - describe("2.3.2: If `x` is a promise, adopt its state") { - describe("2.3.2.1: If `x` is pending, `promise` must remain pending until `x` is fulfilled or rejected.") { - - func xFactory() -> Promise { - return Promise.pending().promise - } - - testPromiseResolution(factory: xFactory) { promise, expectation in - var wasFulfilled = false; - var wasRejected = false; - - promise.test(onFulfilled: { wasFulfilled = true }, onRejected: { wasRejected = true }) - - after(ticks: 4) { - XCTAssertFalse(wasFulfilled) - XCTAssertFalse(wasRejected) - expectation.fulfill() - } - } - } - - describe("2.3.2.2: If/when `x` is fulfilled, fulfill `promise` with the same value.") { - describe("`x` is already-fulfilled") { - let sentinel = arc4random() - - func xFactory() -> Promise { - return .value(sentinel) - } - - testPromiseResolution(factory: xFactory) { promise, expectation in - promise.done { - XCTAssertEqual($0, sentinel) - expectation.fulfill() - }.silenceWarning() - } - } - describe("`x` is eventually-fulfilled") { - let sentinel = arc4random() - - func xFactory() -> Promise { - return Promise { seal in - after(ticks: 2) { - seal.fulfill(sentinel) - } - } - } - - testPromiseResolution(factory: xFactory) { promise, expectation in - promise.done { - XCTAssertEqual($0, sentinel) - expectation.fulfill() - }.silenceWarning() - } - } - } - - describe("2.3.2.3: If/when `x` is rejected, reject `promise` with the same reason.") { - describe("`x` is already-rejected") { - let sentinel = arc4random() - - func xFactory() -> Promise { - return Promise(error: Error.sentinel(sentinel)) - } - - testPromiseResolution(factory: xFactory) { promise, expectation in - promise.catch { err in - if case Error.sentinel(let value) = err, value == sentinel { - expectation.fulfill() - } - } - } - } - describe("`x` is eventually-rejected") { - let sentinel = arc4random() - - func xFactory() -> Promise { - return Promise { seal in - after(ticks: 2) { - seal.reject(Error.sentinel(sentinel)) - } - } - } - - testPromiseResolution(factory: xFactory) { promise, expectation in - promise.catch { err in - if case Error.sentinel(let value) = err, value == sentinel { - expectation.fulfill() - } - } - } - } - } - } - } -} - - -///////////////////////////////////////////////////////////////////////// - -extension Test232 { - fileprivate func testPromiseResolution(factory: @escaping () -> Promise, line: UInt = #line, test: (Promise, XCTestExpectation) -> Void) { - specify("via return from a fulfilled promise", file: #file, line: line) { d, expectation in - let promise = Promise.value(arc4random()).then { _ in factory() } - test(promise, expectation) - } - specify("via return from a rejected promise", file: #file, line: line) { d, expectation in - let promise: Promise = Promise(error: Error.dummy).recover { _ in factory() } - test(promise, expectation) - } - } -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/A+/2.3.4.swift b/Carthage/Checkouts/PromiseKit/Tests/A+/2.3.4.swift deleted file mode 100644 index 2c0133b61..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/A+/2.3.4.swift +++ /dev/null @@ -1,26 +0,0 @@ -import PromiseKit -import XCTest - - -class Test234: XCTestCase { - func test() { - describe("2.3.4: If `x` is not an object or function, fulfill `promise` with `x`") { - testFulfilled { promise, exception, _ in - promise.map { value -> UInt32 in - return 1 - }.done { value in - XCTAssertEqual(value, 1) - exception.fulfill() - }.silenceWarning() - } - testRejected { promise, expectation, _ in - promise.recover { _ -> Promise in - return .value(UInt32(1)) - }.done { value in - XCTAssertEqual(value, 1) - expectation.fulfill() - }.silenceWarning() - } - } - } -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/A+/README.md b/Carthage/Checkouts/PromiseKit/Tests/A+/README.md deleted file mode 100644 index bba573e0b..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/A+/README.md +++ /dev/null @@ -1,13 +0,0 @@ -Resources -========= -* https://github.com/promises-aplus/promises-tests - - -Skipped -======= -* 2.3.3: Otherwise, if x is an object or function. - This spec is a NOOP for Swift: - - We have decided not to interact with other Promises A+ implementations - - functions cannot have properties -* 2.3.3.4: If then is not a function, fulfill promise with x. - - See: The 2.3.4 suite. diff --git a/Carthage/Checkouts/PromiseKit/Tests/A+/XCTestManifests.swift b/Carthage/Checkouts/PromiseKit/Tests/A+/XCTestManifests.swift deleted file mode 100644 index 5f78de59e..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/A+/XCTestManifests.swift +++ /dev/null @@ -1,108 +0,0 @@ -#if !canImport(ObjectiveC) -import XCTest - -extension Test212 { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__Test212 = [ - ("test", test), - ] -} - -extension Test213 { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__Test213 = [ - ("test", test), - ] -} - -extension Test222 { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__Test222 = [ - ("test", test), - ] -} - -extension Test223 { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__Test223 = [ - ("test", test), - ] -} - -extension Test224 { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__Test224 = [ - ("test", test), - ] -} - -extension Test226 { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__Test226 = [ - ("test", test), - ] -} - -extension Test227 { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__Test227 = [ - ("test", test), - ] -} - -extension Test231 { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__Test231 = [ - ("test", test), - ] -} - -extension Test232 { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__Test232 = [ - ("test", test), - ] -} - -extension Test234 { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__Test234 = [ - ("test", test), - ] -} - -public func __allTests() -> [XCTestCaseEntry] { - return [ - testCase(Test212.__allTests__Test212), - testCase(Test213.__allTests__Test213), - testCase(Test222.__allTests__Test222), - testCase(Test223.__allTests__Test223), - testCase(Test224.__allTests__Test224), - testCase(Test226.__allTests__Test226), - testCase(Test227.__allTests__Test227), - testCase(Test231.__allTests__Test231), - testCase(Test232.__allTests__Test232), - testCase(Test234.__allTests__Test234), - ] -} -#endif diff --git a/Carthage/Checkouts/PromiseKit/Tests/Bridging/BridgingTests.m b/Carthage/Checkouts/PromiseKit/Tests/Bridging/BridgingTests.m deleted file mode 100644 index 928c0481a..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/Bridging/BridgingTests.m +++ /dev/null @@ -1,34 +0,0 @@ -@import PromiseKit; -@import XCTest; -#import "Infrastructure.h" - - -@interface BridgingTests: XCTestCase @end @implementation BridgingTests - -- (void)testChainAnyPromiseFromSwiftCode { - XCTestExpectation *ex = [self expectationWithDescription:@""]; - AnyPromise *promise = PMKAfter(0.02); - for (int x = 0; x < 100; ++x) { - promise = promise.then(^{ - return [[[PromiseBridgeHelper alloc] init] bridge1]; - }); - } - promise.then(^{ - [ex fulfill]; - }); - [self waitForExpectationsWithTimeout:20 handler:nil]; -} - -- (void)test626 { - XCTestExpectation *ex = [self expectationWithDescription:@""]; - - testCase626().then(^{ - XCTFail(); - }).ensure(^{ - [ex fulfill]; - }); - - [self waitForExpectationsWithTimeout:20 handler:nil]; -} - -@end diff --git a/Carthage/Checkouts/PromiseKit/Tests/Bridging/BridgingTests.swift b/Carthage/Checkouts/PromiseKit/Tests/Bridging/BridgingTests.swift deleted file mode 100644 index 0e0433461..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/Bridging/BridgingTests.swift +++ /dev/null @@ -1,280 +0,0 @@ -import Foundation -import PromiseKit -import XCTest - -class BridgingTests: XCTestCase { - - func testCanBridgeAnyObject() { - let sentinel = NSURLRequest() - let p = Promise.value(sentinel) - let ap = AnyPromise(p) - - XCTAssertEqual(ap.value(forKey: "value") as? NSURLRequest, sentinel) - } - - func testCanBridgeOptional() { - let sentinel: NSURLRequest? = NSURLRequest() - let p = Promise.value(sentinel) - let ap = AnyPromise(p) - - XCTAssertEqual(ap.value(forKey: "value") as? NSURLRequest, sentinel) - } - - func testCanBridgeSwiftArray() { - let sentinel = [NSString(), NSString(), NSString()] - let p = Promise.value(sentinel) - let ap = AnyPromise(p) - - guard let foo = ap.value(forKey: "value") as? [NSString] else { return XCTFail() } - XCTAssertEqual(foo, sentinel) - } - - func testCanBridgeSwiftDictionary() { - let sentinel = [NSString(): NSString()] - let p = Promise.value(sentinel) - let ap = AnyPromise(p) - - guard let foo = ap.value(forKey: "value") as? [NSString: NSString] else { return XCTFail() } - XCTAssertEqual(foo, sentinel) - } - - func testCanBridgeInt() { - let sentinel = 3 - let p = Promise.value(sentinel) - let ap = AnyPromise(p) - XCTAssertEqual(ap.value(forKey: "value") as? Int, sentinel) - } - - func testCanBridgeString() { - let sentinel = "a" - let p = Promise.value(sentinel) - let ap = AnyPromise(p) - XCTAssertEqual(ap.value(forKey: "value") as? String, sentinel) - } - - func testCanBridgeBool() { - let sentinel = true - let p = Promise.value(sentinel) - let ap = AnyPromise(p) - XCTAssertEqual(ap.value(forKey: "value") as? Bool, sentinel) - } - - func testCanChainOffAnyPromiseFromObjC() { - let ex = expectation(description: "") - - firstly { - .value(1) - }.then { _ -> AnyPromise in - return PromiseBridgeHelper().value(forKey: "bridge2") as! AnyPromise - }.done { value in - XCTAssertEqual(123, value as? Int) - ex.fulfill() - }.silenceWarning() - - waitForExpectations(timeout: 1) - } - - func testCanThenOffAnyPromise() { - let ex = expectation(description: "") - - PMKDummyAnyPromise_YES().then { obj -> Promise in - if let value = obj as? NSNumber { - XCTAssertEqual(value, NSNumber(value: true)) - ex.fulfill() - } - return Promise() - }.silenceWarning() - - waitForExpectations(timeout: 1) - } - - func testCanThenOffManifoldAnyPromise() { - let ex = expectation(description: "") - - PMKDummyAnyPromise_Manifold().then { obj -> Promise in - defer { ex.fulfill() } - XCTAssertEqual(obj as? NSNumber, NSNumber(value: true), "\(obj ?? "nil") is not @YES") - return Promise() - }.silenceWarning() - - waitForExpectations(timeout: 1) - } - - func testCanAlwaysOffAnyPromise() { - let ex = expectation(description: "") - - PMKDummyAnyPromise_YES().then { obj -> Promise in - ex.fulfill() - return Promise() - }.silenceWarning() - - waitForExpectations(timeout: 1) - } - - func testCanCatchOffAnyPromise() { - let ex = expectation(description: "") - PMKDummyAnyPromise_Error().catch { err in - ex.fulfill() - } - waitForExpectations(timeout: 1) - } - - func testAsPromise() { - #if swift(>=3.1) - XCTAssertTrue(Promise(PMKDummyAnyPromise_Error()).isRejected) - XCTAssertEqual(Promise(PMKDummyAnyPromise_YES()).value as? NSNumber, NSNumber(value: true)) - #else - XCTAssertTrue(PMKDummyAnyPromise_Error().asPromise().isRejected) - XCTAssertEqual(PMKDummyAnyPromise_YES().asPromise().value as? NSNumber, NSNumber(value: true)) - #endif - } - - func testFirstlyReturningAnyPromiseSuccess() { - let ex = expectation(description: "") - firstly { - PMKDummyAnyPromise_Error() - }.catch { error in - ex.fulfill() - } - waitForExpectations(timeout: 1) - } - - func testFirstlyReturningAnyPromiseError() { - let ex = expectation(description: "") - firstly { - PMKDummyAnyPromise_YES() - }.done { _ in - ex.fulfill() - }.silenceWarning() - waitForExpectations(timeout: 1) - } - - func test1() { - let ex = expectation(description: "") - - // AnyPromise.then { return x } - - let input = after(seconds: 0).map{ 1 } - - AnyPromise(input).then { obj -> Promise in - XCTAssertEqual(obj as? Int, 1) - return .value(2) - }.done { value in - XCTAssertEqual(value, 2) - ex.fulfill() - }.silenceWarning() - - waitForExpectations(timeout: 1) - } - - func test2() { - let ex = expectation(description: "") - - // AnyPromise.then { return AnyPromise } - - let input = after(seconds: 0).map{ 1 } - - AnyPromise(input).then { obj -> AnyPromise in - XCTAssertEqual(obj as? Int, 1) - return AnyPromise(after(seconds: 0).map{ 2 }) - }.done { obj in - XCTAssertEqual(obj as? Int, 2) - ex.fulfill() - }.silenceWarning() - - waitForExpectations(timeout: 1) - } - - func test3() { - let ex = expectation(description: "") - - // AnyPromise.then { return Promise } - - let input = after(seconds: 0).map{ 1 } - - AnyPromise(input).then { obj -> Promise in - XCTAssertEqual(obj as? Int, 1) - return after(seconds: 0).map{ 2 } - }.done { value in - XCTAssertEqual(value, 2) - ex.fulfill() - }.silenceWarning() - - waitForExpectations(timeout: 1, handler: nil) - } - - - // can return AnyPromise (that fulfills) in then handler - func test4() { - let ex = expectation(description: "") - Promise.value(1).then { _ -> AnyPromise in - return AnyPromise(after(seconds: 0).map{ 1 }) - }.done { x in - XCTAssertEqual(x as? Int, 1) - ex.fulfill() - }.silenceWarning() - waitForExpectations(timeout: 1, handler: nil) - } - - // can return AnyPromise (that rejects) in then handler - func test5() { - let ex = expectation(description: "") - - Promise.value(1).then { _ -> AnyPromise in - let promise = after(.milliseconds(100)).done{ throw Error.dummy } - return AnyPromise(promise) - }.catch { err in - ex.fulfill() - } - waitForExpectations(timeout: 1) - } - - func testStandardSwiftBridgeIsUnambiguous() { - let p = Promise.value(1) - let q = Promise(p) - - XCTAssertEqual(p.value, q.value) - } - - /// testing NSError to Error for cancelledError types - func testErrorCancellationBridging() { - let ex = expectation(description: "") - - let p = Promise().done { - throw LocalError.cancel as NSError - } - p.catch { _ in - XCTFail() - } - p.catch(policy: .allErrors) { - XCTAssertTrue($0.isCancelled) - ex.fulfill() - } - waitForExpectations(timeout: 1) - - // here we verify that Swift’s NSError bridging works as advertised - - XCTAssertTrue(LocalError.cancel.isCancelled) - XCTAssertTrue((LocalError.cancel as NSError).isCancelled) - } -} - -private enum Error: Swift.Error { - case dummy -} - -extension Promise { - func silenceWarning() {} -} - -private enum LocalError: CancellableError { - case notCancel - case cancel - - var isCancelled: Bool { - switch self { - case .notCancel: return false - case .cancel: return true - } - } -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/Bridging/Infrastructure.h b/Carthage/Checkouts/PromiseKit/Tests/Bridging/Infrastructure.h deleted file mode 100644 index 104378fa6..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/Bridging/Infrastructure.h +++ /dev/null @@ -1,14 +0,0 @@ -@import Foundation; -@class AnyPromise; - -AnyPromise *PMKDummyAnyPromise_YES(void); -AnyPromise *PMKDummyAnyPromise_Manifold(void); -AnyPromise *PMKDummyAnyPromise_Error(void); - -__attribute__((objc_runtime_name("PMKPromiseBridgeHelper"))) -__attribute__((objc_subclassing_restricted)) -@interface PromiseBridgeHelper: NSObject -- (AnyPromise *)bridge1; -@end - -AnyPromise *testCase626(void); diff --git a/Carthage/Checkouts/PromiseKit/Tests/Bridging/Infrastructure.m b/Carthage/Checkouts/PromiseKit/Tests/Bridging/Infrastructure.m deleted file mode 100644 index 5049310ae..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/Bridging/Infrastructure.m +++ /dev/null @@ -1,38 +0,0 @@ -@import Foundation; -@import PromiseKit; -#import "Infrastructure.h" - -AnyPromise *PMKDummyAnyPromise_YES() { - return [AnyPromise promiseWithValue:@YES]; -} - -AnyPromise *PMKDummyAnyPromise_Manifold() { - return [AnyPromise promiseWithValue:PMKManifold(@YES, @NO, @NO)]; -} - -AnyPromise *PMKDummyAnyPromise_Error() { - return [AnyPromise promiseWithValue:[NSError errorWithDomain:@"a" code:1 userInfo:nil]]; -} - -@implementation PromiseBridgeHelper (objc) - -- (AnyPromise *)bridge2 { - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ - resolve(@123); - }); - }]; -} - -@end - -#import "PMKBridgeTests-Swift.h" - -AnyPromise *testCase626() { - return PMKWhen(@[[TestPromise626 promise], [TestPromise626 promise]]).then(^(id value){ - NSLog(@"Success: %@", value); - }).catch(^(NSError *error) { - NSLog(@"Error: %@", error); - @throw error; - }); -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/Bridging/Infrastructure.swift b/Carthage/Checkouts/PromiseKit/Tests/Bridging/Infrastructure.swift deleted file mode 100644 index 775fd31cb..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/Bridging/Infrastructure.swift +++ /dev/null @@ -1,24 +0,0 @@ -import PromiseKit - -// for BridgingTests.m -@objc(PMKPromiseBridgeHelper) class PromiseBridgeHelper: NSObject { - @objc func bridge1() -> AnyPromise { - let p = after(.milliseconds(10)) - return AnyPromise(p) - } -} - -enum MyError: Error { - case PromiseError -} - -@objc class TestPromise626: NSObject { - - @objc class func promise() -> AnyPromise { - let promise: Promise = Promise { seal in - seal.reject(MyError.PromiseError) - } - - return AnyPromise(promise) - } -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/CoreObjC/AnyPromiseTests.m b/Carthage/Checkouts/PromiseKit/Tests/CoreObjC/AnyPromiseTests.m deleted file mode 100644 index 0e6fe2993..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/CoreObjC/AnyPromiseTests.m +++ /dev/null @@ -1,950 +0,0 @@ -@import PromiseKit; -@import XCTest; -#import "Infrastructure.h" -#define PMKTestErrorDomain @"PMKTestErrorDomain" - -static inline NSError *dummyWithCode(NSInteger code) { - return [NSError errorWithDomain:PMKTestErrorDomain code:rand() userInfo:@{NSLocalizedDescriptionKey: @(code).stringValue}]; -} - -static inline NSError *dummy() { - return dummyWithCode(rand()); -} - -static inline AnyPromise *rejectLater() { - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - dispatch_async(dispatch_get_main_queue(), ^{ - resolve(dummy()); - }); - }); - }]; -} - -static inline AnyPromise *fulfillLater() { - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - dispatch_async(dispatch_get_global_queue(0, 0), ^{ - resolve(@1); - }); - }]; -} - - - -@interface AnyPromiseTestSuite : XCTestCase @end @implementation AnyPromiseTestSuite - -- (void)test_01_resolve { - id ex1 = [self expectationWithDescription:@""]; - - AnyPromise *promise = [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - resolve(@1); - }]; - promise.then(^(NSNumber *o){ - [ex1 fulfill]; - XCTAssertEqual(o.intValue, 1); - }); - promise.catch(^{ - XCTFail(); - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_02_reject { - id ex1 = [self expectationWithDescription:@""]; - - AnyPromise *promise = [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - resolve(dummyWithCode(2)); - }]; - promise.then(^{ - XCTFail(); - }); - promise.catch(^(NSError *error){ - XCTAssertEqualObjects(error.localizedDescription, @"2"); - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_03_return_error { - id ex1 = [self expectationWithDescription:@""]; - - AnyPromise *promise = [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - resolve(@2); - }]; - promise.then(^{ - return [NSError errorWithDomain:@"a" code:3 userInfo:nil]; - }).catch(^(NSError *e){ - [ex1 fulfill]; - XCTAssertEqual(3, e.code); - }); - promise.catch(^{ - XCTFail(); - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_04_return_error_doesnt_compromise_result { - id ex1 = [self expectationWithDescription:@""]; - - AnyPromise *promise = [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - resolve(@4); - }].then(^{ - return dummy(); - }); - promise.then(^{ - XCTFail(); - }); - promise.catch(^{ - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_05_throw_and_bubble { - id ex1 = [self expectationWithDescription:@""]; - - [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - resolve(@5); - }].then(^(id ii){ - XCTAssertEqual(5, [ii intValue]); - return [NSError errorWithDomain:@"a" code:[ii intValue] userInfo:nil]; - }).catch(^(NSError *e){ - XCTAssertEqual(e.code, 5); - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_05_throw_and_bubble_more { - id ex1 = [self expectationWithDescription:@""]; - - [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - resolve(@5); - }].then(^{ - return dummy(); - }).then(^{ - //NOOP - }).catch(^(NSError *e){ - [ex1 fulfill]; - XCTAssertEqualObjects(e.domain, PMKTestErrorDomain); - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_06_return_error { - id ex1 = [self expectationWithDescription:@""]; - - [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - resolve(@5); - }].then(^{ - return dummy(); - }).catch(^{ - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_07_can_then_resolved { - id ex1 = [self expectationWithDescription:@""]; - - [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - resolve(@1); - }].then(^(id o){ - [ex1 fulfill]; - XCTAssertEqualObjects(@1, o); - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_07a_can_fail_rejected { - id ex1 = [self expectationWithDescription:@""]; - - [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - resolve(dummyWithCode(1)); - }].catch(^(NSError *e){ - [ex1 fulfill]; - XCTAssertEqualObjects(@"1", e.localizedDescription); - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_09_async { - id ex1 = [self expectationWithDescription:@""]; - - __block int x = 0; - [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - resolve(@1); - }].then(^{ - XCTAssertEqual(x, 0); - x++; - }).then(^{ - XCTAssertEqual(x, 1); - x++; - }).then(^{ - XCTAssertEqual(x, 2); - x++; - }).then(^{ - XCTAssertEqual(x, 3); - x++; - }).then(^{ - XCTAssertEqual(x, 4); - x++; - - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; - - XCTAssertEqual(x, 5); -} - -- (void)test_10_then_returns_resolved_promise { - id ex1 = [self expectationWithDescription:@""]; - - [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - resolve(@10); - }].then(^(id o){ - XCTAssertEqualObjects(@10, o); - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - resolve(@100); - }]; - }).then(^(id o){ - XCTAssertEqualObjects(@100, o); - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_11_then_returns_pending_promise { - id ex1 = [self expectationWithDescription:@""]; - - [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - resolve(@1); - }].then(^{ - return fulfillLater(); - }).then(^(id o){ - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_12_then_returns_recursive_promises { - id ex1 = [self expectationWithDescription:@""]; - id ex2 = [self expectationWithDescription:@""]; - - __block int x = 0; - fulfillLater().then(^{ - NSLog(@"1"); - XCTAssertEqual(x++, 0); - return fulfillLater().then(^{ - NSLog(@"2"); - XCTAssertEqual(x++, 1); - return fulfillLater().then(^{ - NSLog(@"3"); - XCTAssertEqual(x++, 2); - return fulfillLater().then(^{ - NSLog(@"4"); - XCTAssertEqual(x++, 3); - [ex2 fulfill]; - return @"foo"; - }); - }); - }); - }).then(^(id o){ - NSLog(@"5"); - XCTAssertEqualObjects(@"foo", o); - XCTAssertEqual(x++, 4); - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; - - XCTAssertEqual(x, 5); -} - - - (void)test_13_then_returns_recursive_promises_that_fails { - id ex1 = [self expectationWithDescription:@""]; - id ex2 = [self expectationWithDescription:@""]; - - fulfillLater().then(^{ - return fulfillLater().then(^{ - return fulfillLater().then(^{ - return fulfillLater().then(^{ - [ex2 fulfill]; - return dummy(); - }); - }); - }); - }).then(^{ - XCTFail(); - }).catch(^(NSError *e){ - XCTAssertEqualObjects(e.domain, PMKTestErrorDomain); - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; - } - -- (void)test_14_fail_returns_value { - id ex1 = [self expectationWithDescription:@""]; - - [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - resolve(@1); - }].then(^{ - return [NSError errorWithDomain:@"a" code:1 userInfo:nil]; - }).catch(^(NSError *e){ - XCTAssertEqual(e.code, 1); - return @2; - }).then(^(id o){ - XCTAssertEqualObjects(o, @2); - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_15_fail_returns_promise { - id ex1 = [self expectationWithDescription:@""]; - - [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - resolve(@1); - }].then(^{ - return dummy(); - }).catch(^{ - return fulfillLater().then(^{ - return @123; - }); - }).then(^(id o){ - XCTAssertEqualObjects(o, @123); - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_23_add_another_fail_to_already_rejected { - id ex1 = [self expectationWithDescription:@""]; - id ex2 = [self expectationWithDescription:@""]; - - PMKResolver resolve; - AnyPromise *promise = [[AnyPromise alloc] initWithResolver:&resolve]; - - promise.then(^{ - XCTFail(); - }).catch(^(NSError *e){ - XCTAssertEqualObjects(e.localizedDescription, @"23"); - [ex1 fulfill]; - }); - - resolve(dummyWithCode(23)); - - promise.then(^{ - XCTFail(); - }).catch(^(NSError *e){ - XCTAssertEqualObjects(e.localizedDescription, @"23"); - [ex2 fulfill]; - }); - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_25_then_plus_deferred_plus_GCD { - id ex1 = [self expectationWithDescription:@""]; - id ex2 = [self expectationWithDescription:@""]; - id ex3 = [self expectationWithDescription:@""]; - - fulfillLater().then(^(id o){ - [ex1 fulfill]; - return fulfillLater().then(^{ - return @YES; - }); - }).then(^(id o){ - XCTAssertEqualObjects(@YES, o); - [ex2 fulfill]; - }).then(^(id o){ - XCTAssertNil(o); - [ex3 fulfill]; - }).catch(^{ - XCTFail(); - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_26_promise_then_promise_fail_promise_fail { - id ex1 = [self expectationWithDescription:@""]; - - fulfillLater().then(^{ - return fulfillLater().then(^{ - return dummy(); - }).catch(^{ - return fulfillLater().then(^{ - return dummy(); - }); - }); - }).then(^{ - XCTFail(); - }).catch(^{ - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil];} - -- (void)test_27_eat_failure { - id ex1 = [self expectationWithDescription:@""]; - - fulfillLater().then(^{ - return dummy(); - }).catch(^{ - return @YES; - }).then(^{ - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_28_deferred_rejected_catch_promise { - id ex1 = [self expectationWithDescription:@""]; - id ex2 = [self expectationWithDescription:@""]; - - rejectLater().catch(^{ - [ex1 fulfill]; - return fulfillLater(); - }).then(^(id o){ - [ex2 fulfill]; - }).catch(^{ - XCTFail(); - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_29_deferred_rejected_catch_promise { - id ex1 = [self expectationWithDescription:@""]; - id ex2 = [self expectationWithDescription:@""]; - - rejectLater().catch(^{ - [ex1 fulfill]; - return fulfillLater().then(^{ - return dummy(); - }); - }).then(^{ - XCTFail(@"1"); - }).catch(^(NSError *error){ - [ex2 fulfill]; - }).catch(^{ - XCTFail(@"2"); - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_30_dispatch_returns_pending_promise { - id ex1 = [self expectationWithDescription:@""]; - dispatch_promise(^{ - return fulfillLater(); - }).then(^{ - [ex1 fulfill]; - }); - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_31_dispatch_returns_promise { - id ex1 = [self expectationWithDescription:@""]; - dispatch_promise(^{ - return [AnyPromise promiseWithValue:@1]; - }).then(^(id o){ - XCTAssertEqualObjects(o, @1); - [ex1 fulfill]; - }); - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_32_return_primitive { - id ex1 = [self expectationWithDescription:@""]; - __block void (^fulfiller)(id) = nil; - [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - fulfiller = resolve; - }].then(^(id o){ - XCTAssertEqualObjects(o, @32); - return 3; - }).then(^(id o){ - XCTAssertEqualObjects(@3, o); - [ex1 fulfill]; - }); - fulfiller(@32); - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_33_return_nil { - id ex1 = [self expectationWithDescription:@""]; - [AnyPromise promiseWithValue:@1].then(^(id o){ - XCTAssertEqualObjects(o, @1); - return nil; - }).then(^{ - return nil; - }).then(^(id o){ - XCTAssertNil(o); - [ex1 fulfill]; - }); - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_33a_return_nil { - id ex1 = [self expectationWithDescription:@""]; - id ex2 = [self expectationWithDescription:@""]; - - [AnyPromise promiseWithValue:@"HI"].then(^(id o){ - XCTAssertEqualObjects(o, @"HI"); - [ex1 fulfill]; - return nil; - }).then(^{ - return nil; - }).then(^{ - [ex2 fulfill]; - return nil; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_36_promise_with_value_nil { - id ex1 = [self expectationWithDescription:@""]; - - [AnyPromise promiseWithValue:nil].then(^(id o){ - XCTAssertNil(o); - [ex1 fulfill]; - }); - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_42 { - id ex1 = [self expectationWithDescription:@""]; - - [AnyPromise promiseWithValue:@1].then(^{ - return fulfillLater(); - }).then(^{ - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_43_return_promise_from_itself { - id ex1 = [self expectationWithDescription:@""]; - - AnyPromise *p = fulfillLater().then(^{ return @1; }); - p.then(^{ - return p; - }).then(^{ - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_44_reseal { - id ex1 = [self expectationWithDescription:@""]; - - [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - resolve(@123); - resolve(@234); - }].then(^(id o){ - XCTAssertEqualObjects(o, @123); - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_46_test_then_on { - id ex1 = [self expectationWithDescription:@""]; - - dispatch_queue_t q1 = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0); - dispatch_queue_t q2 = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0); - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - [AnyPromise promiseWithValue:@1].thenOn(q1, ^{ - XCTAssertFalse([NSThread isMainThread]); - return dispatch_get_current_queue(); - }).thenOn(q2, ^(id q){ - XCTAssertFalse([NSThread isMainThread]); - XCTAssertNotEqualObjects(q, dispatch_get_current_queue()); - [ex1 fulfill]; - }); -#pragma clang diagnostic pop - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_47_finally_plus { - id ex1 = [self expectationWithDescription:@""]; - - [AnyPromise promiseWithValue:@1].then(^{ - return @1; - }).ensure(^{ - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_48_finally_negative { - @autoreleasepool { - id ex1 = [self expectationWithDescription:@"always"]; - id ex2 = [self expectationWithDescription:@"errorUnhandler"]; - - [AnyPromise promiseWithValue:@1].then(^{ - return dummy(); - }).ensure(^{ - [ex1 fulfill]; - }).catch(^(NSError *err){ - XCTAssertEqualObjects(err.domain, PMKTestErrorDomain); - [ex2 fulfill]; - }); - } - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_49_finally_negative_later { - id ex1 = [self expectationWithDescription:@""]; - __block int x = 0; - - [AnyPromise promiseWithValue:@1].then(^{ - XCTAssertEqual(++x, 1); - return dummy(); - }).catch(^{ - XCTAssertEqual(++x, 2); - }).then(^{ - XCTAssertEqual(++x, 3); - }).ensure(^{ - XCTAssertEqual(++x, 4); - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_50_fulfill_with_pending_promise { - id ex1 = [self expectationWithDescription:@""]; - - [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - resolve(fulfillLater().then(^{ return @"HI"; })); - }].then(^(id hi){ - XCTAssertEqualObjects(hi, @"HI"); - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_51_fulfill_with_fulfilled_promise { - id ex1 = [self expectationWithDescription:@""]; - - [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - resolve([AnyPromise promiseWithValue:@1]); - }].then(^(id o){ - XCTAssertEqualObjects(o, @1); - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_52_fulfill_with_rejected_promise { //NEEDEDanypr - id ex1 = [self expectationWithDescription:@""]; - fulfillLater().then(^{ - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - resolve([AnyPromise promiseWithValue:dummy()]); - }]; - }).catch(^(NSError *err){ - [ex1 fulfill]; - }); - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_53_return_rejected_promise { - id ex1 = [self expectationWithDescription:@""]; - fulfillLater().then(^{ - return @1; - }).then(^{ - return [AnyPromise promiseWithValue:dummy()]; - }).catch(^{ - [ex1 fulfill]; - }); - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_54_reject_with_rejected_promise { - id ex1 = [self expectationWithDescription:@""]; - - [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - id err = [NSError errorWithDomain:@"a" code:123 userInfo:nil]; - resolve([AnyPromise promiseWithValue:err]); - }].catch(^(NSError *err){ - XCTAssertEqual(err.code, 123); - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_58_just_finally { - id ex1 = [self expectationWithDescription:@""]; - - AnyPromise *promise = fulfillLater().then(^{ - return nil; - }).ensure(^{ - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; - - id ex2 = [self expectationWithDescription:@""]; - - promise.ensure(^{ - [ex2 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_59_catch_in_background { - id ex1 = [self expectationWithDescription:@""]; - - [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - id err = [NSError errorWithDomain:@"a" code:123 userInfo:nil]; - resolve(err); - }].catchInBackground(^(NSError *err){ - XCTAssertEqual(err.code, 123); - XCTAssertFalse([NSThread isMainThread]); - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_60_catch_on_specific_queue { - id ex1 = [self expectationWithDescription:@""]; - - NSString *expectedQueueName = @"specific queue 123"; - dispatch_queue_t q = dispatch_queue_create(expectedQueueName.UTF8String, DISPATCH_QUEUE_SERIAL); - - [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - id err = [NSError errorWithDomain:@"a" code:123 userInfo:nil]; - resolve(err); - }].catchOn(q, ^(NSError *err){ - XCTAssertEqual(err.code, 123); - XCTAssertFalse([NSThread isMainThread]); - NSString *currentQueueName = [NSString stringWithFormat:@"%s", dispatch_queue_get_label(DISPATCH_CURRENT_QUEUE_LABEL)]; - XCTAssertEqualObjects(expectedQueueName, currentQueueName); - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_61_wait_for_value { - id o = [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - resolve(@1); - }].wait; - - XCTAssertEqualObjects(o, @1); -} - -- (void)test_62_wait_for_error { - NSError* err = [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - resolve([NSError errorWithDomain:@"a" code:123 userInfo:nil]); - }].wait; - - XCTAssertEqual(err.code, 123); -} - -- (void)test_properties { - XCTAssertEqualObjects([AnyPromise promiseWithValue:@1].value, @1); - XCTAssertEqualObjects([[AnyPromise promiseWithValue:dummyWithCode(2)].value localizedDescription], @"2"); - XCTAssertNil([AnyPromise promiseWithResolverBlock:^(id a){}].value); - XCTAssertTrue([AnyPromise promiseWithResolverBlock:^(id a){}].pending); - XCTAssertFalse([AnyPromise promiseWithValue:@1].pending); - XCTAssertTrue([AnyPromise promiseWithValue:@1].fulfilled); - XCTAssertFalse([AnyPromise promiseWithValue:@1].rejected); -} - -- (void)test_promiseWithValue { - XCTAssertEqual([AnyPromise promiseWithValue:@1].value, @1); - XCTAssertEqualObjects([[AnyPromise promiseWithValue:dummyWithCode(2)].value localizedDescription], @"2"); - XCTAssertEqual([AnyPromise promiseWithValue:[AnyPromise promiseWithValue:@1]].value, @1); -} - -- (void)test_race { - id ex = [self expectationWithDescription:@""]; - id p = PMKAfter(0.1).then(^{ return @2; }); - PMKRace(@[PMKAfter(10), PMKAfter(20), p]).then(^(id obj){ - XCTAssertEqual(2, [obj integerValue]); - [ex fulfill]; - }); - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_race_fullfilled { - id ex = [self expectationWithDescription:@""]; - NSArray* promises = @[ - PMKAfter(1).then(^{ return dummyWithCode(1); }), - PMKAfter(2).then(^{ return dummyWithCode(2); }), - PMKAfter(5).then(^{ return @1; }), - PMKAfter(4).then(^{ return @2; }), - PMKAfter(3).then(^{ return dummyWithCode(3); }) - ]; - PMKRaceFulfilled(promises).then(^(id obj){ - XCTAssertEqual(2, [obj integerValue]); - [ex fulfill]; - }).catch(^{ - XCTFail(); - [ex fulfill]; - }); - [self waitForExpectationsWithTimeout:10 handler:nil]; -} - -- (void)test_race_fullfilled_with_no_winner { - id ex = [self expectationWithDescription:@""]; - NSArray* promises = @[ - PMKAfter(1).then(^{ return dummyWithCode(1); }), - PMKAfter(2).then(^{ return dummyWithCode(2); }), - PMKAfter(3).then(^{ return dummyWithCode(3); }) - ]; - PMKRaceFulfilled(promises).then(^(id obj){ - XCTFail(); - [ex fulfill]; - }).catch(^(NSError *e){ - XCTAssertEqual(e.domain, PMKErrorDomain); - XCTAssertEqual(e.code, PMKNoWinnerError); - XCTAssertEqualObjects(e.userInfo[NSLocalizedDescriptionKey], @"PMKRaceFulfilled(nil)"); - [ex fulfill]; - }); - [self waitForExpectationsWithTimeout:10 handler:nil]; -} - -- (void)testInBackground { - id ex = [self expectationWithDescription:@""]; - PMKAfter(0.1).thenInBackground(^{ [ex fulfill]; }); - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)testEnsureOn { - id ex = [self expectationWithDescription:@""]; - PMKAfter(0.1).ensureOn(dispatch_get_global_queue(0, 0), ^{ [ex fulfill]; }); - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)testAdapterBlock { - void (^fetch)(PMKAdapter) = ^(PMKAdapter block){ - block(@1, nil); - }; - id ex = [self expectationWithDescription:@""]; - [AnyPromise promiseWithAdapterBlock:fetch].then(^(id obj){ - XCTAssertEqualObjects(obj, @1); - [ex fulfill]; - }); - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)testIntegerAdapterBlock { - void (^fetch)(PMKIntegerAdapter) = ^(PMKIntegerAdapter block){ - block(1, nil); - }; - id ex = [self expectationWithDescription:@""]; - [AnyPromise promiseWithIntegerAdapterBlock:fetch].then(^(id obj){ - XCTAssertEqualObjects(obj, @1); - [ex fulfill]; - }); - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)testBooleanAdapterBlock { - void (^fetch)(PMKBooleanAdapter) = ^(PMKBooleanAdapter block){ - block(YES, nil); - }; - id ex = [self expectationWithDescription:@""]; - [AnyPromise promiseWithBooleanAdapterBlock:fetch].then(^(id obj){ - XCTAssertEqualObjects(obj, @YES); - [ex fulfill]; - }); - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -static NSHashTable *errorArray; - -- (void)setUp { - [super setUp]; - errorArray = [NSHashTable weakObjectsHashTable]; -} - -- (void)testErrorLeaks { - id ex1 = [self expectationWithDescription:@""]; - NSError *error = dummyWithCode(1001); - [errorArray addObject:error]; - [AnyPromise promiseWithValue:error] - .then(^{ - XCTFail(); - }).catch(^(NSError *e){ - XCTAssertEqual(e.localizedDescription.intValue, 1001); - }).then(^{ - NSError *err = dummyWithCode(1002); - [errorArray addObject:err]; - return err; - }).catch(^(NSError *e){ - XCTAssertEqual(e.localizedDescription.intValue, 1002); - }).then(^{ - NSError *err = dummyWithCode(1003); - [errorArray addObject:err]; - return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve){ - resolve(err); - }]; - }).catch(^(NSError *e){ - XCTAssertEqual(e.localizedDescription.intValue, 1003); - NSError *err = dummyWithCode(1004); - [errorArray addObject:err]; - return err; - }).catch(^(NSError *e){ - XCTAssertEqual(e.localizedDescription.intValue, 1004); - }).then(^{ - NSError *err = dummyWithCode(1005); - [errorArray addObject:err]; - // throw will lead to leak, if not use complie flag with "-fobjc-arc-exceptions" - @throw err; - }).catch(^(NSError *e){ - XCTAssertEqual(e.localizedDescription.intValue, 1005); - }).ensure(^{ - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)tearDown { - XCTAssertEqual(errorArray.allObjects.count, 0); - [super tearDown]; -} - -//- (void)test_nil_block { -// [AnyPromise promiseWithValue:@1].then(nil); -// [AnyPromise promiseWithValue:@1].thenOn(nil, nil); -// [AnyPromise promiseWithValue:@1].catch(nil); -// [AnyPromise promiseWithValue:@1].always(nil); -// [AnyPromise promiseWithValue:@1].alwaysOn(nil, nil); -//} - -@end diff --git a/Carthage/Checkouts/PromiseKit/Tests/CoreObjC/AnyPromiseTests.swift b/Carthage/Checkouts/PromiseKit/Tests/CoreObjC/AnyPromiseTests.swift deleted file mode 100644 index adbc68f78..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/CoreObjC/AnyPromiseTests.swift +++ /dev/null @@ -1,38 +0,0 @@ -import PromiseKit -import XCTest - -class AnyPromiseTests: XCTestCase { - func testFulfilledResult() { - switch AnyPromise(Promise.value(true)).result { - case .fulfilled(let obj as Bool)? where obj: - break - default: - XCTFail() - } - } - - func testRejectedResult() { - switch AnyPromise(Promise(error: PMKError.badInput)).result { - case .rejected(let err)?: - print(err) - break - default: - XCTFail() - } - } - - func testPendingResult() { - switch AnyPromise(Promise.pending().promise).result { - case nil: - break - default: - XCTFail() - } - } - - func testCustomStringConvertible() { - XCTAssertEqual("\(AnyPromise(Promise.pending().promise))", "AnyPromise(…)") - XCTAssertEqual("\(AnyPromise(Promise.value(1)))", "AnyPromise(1)") - XCTAssertEqual("\(AnyPromise(Promise.value(nil)))", "AnyPromise(nil)") - } -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/CoreObjC/HangTests.m b/Carthage/Checkouts/PromiseKit/Tests/CoreObjC/HangTests.m deleted file mode 100644 index cf31ead97..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/CoreObjC/HangTests.m +++ /dev/null @@ -1,13 +0,0 @@ -@import PromiseKit; -@import XCTest; - -@interface HangTests: XCTestCase @end @implementation HangTests - -- (void)test { - __block int x = 0; - id value = PMKHang(PMKAfter(0.02).then(^{ x++; return 1; })); - XCTAssertEqual(x, 1); - XCTAssertEqualObjects(value, @1); -} - -@end diff --git a/Carthage/Checkouts/PromiseKit/Tests/CoreObjC/JoinTests.m b/Carthage/Checkouts/PromiseKit/Tests/CoreObjC/JoinTests.m deleted file mode 100644 index 1249cde0f..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/CoreObjC/JoinTests.m +++ /dev/null @@ -1,90 +0,0 @@ -@import Foundation; -@import PromiseKit; -@import XCTest; - - -@interface JoinTests: XCTestCase @end @implementation JoinTests - -- (void)test_73_join { - XCTestExpectation *ex1 = [self expectationWithDescription:@""]; - - __block void (^fulfiller)(id) = nil; - AnyPromise *promise = [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - fulfiller = resolve; - }]; - - PMKJoin(@[ - [AnyPromise promiseWithValue:[NSError errorWithDomain:@"dom" code:1 userInfo:nil]], - promise, - [AnyPromise promiseWithValue:[NSError errorWithDomain:@"dom" code:2 userInfo:nil]] - ]).then(^{ - XCTFail(); - }).catch(^(NSError *error){ - id promises = error.userInfo[PMKJoinPromisesKey]; - - int cume = 0, cumv = 0; - - for (AnyPromise *promise in promises) { - if ([promise.value isKindOfClass:[NSError class]]) { - cume |= [promise.value code]; - } else { - cumv |= [promise.value unsignedIntValue]; - } - } - - XCTAssertTrue(cumv == 4); - XCTAssertTrue(cume == 3); - - [ex1 fulfill]; - }); - fulfiller(@4); - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_74_join_no_errors { - XCTestExpectation *ex1 = [self expectationWithDescription:@""]; - PMKJoin(@[ - [AnyPromise promiseWithValue:@1], - [AnyPromise promiseWithValue:@2] - ]).then(^(NSArray *values, id errors) { - XCTAssertEqualObjects(values, (@[@1, @2])); - XCTAssertNil(errors); - [ex1 fulfill]; - }); - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - - -- (void)test_75_join_no_success { - XCTestExpectation *ex1 = [self expectationWithDescription:@""]; - PMKJoin(@[ - [AnyPromise promiseWithValue:[NSError errorWithDomain:@"dom" code:1 userInfo:nil]], - [AnyPromise promiseWithValue:[NSError errorWithDomain:@"dom" code:2 userInfo:nil]], - ]).then(^{ - XCTFail(); - }).catch(^(NSError *error){ - XCTAssertNotNil(error.userInfo[PMKJoinPromisesKey]); - [ex1 fulfill]; - }); - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_76_join_fulfills_if_empty_input { - XCTestExpectation *ex1 = [self expectationWithDescription:@""]; - PMKJoin(@[]).then(^(id a, id b, id c){ - XCTAssertEqualObjects(@[], a); - XCTAssertNil(b); - XCTAssertNil(c); - [ex1 fulfill]; - }); - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_join_nil { - NSArray *foo = nil; - NSError *err = PMKJoin(foo).value; - XCTAssertEqual(err.domain, PMKErrorDomain); - XCTAssertEqual(err.code, PMKInvalidUsageError); -} - -@end diff --git a/Carthage/Checkouts/PromiseKit/Tests/CoreObjC/PMKManifoldTests.m b/Carthage/Checkouts/PromiseKit/Tests/CoreObjC/PMKManifoldTests.m deleted file mode 100644 index 78248d6a4..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/CoreObjC/PMKManifoldTests.m +++ /dev/null @@ -1,83 +0,0 @@ -@import PromiseKit; -@import XCTest; - -@interface PMKManifoldTests: XCTestCase @end @implementation PMKManifoldTests - -- (void)test_62_access_extra_elements { - id ex1 = [self expectationWithDescription:@""]; - - [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { - resolve(PMKManifold(@1)); - }].then(^(id o, id m, id n){ - XCTAssertNil(m, @"Accessing extra elements should not crash"); - XCTAssertNil(n, @"Accessing extra elements should not crash"); - XCTAssertEqualObjects(o, @1); - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_63_then_manifold { - id ex1 = [self expectationWithDescription:@""]; - - [AnyPromise promiseWithValue:@0].then(^{ - return PMKManifold(@1, @2, @3); - }).then(^(id o1, id o2, id o3){ - XCTAssertEqualObjects(o1, @1); - XCTAssertEqualObjects(o2, @2); - XCTAssertEqualObjects(o3, @3); - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_63_then_manifold_with_nil { - id ex1 = [self expectationWithDescription:@""]; - - [AnyPromise promiseWithValue:@0].then(^{ - return PMKManifold(@1, nil, @3); - }).then(^(id o1, id o2, id o3){ - XCTAssertEqualObjects(o1, @1); - XCTAssertEqualObjects(o2, nil); - XCTAssertEqualObjects(o3, @3); - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_65_manifold_fulfill_value { - id ex1 = [self expectationWithDescription:@""]; - - AnyPromise *promise = [AnyPromise promiseWithValue:@1].then(^{ - return PMKManifold(@123, @2); - }); - - promise.then(^(id a, id b){ - XCTAssertNotNil(a); - XCTAssertNotNil(b); - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; - - XCTAssertEqualObjects(promise.value, @123); -} - -- (void)test_37_PMKMany_2 { - id ex1 = [self expectationWithDescription:@""]; - - PMKAfter(0.02).then(^{ - return PMKManifold(@1, @2); - }).then(^(id a, id b){ - XCTAssertEqualObjects(a, @1); - XCTAssertEqualObjects(b, @2); - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -@end diff --git a/Carthage/Checkouts/PromiseKit/Tests/CoreObjC/WhenTests.m b/Carthage/Checkouts/PromiseKit/Tests/CoreObjC/WhenTests.m deleted file mode 100644 index 20267c156..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/CoreObjC/WhenTests.m +++ /dev/null @@ -1,265 +0,0 @@ -@import Foundation; -@import PromiseKit; -@import XCTest; - - -@interface WhenTests: XCTestCase @end @implementation WhenTests - -- (void)testProgress { - - id ex = [self expectationWithDescription:@""]; - - XCTAssertNil([NSProgress currentProgress]); - - id p1 = PMKAfter(0.01); - id p2 = PMKAfter(0.02); - id p3 = PMKAfter(0.03); - id p4 = PMKAfter(0.04); - - NSProgress *progress = [NSProgress progressWithTotalUnitCount:1]; - [progress becomeCurrentWithPendingUnitCount:1]; - - PMKWhen(@[p1, p2, p3, p4]).then(^{ - XCTAssertEqual(progress.completedUnitCount, 1); - [ex fulfill]; - }); - - [progress resignCurrent]; - - [self waitForExpectationsWithTimeout:5 handler:nil]; -} - -- (void)testProgressDoesNotExceed100Percent { - - id ex1 = [self expectationWithDescription:@""]; - id ex2 = [self expectationWithDescription:@""]; - - XCTAssertNil([NSProgress currentProgress]); - - id p1 = PMKAfter(0.01); - id p2 = PMKAfter(0.02).then(^{ return [NSError errorWithDomain:@"a" code:1 userInfo:nil]; }); - id p3 = PMKAfter(0.03); - id p4 = PMKAfter(0.04); - - id promises = @[p1, p2, p3, p4]; - - NSProgress *progress = [NSProgress progressWithTotalUnitCount:1]; - [progress becomeCurrentWithPendingUnitCount:1]; - - PMKWhen(promises).catch(^{ - [ex2 fulfill]; - }); - - [progress resignCurrent]; - - PMKJoin(promises).catch(^{ - XCTAssertLessThanOrEqual(1, progress.fractionCompleted); - XCTAssertEqual(progress.completedUnitCount, 1); - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)testWhenManifolds { - id ex = [self expectationWithDescription:@""]; - id p1 = dispatch_promise(^{ return PMKManifold(@1, @2); }); - id p2 = dispatch_promise(^{}); - PMKWhen(@[p1, p2]).then(^(NSArray *results){ - XCTAssertEqualObjects(results[0], @1); - XCTAssertEqualObjects(results[1], [NSNull null]); - [ex fulfill]; - }); - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_55_all_dictionary { - id ex1 = [self expectationWithDescription:@""]; - - id promises = @{ - @1: @2, - @2: @"abc", - @"a": PMKAfter(0.1).then(^{ return @"HI"; }) - }; - PMKWhen(promises).then(^(NSDictionary *dict){ - XCTAssertEqual(dict.count, 3ul); - XCTAssertEqualObjects(dict[@1], @2); - XCTAssertEqualObjects(dict[@2], @"abc"); - XCTAssertEqualObjects(dict[@"a"], @"HI"); - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_56_empty_array_when { - id ex1 = [self expectationWithDescription:@""]; - - PMKWhen(@[]).then(^(NSArray *array){ - XCTAssertEqual(array.count, 0ul); - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_57_empty_array_all { - id ex1 = [self expectationWithDescription:@""]; - - PMKWhen(@[]).then(^(NSArray *array){ - XCTAssertEqual(array.count, 0ul); - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_18_when { - id ex1 = [self expectationWithDescription:@""]; - - id a = PMKAfter(0.02).then(^{ return @345; }); - id b = PMKAfter(0.03).then(^{ return @345; }); - PMKWhen(@[a, b]).then(^(NSArray *objs){ - XCTAssertEqual(objs.count, 2ul); - XCTAssertEqualObjects(objs[0], objs[1]); - [ex1 fulfill]; - }); - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_21_recursive_when { - id domain = @"sdjhfg"; - - id ex1 = [self expectationWithDescription:@""]; - id a = PMKAfter(0.03).then(^{ - return [NSError errorWithDomain:domain code:123 userInfo:nil]; - }); - id b = PMKAfter(0.02); - id c = PMKWhen(@[a, b]); - PMKWhen(c).then(^{ - XCTFail(); - }).catch(^(NSError *e){ - XCTAssertEqualObjects(e.userInfo[PMKFailingPromiseIndexKey], @0); - XCTAssertEqualObjects(e.domain, domain); - [ex1 fulfill]; - }); - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_22_already_resolved_and_bubble { - id ex1 = [self expectationWithDescription:@""]; - id ex2 = [self expectationWithDescription:@""]; - - PMKResolver resolve; - AnyPromise *promise = [[AnyPromise alloc] initWithResolver:&resolve]; - - promise.then(^{ - XCTFail(); - }).catch(^(NSError *e){ - [ex1 fulfill]; - }); - - resolve([NSError errorWithDomain:@"a" code:1 userInfo:nil]); - - PMKWhen(promise).then(^{ - XCTFail(); - }).catch(^{ - [ex2 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_24_some_edge_case { - id ex1 = [self expectationWithDescription:@""]; - id a = PMKAfter(0.02).catch(^{}); - id b = PMKAfter(0.03); - PMKWhen(@[a, b]).then(^(NSArray *objs){ - [ex1 fulfill]; - }); - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_35_when_nil { - id ex1 = [self expectationWithDescription:@""]; - - AnyPromise *promise = [AnyPromise promiseWithValue:@"35"].then(^{ return nil; }); - PMKWhen(@[PMKAfter(0.02).then(^{ return @1; }), [AnyPromise promiseWithValue:nil], promise]).then(^(NSArray *results){ - XCTAssertEqual(results.count, 3ul); - XCTAssertEqualObjects(results[1], [NSNull null]); - [ex1 fulfill]; - }).catch(^(NSError *err){ - abort(); - }); - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - - -- (void)test_39_when_with_some_values { - id ex1 = [self expectationWithDescription:@""]; - - id p = PMKAfter(0.02); - id v = @1; - PMKWhen(@[p, v]).then(^(NSArray *aa){ - XCTAssertEqual(aa.count, 2ul); - XCTAssertEqualObjects(aa[1], @1); - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_40_when_with_all_values { - id ex1 = [self expectationWithDescription:@""]; - - PMKWhen(@[@1, @2]).then(^(NSArray *aa){ - XCTAssertEqualObjects(aa[0], @1); - XCTAssertEqualObjects(aa[1], @2); - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_41_when_with_repeated_promises { - id ex1 = [self expectationWithDescription:@""]; - - id p = PMKAfter(0.02); - id v = @1; - PMKWhen(@[p, v, p, v]).then(^(NSArray *aa){ - XCTAssertEqual(aa.count, 4ul); - XCTAssertEqualObjects(aa[1], @1); - XCTAssertEqualObjects(aa[3], @1); - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_45_when_which_returns_void { - id ex1 = [self expectationWithDescription:@""]; - - AnyPromise *promise = [AnyPromise promiseWithValue:@1].then(^{}); - PMKWhen(@[promise, [AnyPromise promiseWithValue:@1]]).then(^(NSArray *stuff){ - XCTAssertEqual(stuff.count, 2ul); - XCTAssertEqualObjects(stuff[0], [NSNull null]); - [ex1 fulfill]; - }); - - [self waitForExpectationsWithTimeout:1 handler:nil]; -} - -- (void)test_when_nil { - NSArray *foo = nil; - NSError *err = PMKWhen(foo).value; - XCTAssertEqual(err.domain, PMKErrorDomain); - XCTAssertEqual(err.code, PMKInvalidUsageError); -} - - -- (void)test_when_bad_input { - id foo = @"a"; - XCTAssertEqual(PMKWhen(foo).value, foo); -} - -@end diff --git a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/AfterTests.swift b/Carthage/Checkouts/PromiseKit/Tests/CorePromise/AfterTests.swift deleted file mode 100644 index 6b587c954..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/AfterTests.swift +++ /dev/null @@ -1,52 +0,0 @@ -import PromiseKit -import XCTest - -class AfterTests: XCTestCase { - func testZero() { - let ex2 = expectation(description: "") - after(seconds: 0).done(ex2.fulfill) - waitForExpectations(timeout: 2, handler: nil) - - let ex3 = expectation(description: "") - after(.seconds(0)).done(ex3.fulfill) - waitForExpectations(timeout: 2, handler: nil) - - #if !SWIFT_PACKAGE - let ex4 = expectation(description: "") - __PMKAfter(0).done{ _ in ex4.fulfill() }.silenceWarning() - waitForExpectations(timeout: 2, handler: nil) - #endif - } - - func testNegative() { - let ex2 = expectation(description: "") - after(seconds: -1).done(ex2.fulfill) - waitForExpectations(timeout: 2, handler: nil) - - let ex3 = expectation(description: "") - after(.seconds(-1)).done(ex3.fulfill) - waitForExpectations(timeout: 2, handler: nil) - - #if !SWIFT_PACKAGE - let ex4 = expectation(description: "") - __PMKAfter(-1).done{ _ in ex4.fulfill() }.silenceWarning() - waitForExpectations(timeout: 2, handler: nil) - #endif - } - - func testPositive() { - let ex2 = expectation(description: "") - after(seconds: 1).done(ex2.fulfill) - waitForExpectations(timeout: 2, handler: nil) - - let ex3 = expectation(description: "") - after(.seconds(1)).done(ex3.fulfill) - waitForExpectations(timeout: 2, handler: nil) - - #if !SWIFT_PACKAGE - let ex4 = expectation(description: "") - __PMKAfter(1).done{ _ in ex4.fulfill() }.silenceWarning() - waitForExpectations(timeout: 2, handler: nil) - #endif - } -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/CancellableErrorTests.swift b/Carthage/Checkouts/PromiseKit/Tests/CorePromise/CancellableErrorTests.swift deleted file mode 100644 index 3eb7212c9..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/CancellableErrorTests.swift +++ /dev/null @@ -1,167 +0,0 @@ -import Foundation -import PromiseKit -import XCTest - -#if canImport(StoreKit) -import StoreKit -#endif - -class CancellationTests: XCTestCase { - func testCancellation() { - let ex1 = expectation(description: "") - - let p = after(seconds: 0).done { _ in - throw LocalError.cancel - }.done { - XCTFail() - } - p.catch { _ in - XCTFail() - } - p.catch(policy: .allErrors) { - XCTAssertTrue($0.isCancelled) - ex1.fulfill() - } - - waitForExpectations(timeout: 60) - } - - func testThrowCancellableErrorThatIsNotCancelled() { - let expct = expectation(description: "") - - after(seconds: 0).done { _ in - throw LocalError.notCancel - }.done { - XCTFail() - }.catch { - XCTAssertFalse($0.isCancelled) - expct.fulfill() - } - - waitForExpectations(timeout: 1) - } - - func testRecoverWithCancellation() { - let ex1 = expectation(description: "") - let ex2 = expectation(description: "") - - let p = after(seconds: 0).done { _ in - throw CocoaError.cancelled - }.recover(policy: .allErrors) { err -> Promise in - ex1.fulfill() - XCTAssertTrue(err.isCancelled) - throw err - }.done { _ in - XCTFail() - } - p.catch { _ in - XCTFail() - } - p.catch(policy: .allErrors) { - XCTAssertTrue($0.isCancelled) - ex2.fulfill() - } - - waitForExpectations(timeout: 1) - } - - func testFoundationBridging1() { - let ex = expectation(description: "") - - let p = after(seconds: 0).done { _ in - throw CocoaError.cancelled - } - p.catch { _ in - XCTFail() - } - p.catch(policy: .allErrors) { - XCTAssertTrue($0.isCancelled) - ex.fulfill() - } - - waitForExpectations(timeout: 1) - } - - func testFoundationBridging2() { - let ex = expectation(description: "") - - let p = Promise().done { - throw URLError.cancelled - } - p.catch { _ in - XCTFail() - } - p.catch(policy: .allErrors) { - XCTAssertTrue($0.isCancelled) - ex.fulfill() - } - - waitForExpectations(timeout: 1) - } - - func testDoesntCrashSwift() { - #if os(macOS) - // Previously exposed a bridging crash in Swift - // NOTE nobody was brave enough or diligent enough to report this to Apple :{ - // NOTE no Linux test since this constructor doesn’t exist there - XCTAssertFalse(NSError().isCancelled) - #endif - - #if canImport(StoreKit) - do { - let err = SKError(.paymentCancelled) - XCTAssertTrue(err.isCancelled) - throw err - } catch { - XCTAssertTrue(error.isCancelled) - } - - XCTAssertFalse(SKError(.clientInvalid).isCancelled) - - #endif - } - - func testBridgeToNSError() { - // Swift.Error types must be cast to NSError for the bridging to occur. - // The below would throw an expection about an invalid selector without a cast: - // `(error as AnyObject).value(forKey: "domain")` - // This simply checks to make sure `isCancelled` is not making that mistake. - - class TestingError: Error { } - - XCTAssertFalse(TestingError().isCancelled) - } - -#if swift(>=3.2) - func testIsCancelled() { - XCTAssertTrue(PMKError.cancelled.isCancelled) - XCTAssertTrue(URLError.cancelled.isCancelled) - XCTAssertTrue(CocoaError.cancelled.isCancelled) - XCTAssertFalse(CocoaError(_nsError: NSError(domain: NSCocoaErrorDomain, code: CocoaError.Code.coderInvalidValue.rawValue)).isCancelled) - } -#endif -} - -private enum LocalError: CancellableError { - case notCancel - case cancel - - var isCancelled: Bool { - switch self { - case .notCancel: return false - case .cancel: return true - } - } -} - -private extension URLError { - static var cancelled: URLError { - return .init(_nsError: NSError(domain: NSURLErrorDomain, code: URLError.Code.cancelled.rawValue)) - } -} - -private extension CocoaError { - static var cancelled: CocoaError { - return .init(_nsError: NSError(domain: NSCocoaErrorDomain, code: CocoaError.Code.userCancelled.rawValue)) - } -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/CatchableTests.swift b/Carthage/Checkouts/PromiseKit/Tests/CorePromise/CatchableTests.swift deleted file mode 100644 index d94b2b6f5..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/CatchableTests.swift +++ /dev/null @@ -1,267 +0,0 @@ -import PromiseKit -import Dispatch -import XCTest - -class CatchableTests: XCTestCase { - - func testFinally() { - let finallyQueue = DispatchQueue(label: "\(#file):\(#line)", attributes: .concurrent) - - func helper(error: Error, on queue: DispatchQueue = .main, flags: DispatchWorkItemFlags? = nil) { - let ex = (expectation(description: ""), expectation(description: "")) - var x = 0 - Promise(error: error).catch(policy: .allErrors) { _ in - XCTAssertEqual(x, 0) - x += 1 - ex.0.fulfill() - }.finally(on: queue, flags: flags) { - if let flags = flags, flags.contains(.barrier) { - dispatchPrecondition(condition: .onQueueAsBarrier(queue)) - } else { - dispatchPrecondition(condition: .onQueue(queue)) - } - XCTAssertEqual(x, 1) - x += 1 - ex.1.fulfill() - } - wait(for: [ex.0, ex.1], timeout: 10) - } - - helper(error: Error.dummy) - helper(error: Error.cancelled) - helper(error: Error.dummy, on: finallyQueue) - helper(error: Error.dummy, on: finallyQueue, flags: .barrier) - } - - func testCauterize() { - let ex = expectation(description: "") - let p = Promise(error: Error.dummy) - - // cannot test specifically that this outputs to console, - // but code-coverage will note that the line is run - p.cauterize() - - p.catch { _ in - ex.fulfill() - } - wait(for: [ex], timeout: 1) - } -} - - -/// `Promise.recover` -extension CatchableTests { - func test__void_specialized_full_recover() { - - func helper(error: Swift.Error) { - let ex = expectation(description: "") - Promise(error: error).recover { _ in }.done(ex.fulfill) - wait(for: [ex], timeout: 10) - } - - helper(error: Error.dummy) - helper(error: Error.cancelled) - } - - func test__void_specialized_full_recover__fulfilled_path() { - let ex = expectation(description: "") - Promise().recover { _ in XCTFail() }.done(ex.fulfill) - wait(for: [ex], timeout: 10) - } - - func test__void_specialized_conditional_recover() { - func helper(policy: CatchPolicy, error: Swift.Error, line: UInt = #line) { - let ex = expectation(description: "") - var x = 0 - Promise(error: error).recover(policy: policy) { err in - guard x < 1 else { throw err } - x += 1 - }.done(ex.fulfill).silenceWarning() - wait(for: [ex], timeout: 10) - } - - for error in [Error.dummy as Swift.Error, Error.cancelled] { - helper(policy: .allErrors, error: error) - } - helper(policy: .allErrorsExceptCancellation, error: Error.dummy) - } - - func test__void_specialized_conditional_recover__no_recover() { - - func helper(policy: CatchPolicy, error: Error, line: UInt = #line) { - let ex = expectation(description: "") - Promise(error: error).recover(policy: policy) { err in - throw err - }.catch(policy: .allErrors) { - XCTAssertEqual(error, $0 as? Error) - ex.fulfill() - } - wait(for: [ex], timeout: 10) - } - - for error in [Error.dummy, Error.cancelled] { - helper(policy: .allErrors, error: error) - } - helper(policy: .allErrorsExceptCancellation, error: Error.dummy) - } - - func test__void_specialized_conditional_recover__ignores_cancellation_but_fed_cancellation() { - let ex = expectation(description: "") - Promise(error: Error.cancelled).recover(policy: .allErrorsExceptCancellation) { _ in - XCTFail() - }.catch(policy: .allErrors) { - XCTAssertEqual(Error.cancelled, $0 as? Error) - ex.fulfill() - } - wait(for: [ex], timeout: 10) - } - - func test__void_specialized_conditional_recover__fulfilled_path() { - let ex = expectation(description: "") - Promise().recover { _ in - XCTFail() - }.catch { _ in - XCTFail() // this `catch` to ensure we are calling the `recover` variant we think we are - }.finally { - ex.fulfill() - } - wait(for: [ex], timeout: 10) - } -} - - -/// `Promise.recover` -extension CatchableTests { - func test__full_recover() { - - func helper(error: Swift.Error) { - let ex = expectation(description: "") - Promise(error: error).recover { _ in return .value(2) }.done { - XCTAssertEqual($0, 2) - ex.fulfill() - } - wait(for: [ex], timeout: 10) - } - - helper(error: Error.dummy) - helper(error: Error.cancelled) - } - - func test__full_recover__fulfilled_path() { - let ex = expectation(description: "") - Promise.value(1).recover { _ in XCTFail(); return .value(2) }.done{ - XCTAssertEqual($0, 1) - ex.fulfill() - } - wait(for: [ex], timeout: 10) - } - - - func test__conditional_recover() { - func helper(policy: CatchPolicy, error: Swift.Error, line: UInt = #line) { - let ex = expectation(description: "") - var x = 0 - Promise(error: error).recover(policy: policy) { err -> Promise in - guard x < 1 else { throw err } - x += 1 - return .value(x) - }.done { - XCTAssertEqual($0, x) - ex.fulfill() - }.silenceWarning() - wait(for: [ex], timeout: 10) - } - - for error in [Error.dummy as Swift.Error, Error.cancelled] { - helper(policy: .allErrors, error: error) - } - helper(policy: .allErrorsExceptCancellation, error: Error.dummy) - } - - func test__conditional_recover__no_recover() { - - func helper(policy: CatchPolicy, error: Error, line: UInt = #line) { - let ex = expectation(description: "") - Promise(error: error).recover(policy: policy) { err -> Promise in - throw err - }.catch(policy: .allErrors) { - XCTAssertEqual(error, $0 as? Error) - ex.fulfill() - } - wait(for: [ex], timeout: 10) - } - - for error in [Error.dummy, Error.cancelled] { - helper(policy: .allErrors, error: error) - } - helper(policy: .allErrorsExceptCancellation, error: Error.dummy) - } - - func test__conditional_recover__ignores_cancellation_but_fed_cancellation() { - let ex = expectation(description: "") - Promise(error: Error.cancelled).recover(policy: .allErrorsExceptCancellation) { _ -> Promise in - XCTFail() - return .value(1) - }.catch(policy: .allErrors) { - XCTAssertEqual(Error.cancelled, $0 as? Error) - ex.fulfill() - } - wait(for: [ex], timeout: 10) - } - - func test__conditional_recover__fulfilled_path() { - let ex = expectation(description: "") - Promise.value(1).recover { err -> Promise in - XCTFail() - throw err - }.done { - XCTAssertEqual($0, 1) - ex.fulfill() - }.catch { _ in - XCTFail() // this `catch` to ensure we are calling the `recover` variant we think we are - } - wait(for: [ex], timeout: 10) - } - - func testEnsureThen_Error() { - let ex = expectation(description: "") - - Promise.value(1).done { - XCTAssertEqual($0, 1) - throw Error.dummy - }.ensureThen { - after(seconds: 0.01) - }.catch { - XCTAssertEqual(Error.dummy, $0 as? Error) - }.finally { - ex.fulfill() - } - - wait(for: [ex], timeout: 10) - } - - func testEnsureThen_Value() { - let ex = expectation(description: "") - - Promise.value(1).ensureThen { - after(seconds: 0.01) - }.done { - XCTAssertEqual($0, 1) - }.catch { _ in - XCTFail() - }.finally { - ex.fulfill() - } - - wait(for: [ex], timeout: 10) - } -} - -private enum Error: CancellableError { - case dummy - case cancelled - - var isCancelled: Bool { - return self == Error.cancelled - } -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/DefaultDispatchQueueTests.swift b/Carthage/Checkouts/PromiseKit/Tests/CorePromise/DefaultDispatchQueueTests.swift deleted file mode 100644 index f9908e26a..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/DefaultDispatchQueueTests.swift +++ /dev/null @@ -1,70 +0,0 @@ -// -// PMKDefaultDispatchQueue.test.swift -// PromiseKit -// -// Created by David Rodriguez on 4/14/16. -// Copyright © 2016 Max Howell. All rights reserved. -// - -import class Foundation.Thread -import PromiseKit -import Dispatch -import XCTest - -private enum Error: Swift.Error { case dummy } - - -class PMKDefaultDispatchQueueTest: XCTestCase { - - let myQueue = DispatchQueue(label: "myQueue") - - override func setUp() { - // can actually only set the default queue once - // - See: PMKSetDefaultDispatchQueue - conf.Q = (myQueue, myQueue) - } - - override func tearDown() { - conf.Q = (.main, .main) - } - - func testOverrodeDefaultThenQueue() { - let ex = expectation(description: "resolving") - - Promise.value(1).then { _ -> Promise in - ex.fulfill() - XCTAssertFalse(Thread.isMainThread) - return Promise() - }.silenceWarning() - - XCTAssertTrue(Thread.isMainThread) - - waitForExpectations(timeout: 1) - } - - func testOverrodeDefaultCatchQueue() { - let ex = expectation(description: "resolving") - - Promise(error: Error.dummy).catch { _ in - ex.fulfill() - XCTAssertFalse(Thread.isMainThread) - } - - XCTAssertTrue(Thread.isMainThread) - - waitForExpectations(timeout: 1) - } - - func testOverrodeDefaultAlwaysQueue() { - let ex = expectation(description: "resolving") - - Promise.value(1).ensure { - ex.fulfill() - XCTAssertFalse(Thread.isMainThread) - }.silenceWarning() - - XCTAssertTrue(Thread.isMainThread) - - waitForExpectations(timeout: 1) - } -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/ErrorTests.swift b/Carthage/Checkouts/PromiseKit/Tests/CorePromise/ErrorTests.swift deleted file mode 100644 index d9087d2a0..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/ErrorTests.swift +++ /dev/null @@ -1,22 +0,0 @@ -import PromiseKit -import XCTest - -class PMKErrorTests: XCTestCase { - func testCustomStringConvertible() { - XCTAssertNotNil(PMKError.invalidCallingConvention.errorDescription) - XCTAssertNotNil(PMKError.returnedSelf.errorDescription) - XCTAssertNotNil(PMKError.badInput.errorDescription) - XCTAssertNotNil(PMKError.cancelled.errorDescription) - XCTAssertNotNil(PMKError.compactMap(1, Int.self).errorDescription) - XCTAssertNotNil(PMKError.emptySequence.errorDescription) - } - - func testCustomDebugStringConvertible() { - XCTAssertFalse(PMKError.invalidCallingConvention.debugDescription.isEmpty) - XCTAssertFalse(PMKError.returnedSelf.debugDescription.isEmpty) - XCTAssertNotNil(PMKError.badInput.debugDescription.isEmpty) - XCTAssertFalse(PMKError.cancelled.debugDescription.isEmpty) - XCTAssertFalse(PMKError.compactMap(1, Int.self).debugDescription.isEmpty) - XCTAssertFalse(PMKError.emptySequence.debugDescription.isEmpty) - } -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/GuaranteeTests.swift b/Carthage/Checkouts/PromiseKit/Tests/CorePromise/GuaranteeTests.swift deleted file mode 100644 index 55d12a712..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/GuaranteeTests.swift +++ /dev/null @@ -1,205 +0,0 @@ -import PromiseKit -import XCTest - -class GuaranteeTests: XCTestCase { - func testInit() { - let ex = expectation(description: "") - Guarantee { seal in - seal(1) - }.done { - XCTAssertEqual(1, $0) - ex.fulfill() - } - wait(for: [ex], timeout: 10) - } - - func testMap() { - let ex = expectation(description: "") - - Guarantee.value(1).map { - $0 * 2 - }.done { - XCTAssertEqual(2, $0) - ex.fulfill() - } - - wait(for: [ex], timeout: 10) - } - - func testMapByKeyPath() { - let ex = expectation(description: "") - - Guarantee.value(Person(name: "Max")).map(\.name).done { - XCTAssertEqual("Max", $0) - ex.fulfill() - } - - wait(for: [ex], timeout: 10) - } - - func testWait() { - XCTAssertEqual(after(.milliseconds(100)).map(on: nil){ 1 }.wait(), 1) - } - - func testMapValues() { - let ex = expectation(description: "") - - Guarantee.value([1, 2, 3]) - .mapValues { $0 * 2 } - .done { values in - XCTAssertEqual([2, 4, 6], values) - ex.fulfill() - } - - wait(for: [ex], timeout: 10) - } - - func testMapValuesByKeyPath() { - let ex = expectation(description: "") - - Guarantee.value([Person(name: "Max"), Person(name: "Roman"), Person(name: "John")]) - .mapValues(\.name) - .done { values in - XCTAssertEqual(["Max", "Roman", "John"], values) - ex.fulfill() - } - - wait(for: [ex], timeout: 10) - } - - func testFlatMapValues() { - let ex = expectation(description: "") - - Guarantee.value([1, 2, 3]) - .flatMapValues { [$0, $0] } - .done { values in - XCTAssertEqual([1, 1, 2, 2, 3, 3], values) - ex.fulfill() - } - - wait(for: [ex], timeout: 10) - } - - func testCompactMapValues() { - let ex = expectation(description: "") - - Guarantee.value(["1","2","a","3"]) - .compactMapValues { Int($0) } - .done { values in - XCTAssertEqual([1, 2, 3], values) - ex.fulfill() - } - - wait(for: [ex], timeout: 10) - } - - func testCompactMapValuesByKeyPath() { - let ex = expectation(description: "") - - Guarantee.value([Person(name: "Max"), Person(name: "Roman", age: 26), Person(name: "John", age: 23)]) - .compactMapValues(\.age) - .done { values in - XCTAssertEqual([26, 23], values) - ex.fulfill() - } - - wait(for: [ex], timeout: 10) - } - - func testThenMap() { - - let ex = expectation(description: "") - - Guarantee.value([1, 2, 3]) - .thenMap { Guarantee.value($0 * 2) } - .done { values in - XCTAssertEqual([2, 4, 6], values) - ex.fulfill() - } - - wait(for: [ex], timeout: 10) - } - - func testThenFlatMap() { - - let ex = expectation(description: "") - - Guarantee.value([1, 2, 3]) - .thenFlatMap { Guarantee.value([$0, $0]) } - .done { values in - XCTAssertEqual([1, 1, 2, 2, 3, 3], values) - ex.fulfill() - } - - wait(for: [ex], timeout: 10) - } - - func testFilterValues() { - - let ex = expectation(description: "") - - Guarantee.value([1, 2, 3]) - .filterValues { $0 > 1 } - .done { values in - XCTAssertEqual([2, 3], values) - ex.fulfill() - } - - wait(for: [ex], timeout: 10) - } - - func testFilterValuesByKeyPath() { - - let ex = expectation(description: "") - - Guarantee.value([Person(name: "Max"), Person(name: "Roman", age: 26, isStudent: false), Person(name: "John", age: 23, isStudent: true)]) - .filterValues(\.isStudent) - .done { values in - XCTAssertEqual([Person(name: "John", age: 23, isStudent: true)], values) - ex.fulfill() - } - - wait(for: [ex], timeout: 10) - } - - func testSorted() { - - let ex = expectation(description: "") - - Guarantee.value([5, 2, 3, 4, 1]) - .sortedValues() - .done { values in - XCTAssertEqual([1, 2, 3, 4, 5], values) - ex.fulfill() - } - - wait(for: [ex], timeout: 10) - } - - func testSortedBy() { - - let ex = expectation(description: "") - - Guarantee.value([5, 2, 3, 4, 1]) - .sortedValues { $0 > $1 } - .done { values in - XCTAssertEqual([5, 4, 3, 2, 1], values) - ex.fulfill() - } - - wait(for: [ex], timeout: 10) - } - - #if swift(>=3.1) - func testNoAmbiguityForValue() { - let ex = expectation(description: "") - let a = Guarantee.value - let b = Guarantee.value(Void()) - let c = Guarantee.value(()) - when(fulfilled: a, b, c).done { - ex.fulfill() - }.cauterize() - wait(for: [ex], timeout: 10) - } - #endif -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/HangTests.swift b/Carthage/Checkouts/PromiseKit/Tests/CorePromise/HangTests.swift deleted file mode 100644 index 84156d35b..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/HangTests.swift +++ /dev/null @@ -1,38 +0,0 @@ -import PromiseKit -import XCTest - -class HangTests: XCTestCase { - func test() { - let ex = expectation(description: "block executed") - do { - let value = try hang(after(seconds: 0.02).then { _ -> Promise in - ex.fulfill() - return .value(1) - }) - XCTAssertEqual(value, 1) - } catch { - XCTFail("Unexpected error") - } - waitForExpectations(timeout: 0) - } - - enum Error: Swift.Error { - case test - } - - func testError() { - var value = 0 - do { - _ = try hang(after(seconds: 0.02).done { - value = 1 - throw Error.test - }) - XCTAssertEqual(value, 1) - } catch Error.test { - return - } catch { - XCTFail("Unexpected error (expected Error.test)") - } - XCTFail("Expected error but no error was thrown") - } -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/LoggingTests.swift b/Carthage/Checkouts/PromiseKit/Tests/CorePromise/LoggingTests.swift deleted file mode 100644 index ab869d1ac..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/LoggingTests.swift +++ /dev/null @@ -1,199 +0,0 @@ -@testable import PromiseKit -import Dispatch -import XCTest - -class LoggingTests: XCTestCase { - /** - The test should emit the following log messages: - - PromiseKit: warning: `wait()` called on main thread! - PromiseKit: warning: pending promise deallocated - PromiseKit:cauterized-error: purposes - This is an error message - */ - func testLogging() { - - var logOutput: String? = nil - - enum ForTesting: Error { - case purposes - } - - // Test Logging to Console, the default behavior - conf.logHandler(.waitOnMainThread) - conf.logHandler(.pendingPromiseDeallocated) - conf.logHandler(.pendingGuaranteeDeallocated) - conf.logHandler(.cauterized(ForTesting.purposes)) - XCTAssertNil(logOutput) - - // Now test no logging - conf.logHandler = { event in } - conf.logHandler(.waitOnMainThread) - conf.logHandler(.pendingPromiseDeallocated) - conf.logHandler(.cauterized(ForTesting.purposes)) - XCTAssertNil(logOutput) - - conf.logHandler = { event in - switch event { - case .waitOnMainThread, .pendingPromiseDeallocated, .pendingGuaranteeDeallocated: - logOutput = "\(event)" - case .cauterized: - // Using an enum with associated value does not convert to a string properly in - // earlier versions of swift - logOutput = "cauterized" - } - } - conf.logHandler(.waitOnMainThread) - XCTAssertEqual(logOutput!, "waitOnMainThread") - logOutput = nil - conf.logHandler(.pendingPromiseDeallocated) - XCTAssertEqual(logOutput!, "pendingPromiseDeallocated") - logOutput = nil - conf.logHandler(.cauterized(ForTesting.purposes)) - XCTAssertEqual(logOutput!, "cauterized") - } - - // Verify waiting on main thread in Promise is logged - func testPromiseWaitOnMainThreadLogged() throws { - - enum ForTesting: Error { - case purposes - } - - var logOutput: String? = nil - conf.logHandler = { event in - logOutput = "\(event)" - } - let promiseResolver = Promise.pending() - let workQueue = DispatchQueue(label: "worker") - workQueue.async { - promiseResolver.resolver.fulfill ("PromiseFulfilled") - } - let promisedString = try promiseResolver.promise.wait() - XCTAssertEqual("PromiseFulfilled", promisedString) - XCTAssertEqual(logOutput!, "waitOnMainThread") - } - - // Verify Promise.cauterize() is logged - func testCauterizeIsLogged() { - - enum ForTesting: Error { - case purposes - } - - var logOutput: String? = nil - conf.logHandler = { event in - switch event { - case .waitOnMainThread, .pendingPromiseDeallocated, .pendingGuaranteeDeallocated: - logOutput = "\(event)" - case .cauterized: - // Using an enum with associated value does not convert to a string properly in - // earlier versions of swift - logOutput = "cauterized" - } - } - func createPromise() -> Promise { - let promiseResolver = Promise.pending() - - let queue = DispatchQueue(label: "workQueue") - queue.async { - promiseResolver.resolver.reject(ForTesting.purposes) - } - return promiseResolver.promise - } - var ex = expectation(description: "cauterize") - firstly { - createPromise() - }.ensure { - ex.fulfill() - }.cauterize() - waitForExpectations(timeout: 1) - ex = expectation(description: "read") - let readQueue = DispatchQueue(label: "readQueue") - readQueue.async { - var outputSet = false - while !outputSet { - if let logOutput = logOutput { - XCTAssertEqual(logOutput, "cauterized") - outputSet = true - ex.fulfill() - } - if !outputSet { - usleep(10000) - } - } - } - waitForExpectations(timeout: 1) - } - - // Verify waiting on main thread in Guarantee is logged - func testGuaranteeWaitOnMainThreadLogged() { - - enum ForTesting: Error { - case purposes - } - - var logOutput: String? = nil - conf.logHandler = { event in - switch event { - case .waitOnMainThread, .pendingPromiseDeallocated, .pendingGuaranteeDeallocated: - logOutput = "\(event)" - case .cauterized: - // Using an enum with associated value does not convert to a string properly in - // earlier versions of swift - logOutput = "cauterized" - } - } - let guaranteeResolve = Guarantee.pending() - let workQueue = DispatchQueue(label: "worker") - workQueue.async { - guaranteeResolve.resolve("GuaranteeFulfilled") - } - let guaranteedString = guaranteeResolve.guarantee.wait() - XCTAssertEqual("GuaranteeFulfilled", guaranteedString) - XCTAssertEqual(logOutput!, "waitOnMainThread") - } - - // Verify pendingPromiseDeallocated is logged - func testPendingPromiseDeallocatedIsLogged() { - - var logOutput: String? = nil - conf.logHandler = { event in - switch event { - case .waitOnMainThread, .pendingPromiseDeallocated, .pendingGuaranteeDeallocated: - logOutput = "\(event)" - case .cauterized: - // Using an enum with associated value does not convert to a string properly in - // earlier versions of swift - logOutput = "cauterized" - } - } - do { - let _ = Promise.pending() - } - XCTAssertEqual ("pendingPromiseDeallocated", logOutput!) - } - - // Verify pendingGuaranteeDeallocated is logged - func testPendingGuaranteeDeallocatedIsLogged() { - - var logOutput: String? = nil - let loggingClosure: (PromiseKit.LogEvent) -> Void = { event in - switch event { - case .waitOnMainThread, .pendingPromiseDeallocated, .pendingGuaranteeDeallocated: - logOutput = "\(event)" - case .cauterized: - // Using an enum with associated value does not convert to a string properly in - // earlier versions of swift - logOutput = "cauterized" - } - } - conf.logHandler = loggingClosure - do { - let _ = Guarantee.pending() - } - XCTAssertEqual ("pendingGuaranteeDeallocated", logOutput!) - } - - //TODO Verify pending promise deallocation is logged -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/PromiseTests.swift b/Carthage/Checkouts/PromiseKit/Tests/CorePromise/PromiseTests.swift deleted file mode 100644 index fd010a0f5..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/PromiseTests.swift +++ /dev/null @@ -1,152 +0,0 @@ -import PromiseKit -import Dispatch -import XCTest - -class PromiseTests: XCTestCase { - func testIsPending() { - XCTAssertTrue(Promise.pending().promise.isPending) - XCTAssertFalse(Promise().isPending) - XCTAssertFalse(Promise(error: Error.dummy).isPending) - } - - func testIsResolved() { - XCTAssertFalse(Promise.pending().promise.isResolved) - XCTAssertTrue(Promise().isResolved) - XCTAssertTrue(Promise(error: Error.dummy).isResolved) - } - - func testIsFulfilled() { - XCTAssertFalse(Promise.pending().promise.isFulfilled) - XCTAssertTrue(Promise().isFulfilled) - XCTAssertFalse(Promise(error: Error.dummy).isFulfilled) - } - - func testIsRejected() { - XCTAssertFalse(Promise.pending().promise.isRejected) - XCTAssertTrue(Promise(error: Error.dummy).isRejected) - XCTAssertFalse(Promise().isRejected) - } - - @available(macOS 10.10, iOS 2.0, tvOS 10.0, watchOS 2.0, *) - func testDispatchQueueAsyncExtensionReturnsPromise() { - let ex = expectation(description: "") - - DispatchQueue.global().async(.promise) { () -> Int in - XCTAssertFalse(Thread.isMainThread) - return 1 - }.done { one in - XCTAssertEqual(one, 1) - ex.fulfill() - } - - waitForExpectations(timeout: 1) - } - - @available(macOS 10.10, iOS 2.0, tvOS 10.0, watchOS 2.0, *) - func testDispatchQueueAsyncExtensionCanThrowInBody() { - let ex = expectation(description: "") - - DispatchQueue.global().async(.promise) { () -> Int in - throw Error.dummy - }.done { _ in - XCTFail() - }.catch { _ in - ex.fulfill() - } - - waitForExpectations(timeout: 1) - } - - func testCustomStringConvertible() { - XCTAssertEqual(Promise.pending().promise.debugDescription, "Promise.pending(handlers: 0)") - XCTAssertEqual(Promise().debugDescription, "Promise<()>.fulfilled(())") - XCTAssertEqual(Promise(error: Error.dummy).debugDescription, "Promise.rejected(Error.dummy)") - - XCTAssertEqual("\(Promise.pending().promise)", "Promise(…Int)") - XCTAssertEqual("\(Promise.value(3))", "Promise(3)") - XCTAssertEqual("\(Promise(error: Error.dummy))", "Promise(dummy)") - } - - func testCannotFulfillWithError() { - - // sadly this test proves the opposite :( - // left here so maybe one day we can prevent instantiation of `Promise` - - _ = Promise { seal in - seal.fulfill(Error.dummy) - } - - _ = Promise.pending() - - _ = Promise.value(Error.dummy) - - _ = Promise().map { Error.dummy } - } - -#if swift(>=3.1) - func testCanMakeVoidPromise() { - _ = Promise() - _ = Guarantee() - } -#endif - - enum Error: Swift.Error { - case dummy - } - - func testThrowInInitializer() { - let p = Promise { _ in - throw Error.dummy - } - XCTAssertTrue(p.isRejected) - guard let err = p.error, case Error.dummy = err else { return XCTFail() } - } - - func testThrowInFirstly() { - let ex = expectation(description: "") - - firstly { () -> Promise in - throw Error.dummy - }.catch { - XCTAssertEqual($0 as? Error, Error.dummy) - ex.fulfill() - } - - wait(for: [ex], timeout: 10) - } - - func testWait() throws { - let p = after(.milliseconds(100)).then(on: nil){ Promise.value(1) } - XCTAssertEqual(try p.wait(), 1) - - do { - let p = after(.milliseconds(100)).map(on: nil){ throw Error.dummy } - try p.wait() - XCTFail() - } catch { - XCTAssertEqual(error as? Error, Error.dummy) - } - } - - func testPipeForResolved() { - let ex = expectation(description: "") - Promise.value(1).done { - XCTAssertEqual(1, $0) - ex.fulfill() - }.silenceWarning() - wait(for: [ex], timeout: 10) - } - - #if swift(>=3.1) - func testNoAmbiguityForValue() { - let ex = expectation(description: "") - let a = Promise.value - let b = Promise.value(Void()) - let c = Promise.value(()) - when(fulfilled: a, b, c).done { - ex.fulfill() - }.cauterize() - wait(for: [ex], timeout: 10) - } - #endif -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/RaceTests.swift b/Carthage/Checkouts/PromiseKit/Tests/CorePromise/RaceTests.swift deleted file mode 100644 index 45d7ef0b7..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/RaceTests.swift +++ /dev/null @@ -1,91 +0,0 @@ -import XCTest -import PromiseKit - -class RaceTests: XCTestCase { - func test1() { - let ex = expectation(description: "") - race(after(.milliseconds(10)).then{ Promise.value(1) }, after(seconds: 1).map{ 2 }).done { index in - XCTAssertEqual(index, 1) - ex.fulfill() - }.silenceWarning() - waitForExpectations(timeout: 1, handler: nil) - } - - func test2() { - let ex = expectation(description: "") - race(after(seconds: 1).map{ 1 }, after(.milliseconds(10)).map{ 2 }).done { index in - XCTAssertEqual(index, 2) - ex.fulfill() - } - waitForExpectations(timeout: 1, handler: nil) - } - - func test1Array() { - let ex = expectation(description: "") - let promises = [after(.milliseconds(10)).map{ 1 }, after(seconds: 1).map{ 2 }] - race(promises).done { index in - XCTAssertEqual(index, 1) - ex.fulfill() - }.silenceWarning() - waitForExpectations(timeout: 1, handler: nil) - } - - func test2Array() { - let ex = expectation(description: "") - race(after(seconds: 1).map{ 1 }, after(.milliseconds(10)).map{ 2 }).done { index in - XCTAssertEqual(index, 2) - ex.fulfill() - } - waitForExpectations(timeout: 1, handler: nil) - } - - func testEmptyArray() { - let ex = expectation(description: "") - let empty = [Promise]() - race(empty).catch { - guard case PMKError.badInput = $0 else { return XCTFail() } - ex.fulfill() - } - wait(for: [ex], timeout: 10) - } - - func testFulfilled() { - enum Error: Swift.Error { case test1, test2, test3 } - let ex = expectation(description: "") - let promises: [Promise] = [after(seconds: 1).map { _ in throw Error.test1 }, after(seconds: 2).map { _ in throw Error.test2 }, after(seconds: 5).map { 1 }, after(seconds: 4).map { 2 }, after(seconds: 3).map { _ in throw Error.test3 }] - race(fulfilled: promises).done { - XCTAssertEqual($0, 2) - ex.fulfill() - }.catch { _ in - XCTFail() - ex.fulfill() - } - wait(for: [ex], timeout: 10) - } - - func testFulfilledEmptyArray() { - let ex = expectation(description: "") - let empty = [Promise]() - race(fulfilled: empty).catch { - guard case PMKError.badInput = $0 else { return XCTFail() } - ex.fulfill() - } - wait(for: [ex], timeout: 10) - } - - func testFulfilledWithNoWinner() { - enum Error: Swift.Error { case test1, test2 } - let ex = expectation(description: "") - let promises: [Promise] = [after(seconds: 1).map { _ in throw Error.test1 }, after(seconds: 2).map { _ in throw Error.test2 }] - race(fulfilled: promises).done { _ in - XCTFail() - ex.fulfill() - }.catch { - guard let pmkError = $0 as? PMKError else { return XCTFail() } - guard case .noWinner = pmkError else { return XCTFail() } - guard pmkError.debugDescription == "All thenables passed to race(fulfilled:) were rejected" else { return XCTFail() } - ex.fulfill() - } - wait(for: [ex], timeout: 10) - } -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/RegressionTests.swift b/Carthage/Checkouts/PromiseKit/Tests/CorePromise/RegressionTests.swift deleted file mode 100644 index 8bcb1a009..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/RegressionTests.swift +++ /dev/null @@ -1,27 +0,0 @@ -import PromiseKit -import XCTest - -class RegressionTests: XCTestCase { - func testReturningPreviousPromiseWorks() { - - // regression test because we were doing this wrong - // in our A+ tests implementation for spec: 2.3.1 - - do { - let promise1 = Promise() - let promise2 = promise1.then(on: nil) { promise1 } - promise2.catch(on: nil) { _ in XCTFail() } - } - do { - enum Error: Swift.Error { case dummy } - - let promise1 = Promise(error: Error.dummy) - let promise2 = promise1.recover(on: nil) { _ in promise1 } - promise2.catch(on: nil) { err in - if case PMKError.returnedSelf = err { - XCTFail() - } - } - } - } -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/ResolverTests.swift b/Carthage/Checkouts/PromiseKit/Tests/CorePromise/ResolverTests.swift deleted file mode 100644 index 63b35322d..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/ResolverTests.swift +++ /dev/null @@ -1,234 +0,0 @@ -import PromiseKit -import XCTest - -class WrapTests: XCTestCase { - fileprivate class KittenFetcher { - let value: Int? - let error: Error? - - init(value: Int?, error: Error?) { - self.value = value - self.error = error - } - - func fetchWithCompletionBlock(block: @escaping(Int?, Error?) -> Void) { - after(.milliseconds(20)).done { - block(self.value, self.error) - } - } - - func fetchWithCompletionBlock2(block: @escaping(Error?, Int?) -> Void) { - after(.milliseconds(20)).done { - block(self.error, self.value) - } - } - - func fetchWithCompletionBlock3(block: @escaping(Int, Error?) -> Void) { - after(.milliseconds(20)).done { - block(self.value ?? -99, self.error) - } - } - - func fetchWithCompletionBlock4(block: @escaping(Error?) -> Void) { - after(.milliseconds(20)).done { - block(self.error) - } - } - -#if swift(>=5.0) - func fetchWithCompletionBlock5(block: @escaping(Swift.Result) -> Void) { - after(.milliseconds(20)).done { - if let value = self.value { - block(.success(value)) - } else { - block(.failure(self.error!)) - } - } - } -#endif - } - - func testSuccess() { - let ex = expectation(description: "") - let kittenFetcher = KittenFetcher(value: 2, error: nil) - Promise { seal in - kittenFetcher.fetchWithCompletionBlock(block: seal.resolve) - }.done { - XCTAssertEqual($0, 2) - ex.fulfill() - }.silenceWarning() - - waitForExpectations(timeout: 1) - } - - func testError() { - let ex = expectation(description: "") - - let kittenFetcher = KittenFetcher(value: nil, error: Error.test) - Promise { seal in - kittenFetcher.fetchWithCompletionBlock(block: seal.resolve) - }.catch { error in - defer { ex.fulfill() } - guard case Error.test = error else { - return XCTFail() - } - } - - waitForExpectations(timeout: 1) - } - - func testInvalidCallingConvention() { - let ex = expectation(description: "") - - let kittenFetcher = KittenFetcher(value: nil, error: nil) - Promise { seal in - kittenFetcher.fetchWithCompletionBlock(block: seal.resolve) - }.catch { error in - defer { ex.fulfill() } - guard case PMKError.invalidCallingConvention = error else { - return XCTFail() - } - } - - waitForExpectations(timeout: 1) - } - - func testInvertedCallingConvention() { - let ex = expectation(description: "") - let kittenFetcher = KittenFetcher(value: 2, error: nil) - Promise { seal in - kittenFetcher.fetchWithCompletionBlock2(block: seal.resolve) - }.done { - XCTAssertEqual($0, 2) - ex.fulfill() - }.silenceWarning() - - waitForExpectations(timeout: 1) - - } - - func testNonOptionalFirstParameter() { - let ex1 = expectation(description: "") - let kf1 = KittenFetcher(value: 2, error: nil) - Promise { seal in - kf1.fetchWithCompletionBlock3(block: seal.resolve) - }.done { - XCTAssertEqual($0, 2) - ex1.fulfill() - }.silenceWarning() - - let ex2 = expectation(description: "") - let kf2 = KittenFetcher(value: -100, error: Error.test) - Promise { seal in - kf2.fetchWithCompletionBlock3(block: seal.resolve) - }.catch { _ in ex2.fulfill() } - - wait(for: [ex1, ex2] ,timeout: 1) - } - -#if swift(>=3.1) - func testVoidCompletionValue() { - let ex1 = expectation(description: "") - let kf1 = KittenFetcher(value: nil, error: nil) - Promise { seal in - kf1.fetchWithCompletionBlock4(block: seal.resolve) - }.done(ex1.fulfill).silenceWarning() - - let ex2 = expectation(description: "") - let kf2 = KittenFetcher(value: nil, error: Error.test) - Promise { seal in - kf2.fetchWithCompletionBlock4(block: seal.resolve) - }.catch { _ in ex2.fulfill() } - - wait(for: [ex1, ex2], timeout: 1) - } -#endif - - func testSwiftResultSuccess() { - #if swift(>=5.0) - let ex = expectation(description: "") - let kittenFetcher = KittenFetcher(value: 2, error: nil) - Promise { seal in - kittenFetcher.fetchWithCompletionBlock5(block: seal.resolve) - }.done { - XCTAssertEqual($0, 2) - ex.fulfill() - }.silenceWarning() - - waitForExpectations(timeout: 1) - #endif - } - - func testSwiftResultError() { - #if swift(>=5.0) - let ex = expectation(description: "") - - let kittenFetcher = KittenFetcher(value: nil, error: Error.test) - Promise { seal in - kittenFetcher.fetchWithCompletionBlock5(block: seal.resolve) - }.catch { error in - defer { ex.fulfill() } - guard case Error.test = error else { - return XCTFail() - } - } - - waitForExpectations(timeout: 1) - #endif - } - - func testIsFulfilled() { - XCTAssertTrue(Promise.value(()).result?.isFulfilled ?? false) - XCTAssertFalse(Promise(error: Error.test).result?.isFulfilled ?? true) - } - - func testPendingPromiseDeallocated() { - - // NOTE this doesn't seem to register the `deinit` as covered :( - // BUT putting a breakpoint in the deinit CLEARLY shows it getting covered… - - class Foo { - let p = Promise.pending() - var ex: XCTestExpectation! - - deinit { - after(.milliseconds(100)).done(ex.fulfill) - } - } - - let ex = expectation(description: "") - do { - // for code coverage report for `Resolver.deinit` warning - let foo = Foo() - foo.ex = ex - } - wait(for: [ex], timeout: 10) - } - - func testVoidResolverFulfillAmbiguity() { - #if !swift(>=5) && swift(>=4.1) || swift(>=3.3) && !swift(>=4.0) - // ^^ this doesn’t work with Swift < 3.3 for some reason - // ^^ this doesn’t work with Swift 5.0-beta1 for some reason - - // reference: https://github.com/mxcl/PromiseKit/issues/990 - - func foo(success: () -> Void, failure: (Error) -> Void) { - success() - } - - func bar() -> Promise { - return Promise { (seal: Resolver) in - foo(success: seal.fulfill, failure: seal.reject) - } - } - - let ex = expectation(description: "") - bar().done(ex.fulfill).cauterize() - wait(for: [ex], timeout: 10) - #endif - } -} - -private enum Error: Swift.Error { - case test -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/StressTests.swift b/Carthage/Checkouts/PromiseKit/Tests/CorePromise/StressTests.swift deleted file mode 100644 index 787e485d0..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/StressTests.swift +++ /dev/null @@ -1,78 +0,0 @@ -import PromiseKit -import Dispatch -import XCTest - -class StressTests: XCTestCase { - func testThenDataRace() { - let e1 = expectation(description: "") - - //will crash if then doesn't protect handlers - stressDataRace(expectation: e1, stressFunction: { promise in - promise.done { s in - XCTAssertEqual("ok", s) - return - }.silenceWarning() - }, fulfill: { "ok" }) - - waitForExpectations(timeout: 10, handler: nil) - } - - @available(macOS 10.10, iOS 2.0, tvOS 10.0, watchOS 2.0, *) - func testThensAreSequentialForLongTime() { - var values = [Int]() - let ex = expectation(description: "") - var promise = DispatchQueue.global().async(.promise){ 0 } - let N = 1000 - for x in 1.. Guarantee in - values.append(y) - XCTAssertEqual(x - 1, y) - return DispatchQueue.global().async(.promise) { x } - } - } - promise.done { x in - values.append(x) - XCTAssertEqual(values, (0..(expectation e1: XCTestExpectation, iterations: Int = 1000, stressFactor: Int = 10, stressFunction: @escaping (Promise) -> Void, fulfill f: @escaping () -> T) { - let group = DispatchGroup() - let queue = DispatchQueue(label: "the.domain.of.Zalgo", attributes: .concurrent) - - for _ in 0...pending() - - DispatchQueue.concurrentPerform(iterations: stressFactor) { n in - stressFunction(promise) - } - - queue.async(group: group) { - seal.fulfill(f()) - } - } - - group.notify(queue: queue, execute: e1.fulfill) -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/ThenableTests.swift b/Carthage/Checkouts/PromiseKit/Tests/CorePromise/ThenableTests.swift deleted file mode 100644 index f004455f6..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/ThenableTests.swift +++ /dev/null @@ -1,249 +0,0 @@ -import PromiseKit -import Dispatch -import XCTest - -struct Person: Equatable { - let name: String - let age: Int? - let isStudent: Bool - - init( - name: String = "", - age: Int? = nil, - isStudent: Bool = false - ) { - self.name = name - self.age = age - self.isStudent = isStudent - } -} - -class ThenableTests: XCTestCase { - func testGet() { - let ex1 = expectation(description: "") - let ex2 = expectation(description: "") - Promise.value(1).get { - XCTAssertEqual($0, 1) - ex1.fulfill() - }.done { - XCTAssertEqual($0, 1) - ex2.fulfill() - }.silenceWarning() - wait(for: [ex1, ex2], timeout: 10) - } - - func testMap() { - let ex = expectation(description: "") - Promise.value(1).map { - $0 * 2 - }.done { - XCTAssertEqual($0, 2) - ex.fulfill() - }.silenceWarning() - wait(for: [ex], timeout: 10) - } - - func testMapByKeyPath() { - let ex = expectation(description: "") - Promise.value(Person(name: "Max")).map(\.name).done { - XCTAssertEqual($0, "Max") - ex.fulfill() - }.silenceWarning() - wait(for: [ex], timeout: 10) - } - - func testCompactMap() { - let ex = expectation(description: "") - Promise.value(1.0).compactMap { - Int($0) - }.done { - XCTAssertEqual($0, 1) - ex.fulfill() - }.silenceWarning() - wait(for: [ex], timeout: 10) - } - - func testCompactMapThrows() { - - enum E: Error { case dummy } - - let ex = expectation(description: "") - Promise.value("a").compactMap { x -> Int in - throw E.dummy - }.catch { - if case E.dummy = $0 {} else { - XCTFail() - } - ex.fulfill() - } - wait(for: [ex], timeout: 10) - } - - func testRejectedPromiseCompactMap() { - - enum E: Error { case dummy } - - let ex = expectation(description: "") - Promise(error: E.dummy).compactMap { - Int($0) - }.catch { - if case E.dummy = $0 {} else { - XCTFail() - } - ex.fulfill() - } - wait(for: [ex], timeout: 10) - } - - func testPMKErrorCompactMap() { - let ex = expectation(description: "") - Promise.value("a").compactMap { - Int($0) - }.catch { - if case PMKError.compactMap = $0 {} else { - XCTFail() - } - ex.fulfill() - } - wait(for: [ex], timeout: 10) - } - - func testCompactMapByKeyPath() { - let ex = expectation(description: "") - Promise.value(Person(name: "Roman", age: 26)).compactMap(\.age).done { - XCTAssertEqual($0, 26) - ex.fulfill() - }.silenceWarning() - wait(for: [ex], timeout: 10) - } - - func testMapValues() { - let ex = expectation(description: "") - Promise.value([14, 20, 45]).mapValues { - $0 * 2 - }.done { - XCTAssertEqual([28, 40, 90], $0) - ex.fulfill() - }.silenceWarning() - wait(for: [ex], timeout: 10) - } - - func testMapValuesByKeyPath() { - let ex = expectation(description: "") - Promise.value([Person(name: "Max"), Person(name: "Roman"), Person(name: "John")]).mapValues(\.name).done { - XCTAssertEqual(["Max", "Roman", "John"], $0) - ex.fulfill() - }.silenceWarning() - wait(for: [ex], timeout: 10) - } - - func testCompactMapValues() { - let ex = expectation(description: "") - Promise.value(["1","2","a","4"]).compactMapValues { - Int($0) - }.done { - XCTAssertEqual([1,2,4], $0) - ex.fulfill() - }.silenceWarning() - wait(for: [ex], timeout: 10) - } - - func testCompactMapValuesByKeyPath() { - let ex = expectation(description: "") - Promise.value([Person(name: "Max"), Person(name: "Roman", age: 26), Person(name: "John", age: 23)]).compactMapValues(\.age).done { - XCTAssertEqual([26, 23], $0) - ex.fulfill() - }.silenceWarning() - wait(for: [ex], timeout: 10) - } - - func testThenMap() { - let ex = expectation(description: "") - Promise.value([1,2,3,4]).thenMap { - Promise.value($0) - }.done { - XCTAssertEqual([1,2,3,4], $0) - ex.fulfill() - }.silenceWarning() - wait(for: [ex], timeout: 10) - } - - func testThenFlatMap() { - let ex = expectation(description: "") - Promise.value([1,2,3,4]).thenFlatMap { - Promise.value([$0, $0]) - }.done { - XCTAssertEqual([1,1,2,2,3,3,4,4], $0) - ex.fulfill() - }.silenceWarning() - wait(for: [ex], timeout: 10) - } - - func testFilterValues() { - let ex = expectation(description: "") - Promise.value([Person(name: "Max"), Person(name: "Roman", age: 26, isStudent: false), Person(name: "John", age: 23, isStudent: true)]).filterValues { - $0.isStudent - }.done { - XCTAssertEqual([Person(name: "John", age: 23, isStudent: true)], $0) - ex.fulfill() - }.silenceWarning() - wait(for: [ex], timeout: 10) - } - - func testFilterValuesByKeyPath() { - let ex = expectation(description: "") - Promise.value([Person(name: "Max"), Person(name: "Roman", age: 26, isStudent: false), Person(name: "John", age: 23, isStudent: true)]).filterValues(\.isStudent).done { - XCTAssertEqual([Person(name: "John", age: 23, isStudent: true)], $0) - ex.fulfill() - }.silenceWarning() - wait(for: [ex], timeout: 10) - } - - func testLastValueForEmpty() { - XCTAssertTrue(Promise.value([]).lastValue.isRejected) - } - - func testFirstValueForEmpty() { - XCTAssertTrue(Promise.value([]).firstValue.isRejected) - } - - func testThenOffRejected() { - // surprisingly missing in our CI, mainly due to - // extensive use of `done` in A+ tests since PMK 5 - - let ex = expectation(description: "") - Promise(error: PMKError.badInput).then { x -> Promise in - XCTFail() - return .value(x) - }.catch { _ in - ex.fulfill() - } - wait(for: [ex], timeout: 10) - } - - func testBarrier() { - let ex = expectation(description: "") - let q = DispatchQueue(label: "\(#file):\(#line)", attributes: .concurrent) - Promise.value(1).done(on: q, flags: .barrier) { - XCTAssertEqual($0, 1) - dispatchPrecondition(condition: .onQueueAsBarrier(q)) - ex.fulfill() - }.catch { _ in - XCTFail() - } - wait(for: [ex], timeout: 10) - } - - func testDispatchFlagsSyntax() { - let ex = expectation(description: "") - let q = DispatchQueue(label: "\(#file):\(#line)", attributes: .concurrent) - Promise.value(1).done(on: q, flags: [.barrier, .inheritQoS]) { - XCTAssertEqual($0, 1) - dispatchPrecondition(condition: .onQueueAsBarrier(q)) - ex.fulfill() - }.catch { _ in - XCTFail() - } - wait(for: [ex], timeout: 10) - } -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/Utilities.swift b/Carthage/Checkouts/PromiseKit/Tests/CorePromise/Utilities.swift deleted file mode 100644 index 6e9bce694..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/Utilities.swift +++ /dev/null @@ -1,33 +0,0 @@ -import PromiseKit - -extension Promise { - func silenceWarning() {} -} - -#if os(Linux) -import func CoreFoundation._CFIsMainThread - -extension Thread { - // `isMainThread` is not implemented yet in swift-corelibs-foundation. - static var isMainThread: Bool { - return _CFIsMainThread() - } -} - -import XCTest - -extension XCTestCase { - func wait(for: [XCTestExpectation], timeout: TimeInterval, file: StaticString = #file, line: UInt = #line) { - #if !(swift(>=4.0) && !swift(>=4.1)) - let line = Int(line) - #endif - waitForExpectations(timeout: timeout, file: file, line: line) - } -} - -extension XCTestExpectation { - func fulfill() { - fulfill(#file, line: #line) - } -} -#endif diff --git a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/WhenConcurrentTests.swift b/Carthage/Checkouts/PromiseKit/Tests/CorePromise/WhenConcurrentTests.swift deleted file mode 100644 index 1b2c8179f..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/WhenConcurrentTests.swift +++ /dev/null @@ -1,190 +0,0 @@ -import XCTest -import PromiseKit - -class WhenConcurrentTestCase_Swift: XCTestCase { - - func testWhen() { - let e = expectation(description: "") - - var numbers = (0..<42).makeIterator() - let squareNumbers = numbers.map { $0 * $0 } - - let generator = AnyIterator> { - guard let number = numbers.next() else { - return nil - } - - return after(.milliseconds(10)).map { - return number * number - } - } - - when(fulfilled: generator, concurrently: 5).done { numbers in - if numbers == squareNumbers { - e.fulfill() - } - }.silenceWarning() - - waitForExpectations(timeout: 3, handler: nil) - } - - func testWhenEmptyGenerator() { - let e = expectation(description: "") - - let generator = AnyIterator> { - return nil - } - - when(fulfilled: generator, concurrently: 5).done { numbers in - if numbers.count == 0 { - e.fulfill() - } - }.silenceWarning() - - waitForExpectations(timeout: 1, handler: nil) - } - - func testWhenGeneratorError() { - enum LocalError: Error { - case Unknown - case DivisionByZero - } - - let expectedErrorIndex = 42 - let expectedError = LocalError.DivisionByZero - - let e = expectation(description: "") - - var numbers = (-expectedErrorIndex..> { - guard let number = numbers.next() else { - return nil - } - - return after(.milliseconds(10)).then { _ -> Promise in - if number != 0 { - return Promise(error: expectedError) - } else { - return .value(100500 / number) - } - } - } - - when(fulfilled: generator, concurrently: 3) - .catch { error in - guard let error = error as? LocalError else { - return - } - guard case .DivisionByZero = error else { - return - } - e.fulfill() - } - - waitForExpectations(timeout: 3, handler: nil) - } - - func testWhenConcurrency() { - let expectedConcurrently = 4 - var currentConcurrently = 0 - var maxConcurrently = 0 - - let e = expectation(description: "") - - var numbers = (0..<42).makeIterator() - - let generator = AnyIterator> { - currentConcurrently += 1 - maxConcurrently = max(maxConcurrently, currentConcurrently) - - guard let number = numbers.next() else { - return nil - } - - return after(.milliseconds(10)).then(on: .main) { _ -> Promise in - currentConcurrently -= 1 - return .value(number * number) - } - } - - when(fulfilled: generator, concurrently: expectedConcurrently).done { _ in - XCTAssertEqual(expectedConcurrently, maxConcurrently) - e.fulfill() - }.silenceWarning() - - waitForExpectations(timeout: 3) - } - - func testWhenConcurrencyLessThanZero() { - let generator = AnyIterator> { XCTFail(); return nil } - - let p1 = when(fulfilled: generator, concurrently: 0) - let p2 = when(fulfilled: generator, concurrently: -1) - - guard let e1 = p1.error else { return XCTFail() } - guard let e2 = p2.error else { return XCTFail() } - guard case PMKError.badInput = e1 else { return XCTFail() } - guard case PMKError.badInput = e2 else { return XCTFail() } - } - - func testStopsDequeueingOnceRejected() { - let ex = expectation(description: "") - enum Error: Swift.Error { case dummy } - - var x: UInt = 0 - let generator = AnyIterator> { - x += 1 - switch x { - case 0: - fatalError() - case 1: - return Promise() - case 2: - return Promise(error: Error.dummy) - case _: - XCTFail() - return nil - } - } - - when(fulfilled: generator, concurrently: 1).done { - XCTFail("\($0)") - }.catch { error in - ex.fulfill() - } - - waitForExpectations(timeout: 3) - } - - func testWhenResolvedContinuesWhenRejected() { - #if swift(>=5.3) - let ex = expectation(description: "") - enum Error: Swift.Error { case dummy } - - var x: UInt = 0 - let generator = AnyIterator> { - x += 1 - switch x { - case 0: - fatalError() - case 1: - return Promise() - case 2: - return Promise(error: Error.dummy) - case 3: - return Promise() - case _: - return nil - } - } - - when(resolved: generator, concurrently: 1).done { results in - XCTAssertEqual(results.count, 3) - ex.fulfill() - } - - waitForExpectations(timeout: 3) - #endif - } -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/WhenResolvedTests.swift b/Carthage/Checkouts/PromiseKit/Tests/CorePromise/WhenResolvedTests.swift deleted file mode 100644 index 32bda7bb7..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/WhenResolvedTests.swift +++ /dev/null @@ -1,41 +0,0 @@ -// Created by Austin Feight on 3/19/16. -// Copyright © 2016 Max Howell. All rights reserved. - -import PromiseKit -import XCTest - -class JoinTests: XCTestCase { - func testImmediates() { - let successPromise = Promise() - - var joinFinished = false - when(resolved: successPromise).done(on: nil) { _ in joinFinished = true } - XCTAssert(joinFinished, "Join immediately finishes on fulfilled promise") - - let promise2 = Promise.value(2) - let promise3 = Promise.value(3) - let promise4 = Promise.value(4) - var join2Finished = false - when(resolved: promise2, promise3, promise4).done(on: nil) { _ in join2Finished = true } - XCTAssert(join2Finished, "Join immediately finishes on fulfilled promises") - } - - func testFulfilledAfterAllResolve() { - let (promise1, seal1) = Promise.pending() - let (promise2, seal2) = Promise.pending() - let (promise3, seal3) = Promise.pending() - - var finished = false - when(resolved: promise1, promise2, promise3).done(on: nil) { _ in finished = true } - XCTAssertFalse(finished, "Not all promises have resolved") - - seal1.fulfill_() - XCTAssertFalse(finished, "Not all promises have resolved") - - seal2.fulfill_() - XCTAssertFalse(finished, "Not all promises have resolved") - - seal3.fulfill_() - XCTAssert(finished, "All promises have resolved") - } -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/WhenTests.swift b/Carthage/Checkouts/PromiseKit/Tests/CorePromise/WhenTests.swift deleted file mode 100644 index 9a6781ac7..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/WhenTests.swift +++ /dev/null @@ -1,267 +0,0 @@ -import PromiseKit -import Dispatch -import XCTest - -class WhenTests: XCTestCase { - - func testEmpty() { - let e1 = expectation(description: "") - let promises: [Promise] = [] - when(fulfilled: promises).done { _ in - e1.fulfill() - }.silenceWarning() - - let e2 = expectation(description: "") - when(resolved: promises).done { _ in - e2.fulfill() - }.silenceWarning() - - wait(for: [e1, e2], timeout: 1) - } - - func testInt() { - let e1 = expectation(description: "") - let p1 = Promise.value(1) - let p2 = Promise.value(2) - let p3 = Promise.value(3) - let p4 = Promise.value(4) - - when(fulfilled: [p1, p2, p3, p4]).done { x in - XCTAssertEqual(x[0], 1) - XCTAssertEqual(x[1], 2) - XCTAssertEqual(x[2], 3) - XCTAssertEqual(x[3], 4) - XCTAssertEqual(x.count, 4) - e1.fulfill() - }.silenceWarning() - waitForExpectations(timeout: 1, handler: nil) - } - - func testDoubleTuple() { - let e1 = expectation(description: "") - let p1 = Promise.value(1) - let p2 = Promise.value("abc") - when(fulfilled: p1, p2).done{ x, y in - XCTAssertEqual(x, 1) - XCTAssertEqual(y, "abc") - e1.fulfill() - }.silenceWarning() - waitForExpectations(timeout: 1, handler: nil) - } - - func testTripleTuple() { - let e1 = expectation(description: "") - let p1 = Promise.value(1) - let p2 = Promise.value("abc") - let p3 = Promise.value( 1.0) - when(fulfilled: p1, p2, p3).done { u, v, w in - XCTAssertEqual(1, u) - XCTAssertEqual("abc", v) - XCTAssertEqual(1.0, w) - e1.fulfill() - }.silenceWarning() - waitForExpectations(timeout: 1, handler: nil) - } - - func testQuadrupleTuple() { - let e1 = expectation(description: "") - let p1 = Promise.value(1) - let p2 = Promise.value("abc") - let p3 = Promise.value(1.0) - let p4 = Promise.value(true) - when(fulfilled: p1, p2, p3, p4).done { u, v, w, x in - XCTAssertEqual(1, u) - XCTAssertEqual("abc", v) - XCTAssertEqual(1.0, w) - XCTAssertEqual(true, x) - e1.fulfill() - }.silenceWarning() - waitForExpectations(timeout: 1, handler: nil) - } - - func testQuintupleTuple() { - let e1 = expectation(description: "") - let p1 = Promise.value(1) - let p2 = Promise.value("abc") - let p3 = Promise.value(1.0) - let p4 = Promise.value(true) - let p5 = Promise.value("a" as Character) - when(fulfilled: p1, p2, p3, p4, p5).done { u, v, w, x, y in - XCTAssertEqual(1, u) - XCTAssertEqual("abc", v) - XCTAssertEqual(1.0, w) - XCTAssertEqual(true, x) - XCTAssertEqual("a" as Character, y) - e1.fulfill() - }.silenceWarning() - waitForExpectations(timeout: 1, handler: nil) - } - - func testVoid() { - let e1 = expectation(description: "") - let p1 = Promise.value(1).done { _ in } - let p2 = Promise.value(2).done { _ in } - let p3 = Promise.value(3).done { _ in } - let p4 = Promise.value(4).done { _ in } - - when(fulfilled: p1, p2, p3, p4).done(e1.fulfill).silenceWarning() - - waitForExpectations(timeout: 1, handler: nil) - } - - func testRejected() { - enum Error: Swift.Error { case dummy } - - let e1 = expectation(description: "") - let p1 = after(.milliseconds(100)).map{ true } - let p2: Promise = after(.milliseconds(200)).map{ throw Error.dummy } - let p3 = Promise.value(false) - - when(fulfilled: p1, p2, p3).catch { _ in - e1.fulfill() - } - - waitForExpectations(timeout: 1, handler: nil) - } - - func testProgress() { - let ex = expectation(description: "") - - XCTAssertNil(Progress.current()) - - let p1 = after(.milliseconds(10)) - let p2 = after(.milliseconds(20)) - let p3 = after(.milliseconds(30)) - let p4 = after(.milliseconds(40)) - - let progress = Progress(totalUnitCount: 1) - progress.becomeCurrent(withPendingUnitCount: 1) - - when(fulfilled: p1, p2, p3, p4).done { _ in - XCTAssertEqual(progress.completedUnitCount, 1) - ex.fulfill() - }.silenceWarning() - - progress.resignCurrent() - - waitForExpectations(timeout: 1, handler: nil) - } - - func testProgressDoesNotExceed100Percent() { - let ex1 = expectation(description: "") - let ex2 = expectation(description: "") - - XCTAssertNil(Progress.current()) - - let p1 = after(.milliseconds(10)) - let p2 = after(.milliseconds(20)).done { throw NSError(domain: "a", code: 1, userInfo: nil) } - let p3 = after(.milliseconds(30)) - let p4 = after(.milliseconds(40)) - - let progress = Progress(totalUnitCount: 1) - progress.becomeCurrent(withPendingUnitCount: 1) - - let promise = when(fulfilled: p1, p2, p3, p4) - - progress.resignCurrent() - - promise.catch { _ in - ex2.fulfill() - } - - var x = 0 - func finally() { - x += 1 - if x == 4 { - XCTAssertLessThanOrEqual(1, progress.fractionCompleted) - XCTAssertEqual(progress.completedUnitCount, 1) - ex1.fulfill() - } - } - - let q = DispatchQueue.main - p1.done(on: q, finally) - p2.ensure(on: q, finally).silenceWarning() - p3.done(on: q, finally) - p4.done(on: q, finally) - - waitForExpectations(timeout: 1, handler: nil) - } - - func testUnhandledErrorHandlerDoesNotFire() { - enum Error: Swift.Error { - case test - } - - let ex = expectation(description: "") - let p1 = Promise(error: Error.test) - let p2 = after(.milliseconds(100)) - when(fulfilled: p1, p2).done{ _ in XCTFail() }.catch { error in - XCTAssertTrue(error as? Error == Error.test) - ex.fulfill() - } - - waitForExpectations(timeout: 1, handler: nil) - } - - func testUnhandledErrorHandlerDoesNotFireForStragglers() { - enum Error: Swift.Error { - case test - case straggler - } - - let ex1 = expectation(description: "") - let ex2 = expectation(description: "") - let ex3 = expectation(description: "") - - let p1 = Promise(error: Error.test) - let p2 = after(.milliseconds(100)).done { throw Error.straggler } - let p3 = after(.milliseconds(200)).done { throw Error.straggler } - - let whenFulfilledP1P2P3: Promise<(Void, Void, Void)> = when(fulfilled: p1, p2, p3) - whenFulfilledP1P2P3.catch { error -> Void in - XCTAssertTrue(Error.test == error as? Error) - ex1.fulfill() - } - - p2.ensure { after(.milliseconds(100)).done(ex2.fulfill) }.silenceWarning() - p3.ensure { after(.milliseconds(100)).done(ex3.fulfill) }.silenceWarning() - - waitForExpectations(timeout: 1, handler: nil) - } - - func testAllSealedRejectedFirstOneRejects() { - enum Error: Swift.Error { - case test1 - case test2 - case test3 - } - - let ex = expectation(description: "") - let p1 = Promise(error: Error.test1) - let p2 = Promise(error: Error.test2) - let p3 = Promise(error: Error.test3) - - let whenFulfilledP1P2P3: Promise = when(fulfilled: p1, p2, p3) - whenFulfilledP1P2P3.catch { error in - XCTAssertTrue(error as? Error == Error.test1) - ex.fulfill() - } - - waitForExpectations(timeout: 1) - } - - func testGuaranteeWhen() { - let ex1 = expectation(description: "") - when(Guarantee(), Guarantee()).done { - ex1.fulfill() - } - - let ex2 = expectation(description: "") - when(guarantees: [Guarantee(), Guarantee()]).done { - ex2.fulfill() - } - - wait(for: [ex1, ex2], timeout: 10) - } -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/XCTestManifests.swift b/Carthage/Checkouts/PromiseKit/Tests/CorePromise/XCTestManifests.swift deleted file mode 100644 index 9ba889f08..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/XCTestManifests.swift +++ /dev/null @@ -1,311 +0,0 @@ -#if !canImport(ObjectiveC) -import XCTest - -extension AfterTests { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__AfterTests = [ - ("testNegative", testNegative), - ("testPositive", testPositive), - ("testZero", testZero), - ] -} - -extension CancellationTests { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__CancellationTests = [ - ("testBridgeToNSError", testBridgeToNSError), - ("testCancellation", testCancellation), - ("testDoesntCrashSwift", testDoesntCrashSwift), - ("testFoundationBridging1", testFoundationBridging1), - ("testFoundationBridging2", testFoundationBridging2), - ("testIsCancelled", testIsCancelled), - ("testRecoverWithCancellation", testRecoverWithCancellation), - ("testThrowCancellableErrorThatIsNotCancelled", testThrowCancellableErrorThatIsNotCancelled), - ] -} - -extension CatchableTests { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__CatchableTests = [ - ("test__conditional_recover", test__conditional_recover), - ("test__conditional_recover__fulfilled_path", test__conditional_recover__fulfilled_path), - ("test__conditional_recover__ignores_cancellation_but_fed_cancellation", test__conditional_recover__ignores_cancellation_but_fed_cancellation), - ("test__conditional_recover__no_recover", test__conditional_recover__no_recover), - ("test__full_recover", test__full_recover), - ("test__full_recover__fulfilled_path", test__full_recover__fulfilled_path), - ("test__void_specialized_conditional_recover", test__void_specialized_conditional_recover), - ("test__void_specialized_conditional_recover__fulfilled_path", test__void_specialized_conditional_recover__fulfilled_path), - ("test__void_specialized_conditional_recover__ignores_cancellation_but_fed_cancellation", test__void_specialized_conditional_recover__ignores_cancellation_but_fed_cancellation), - ("test__void_specialized_conditional_recover__no_recover", test__void_specialized_conditional_recover__no_recover), - ("test__void_specialized_full_recover", test__void_specialized_full_recover), - ("test__void_specialized_full_recover__fulfilled_path", test__void_specialized_full_recover__fulfilled_path), - ("testCauterize", testCauterize), - ("testEnsureThen_Error", testEnsureThen_Error), - ("testEnsureThen_Value", testEnsureThen_Value), - ("testFinally", testFinally), - ] -} - -extension GuaranteeTests { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__GuaranteeTests = [ - ("testCompactMapValues", testCompactMapValues), - ("testCompactMapValuesByKeyPath", testCompactMapValuesByKeyPath), - ("testFilterValues", testFilterValues), - ("testFilterValuesByKeyPath", testFilterValuesByKeyPath), - ("testFlatMapValues", testFlatMapValues), - ("testInit", testInit), - ("testMap", testMap), - ("testMapByKeyPath", testMapByKeyPath), - ("testMapValues", testMapValues), - ("testMapValuesByKeyPath", testMapValuesByKeyPath), - ("testNoAmbiguityForValue", testNoAmbiguityForValue), - ("testSorted", testSorted), - ("testSortedBy", testSortedBy), - ("testThenFlatMap", testThenFlatMap), - ("testThenMap", testThenMap), - ("testWait", testWait), - ] -} - -extension HangTests { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__HangTests = [ - ("test", test), - ("testError", testError), - ] -} - -extension JoinTests { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__JoinTests = [ - ("testFulfilledAfterAllResolve", testFulfilledAfterAllResolve), - ("testImmediates", testImmediates), - ] -} - -extension LoggingTests { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__LoggingTests = [ - ("testCauterizeIsLogged", testCauterizeIsLogged), - ("testGuaranteeWaitOnMainThreadLogged", testGuaranteeWaitOnMainThreadLogged), - ("testLogging", testLogging), - ("testPendingGuaranteeDeallocatedIsLogged", testPendingGuaranteeDeallocatedIsLogged), - ("testPendingPromiseDeallocatedIsLogged", testPendingPromiseDeallocatedIsLogged), - ("testPromiseWaitOnMainThreadLogged", testPromiseWaitOnMainThreadLogged), - ] -} - -extension PMKDefaultDispatchQueueTest { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__PMKDefaultDispatchQueueTest = [ - ("testOverrodeDefaultAlwaysQueue", testOverrodeDefaultAlwaysQueue), - ("testOverrodeDefaultCatchQueue", testOverrodeDefaultCatchQueue), - ("testOverrodeDefaultThenQueue", testOverrodeDefaultThenQueue), - ] -} - -extension PMKErrorTests { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__PMKErrorTests = [ - ("testCustomDebugStringConvertible", testCustomDebugStringConvertible), - ("testCustomStringConvertible", testCustomStringConvertible), - ] -} - -extension PromiseTests { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__PromiseTests = [ - ("testCanMakeVoidPromise", testCanMakeVoidPromise), - ("testCannotFulfillWithError", testCannotFulfillWithError), - ("testCustomStringConvertible", testCustomStringConvertible), - ("testDispatchQueueAsyncExtensionCanThrowInBody", testDispatchQueueAsyncExtensionCanThrowInBody), - ("testDispatchQueueAsyncExtensionReturnsPromise", testDispatchQueueAsyncExtensionReturnsPromise), - ("testIsFulfilled", testIsFulfilled), - ("testIsPending", testIsPending), - ("testIsRejected", testIsRejected), - ("testIsResolved", testIsResolved), - ("testNoAmbiguityForValue", testNoAmbiguityForValue), - ("testPipeForResolved", testPipeForResolved), - ("testThrowInFirstly", testThrowInFirstly), - ("testThrowInInitializer", testThrowInInitializer), - ("testWait", testWait), - ] -} - -extension RaceTests { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__RaceTests = [ - ("test1", test1), - ("test1Array", test1Array), - ("test2", test2), - ("test2Array", test2Array), - ("testEmptyArray", testEmptyArray), - ("testFulfilled", testFulfilled), - ("testFulfilledEmptyArray", testFulfilledEmptyArray), - ("testFulfilledWithNoWinner", testFulfilledWithNoWinner), - ] -} - -extension RegressionTests { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__RegressionTests = [ - ("testReturningPreviousPromiseWorks", testReturningPreviousPromiseWorks), - ] -} - -extension StressTests { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__StressTests = [ - ("testThenDataRace", testThenDataRace), - ("testThensAreSequentialForLongTime", testThensAreSequentialForLongTime), - ("testZalgoDataRace", testZalgoDataRace), - ] -} - -extension ThenableTests { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__ThenableTests = [ - ("testBarrier", testBarrier), - ("testCompactMap", testCompactMap), - ("testCompactMapByKeyPath", testCompactMapByKeyPath), - ("testCompactMapThrows", testCompactMapThrows), - ("testCompactMapValues", testCompactMapValues), - ("testCompactMapValuesByKeyPath", testCompactMapValuesByKeyPath), - ("testDispatchFlagsSyntax", testDispatchFlagsSyntax), - ("testFilterValues", testFilterValues), - ("testFilterValuesByKeyPath", testFilterValuesByKeyPath), - ("testFirstValueForEmpty", testFirstValueForEmpty), - ("testGet", testGet), - ("testLastValueForEmpty", testLastValueForEmpty), - ("testMap", testMap), - ("testMapByKeyPath", testMapByKeyPath), - ("testMapValues", testMapValues), - ("testMapValuesByKeyPath", testMapValuesByKeyPath), - ("testPMKErrorCompactMap", testPMKErrorCompactMap), - ("testRejectedPromiseCompactMap", testRejectedPromiseCompactMap), - ("testThenFlatMap", testThenFlatMap), - ("testThenMap", testThenMap), - ("testThenOffRejected", testThenOffRejected), - ] -} - -extension WhenConcurrentTestCase_Swift { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__WhenConcurrentTestCase_Swift = [ - ("testStopsDequeueingOnceRejected", testStopsDequeueingOnceRejected), - ("testWhen", testWhen), - ("testWhenConcurrency", testWhenConcurrency), - ("testWhenConcurrencyLessThanZero", testWhenConcurrencyLessThanZero), - ("testWhenEmptyGenerator", testWhenEmptyGenerator), - ("testWhenGeneratorError", testWhenGeneratorError), - ("testWhenResolvedContinuesWhenRejected", testWhenResolvedContinuesWhenRejected), - ] -} - -extension WhenTests { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__WhenTests = [ - ("testAllSealedRejectedFirstOneRejects", testAllSealedRejectedFirstOneRejects), - ("testDoubleTuple", testDoubleTuple), - ("testEmpty", testEmpty), - ("testGuaranteeWhen", testGuaranteeWhen), - ("testInt", testInt), - ("testProgress", testProgress), - ("testProgressDoesNotExceed100Percent", testProgressDoesNotExceed100Percent), - ("testQuadrupleTuple", testQuadrupleTuple), - ("testQuintupleTuple", testQuintupleTuple), - ("testRejected", testRejected), - ("testTripleTuple", testTripleTuple), - ("testUnhandledErrorHandlerDoesNotFire", testUnhandledErrorHandlerDoesNotFire), - ("testUnhandledErrorHandlerDoesNotFireForStragglers", testUnhandledErrorHandlerDoesNotFireForStragglers), - ("testVoid", testVoid), - ] -} - -extension WrapTests { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__WrapTests = [ - ("testError", testError), - ("testInvalidCallingConvention", testInvalidCallingConvention), - ("testInvertedCallingConvention", testInvertedCallingConvention), - ("testIsFulfilled", testIsFulfilled), - ("testNonOptionalFirstParameter", testNonOptionalFirstParameter), - ("testPendingPromiseDeallocated", testPendingPromiseDeallocated), - ("testSuccess", testSuccess), - ("testSwiftResultError", testSwiftResultError), - ("testSwiftResultSuccess", testSwiftResultSuccess), - ("testVoidCompletionValue", testVoidCompletionValue), - ("testVoidResolverFulfillAmbiguity", testVoidResolverFulfillAmbiguity), - ] -} - -extension ZalgoTests { - // DO NOT MODIFY: This is autogenerated, use: - // `swift test --generate-linuxmain` - // to regenerate. - static let __allTests__ZalgoTests = [ - ("test1", test1), - ("test2", test2), - ("test3", test3), - ("test4", test4), - ] -} - -public func __allTests() -> [XCTestCaseEntry] { - return [ - testCase(AfterTests.__allTests__AfterTests), - testCase(CancellationTests.__allTests__CancellationTests), - testCase(CatchableTests.__allTests__CatchableTests), - testCase(GuaranteeTests.__allTests__GuaranteeTests), - testCase(HangTests.__allTests__HangTests), - testCase(JoinTests.__allTests__JoinTests), - testCase(LoggingTests.__allTests__LoggingTests), - testCase(PMKDefaultDispatchQueueTest.__allTests__PMKDefaultDispatchQueueTest), - testCase(PMKErrorTests.__allTests__PMKErrorTests), - testCase(PromiseTests.__allTests__PromiseTests), - testCase(RaceTests.__allTests__RaceTests), - testCase(RegressionTests.__allTests__RegressionTests), - testCase(StressTests.__allTests__StressTests), - testCase(ThenableTests.__allTests__ThenableTests), - testCase(WhenConcurrentTestCase_Swift.__allTests__WhenConcurrentTestCase_Swift), - testCase(WhenTests.__allTests__WhenTests), - testCase(WrapTests.__allTests__WrapTests), - testCase(ZalgoTests.__allTests__ZalgoTests), - ] -} -#endif diff --git a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/ZalgoTests.swift b/Carthage/Checkouts/PromiseKit/Tests/CorePromise/ZalgoTests.swift deleted file mode 100644 index e3909b4d2..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/CorePromise/ZalgoTests.swift +++ /dev/null @@ -1,59 +0,0 @@ -import XCTest -import PromiseKit - -class ZalgoTests: XCTestCase { - func test1() { - var resolved = false - Promise.value(1).done(on: nil) { _ in - resolved = true - }.silenceWarning() - XCTAssertTrue(resolved) - } - - func test2() { - let p1 = Promise.value(1).map(on: nil) { x in - return 2 - } - XCTAssertEqual(p1.value!, 2) - - var x = 0 - - let (p2, seal) = Promise.pending() - p2.done(on: nil) { _ in - x = 1 - }.silenceWarning() - XCTAssertEqual(x, 0) - - seal.fulfill(1) - XCTAssertEqual(x, 1) - } - - // returning a pending promise from its own zalgo’d then handler doesn’t hang - func test3() { - let ex = (expectation(description: ""), expectation(description: "")) - - var p1: Promise! - p1 = after(.milliseconds(100)).then(on: nil) { _ -> Promise in - ex.0.fulfill() - return p1 - } - - p1.catch { err in - defer{ ex.1.fulfill() } - guard case PMKError.returnedSelf = err else { return XCTFail() } - } - - waitForExpectations(timeout: 1) - } - - // return a sealed promise from its own zalgo’d then handler doesn’t hang - func test4() { - let ex = expectation(description: "") - let p1 = Promise.value(1) - p1.then(on: nil) { _ -> Promise in - ex.fulfill() - return p1 - }.silenceWarning() - waitForExpectations(timeout: 1) - } -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/DeprecationTests.swift b/Carthage/Checkouts/PromiseKit/Tests/DeprecationTests.swift deleted file mode 100644 index d382ce85e..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/DeprecationTests.swift +++ /dev/null @@ -1,158 +0,0 @@ -import PromiseKit -import XCTest - -class DeprecationTests: XCTestCase { - func testWrap1() { - let dummy = 10 - - func completion(_ body: (_ a: Int?, _ b: Error?) -> Void) { - body(dummy, nil) - } - - let ex = expectation(description: "") - wrap(completion).done { - XCTAssertEqual($0, dummy) - ex.fulfill() - } - wait(for: [ex], timeout: 10) - } - - func testWrap2() { - let dummy = 10 - - func completion(_ body: (_ a: Int, _ b: Error?) -> Void) { - body(dummy, nil) - } - - let ex = expectation(description: "") - wrap(completion).done { - XCTAssertEqual($0, dummy) - ex.fulfill() - } - wait(for: [ex], timeout: 10) - } - - func testWrap3() { - let dummy = 10 - - func completion(_ body: (_ a: Error?, _ b: Int?) -> Void) { - body(nil, dummy) - } - - let ex = expectation(description: "") - wrap(completion).done { - XCTAssertEqual($0, dummy) - ex.fulfill() - } - wait(for: [ex], timeout: 10) - } - - func testWrap4() { - let dummy = 10 - - func completion(_ body: (_ a: Error?) -> Void) { - body(nil) - } - - let ex = expectation(description: "") - wrap(completion).done { - ex.fulfill() - } - wait(for: [ex], timeout: 10) - } - - func testWrap5() { - let dummy = 10 - - func completion(_ body: (_ a: Int) -> Void) { - body(dummy) - } - - let ex = expectation(description: "") - wrap(completion).done { - XCTAssertEqual($0, dummy) - ex.fulfill() - } - wait(for: [ex], timeout: 10) - } - - func testAlways() { - let ex = expectation(description: "") - Promise.value(1).always(execute: ex.fulfill) - wait(for: [ex], timeout: 10) - } - -#if PMKFullDeprecations - func testFlatMap() { - let ex = expectation(description: "") - Promise.value(1).flatMap { _ -> Int? in - nil - }.catch { - //TODO should be `flatMap`, but how to enact that without causing - // compiler to warn when building PromiseKit for end-users? LOL - guard case PMKError.compactMap = $0 else { return XCTFail() } - ex.fulfill() - } - wait(for: [ex], timeout: 10) - } - - func testSequenceMap() { - let ex = expectation(description: "") - Promise.value([1, 2]).map { - $0 + 1 - }.done { - XCTAssertEqual($0, [2, 3]) - ex.fulfill() - }.silenceWarning() - wait(for: [ex], timeout: 10) - } - - func testSequenceFlatMap() { - let ex = expectation(description: "") - Promise.value([1, 2]).flatMap { - [$0 + 1, $0 + 2] - }.done { - XCTAssertEqual($0, [2, 3, 3, 4]) - ex.fulfill() - }.silenceWarning() - wait(for: [ex], timeout: 10) - } -#endif - - func testSequenceFilter() { - let ex = expectation(description: "") - Promise.value([0, 1, 2, 3]).filter { - $0 < 2 - }.done { - XCTAssertEqual($0, [0, 1]) - ex.fulfill() - }.silenceWarning() - wait(for: [ex], timeout: 10) - } - - func testSorted() { - let ex = expectation(description: "") - Promise.value([5, 2, 1, 8]).sorted().done { - XCTAssertEqual($0, [1,2,5,8]) - ex.fulfill() - } - wait(for: [ex], timeout: 10) - } - - func testFirst() { - XCTAssertEqual(Promise.value([1,2]).first.value, 1) - } - - func testLast() { - XCTAssertEqual(Promise.value([1,2]).last.value, 2) - } - - func testPMKErrorFlatMap() { - XCTAssertNotNil(PMKError.flatMap(1, Int.self).errorDescription) - } -} - - -extension Promise { - func silenceWarning() {} -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/JS-A+/.gitignore b/Carthage/Checkouts/PromiseKit/Tests/JS-A+/.gitignore deleted file mode 100644 index 6c0be0cef..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/JS-A+/.gitignore +++ /dev/null @@ -1,63 +0,0 @@ -# From https://github.com/github/gitignore/blob/master/Node.gitignore - -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# Typescript v1 declaration files -typings/ - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env - -# next.js build output -.next diff --git a/Carthage/Checkouts/PromiseKit/Tests/JS-A+/AllTests.swift b/Carthage/Checkouts/PromiseKit/Tests/JS-A+/AllTests.swift deleted file mode 100644 index a1fd6445e..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/JS-A+/AllTests.swift +++ /dev/null @@ -1,84 +0,0 @@ -// -// AllTests.swift -// PMKJSA+Tests -// -// Created by Lois Di Qual on 2/28/18. -// - -#if swift(>=3.2) - -import XCTest -import PromiseKit -import JavaScriptCore - -class AllTests: XCTestCase { - - func testAll() { - - let scriptPath = URL(fileURLWithPath: #file).deletingLastPathComponent().appendingPathComponent("build/build.js") - guard FileManager.default.fileExists(atPath: scriptPath.path) else { - return print("Skipping JS-A+: see README for instructions on how to build") - } - - guard let script = try? String(contentsOf: scriptPath) else { - return XCTFail("Couldn't read content of test suite JS file") - } - - let context = JSUtils.sharedContext - - // Add a global exception handler - context.exceptionHandler = { context, exception in - guard let exception = exception else { - return XCTFail("Unknown JS exception") - } - JSUtils.printStackTrace(exception: exception, includeExceptionDescription: true) - } - - // Setup mock functions (timers, console.log, etc) - let environment = MockNodeEnvironment() - environment.setup(with: context) - - // Expose JSPromise in the javascript context - context.setObject(JSPromise.self, forKeyedSubscript: "JSPromise" as NSString) - - // Create adapter - guard let adapter = JSValue(object: NSDictionary(), in: context) else { - fatalError("Couldn't create adapter") - } - adapter.setObject(JSAdapter.resolved, forKeyedSubscript: "resolved" as NSString) - adapter.setObject(JSAdapter.rejected, forKeyedSubscript: "rejected" as NSString) - adapter.setObject(JSAdapter.deferred, forKeyedSubscript: "deferred" as NSString) - - // Evaluate contents of `build.js`, which exposes `runTests` in the global context - context.evaluateScript(script) - guard let runTests = context.objectForKeyedSubscript("runTests") else { - return XCTFail("Couldn't find `runTests` in JS context") - } - - // Create a callback that's called whenever there's a failure - let onFail: @convention(block) (JSValue, JSValue) -> Void = { test, error in - guard let test = test.toString(), let error = error.toString() else { - return XCTFail("Unknown test failure") - } - XCTFail("\(test) failed: \(error)") - } - let onFailValue: JSValue = JSValue(object: onFail, in: context) - - // Create a new callback that we'll send to `runTest` so that it notifies when tests are done running. - let expectation = self.expectation(description: "async") - let onDone: @convention(block) (JSValue) -> Void = { failures in - expectation.fulfill() - } - let onDoneValue: JSValue = JSValue(object: onDone, in: context) - - // If there's a need to only run one specific test, uncomment the next line and comment the one after - // let testName: JSValue = JSValue(object: "2.3.1", in: context) - let testName = JSUtils.undefined - - // Call `runTests` - runTests.call(withArguments: [adapter, onFailValue, onDoneValue, testName]) - self.wait(for: [expectation], timeout: 60) - } -} - -#endif diff --git a/Carthage/Checkouts/PromiseKit/Tests/JS-A+/JSAdapter.swift b/Carthage/Checkouts/PromiseKit/Tests/JS-A+/JSAdapter.swift deleted file mode 100644 index 6dcbe74c6..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/JS-A+/JSAdapter.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// JSAdapter.swift -// PMKJSA+Tests -// -// Created by Lois Di Qual on 3/2/18. -// - -import Foundation -import JavaScriptCore -import PromiseKit - -enum JSAdapter { - - static let resolved: @convention(block) (JSValue) -> JSPromise = { value in - return JSPromise(promise: .value(value)) - } - - static let rejected: @convention(block) (JSValue) -> JSPromise = { reason in - let error = JSUtils.JSError(reason: reason) - let promise = Promise(error: error) - return JSPromise(promise: promise) - } - - static let deferred: @convention(block) () -> JSValue = { - - let context = JSContext.current() - - guard let object = JSValue(object: NSDictionary(), in: context) else { - fatalError("Couldn't create object") - } - - let pendingPromise = Promise.pending() - let jsPromise = JSPromise(promise: pendingPromise.promise) - - // promise - object.setObject(jsPromise, forKeyedSubscript: "promise" as NSString) - - // resolve - let resolve: @convention(block) (JSValue) -> Void = { value in - pendingPromise.resolver.fulfill(value) - } - object.setObject(resolve, forKeyedSubscript: "resolve" as NSString) - - // reject - let reject: @convention(block) (JSValue) -> Void = { reason in - let error = JSUtils.JSError(reason: reason) - pendingPromise.resolver.reject(error) - } - object.setObject(reject, forKeyedSubscript: "reject" as NSString) - - return object - } -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/JS-A+/JSPromise.swift b/Carthage/Checkouts/PromiseKit/Tests/JS-A+/JSPromise.swift deleted file mode 100644 index 70381fd86..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/JS-A+/JSPromise.swift +++ /dev/null @@ -1,94 +0,0 @@ -// -// JSPromise.swift -// PMKJSA+Tests -// -// Created by Lois Di Qual on 3/1/18. -// - -import Foundation -import XCTest -import PromiseKit -import JavaScriptCore - -@objc protocol JSPromiseProtocol: JSExport { - func then(_: JSValue, _: JSValue) -> JSPromise -} - -class JSPromise: NSObject, JSPromiseProtocol { - - let promise: Promise - - init(promise: Promise) { - self.promise = promise - } - - func then(_ onFulfilled: JSValue, _ onRejected: JSValue) -> JSPromise { - - // Keep a reference to the returned promise so we can comply to 2.3.1 - var returnedPromiseRef: Promise? - - let afterFulfill = promise.then { value -> Promise in - - // 2.2.1: ignored if not a function - guard JSUtils.isFunction(value: onFulfilled) else { - return .value(value) - } - - // Call `onFulfilled` - // 2.2.5: onFulfilled/onRejected must be called as functions (with no `this` value) - guard let returnValue = try JSUtils.call(function: onFulfilled, arguments: [JSUtils.undefined, value]) else { - return .value(value) - } - - // Extract JSPromise.promise if available, or use plain return value - if let jsPromise = returnValue.toObjectOf(JSPromise.self) as? JSPromise { - - // 2.3.1: if returned value is the promise that `then` returned, throw TypeError - if jsPromise.promise === returnedPromiseRef { - throw JSUtils.JSError(reason: JSUtils.typeError(message: "Returned self")) - } - return jsPromise.promise - } else { - return .value(returnValue) - } - } - - let afterReject = promise.recover { error -> Promise in - - // 2.2.1: ignored if not a function - guard let jsError = error as? JSUtils.JSError, JSUtils.isFunction(value: onRejected) else { - throw error - } - - // Call `onRejected` - // 2.2.5: onFulfilled/onRejected must be called as functions (with no `this` value) - guard let returnValue = try JSUtils.call(function: onRejected, arguments: [JSUtils.undefined, jsError.reason]) else { - throw error - } - - // Extract JSPromise.promise if available, or use plain return value - if let jsPromise = returnValue.toObjectOf(JSPromise.self) as? JSPromise { - - // 2.3.1: if returned value is the promise that `then` returned, throw TypeError - if jsPromise.promise === returnedPromiseRef { - throw JSUtils.JSError(reason: JSUtils.typeError(message: "Returned self")) - } - return jsPromise.promise - } else { - return .value(returnValue) - } - } - - let newPromise = Promise> { resolver in - _ = promise.tap(resolver.fulfill) - }.then(on: nil) { result -> Promise in - switch result { - case .fulfilled: return afterFulfill - case .rejected: return afterReject - } - } - returnedPromiseRef = newPromise - - return JSPromise(promise: newPromise) - } -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/JS-A+/JSUtils.swift b/Carthage/Checkouts/PromiseKit/Tests/JS-A+/JSUtils.swift deleted file mode 100644 index d08a44b49..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/JS-A+/JSUtils.swift +++ /dev/null @@ -1,116 +0,0 @@ -// -// JSUtils.swift -// PMKJSA+Tests -// -// Created by Lois Di Qual on 3/2/18. -// - -import Foundation -import JavaScriptCore - -enum JSUtils { - - class JSError: Error { - let reason: JSValue - init(reason: JSValue) { - self.reason = reason - } - } - - static let sharedContext: JSContext = { - guard let context = JSContext() else { - fatalError("Couldn't create JS context") - } - return context - }() - - static var undefined: JSValue { - guard let undefined = JSValue(undefinedIn: JSUtils.sharedContext) else { - fatalError("Couldn't create `undefined` value") - } - return undefined - } - - static func typeError(message: String) -> JSValue { - let message = message.replacingOccurrences(of: "\"", with: "\\\"") - let script = "new TypeError(\"\(message)\")" - guard let result = sharedContext.evaluateScript(script) else { - fatalError("Couldn't create TypeError") - } - return result - } - - // @warning: relies on lodash to be present - static func isFunction(value: JSValue) -> Bool { - guard let context = value.context else { - return false - } - guard let lodash = context.objectForKeyedSubscript("_") else { - fatalError("Couldn't get lodash in JS context") - } - guard let result = lodash.invokeMethod("isFunction", withArguments: [value]) else { - fatalError("Couldn't invoke _.isFunction") - } - return result.toBool() - } - - // Calls a JS function using `Function.prototype.call` and throws any potential exception wrapped in a JSError - static func call(function: JSValue, arguments: [JSValue]) throws -> JSValue? { - - let context = JSUtils.sharedContext - - // Create a new exception handler that will store a potential exception - // thrown in the handler. Save the value of the old handler. - var caughtException: JSValue? - let savedExceptionHandler = context.exceptionHandler - context.exceptionHandler = { context, exception in - caughtException = exception - } - - // Call the handler - let returnValue = function.invokeMethod("call", withArguments: arguments) - context.exceptionHandler = savedExceptionHandler - - // If an exception was caught, throw it - if let exception = caughtException { - throw JSError(reason: exception) - } - - return returnValue - } - - static func printCurrentStackTrace() { - guard let exception = JSUtils.sharedContext.evaluateScript("new Error()") else { - return print("Couldn't get current stack trace") - } - printStackTrace(exception: exception, includeExceptionDescription: false) - } - - static func printStackTrace(exception: JSValue, includeExceptionDescription: Bool) { - guard let lineNumber = exception.objectForKeyedSubscript("line"), - let column = exception.objectForKeyedSubscript("column"), - let message = exception.objectForKeyedSubscript("message"), - let stacktrace = exception.objectForKeyedSubscript("stack")?.toString() else { - return print("Couldn't print stack trace") - } - - if includeExceptionDescription { - print("JS Exception at \(lineNumber):\(column): \(message)") - } - - let lines = stacktrace.split(separator: "\n").map { "\t> \($0)" }.joined(separator: "\n") - print(lines) - } -} - -#if !swift(>=3.2) -extension String { - func split(separator: Character, omittingEmptySubsequences: Bool = true) -> [String] { - return characters.split(separator: separator, omittingEmptySubsequences: omittingEmptySubsequences).map(String.init) - } - - var first: Character? { - return characters.first - } -} -#endif diff --git a/Carthage/Checkouts/PromiseKit/Tests/JS-A+/MockNodeEnvironment.swift b/Carthage/Checkouts/PromiseKit/Tests/JS-A+/MockNodeEnvironment.swift deleted file mode 100644 index 82808fe51..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/JS-A+/MockNodeEnvironment.swift +++ /dev/null @@ -1,129 +0,0 @@ -// -// MockNodeEnvironment.swift -// PMKJSA+Tests -// -// Created by Lois Di Qual on 3/1/18. -// - -#if swift(>=3.2) - -import Foundation -import JavaScriptCore - -class MockNodeEnvironment { - - private var timers: [UInt32: Timer] = [:] - - func setup(with context: JSContext) { - - // console.log / console.error - setupConsole(context: context) - - // setTimeout - let setTimeout: @convention(block) (JSValue, Double) -> UInt32 = { function, intervalMs in - let timerID = self.addTimer(interval: intervalMs / 1000, repeats: false, function: function) - return timerID - } - context.setObject(setTimeout, forKeyedSubscript: "setTimeout" as NSString) - - // clearTimeout - let clearTimeout: @convention(block) (JSValue) -> Void = { timeoutID in - guard timeoutID.isNumber else { - return - } - self.removeTimer(timerID: timeoutID.toUInt32()) - } - context.setObject(clearTimeout, forKeyedSubscript: "clearTimeout" as NSString) - - // setInterval - let setInterval: @convention(block) (JSValue, Double) -> UInt32 = { function, intervalMs in - let timerID = self.addTimer(interval: intervalMs / 1000, repeats: true, function: function) - return timerID - } - context.setObject(setInterval, forKeyedSubscript: "setInterval" as NSString) - - // clearInterval - let clearInterval: @convention(block) (JSValue) -> Void = { intervalID in - guard intervalID.isNumber else { - return - } - self.removeTimer(timerID: intervalID.toUInt32()) - } - context.setObject(clearInterval, forKeyedSubscript: "clearInterval" as NSString) - } - - private func setupConsole(context: JSContext) { - - guard let console = context.objectForKeyedSubscript("console") else { - fatalError("Couldn't get global `console` object") - } - - let consoleLog: @convention(block) () -> Void = { - guard let arguments = JSContext.currentArguments(), let format = arguments.first as? JSValue else { - return - } - - let otherArguments = arguments.dropFirst() - if otherArguments.count == 0 { - print(format) - } else { - - let otherArguments = otherArguments.compactMap { $0 as? JSValue } - let format = format.toString().replacingOccurrences(of: "%s", with: "%@") - let expectedTypes = format.split(separator: "%", omittingEmptySubsequences: false).dropFirst().compactMap { $0.first }.map { String($0) } - - let typedArguments = otherArguments.enumerated().compactMap { index, value -> CVarArg? in - let expectedType = expectedTypes[index] - let converted: CVarArg - switch expectedType { - case "s": converted = value.toString() - case "d": converted = value.toInt32() - case "f": converted = value.toDouble() - default: converted = value.toString() - } - return converted - } - - let output = String(format: format, arguments: typedArguments) - print(output) - } - } - console.setObject(consoleLog, forKeyedSubscript: "log" as NSString) - console.setObject(consoleLog, forKeyedSubscript: "error" as NSString) - } - - private func addTimer(interval: TimeInterval, repeats: Bool, function: JSValue) -> UInt32 { - let block = BlockOperation { - DispatchQueue.main.async { - function.call(withArguments: []) - } - } - let timer = Timer.scheduledTimer(timeInterval: interval, target: block, selector: #selector(Operation.main), userInfo: nil, repeats: repeats) - let rawHash = UUID().uuidString.hashValue - #if swift(>=4.0) - let hash = UInt32(truncatingIfNeeded: rawHash) - #else - let hash = UInt32(truncatingBitPattern: rawHash) - #endif - timers[hash] = timer - return hash - } - - private func removeTimer(timerID: UInt32) { - guard let timer = timers[timerID] else { - return print("Couldn't find timer \(timerID)") - } - timer.invalidate() - timers[timerID] = nil - } -} - - -#if swift(>=4.0) && !swift(>=4.1) || !swift(>=3.3) -extension Sequence { - func compactMap(_ transform: (Self.Element) throws -> T?) rethrows -> [T] { - return try flatMap(transform) - } -} -#endif -#endif diff --git a/Carthage/Checkouts/PromiseKit/Tests/JS-A+/README.md b/Carthage/Checkouts/PromiseKit/Tests/JS-A+/README.md deleted file mode 100644 index 05ab7f9e1..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/JS-A+/README.md +++ /dev/null @@ -1,75 +0,0 @@ -Promises/A+ Compliance Test Suite (JavaScript) -============================================== - -What is this? -------------- - -This contains the necessary Swift and JS files to run the Promises/A+ compliance test suite from PromiseKit's unit tests. - - - Promise/A+ Spec: - - Compliance Test Suite: - -Run tests ---------- - -``` -$ npm install -$ npm run build -``` - -then open `PromiseKit.xcodeproj` and run the `PMKJSA+Tests` unit test scheme. - -Known limitations ------------------ - -See `ignoredTests` in `index.js`. - - - - 2.3.3 is disabled: Otherwise, if x is an object or function. This spec is a NOOP for Swift: - - We have decided not to interact with other Promises A+ implementations - - functions cannot have properties - -Upgrade the test suite ----------------------- - -``` -$ npm install --save promises-aplus-tests@latest -$ npm run build -``` - -Develop -------- - -JavaScriptCore is a bit tedious to work with so here are a couple tips in case you're trying to debug the test suite. - -If you're editing JS files, enable live rebuilds: - -``` -$ npm run watch -``` - -If you're editing Swift files, a couple things you can do: - - - You can adjust `testName` in `AllTests.swift` to only run one test suite - - You can call `JSUtils.printCurrentStackTrace()` at any time. It won't contain line numbers but some of the frame names might help. - -How it works ------------- - -The Promises/A+ test suite is written in JavaScript but PromiseKit is written in Swift/ObjC. For the test suite to run against swift code, we expose a promise wrapper `JSPromise` inside a JavaScriptCore context. This is done in a regular XCTestCase. - -Since JavaScriptCore doesn't support CommonJS imports, we inline all the JavaScript code into `build/build.js` using webpack. This includes all the npm dependencies (`promises-aplus-tests`, `mocha`, `sinon`, etc) as well as the glue code in `index.js`. - -`build.js` exposes one global variable `runTests(adapter, onFail, onDone, [testName])`. In our XCTestCase, a shared JavaScriptCore context is created, `build.js` is evaluated and now `runTests` is accessible from the Swift context. - -In our swift test, we create a JS-bridged `JSPromise` which only has one method `then(onFulfilled, onRejected) -> Promise`. It wraps a swift `Promise` and delegates call `then` calls to it. - -An [adapter](https://github.com/promises-aplus/promises-tests#adapters) – plain JS object which provides `revoled(value), rejected(reason), and deferred()` – is passed to `runTests` to run the whole JavaScript test suite. - -Errors and end events are reported back to Swift and piped to `XCTFail()` if necessary. - -Since JavaScriptCore isn't a node/web environment, there is quite a bit of stubbing necessary for all this to work: - - - The `fs` module is stubbed with an empty function - - `console.log` redirects to `Swift.print` and provides only basic format parsing - - `setTimeout/setInterval` are implemented with `Swift.Timer` behind the scenes and stored in a `[TimerID: Timer]` map. diff --git a/Carthage/Checkouts/PromiseKit/Tests/JS-A+/index.js b/Carthage/Checkouts/PromiseKit/Tests/JS-A+/index.js deleted file mode 100644 index d18e04683..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/JS-A+/index.js +++ /dev/null @@ -1,42 +0,0 @@ -const _ = require('lodash') -require('mocha') - -// Ignored by design -const ignoredTests = [ - '2.3.3' -] - -module.exports = function(adapter, onFail, onDone, testName) { - - global.adapter = adapter - const mocha = new Mocha({ ui: 'bdd' }) - - // Require all tests - console.log('Loading test files') - const requireTest = require.context('promises-aplus-tests/lib/tests', false, /\.js$/) - requireTest.keys().forEach(file => { - - let currentTestName = _.replace(_.replace(file, './', ''), '.js', '') - if (testName && currentTestName !== testName) { - return - } - - if (_.includes(ignoredTests, currentTestName)) { - return - } - - console.log(`\t${currentTestName}`) - mocha.suite.emit('pre-require', global, file, mocha) - mocha.suite.emit('require', requireTest(file), file, mocha) - mocha.suite.emit('post-require', global, file, mocha) - }) - - const runner = mocha.run(failures => { - onDone(failures) - }) - - runner.on('fail', (test, err) => { - console.error(err) - onFail(test.title, err) - }) -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/JS-A+/package-lock.json b/Carthage/Checkouts/PromiseKit/Tests/JS-A+/package-lock.json deleted file mode 100644 index 273f8002e..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/JS-A+/package-lock.json +++ /dev/null @@ -1,8036 +0,0 @@ -{ - "requires": true, - "lockfileVersion": 1, - "dependencies": { - "@sinonjs/formatio": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", - "integrity": "sha512-ls6CAMA6/5gG+O/IdsBcblvnd8qcO/l1TYoNeAzp3wcISOxlPXQEus0mLcdwazEkWjaBdaJ3TaxmNgCLWwvWzg==", - "requires": { - "samsam": "1.3.0" - }, - "dependencies": { - "samsam": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.3.0.tgz", - "integrity": "sha512-1HwIYD/8UlOtFS3QO3w7ey+SdSDFE4HRNLZoZRYVQefrOY3l17epswImeB1ijgJFQJodIaHcwkp3r/myBjFVbg==" - } - } - }, - "acorn": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.0.tgz", - "integrity": "sha512-arn53F07VXmls4o4pUhSzBa4fvaagPRe7AVZ8l7NHxFWUie2DsuFSBMMNAkgzRlOhEhzAnxeKyaWVzOH4xqp/g==" - }, - "acorn-dynamic-import": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz", - "integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==", - "requires": { - "acorn": "^5.0.0" - } - }, - "ajv": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.2.0.tgz", - "integrity": "sha1-r6wpW7qgFSRJ5SJ0LkVHwa6TKNI=", - "requires": { - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" - } - }, - "ajv-keywords": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.1.0.tgz", - "integrity": "sha1-rCsnk5xUPpXSwG5/f1wnvkqlQ74=" - }, - "ansi-escapes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.0.0.tgz", - "integrity": "sha512-O/klc27mWNUigtv0F8NJWbLF00OcegQalkqKURWdosW08YZKi4m6CnSUSvIZG1otNJbTWhN01Hhz389DW7mvDQ==" - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "ansi-styles": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", - "requires": { - "color-convert": "^1.9.0" - } - }, - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - } - }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" - }, - "argv": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/argv/-/argv-0.0.2.tgz", - "integrity": "sha1-7L0W+JSbFXGDcRsb2jNPN4QBhas=" - }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" - }, - "array-differ": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", - "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=" - }, - "array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "requires": { - "array-uniq": "^1.0.1" - } - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" - }, - "asn1": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", - "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" - }, - "asn1.js": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", - "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", - "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "assert": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", - "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", - "requires": { - "util": "0.10.3" - } - }, - "assert-plus": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", - "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=" - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" - }, - "ast-types": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.10.1.tgz", - "integrity": "sha512-UY7+9DPzlJ9VM8eY0b2TUZcZvF+1pO0hzMtAyjBYKhOmnvRlqYNYnWdtsMj0V16CGaMlpL0G1jnLbLo4AyotuQ==" - }, - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" - }, - "async-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", - "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=" - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "atob": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.0.3.tgz", - "integrity": "sha1-GcenYEc3dEaPILLS0DNyrX1Mv10=" - }, - "aws-sign2": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", - "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=" - }, - "aws4": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", - "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" - }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", - "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } - } - }, - "babel-core": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz", - "integrity": "sha1-rzL3izGm/O8RnIew/Y2XU/A6C7g=", - "requires": { - "babel-code-frame": "^6.26.0", - "babel-generator": "^6.26.0", - "babel-helpers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-register": "^6.26.0", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "convert-source-map": "^1.5.0", - "debug": "^2.6.8", - "json5": "^0.5.1", - "lodash": "^4.17.4", - "minimatch": "^3.0.4", - "path-is-absolute": "^1.0.1", - "private": "^0.1.7", - "slash": "^1.0.0", - "source-map": "^0.5.6" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "babel-generator": { - "version": "6.26.1", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", - "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", - "requires": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.7", - "trim-right": "^1.0.1" - }, - "dependencies": { - "jsesc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", - "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=" - } - } - }, - "babel-helper-bindify-decorators": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.24.1.tgz", - "integrity": "sha1-FMGeXxQte0fxmlJDHlKxzLxAozA=", - "requires": { - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helper-builder-binary-assignment-operator-visitor": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz", - "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", - "requires": { - "babel-helper-explode-assignable-expression": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-helper-call-delegate": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", - "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", - "requires": { - "babel-helper-hoist-variables": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helper-define-map": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz", - "integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=", - "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" - } - }, - "babel-helper-explode-assignable-expression": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz", - "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", - "requires": { - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helper-explode-class": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-explode-class/-/babel-helper-explode-class-6.24.1.tgz", - "integrity": "sha1-fcKjkQ3uAHBW4eMdZAztPVTqqes=", - "requires": { - "babel-helper-bindify-decorators": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helper-function-name": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", - "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", - "requires": { - "babel-helper-get-function-arity": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helper-get-function-arity": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", - "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-helper-hoist-variables": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", - "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-helper-optimise-call-expression": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz", - "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=", - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-helper-regex": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz", - "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", - "requires": { - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" - } - }, - "babel-helper-remap-async-to-generator": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz", - "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", - "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helper-replace-supers": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz", - "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=", - "requires": { - "babel-helper-optimise-call-expression": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helpers": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", - "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", - "requires": { - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, - "babel-loader": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-7.1.3.tgz", - "integrity": "sha512-PeN29YvOynPMvNk7QCzsHqxpmfXwKAC+uxkiSNFQsmXBBVltzEkVWmv/Ip3tx7yk149dQUwk497bTXNu+DZjLA==", - "requires": { - "find-cache-dir": "^1.0.0", - "loader-utils": "^1.0.2", - "mkdirp": "^0.5.1" - } - }, - "babel-messages": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", - "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-check-es2015-constants": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", - "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-syntax-async-functions": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", - "integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=" - }, - "babel-plugin-syntax-async-generators": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz", - "integrity": "sha1-a8lj67FuzLrmuStZbrfzXDQqi5o=" - }, - "babel-plugin-syntax-class-constructor-call": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-class-constructor-call/-/babel-plugin-syntax-class-constructor-call-6.18.0.tgz", - "integrity": "sha1-nLnTn+Q8hgC+yBRkVt3L1OGnZBY=" - }, - "babel-plugin-syntax-class-properties": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz", - "integrity": "sha1-1+sjt5oxf4VDlixQW4J8fWysJ94=" - }, - "babel-plugin-syntax-decorators": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz", - "integrity": "sha1-MSVjtNvePMgGzuPkFszurd0RrAs=" - }, - "babel-plugin-syntax-dynamic-import": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz", - "integrity": "sha1-jWomIpyDdFqZgqRBBRVyyqF5sdo=" - }, - "babel-plugin-syntax-exponentiation-operator": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz", - "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=" - }, - "babel-plugin-syntax-export-extensions": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-export-extensions/-/babel-plugin-syntax-export-extensions-6.13.0.tgz", - "integrity": "sha1-cKFITw+QiaToStRLrDU8lbmxJyE=" - }, - "babel-plugin-syntax-flow": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz", - "integrity": "sha1-TDqyCiryaqIM0lmVw5jE63AxDI0=" - }, - "babel-plugin-syntax-object-rest-spread": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", - "integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=" - }, - "babel-plugin-syntax-trailing-function-commas": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz", - "integrity": "sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM=" - }, - "babel-plugin-transform-async-generator-functions": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.24.1.tgz", - "integrity": "sha1-8FiQAUX9PpkHpt3yjaWfIVJYpds=", - "requires": { - "babel-helper-remap-async-to-generator": "^6.24.1", - "babel-plugin-syntax-async-generators": "^6.5.0", - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-async-to-generator": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz", - "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", - "requires": { - "babel-helper-remap-async-to-generator": "^6.24.1", - "babel-plugin-syntax-async-functions": "^6.8.0", - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-class-constructor-call": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-class-constructor-call/-/babel-plugin-transform-class-constructor-call-6.24.1.tgz", - "integrity": "sha1-gNwoVQWsBn3LjWxl4vbxGrd2Xvk=", - "requires": { - "babel-plugin-syntax-class-constructor-call": "^6.18.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, - "babel-plugin-transform-class-properties": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz", - "integrity": "sha1-anl2PqYdM9NvN7YRqp3vgagbRqw=", - "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-plugin-syntax-class-properties": "^6.8.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, - "babel-plugin-transform-decorators": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.24.1.tgz", - "integrity": "sha1-eIAT2PjGtSIr33s0Q5Df13Vp4k0=", - "requires": { - "babel-helper-explode-class": "^6.24.1", - "babel-plugin-syntax-decorators": "^6.13.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-arrow-functions": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz", - "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=", - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-block-scoped-functions": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz", - "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=", - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-block-scoping": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz", - "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=", - "requires": { - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" - } - }, - "babel-plugin-transform-es2015-classes": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", - "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", - "requires": { - "babel-helper-define-map": "^6.24.1", - "babel-helper-function-name": "^6.24.1", - "babel-helper-optimise-call-expression": "^6.24.1", - "babel-helper-replace-supers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-computed-properties": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz", - "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", - "requires": { - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-destructuring": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", - "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-duplicate-keys": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz", - "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=", - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-for-of": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz", - "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=", - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-function-name": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", - "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", - "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-literals": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz", - "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=", - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-modules-amd": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz", - "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=", - "requires": { - "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-modules-commonjs": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz", - "integrity": "sha1-DYOUApt9xqvhqX7xgeAHWN0uXYo=", - "requires": { - "babel-plugin-transform-strict-mode": "^6.24.1", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-types": "^6.26.0" - } - }, - "babel-plugin-transform-es2015-modules-systemjs": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz", - "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=", - "requires": { - "babel-helper-hoist-variables": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-modules-umd": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz", - "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=", - "requires": { - "babel-plugin-transform-es2015-modules-amd": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-object-super": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz", - "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", - "requires": { - "babel-helper-replace-supers": "^6.24.1", - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-parameters": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", - "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", - "requires": { - "babel-helper-call-delegate": "^6.24.1", - "babel-helper-get-function-arity": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-shorthand-properties": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz", - "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=", - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-spread": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", - "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-sticky-regex": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", - "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", - "requires": { - "babel-helper-regex": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-template-literals": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz", - "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=", - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-typeof-symbol": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz", - "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=", - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-unicode-regex": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", - "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", - "requires": { - "babel-helper-regex": "^6.24.1", - "babel-runtime": "^6.22.0", - "regexpu-core": "^2.0.0" - } - }, - "babel-plugin-transform-exponentiation-operator": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz", - "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", - "requires": { - "babel-helper-builder-binary-assignment-operator-visitor": "^6.24.1", - "babel-plugin-syntax-exponentiation-operator": "^6.8.0", - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-export-extensions": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-export-extensions/-/babel-plugin-transform-export-extensions-6.22.0.tgz", - "integrity": "sha1-U3OLR+deghhYnuqUbLvTkQm75lM=", - "requires": { - "babel-plugin-syntax-export-extensions": "^6.8.0", - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-flow-strip-types": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz", - "integrity": "sha1-hMtnKTXUNxT9wyvOhFaNh0Qc988=", - "requires": { - "babel-plugin-syntax-flow": "^6.18.0", - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-object-rest-spread": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz", - "integrity": "sha1-DzZpLVD+9rfi1LOsFHgTepY7ewY=", - "requires": { - "babel-plugin-syntax-object-rest-spread": "^6.8.0", - "babel-runtime": "^6.26.0" - } - }, - "babel-plugin-transform-regenerator": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz", - "integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=", - "requires": { - "regenerator-transform": "^0.10.0" - } - }, - "babel-plugin-transform-strict-mode": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", - "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-preset-env": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/babel-preset-env/-/babel-preset-env-1.6.1.tgz", - "integrity": "sha512-W6VIyA6Ch9ePMI7VptNn2wBM6dbG0eSz25HEiL40nQXCsXGTGZSTZu1Iap+cj3Q0S5a7T9+529l/5Bkvd+afNA==", - "requires": { - "babel-plugin-check-es2015-constants": "^6.22.0", - "babel-plugin-syntax-trailing-function-commas": "^6.22.0", - "babel-plugin-transform-async-to-generator": "^6.22.0", - "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", - "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0", - "babel-plugin-transform-es2015-block-scoping": "^6.23.0", - "babel-plugin-transform-es2015-classes": "^6.23.0", - "babel-plugin-transform-es2015-computed-properties": "^6.22.0", - "babel-plugin-transform-es2015-destructuring": "^6.23.0", - "babel-plugin-transform-es2015-duplicate-keys": "^6.22.0", - "babel-plugin-transform-es2015-for-of": "^6.23.0", - "babel-plugin-transform-es2015-function-name": "^6.22.0", - "babel-plugin-transform-es2015-literals": "^6.22.0", - "babel-plugin-transform-es2015-modules-amd": "^6.22.0", - "babel-plugin-transform-es2015-modules-commonjs": "^6.23.0", - "babel-plugin-transform-es2015-modules-systemjs": "^6.23.0", - "babel-plugin-transform-es2015-modules-umd": "^6.23.0", - "babel-plugin-transform-es2015-object-super": "^6.22.0", - "babel-plugin-transform-es2015-parameters": "^6.23.0", - "babel-plugin-transform-es2015-shorthand-properties": "^6.22.0", - "babel-plugin-transform-es2015-spread": "^6.22.0", - "babel-plugin-transform-es2015-sticky-regex": "^6.22.0", - "babel-plugin-transform-es2015-template-literals": "^6.22.0", - "babel-plugin-transform-es2015-typeof-symbol": "^6.23.0", - "babel-plugin-transform-es2015-unicode-regex": "^6.22.0", - "babel-plugin-transform-exponentiation-operator": "^6.22.0", - "babel-plugin-transform-regenerator": "^6.22.0", - "browserslist": "^2.1.2", - "invariant": "^2.2.2", - "semver": "^5.3.0" - } - }, - "babel-preset-es2015": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz", - "integrity": "sha1-1EBQ1rwsn+6nAqrzjXJ6AhBTiTk=", - "requires": { - "babel-plugin-check-es2015-constants": "^6.22.0", - "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", - "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0", - "babel-plugin-transform-es2015-block-scoping": "^6.24.1", - "babel-plugin-transform-es2015-classes": "^6.24.1", - "babel-plugin-transform-es2015-computed-properties": "^6.24.1", - "babel-plugin-transform-es2015-destructuring": "^6.22.0", - "babel-plugin-transform-es2015-duplicate-keys": "^6.24.1", - "babel-plugin-transform-es2015-for-of": "^6.22.0", - "babel-plugin-transform-es2015-function-name": "^6.24.1", - "babel-plugin-transform-es2015-literals": "^6.22.0", - "babel-plugin-transform-es2015-modules-amd": "^6.24.1", - "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", - "babel-plugin-transform-es2015-modules-systemjs": "^6.24.1", - "babel-plugin-transform-es2015-modules-umd": "^6.24.1", - "babel-plugin-transform-es2015-object-super": "^6.24.1", - "babel-plugin-transform-es2015-parameters": "^6.24.1", - "babel-plugin-transform-es2015-shorthand-properties": "^6.24.1", - "babel-plugin-transform-es2015-spread": "^6.22.0", - "babel-plugin-transform-es2015-sticky-regex": "^6.24.1", - "babel-plugin-transform-es2015-template-literals": "^6.22.0", - "babel-plugin-transform-es2015-typeof-symbol": "^6.22.0", - "babel-plugin-transform-es2015-unicode-regex": "^6.24.1", - "babel-plugin-transform-regenerator": "^6.24.1" - } - }, - "babel-preset-stage-1": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-preset-stage-1/-/babel-preset-stage-1-6.24.1.tgz", - "integrity": "sha1-dpLNfc1oSZB+auSgqFWJz7niv7A=", - "requires": { - "babel-plugin-transform-class-constructor-call": "^6.24.1", - "babel-plugin-transform-export-extensions": "^6.22.0", - "babel-preset-stage-2": "^6.24.1" - } - }, - "babel-preset-stage-2": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-preset-stage-2/-/babel-preset-stage-2-6.24.1.tgz", - "integrity": "sha1-2eKWD7PXEYfw5k7sYrwHdnIZvcE=", - "requires": { - "babel-plugin-syntax-dynamic-import": "^6.18.0", - "babel-plugin-transform-class-properties": "^6.24.1", - "babel-plugin-transform-decorators": "^6.24.1", - "babel-preset-stage-3": "^6.24.1" - } - }, - "babel-preset-stage-3": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-preset-stage-3/-/babel-preset-stage-3-6.24.1.tgz", - "integrity": "sha1-g2raCp56f6N8sTj7kyb4eTSkg5U=", - "requires": { - "babel-plugin-syntax-trailing-function-commas": "^6.22.0", - "babel-plugin-transform-async-generator-functions": "^6.24.1", - "babel-plugin-transform-async-to-generator": "^6.24.1", - "babel-plugin-transform-exponentiation-operator": "^6.24.1", - "babel-plugin-transform-object-rest-spread": "^6.22.0" - } - }, - "babel-register": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", - "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", - "requires": { - "babel-core": "^6.26.0", - "babel-runtime": "^6.26.0", - "core-js": "^2.5.0", - "home-or-tmp": "^2.0.0", - "lodash": "^4.17.4", - "mkdirp": "^0.5.1", - "source-map-support": "^0.4.15" - } - }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", - "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - } - }, - "babel-template": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", - "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", - "requires": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" - } - }, - "babel-traverse": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", - "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", - "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "babel-types": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", - "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", - "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" - } - }, - "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==" - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "requires": { - "is-descriptor": "^1.0.0" - } - } - } - }, - "base64-js": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.3.tgz", - "integrity": "sha512-MsAhsUW1GxCdgYSO6tAfZrNapmUKk7mWx/k5mFY/A1gBtkaCaNapTg+FExCw1r9yeaZhqx/xPg43xgTFH6KL5w==" - }, - "bcrypt-pbkdf": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", - "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", - "optional": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "big.js": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", - "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==" - }, - "binary-extensions": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", - "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=" - }, - "binaryextensions": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/binaryextensions/-/binaryextensions-2.1.1.tgz", - "integrity": "sha512-XBaoWE9RW8pPdPQNibZsW2zh8TW6gcarXp1FZPwT8Uop8ScSNldJEWf2k9l3HeTqdrEwsOsFcq74RiJECW34yA==" - }, - "bluebird": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", - "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" - }, - "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" - }, - "boom": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", - "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", - "requires": { - "hoek": "2.x.x" - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.1.tgz", - "integrity": "sha512-SO5lYHA3vO6gz66erVvedSCkp7AKWdv6VcQ2N4ysXfPxdAlxAMMAdwegGGcv1Bqwm7naF1hNdk5d6AAIEHV2nQ==", - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "kind-of": "^6.0.2", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" - }, - "browser-stdout": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.0.tgz", - "integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8=" - }, - "browserify-aes": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.1.1.tgz", - "integrity": "sha512-UGnTYAnB2a3YuYKIRy1/4FB2HdM866E0qC46JXvVTYKlBlZlnvfpSfY6OKfXZAkv70eJ2a1SqzpAo5CRhZGDFg==", - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "browserify-cipher": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.0.tgz", - "integrity": "sha1-mYgkSHS/XtTijalWZtzWasj8Njo=", - "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "browserify-des": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.0.tgz", - "integrity": "sha1-2qJ3cXRwki7S/hhZQRihdUOXId0=", - "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1" - } - }, - "browserify-rsa": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", - "requires": { - "bn.js": "^4.1.0", - "randombytes": "^2.0.1" - } - }, - "browserify-sign": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", - "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", - "requires": { - "bn.js": "^4.1.1", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.2", - "elliptic": "^6.0.0", - "inherits": "^2.0.1", - "parse-asn1": "^5.0.0" - } - }, - "browserify-zlib": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", - "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", - "requires": { - "pako": "~1.0.5" - } - }, - "browserslist": { - "version": "2.11.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-2.11.3.tgz", - "integrity": "sha512-yWu5cXT7Av6mVwzWc8lMsJMHWn4xyjSuGYi4IozbVTLUOEYPSagUB8kiMDUHA1fS3zjr8nkxkn9jdvug4BBRmA==", - "requires": { - "caniuse-lite": "^1.0.30000792", - "electron-to-chromium": "^1.3.30" - } - }, - "buffer": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", - "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" - }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=" - }, - "builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=" - }, - "cacache": { - "version": "10.0.4", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz", - "integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==", - "requires": { - "bluebird": "^3.5.1", - "chownr": "^1.0.1", - "glob": "^7.1.2", - "graceful-fs": "^4.1.11", - "lru-cache": "^4.1.1", - "mississippi": "^2.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.2", - "ssri": "^5.2.4", - "unique-filename": "^1.1.0", - "y18n": "^4.0.0" - }, - "dependencies": { - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "lru-cache": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", - "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - } - } - }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" - }, - "caniuse-lite": { - "version": "1.0.30000812", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000812.tgz", - "integrity": "sha512-j+l55ayQ9BO4Sy9iVfbf99+G+4ddAmkXoiEt73WCW4vJ83usrlHzDkFEnNXe5/swkVqE7YBm5i8M2uRXlx9vWg==" - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" - }, - "chalk": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.1.tgz", - "integrity": "sha512-QUU4ofkDoMIVO7hcx1iPTISs88wsO8jA92RQIm4JAwZvFGGAV2hSAA1NX7oVj2Ej2Q6NDTcRDjPTFrMCRZoJ6g==", - "requires": { - "ansi-styles": "^3.2.0", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.2.0" - }, - "dependencies": { - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "supports-color": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz", - "integrity": "sha512-F39vS48la4YvTZUPVeTqsjsFNrvcMwrV3RLZINsmHo+7djCvuUzSIeXOnZ5hmjef4bajL1dNccN+tg5XAliO5Q==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "chardet": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", - "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=" - }, - "chokidar": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.2.tgz", - "integrity": "sha512-l32Hw3wqB0L2kGVmSbK/a+xXLDrUEsc84pSgMkmwygHvD7ubRsP/vxxHa5BtB6oix1XLLVCHyYMsckRXxThmZw==", - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.0", - "braces": "^2.3.0", - "fsevents": "^1.0.0", - "glob-parent": "^3.1.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^2.1.1", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0", - "upath": "^1.0.0" - } - }, - "chownr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", - "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=" - }, - "chrome-trace-event": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-0.1.2.tgz", - "integrity": "sha1-kPNohdU0WlBiEzLwcXtZWIPV2YI=" - }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - } - } - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "requires": { - "restore-cursor": "^2.0.0" - } - }, - "cli-spinners": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-0.1.2.tgz", - "integrity": "sha1-u3ZNiOGF+54eaiofGXcjGPYF4xw=" - }, - "cli-table": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.1.tgz", - "integrity": "sha1-9TsFJmqLGguTSz0IIebi3FkUriM=", - "requires": { - "colors": "1.0.3" - }, - "dependencies": { - "colors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", - "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=" - } - } - }, - "cli-truncate": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-0.2.1.tgz", - "integrity": "sha1-nxXPuwcFAFNpIWxiasfQWrkN1XQ=", - "requires": { - "slice-ansi": "0.0.4", - "string-width": "^1.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "^2.0.0" - } - } - } - }, - "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=" - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "^2.0.0" - } - } - } - }, - "clone": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.1.tgz", - "integrity": "sha1-0hfR6WERjjrJpLi7oyhVU79kfNs=" - }, - "clone-buffer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", - "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=" - }, - "clone-stats": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", - "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=" - }, - "cloneable-readable": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.0.0.tgz", - "integrity": "sha1-pikNQT8hemEjL5XkWP84QYz7ARc=", - "requires": { - "inherits": "^2.0.1", - "process-nextick-args": "^1.0.6", - "through2": "^2.0.1" - }, - "dependencies": { - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" - } - } - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" - }, - "codecov": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.0.0.tgz", - "integrity": "sha1-wnO4xPEpRXI+jcnSWAPYk0Pl8o4=", - "requires": { - "argv": "0.0.2", - "request": "2.81.0", - "urlgrey": "0.4.4" - } - }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "color-convert": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", - "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", - "requires": { - "color-name": "^1.1.1" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "colors": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", - "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=" - }, - "combined-stream": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", - "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.3.0.tgz", - "integrity": "sha1-/UMOiJgy7DU7ms0d4hfBHLPu+HM=" - }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" - }, - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "concat-stream": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", - "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", - "requires": { - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", - "requires": { - "date-now": "^0.1.4" - } - }, - "constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=" - }, - "convert-source-map": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", - "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=" - }, - "copy-concurrently": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", - "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", - "requires": { - "aproba": "^1.1.1", - "fs-write-stream-atomic": "^1.0.8", - "iferr": "^0.1.5", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.0" - } - }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" - }, - "core-js": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.3.tgz", - "integrity": "sha1-isw4NFgk8W2DZbfJtCWRaOjtYD4=" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "create-ecdh": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.0.tgz", - "integrity": "sha1-iIxyNZbN92EvZJgjPuvXo1MBc30=", - "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.0.0" - } - }, - "create-hash": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz", - "integrity": "sha1-YGBCrIuSYnUPSDyt2rD1gZFy2P0=", - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "sha.js": "^2.4.0" - } - }, - "create-hmac": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.6.tgz", - "integrity": "sha1-rLniIaThe9sHbpBlfEK5PjcmzwY=", - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "dependencies": { - "lru-cache": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", - "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - } - } - }, - "cryptiles": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", - "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", - "requires": { - "boom": "2.x.x" - } - }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - } - }, - "cyclist": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", - "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=" - }, - "dargs": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/dargs/-/dargs-5.1.0.tgz", - "integrity": "sha1-7H6lDHhWTNNsnV7Bj2Yyn63ieCk=" - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "requires": { - "assert-plus": "^1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } - } - }, - "date-fns": { - "version": "1.29.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.29.0.tgz", - "integrity": "sha512-lbTXWZ6M20cWH8N9S6afb0SBm6tMk+uUg6z3MqHPKE9atmsY3kJkTm8vKe93izJ2B2+q5MV990sM2CHgtAZaOw==" - }, - "date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=" - }, - "dateformat": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz", - "integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=" - }, - "debug": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", - "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", - "requires": { - "ms": "0.7.1" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" - }, - "decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", - "requires": { - "mimic-response": "^1.0.0" - } - }, - "deep-extend": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", - "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=" - }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "des.js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", - "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", - "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "detect-conflict": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/detect-conflict/-/detect-conflict-1.0.1.tgz", - "integrity": "sha1-CIZXpmqWHAUBnbfEIwiDsca0F24=" - }, - "detect-indent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", - "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", - "requires": { - "repeating": "^2.0.0" - } - }, - "diff": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.4.0.tgz", - "integrity": "sha512-QpVuMTEoJMF7cKzi6bvWhRulU1fZqZnvyVQgNhPaxxuTYwyjn/j1v9falseQ/uXWwPnO56RBfwtg4h/EQXmucA==" - }, - "diffie-hellman": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.2.tgz", - "integrity": "sha1-tYNXOScM/ias9jIJn97SoH8gnl4=", - "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - } - }, - "dom-walk": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.1.tgz", - "integrity": "sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg=" - }, - "domain-browser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==" - }, - "duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" - }, - "duplexify": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.3.tgz", - "integrity": "sha512-g8ID9OroF9hKt2POf8YLayy+9594PzmM3scI00/uBXocX3TWNgoB67hjzkFe9ITAbQOne/lLdBxHXvYUM4ZgGA==", - "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" - } - }, - "ecc-jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", - "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", - "optional": true, - "requires": { - "jsbn": "~0.1.0" - } - }, - "editions": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/editions/-/editions-1.3.4.tgz", - "integrity": "sha512-gzao+mxnYDzIysXKMQi/+M1mjy/rjestjg6OPoYTtI+3Izp23oiGZitsl9lPDPiTGXbcSIk1iJWhliSaglxnUg==" - }, - "ejs": { - "version": "2.5.7", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.5.7.tgz", - "integrity": "sha1-zIcsFoiArjxxiXYv1f/ACJbJUYo=" - }, - "electron-to-chromium": { - "version": "1.3.35", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.35.tgz", - "integrity": "sha1-aTwXz7k4QdOMtZuN8BnRfjVphfA=" - }, - "elegant-spinner": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/elegant-spinner/-/elegant-spinner-1.0.1.tgz", - "integrity": "sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4=" - }, - "elliptic": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz", - "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - } - }, - "emojis-list": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", - "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=" - }, - "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", - "requires": { - "once": "^1.4.0" - } - }, - "enhanced-resolve": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.0.0.tgz", - "integrity": "sha512-jox/62b2GofV1qTUQTMPEJSDIGycS43evqYzD/KVtEb9OCoki9cnacUPxCrZa7JfPzZSYOCZhu9O9luaMxAX8g==", - "requires": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.4.0", - "tapable": "^1.0.0" - } - }, - "errno": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", - "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", - "requires": { - "prr": "~1.0.1" - } - }, - "error": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/error/-/error-7.0.2.tgz", - "integrity": "sha1-pfdf/02ZJhJt2sDqXcOOaJFTywI=", - "requires": { - "string-template": "~0.2.1", - "xtend": "~4.0.0" - } - }, - "error-ex": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", - "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "escape-string-regexp": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz", - "integrity": "sha1-Tbwv5nTnGUnK8/smlc5/LcHZqNE=" - }, - "eslint-scope": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", - "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "esprima": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", - "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==" - }, - "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", - "requires": { - "estraverse": "^4.1.0" - } - }, - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" - }, - "events": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=" - }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "exit-hook": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", - "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=" - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "expand-range": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", - "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", - "requires": { - "fill-range": "^2.1.0" - }, - "dependencies": { - "fill-range": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", - "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", - "requires": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^1.1.3", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" - } - }, - "is-number": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", - "requires": { - "kind-of": "^3.0.2" - } - }, - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "requires": { - "isarray": "1.0.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "expand-tilde": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", - "requires": { - "homedir-polyfill": "^1.0.1" - } - }, - "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "external-editor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.1.0.tgz", - "integrity": "sha512-E44iT5QVOUJBKij4IIV3uvxuNlbKS38Tw1HiupxEIHPv9qtC2PrDYohbXV5U+1jnfIXttny8gUhj+oZvflFlzA==", - "requires": { - "chardet": "^0.4.0", - "iconv-lite": "^0.4.17", - "tmp": "^0.0.33" - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" - }, - "fast-deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=" - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" - }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "requires": { - "escape-string-regexp": "^1.0.5" - }, - "dependencies": { - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - } - } - }, - "filename-regex": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", - "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=" - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "find-cache-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", - "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", - "requires": { - "commondir": "^1.0.1", - "make-dir": "^1.0.0", - "pkg-dir": "^2.0.0" - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "requires": { - "locate-path": "^2.0.0" - } - }, - "first-chunk-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-2.0.0.tgz", - "integrity": "sha1-G97NuOCDwGZLkZRVgVd6Q6nzHXA=", - "requires": { - "readable-stream": "^2.0.2" - } - }, - "flow-parser": { - "version": "0.66.0", - "resolved": "https://registry.npmjs.org/flow-parser/-/flow-parser-0.66.0.tgz", - "integrity": "sha1-vlg/77ARkqpRZEFdMaYkGzVxiYM=" - }, - "flush-write-stream": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.2.tgz", - "integrity": "sha1-yBuQ2HRnZvGmCaRoCZRsRd2K5Bc=", - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.4" - } - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" - }, - "for-own": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", - "requires": { - "for-in": "^1.0.1" - } - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" - }, - "form-data": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", - "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.5", - "mime-types": "^2.1.12" - } - }, - "formatio": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/formatio/-/formatio-1.1.1.tgz", - "integrity": "sha1-XtPM1jZVEJc4NGXZlhmRAOhhYek=", - "requires": { - "samsam": "~1.1" - } - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "requires": { - "map-cache": "^0.2.2" - } - }, - "from2": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", - "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" - } - }, - "fs-write-stream-atomic": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", - "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", - "requires": { - "graceful-fs": "^4.1.2", - "iferr": "^0.1.5", - "imurmurhash": "^0.1.4", - "readable-stream": "1 || 2" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "fsevents": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz", - "integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==", - "optional": true, - "requires": { - "nan": "^2.3.0", - "node-pre-gyp": "^0.6.39" - }, - "dependencies": { - "abbrev": { - "version": "1.1.0", - "bundled": true, - "optional": true - }, - "ajv": { - "version": "4.11.8", - "bundled": true, - "optional": true, - "requires": { - "co": "^4.6.0", - "json-stable-stringify": "^1.0.1" - } - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "optional": true - }, - "aproba": { - "version": "1.1.1", - "bundled": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.4", - "bundled": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "asn1": { - "version": "0.2.3", - "bundled": true, - "optional": true - }, - "assert-plus": { - "version": "0.2.0", - "bundled": true, - "optional": true - }, - "asynckit": { - "version": "0.4.0", - "bundled": true, - "optional": true - }, - "aws-sign2": { - "version": "0.6.0", - "bundled": true, - "optional": true - }, - "aws4": { - "version": "1.6.0", - "bundled": true, - "optional": true - }, - "balanced-match": { - "version": "0.4.2", - "bundled": true, - "optional": true - }, - "bcrypt-pbkdf": { - "version": "1.0.1", - "bundled": true, - "optional": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "block-stream": { - "version": "0.0.9", - "bundled": true, - "optional": true, - "requires": { - "inherits": "~2.0.0" - } - }, - "boom": { - "version": "2.10.1", - "bundled": true, - "optional": true, - "requires": { - "hoek": "2.x.x" - } - }, - "brace-expansion": { - "version": "1.1.7", - "bundled": true, - "optional": true, - "requires": { - "balanced-match": "^0.4.1", - "concat-map": "0.0.1" - } - }, - "buffer-shims": { - "version": "1.0.0", - "bundled": true, - "optional": true - }, - "caseless": { - "version": "0.12.0", - "bundled": true, - "optional": true - }, - "co": { - "version": "4.6.0", - "bundled": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "optional": true - }, - "combined-stream": { - "version": "1.0.5", - "bundled": true, - "optional": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "optional": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "optional": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "optional": true - }, - "cryptiles": { - "version": "2.0.5", - "bundled": true, - "optional": true, - "requires": { - "boom": "2.x.x" - } - }, - "dashdash": { - "version": "1.14.1", - "bundled": true, - "optional": true, - "requires": { - "assert-plus": "^1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "optional": true - } - } - }, - "debug": { - "version": "2.6.8", - "bundled": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.4.2", - "bundled": true, - "optional": true - }, - "delayed-stream": { - "version": "1.0.0", - "bundled": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.2", - "bundled": true, - "optional": true - }, - "ecc-jsbn": { - "version": "0.1.1", - "bundled": true, - "optional": true, - "requires": { - "jsbn": "~0.1.0" - } - }, - "extend": { - "version": "3.0.1", - "bundled": true, - "optional": true - }, - "extsprintf": { - "version": "1.0.2", - "bundled": true, - "optional": true - }, - "forever-agent": { - "version": "0.6.1", - "bundled": true, - "optional": true - }, - "form-data": { - "version": "2.1.4", - "bundled": true, - "optional": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.5", - "mime-types": "^2.1.12" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "optional": true - }, - "fstream": { - "version": "1.0.11", - "bundled": true, - "optional": true, - "requires": { - "graceful-fs": "^4.1.2", - "inherits": "~2.0.0", - "mkdirp": ">=0.5 0", - "rimraf": "2" - } - }, - "fstream-ignore": { - "version": "1.0.5", - "bundled": true, - "optional": true, - "requires": { - "fstream": "^1.0.0", - "inherits": "2", - "minimatch": "^3.0.0" - } - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "getpass": { - "version": "0.1.7", - "bundled": true, - "optional": true, - "requires": { - "assert-plus": "^1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "optional": true - } - } - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "graceful-fs": { - "version": "4.1.11", - "bundled": true, - "optional": true - }, - "har-schema": { - "version": "1.0.5", - "bundled": true, - "optional": true - }, - "har-validator": { - "version": "4.2.1", - "bundled": true, - "optional": true, - "requires": { - "ajv": "^4.9.1", - "har-schema": "^1.0.5" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "optional": true - }, - "hawk": { - "version": "3.1.3", - "bundled": true, - "optional": true, - "requires": { - "boom": "2.x.x", - "cryptiles": "2.x.x", - "hoek": "2.x.x", - "sntp": "1.x.x" - } - }, - "hoek": { - "version": "2.16.3", - "bundled": true, - "optional": true - }, - "http-signature": { - "version": "1.1.1", - "bundled": true, - "optional": true, - "requires": { - "assert-plus": "^0.2.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "optional": true - }, - "ini": { - "version": "1.3.4", - "bundled": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "optional": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-typedarray": { - "version": "1.0.0", - "bundled": true, - "optional": true - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "optional": true - }, - "isstream": { - "version": "0.1.2", - "bundled": true, - "optional": true - }, - "jodid25519": { - "version": "1.0.2", - "bundled": true, - "optional": true, - "requires": { - "jsbn": "~0.1.0" - } - }, - "jsbn": { - "version": "0.1.1", - "bundled": true, - "optional": true - }, - "json-schema": { - "version": "0.2.3", - "bundled": true, - "optional": true - }, - "json-stable-stringify": { - "version": "1.0.1", - "bundled": true, - "optional": true, - "requires": { - "jsonify": "~0.0.0" - } - }, - "json-stringify-safe": { - "version": "5.0.1", - "bundled": true, - "optional": true - }, - "jsonify": { - "version": "0.0.0", - "bundled": true, - "optional": true - }, - "jsprim": { - "version": "1.4.0", - "bundled": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.0.2", - "json-schema": "0.2.3", - "verror": "1.3.6" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "optional": true - } - } - }, - "mime-db": { - "version": "1.27.0", - "bundled": true, - "optional": true - }, - "mime-types": { - "version": "2.1.15", - "bundled": true, - "optional": true, - "requires": { - "mime-db": "~1.27.0" - } - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "optional": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "optional": true - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "optional": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "optional": true - }, - "node-pre-gyp": { - "version": "0.6.39", - "bundled": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "hawk": "3.1.3", - "mkdirp": "^0.5.1", - "nopt": "^4.0.1", - "npmlog": "^4.0.2", - "rc": "^1.1.7", - "request": "2.81.0", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^2.2.1", - "tar-pack": "^3.4.0" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npmlog": { - "version": "4.1.0", - "bundled": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "optional": true - }, - "oauth-sign": { - "version": "0.8.2", - "bundled": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "optional": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "optional": true - }, - "osenv": { - "version": "0.1.4", - "bundled": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "optional": true - }, - "performance-now": { - "version": "0.2.0", - "bundled": true, - "optional": true - }, - "process-nextick-args": { - "version": "1.0.7", - "bundled": true, - "optional": true - }, - "punycode": { - "version": "1.4.1", - "bundled": true, - "optional": true - }, - "qs": { - "version": "6.4.0", - "bundled": true, - "optional": true - }, - "rc": { - "version": "1.2.1", - "bundled": true, - "optional": true, - "requires": { - "deep-extend": "~0.4.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.2.9", - "bundled": true, - "optional": true, - "requires": { - "buffer-shims": "~1.0.0", - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "string_decoder": "~1.0.0", - "util-deprecate": "~1.0.1" - } - }, - "request": { - "version": "2.81.0", - "bundled": true, - "optional": true, - "requires": { - "aws-sign2": "~0.6.0", - "aws4": "^1.2.1", - "caseless": "~0.12.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.0", - "forever-agent": "~0.6.1", - "form-data": "~2.1.1", - "har-validator": "~4.2.1", - "hawk": "~3.1.3", - "http-signature": "~1.1.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.7", - "oauth-sign": "~0.8.1", - "performance-now": "^0.2.0", - "qs": "~6.4.0", - "safe-buffer": "^5.0.1", - "stringstream": "~0.0.4", - "tough-cookie": "~2.3.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.0.0" - } - }, - "rimraf": { - "version": "2.6.1", - "bundled": true, - "optional": true, - "requires": { - "glob": "^7.0.5" - } - }, - "safe-buffer": { - "version": "5.0.1", - "bundled": true, - "optional": true - }, - "semver": { - "version": "5.3.0", - "bundled": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "optional": true - }, - "sntp": { - "version": "1.0.9", - "bundled": true, - "optional": true, - "requires": { - "hoek": "2.x.x" - } - }, - "sshpk": { - "version": "1.13.0", - "bundled": true, - "optional": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jodid25519": "^1.0.0", - "jsbn": "~0.1.0", - "tweetnacl": "~0.14.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "optional": true - } - } - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "optional": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.0.1", - "bundled": true, - "optional": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "stringstream": { - "version": "0.0.5", - "bundled": true, - "optional": true - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "optional": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "optional": true - }, - "tar": { - "version": "2.2.1", - "bundled": true, - "optional": true, - "requires": { - "block-stream": "*", - "fstream": "^1.0.2", - "inherits": "2" - } - }, - "tar-pack": { - "version": "3.4.0", - "bundled": true, - "optional": true, - "requires": { - "debug": "^2.2.0", - "fstream": "^1.0.10", - "fstream-ignore": "^1.0.5", - "once": "^1.3.3", - "readable-stream": "^2.1.4", - "rimraf": "^2.5.1", - "tar": "^2.2.1", - "uid-number": "^0.0.6" - } - }, - "tough-cookie": { - "version": "2.3.2", - "bundled": true, - "optional": true, - "requires": { - "punycode": "^1.4.1" - } - }, - "tunnel-agent": { - "version": "0.6.0", - "bundled": true, - "optional": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "bundled": true, - "optional": true - }, - "uid-number": { - "version": "0.0.6", - "bundled": true, - "optional": true - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "optional": true - }, - "uuid": { - "version": "3.0.1", - "bundled": true, - "optional": true - }, - "verror": { - "version": "1.3.6", - "bundled": true, - "optional": true, - "requires": { - "extsprintf": "1.0.2" - } - }, - "wide-align": { - "version": "1.1.2", - "bundled": true, - "optional": true, - "requires": { - "string-width": "^1.0.2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "optional": true - } - } - }, - "get-caller-file": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", - "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=" - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" - }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "requires": { - "assert-plus": "^1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } - } - }, - "gh-got": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/gh-got/-/gh-got-6.0.0.tgz", - "integrity": "sha512-F/mS+fsWQMo1zfgG9MD8KWvTWPPzzhuVwY++fhQ5Ggd+0P+CAMHtzMZhNxG+TqGfHDChJKsbh6otfMGqO2AKBw==", - "requires": { - "got": "^7.0.0", - "is-plain-obj": "^1.1.0" - } - }, - "github-username": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/github-username/-/github-username-4.1.0.tgz", - "integrity": "sha1-y+KABBiDIG2kISrp5LXxacML9Bc=", - "requires": { - "gh-got": "^6.0.0" - } - }, - "glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz", - "integrity": "sha1-Spc/Y1uRkPcV0QmH1cAP0oFevj0=", - "requires": { - "inherits": "2", - "minimatch": "0.3" - }, - "dependencies": { - "minimatch": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz", - "integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=", - "requires": { - "lru-cache": "2", - "sigmund": "~1.0.0" - } - } - } - }, - "glob-all": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-all/-/glob-all-3.1.0.tgz", - "integrity": "sha1-iRPd+17hrHgSZWJBsD1SF8ZLAqs=", - "requires": { - "glob": "^7.0.5", - "yargs": "~1.2.6" - }, - "dependencies": { - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.1.0.tgz", - "integrity": "sha1-md9lelJXTCHJBXSX33QnkLK0wN4=" - }, - "yargs": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-1.2.6.tgz", - "integrity": "sha1-nHtKgv1dWVsr8Xq23MQxNUMv40s=", - "requires": { - "minimist": "^0.1.0" - } - } - } - }, - "glob-base": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", - "requires": { - "glob-parent": "^2.0.0", - "is-glob": "^2.0.0" - }, - "dependencies": { - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "requires": { - "is-glob": "^2.0.0" - } - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "requires": { - "is-extglob": "^1.0.0" - } - } - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "global": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", - "integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=", - "requires": { - "min-document": "^2.19.0", - "process": "~0.5.1" - }, - "dependencies": { - "process": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", - "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=" - } - } - }, - "global-modules": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", - "requires": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" - } - }, - "global-prefix": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", - "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", - "requires": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" - } - }, - "globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==" - }, - "globby": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", - "requires": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "dependencies": { - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - } - } - }, - "got": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", - "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", - "requires": { - "decompress-response": "^3.2.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "is-plain-obj": "^1.1.0", - "is-retry-allowed": "^1.0.0", - "is-stream": "^1.0.0", - "isurl": "^1.0.0-alpha5", - "lowercase-keys": "^1.0.0", - "p-cancelable": "^0.3.0", - "p-timeout": "^1.1.1", - "safe-buffer": "^5.0.1", - "timed-out": "^4.0.0", - "url-parse-lax": "^1.0.0", - "url-to-options": "^1.0.1" - } - }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" - }, - "grouped-queue": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/grouped-queue/-/grouped-queue-0.3.3.tgz", - "integrity": "sha1-wWfSpTGcWg4JZO9qJbfC34mWyFw=", - "requires": { - "lodash": "^4.17.2" - } - }, - "growl": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.9.2.tgz", - "integrity": "sha1-Dqd0NxXbjY3ixe3hd14bRayFwC8=" - }, - "har-schema": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", - "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=" - }, - "har-validator": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", - "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", - "requires": { - "ajv": "^4.9.1", - "har-schema": "^1.0.5" - }, - "dependencies": { - "ajv": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", - "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", - "requires": { - "co": "^4.6.0", - "json-stable-stringify": "^1.0.1" - } - } - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "requires": { - "ansi-regex": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - } - } - }, - "has-color": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz", - "integrity": "sha1-ZxRKUmDDT8PMpnfQQdr1L+e3iy8=" - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" - }, - "has-symbol-support-x": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", - "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==" - }, - "has-to-string-tag-x": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", - "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", - "requires": { - "has-symbol-support-x": "^1.4.1" - } - }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "hash-base": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz", - "integrity": "sha1-ZuodhW206KVHDK32/OI65SRO8uE=", - "requires": { - "inherits": "^2.0.1" - } - }, - "hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" - } - }, - "hawk": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", - "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", - "requires": { - "boom": "2.x.x", - "cryptiles": "2.x.x", - "hoek": "2.x.x", - "sntp": "1.x.x" - } - }, - "he": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", - "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=" - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "hoek": { - "version": "2.16.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=" - }, - "home-or-tmp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", - "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.1" - } - }, - "homedir-polyfill": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", - "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", - "requires": { - "parse-passwd": "^1.0.0" - } - }, - "hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==" - }, - "http-signature": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", - "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", - "requires": { - "assert-plus": "^0.2.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=" - }, - "iconv-lite": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" - }, - "ieee754": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", - "integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=" - }, - "iferr": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", - "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=" - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" - }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "requires": { - "repeating": "^2.0.0" - } - }, - "indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=" - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" - }, - "inquirer": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", - "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", - "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^2.0.4", - "figures": "^2.0.0", - "lodash": "^4.3.0", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rx-lite": "^4.0.8", - "rx-lite-aggregates": "^4.0.8", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", - "through": "^2.3.6" - } - }, - "interpret": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", - "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=" - }, - "invariant": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.3.tgz", - "integrity": "sha512-7Z5PPegwDTyjbaeCnV0efcyS6vdKAU51kpEmS7QFib3P4822l8ICYyMn7qvJnc+WzLoDsuI9gPMKbJ8pCu8XtA==", - "requires": { - "loose-envify": "^1.0.0" - } - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" - }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "requires": { - "builtin-modules": "^1.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "is-dotfile": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", - "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=" - }, - "is-equal-shallow": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", - "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", - "requires": { - "is-primitive": "^2.0.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" - }, - "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "is-glob": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", - "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz", - "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=" - }, - "is-odd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz", - "integrity": "sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ==", - "requires": { - "is-number": "^4.0.0" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==" - } - } - }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "requires": { - "isobject": "^3.0.1" - } - }, - "is-posix-bracket": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", - "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=" - }, - "is-primitive": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", - "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=" - }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" - }, - "is-retry-allowed": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", - "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=" - }, - "is-scoped": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-scoped/-/is-scoped-1.0.0.tgz", - "integrity": "sha1-RJypgpnnEwOCViieyytUDcQ3yzA=", - "requires": { - "scoped-regex": "^1.0.0" - } - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" - }, - "istextorbinary": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/istextorbinary/-/istextorbinary-2.2.1.tgz", - "integrity": "sha512-TS+hoFl8Z5FAFMK38nhBkdLt44CclNRgDHWeMgsV8ko3nDlr/9UI2Sf839sW7enijf8oKsZYXRvM8g0it9Zmcw==", - "requires": { - "binaryextensions": "2", - "editions": "^1.3.3", - "textextensions": "2" - } - }, - "isurl": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", - "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", - "requires": { - "has-to-string-tag-x": "^1.2.0", - "is-object": "^1.0.1" - } - }, - "jade": { - "version": "0.26.3", - "resolved": "https://registry.npmjs.org/jade/-/jade-0.26.3.tgz", - "integrity": "sha1-jxDXl32NefL2/4YqgbBRPMslaGw=", - "requires": { - "commander": "0.6.1", - "mkdirp": "0.3.0" - }, - "dependencies": { - "commander": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-0.6.1.tgz", - "integrity": "sha1-+mihT2qUXVTbvlDYzbMyDp47GgY=" - }, - "mkdirp": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz", - "integrity": "sha1-G79asbqCevI1dRQ0kEJkVfSB/h4=" - } - } - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "optional": true - }, - "jscodeshift": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/jscodeshift/-/jscodeshift-0.4.1.tgz", - "integrity": "sha512-iOX6If+hsw0q99V3n31t4f5VlD1TQZddH08xbT65ZqA7T4Vkx68emrDZMUOLVvCEAJ6NpAk7DECe3fjC/t52AQ==", - "requires": { - "async": "^1.5.0", - "babel-plugin-transform-flow-strip-types": "^6.8.0", - "babel-preset-es2015": "^6.9.0", - "babel-preset-stage-1": "^6.5.0", - "babel-register": "^6.9.0", - "babylon": "^6.17.3", - "colors": "^1.1.2", - "flow-parser": "^0.*", - "lodash": "^4.13.1", - "micromatch": "^2.3.7", - "node-dir": "0.1.8", - "nomnom": "^1.8.1", - "recast": "^0.12.5", - "temp": "^0.8.1", - "write-file-atomic": "^1.2.0" - }, - "dependencies": { - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "requires": { - "arr-flatten": "^1.0.1" - } - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=" - }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "requires": { - "is-posix-bracket": "^0.1.0" - } - }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "requires": { - "is-extglob": "^1.0.0" - } - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "requires": { - "is-extglob": "^1.0.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - } - }, - "recast": { - "version": "0.12.9", - "resolved": "https://registry.npmjs.org/recast/-/recast-0.12.9.tgz", - "integrity": "sha512-y7ANxCWmMW8xLOaiopiRDlyjQ9ajKRENBH+2wjntIbk3A6ZR1+BLQttkmSHMY7Arl+AAZFwJ10grg2T6f1WI8A==", - "requires": { - "ast-types": "0.10.1", - "core-js": "^2.4.1", - "esprima": "~4.0.0", - "private": "~0.1.5", - "source-map": "~0.6.1" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - } - } - }, - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=" - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" - }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" - }, - "json-stable-stringify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", - "requires": { - "jsonify": "~0.0.0" - } - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" - }, - "json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=" - }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } - } - }, - "just-extend": { - "version": "1.1.27", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-1.1.27.tgz", - "integrity": "sha512-mJVp13Ix6gFo3SBAy9U/kL+oeZqzlYYYLQBwXVBlVzIsZwBqGREnOro24oC/8s8aox+rJhtZ2DiQof++IrkA+g==" - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" - }, - "lazy-cache": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", - "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=", - "requires": { - "set-getter": "^0.1.0" - } - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "requires": { - "invert-kv": "^1.0.0" - } - }, - "listr": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/listr/-/listr-0.12.0.tgz", - "integrity": "sha1-a84sD1YD+klYDqF81qAMwOX6RRo=", - "requires": { - "chalk": "^1.1.3", - "cli-truncate": "^0.2.1", - "figures": "^1.7.0", - "indent-string": "^2.1.0", - "is-promise": "^2.1.0", - "is-stream": "^1.1.0", - "listr-silent-renderer": "^1.1.1", - "listr-update-renderer": "^0.2.0", - "listr-verbose-renderer": "^0.4.0", - "log-symbols": "^1.0.2", - "log-update": "^1.0.2", - "ora": "^0.2.3", - "p-map": "^1.1.1", - "rxjs": "^5.0.0-beta.11", - "stream-to-observable": "^0.1.0", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", - "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" - }, - "dependencies": { - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - } - } - }, - "log-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", - "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", - "requires": { - "chalk": "^1.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } - } - }, - "listr-silent-renderer": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz", - "integrity": "sha1-kktaN1cVN3C/Go4/v3S4u/P5JC4=" - }, - "listr-update-renderer": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/listr-update-renderer/-/listr-update-renderer-0.2.0.tgz", - "integrity": "sha1-yoDhd5tOcCZoB+ju0a1qvjmFUPk=", - "requires": { - "chalk": "^1.1.3", - "cli-truncate": "^0.2.1", - "elegant-spinner": "^1.0.1", - "figures": "^1.7.0", - "indent-string": "^3.0.0", - "log-symbols": "^1.0.2", - "log-update": "^1.0.2", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", - "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" - }, - "dependencies": { - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - } - } - }, - "indent-string": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", - "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=" - }, - "log-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", - "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", - "requires": { - "chalk": "^1.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } - } - }, - "listr-verbose-renderer": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz", - "integrity": "sha1-ggb0z21S3cWCfl/RSYng6WWTOjU=", - "requires": { - "chalk": "^1.1.3", - "cli-cursor": "^1.0.2", - "date-fns": "^1.27.2", - "figures": "^1.7.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "cli-cursor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", - "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", - "requires": { - "restore-cursor": "^1.0.1" - } - }, - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", - "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" - }, - "dependencies": { - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - } - } - }, - "onetime": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", - "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=" - }, - "restore-cursor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", - "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", - "requires": { - "exit-hook": "^1.0.0", - "onetime": "^1.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } - } - }, - "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "strip-bom": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - } - } - }, - "loader-runner": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.0.tgz", - "integrity": "sha1-9IKuqC1UPgeSFwDVpG7yb9rGuKI=" - }, - "loader-utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", - "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", - "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=" - }, - "log-symbols": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.1.0.tgz", - "integrity": "sha512-zLeLrzMA1A2vRF1e/0Mo+LNINzi6jzBylHj5WqvQ/WK/5WCZt8si9SyN4p9llr/HRYvVR1AoXHRHl4WTHyQAzQ==", - "requires": { - "chalk": "^2.0.1" - } - }, - "log-update": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-1.0.2.tgz", - "integrity": "sha1-GZKfZMQJPS0ucHWh2tivWcKWuNE=", - "requires": { - "ansi-escapes": "^1.0.0", - "cli-cursor": "^1.0.2" - }, - "dependencies": { - "ansi-escapes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", - "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=" - }, - "cli-cursor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", - "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", - "requires": { - "restore-cursor": "^1.0.1" - } - }, - "onetime": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", - "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=" - }, - "restore-cursor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", - "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", - "requires": { - "exit-hook": "^1.0.0", - "onetime": "^1.0.0" - } - } - } - }, - "lolex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-1.3.2.tgz", - "integrity": "sha1-fD2mL/yzDw9agKJWbKJORdigHzE=" - }, - "loose-envify": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", - "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", - "requires": { - "js-tokens": "^3.0.0" - } - }, - "lowercase-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", - "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=" - }, - "lru-cache": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", - "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=" - }, - "make-dir": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.2.0.tgz", - "integrity": "sha512-aNUAa4UMg/UougV25bbrU4ZaaKNjJ/3/xnvg/twpmKROPdKZPZ9wGgI0opdZzO8q/zUFawoUuixuOv33eZ61Iw==", - "requires": { - "pify": "^3.0.0" - } - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" - }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "requires": { - "object-visit": "^1.0.0" - } - }, - "md5.js": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", - "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - }, - "dependencies": { - "hash-base": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - } - } - }, - "mem": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", - "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "mem-fs": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/mem-fs/-/mem-fs-1.1.3.tgz", - "integrity": "sha1-uK6NLj/Lb10/kWXBLUVRoGXZicw=", - "requires": { - "through2": "^2.0.0", - "vinyl": "^1.1.0", - "vinyl-file": "^2.0.0" - }, - "dependencies": { - "clone": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.3.tgz", - "integrity": "sha1-KY1+IjFmD0DAA8LtMUDezz9TCF8=" - }, - "clone-stats": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", - "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=" - }, - "replace-ext": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", - "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=" - }, - "vinyl": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", - "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", - "requires": { - "clone": "^1.0.0", - "clone-stats": "^0.0.1", - "replace-ext": "0.0.1" - } - } - } - }, - "mem-fs-editor": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/mem-fs-editor/-/mem-fs-editor-3.0.2.tgz", - "integrity": "sha1-3Qpuryu4prN3QAZ6pUnrUwEFr58=", - "requires": { - "commondir": "^1.0.1", - "deep-extend": "^0.4.0", - "ejs": "^2.3.1", - "glob": "^7.0.3", - "globby": "^6.1.0", - "mkdirp": "^0.5.0", - "multimatch": "^2.0.0", - "rimraf": "^2.2.8", - "through2": "^2.0.0", - "vinyl": "^2.0.1" - }, - "dependencies": { - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - } - } - }, - "memory-fs": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", - "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", - "requires": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - } - }, - "micromatch": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.9.tgz", - "integrity": "sha512-SlIz6sv5UPaAVVFRKodKjCg48EbNoIhgetzfK/Cy0v5U52Z6zB136M8tp0UC9jM53LYbmIRihJszvvqpKkfm9g==", - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - } - }, - "miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - } - }, - "mime-db": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" - }, - "mime-types": { - "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", - "requires": { - "mime-db": "~1.33.0" - } - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" - }, - "mimic-response": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.0.tgz", - "integrity": "sha1-3z02Uqc/3ta5sLJBRub9BSNTRY4=" - }, - "min-document": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", - "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", - "requires": { - "dom-walk": "^0.1.0" - } - }, - "minimalistic-assert": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz", - "integrity": "sha1-cCvi3aazf0g2vLP121ZkG2Sh09M=" - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" - }, - "mississippi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz", - "integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==", - "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^2.0.1", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" - } - }, - "mixin-deep": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "requires": { - "minimist": "0.0.8" - } - }, - "mocha": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.0.1.tgz", - "integrity": "sha512-SpwyojlnE/WRBNGtvJSNfllfm5PqEDFxcWluSIgLeSBJtXG4DmoX2NNAeEA7rP5kK+79VgtVq8nG6HskaL1ykg==", - "requires": { - "browser-stdout": "1.3.0", - "commander": "2.11.0", - "debug": "3.1.0", - "diff": "3.3.1", - "escape-string-regexp": "1.0.5", - "glob": "7.1.2", - "growl": "1.10.3", - "he": "1.1.1", - "mkdirp": "0.5.1", - "supports-color": "4.4.0" - }, - "dependencies": { - "commander": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", - "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==" - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - } - }, - "diff": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.3.1.tgz", - "integrity": "sha512-MKPHZDMB0o6yHyDryUOScqZibp914ksXwAMYMTHj6KO8UeKsRYNJD3oNCKjTqZon+V488P7N/HzXF8t7ZR95ww==" - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "growl": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.3.tgz", - "integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==" - }, - "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=" - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "supports-color": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", - "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", - "requires": { - "has-flag": "^2.0.0" - } - } - } - }, - "move-concurrently": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", - "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", - "requires": { - "aproba": "^1.1.1", - "copy-concurrently": "^1.0.0", - "fs-write-stream-atomic": "^1.0.8", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.3" - } - }, - "ms": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", - "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=" - }, - "multimatch": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz", - "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", - "requires": { - "array-differ": "^1.0.0", - "array-union": "^1.0.1", - "arrify": "^1.0.0", - "minimatch": "^3.0.0" - }, - "dependencies": { - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - } - } - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" - }, - "nan": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.9.2.tgz", - "integrity": "sha512-ltW65co7f3PQWBDbqVvaU1WtFJUsNW7sWWm4HINhbMQIyVyzIeyZ8toX5TC5eeooE6piZoaEh4cZkueSKG3KYw==", - "optional": true - }, - "nanomatch": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz", - "integrity": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==", - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-odd": "^2.0.0", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - } - }, - "neo-async": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.5.0.tgz", - "integrity": "sha512-nJmSswG4As/MkRq7QZFuH/sf/yuv8ODdMZrY4Bedjp77a5MK4A6s7YbBB64c9u79EBUOfXUXBvArmvzTD0X+6g==" - }, - "nise": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/nise/-/nise-1.2.7.tgz", - "integrity": "sha512-8LqP1pFLB1v5QU8KlT2WqWzhMRJ3o9LwnZHz+VCbVB8rTsRTFCjtOYv/BatcmLOWp21NedTrErVGinfxe6XYtA==", - "requires": { - "@sinonjs/formatio": "^2.0.0", - "just-extend": "^1.1.27", - "lolex": "^2.3.2", - "path-to-regexp": "^1.7.0", - "text-encoding": "^0.6.4" - }, - "dependencies": { - "lolex": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.3.2.tgz", - "integrity": "sha512-A5pN2tkFj7H0dGIAM6MFvHKMJcPnjZsOMvR7ujCjfgW5TbV6H9vb1PgxLtHvjqNZTHsUolz+6/WEO0N1xNx2ng==" - } - } - }, - "node-dir": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/node-dir/-/node-dir-0.1.8.tgz", - "integrity": "sha1-VfuN62mQcHB/tn+RpGDwRIKUx30=" - }, - "node-libs-browser": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz", - "integrity": "sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==", - "requires": { - "assert": "^1.1.1", - "browserify-zlib": "^0.2.0", - "buffer": "^4.3.0", - "console-browserify": "^1.1.0", - "constants-browserify": "^1.0.0", - "crypto-browserify": "^3.11.0", - "domain-browser": "^1.1.1", - "events": "^1.0.0", - "https-browserify": "^1.0.0", - "os-browserify": "^0.3.0", - "path-browserify": "0.0.0", - "process": "^0.11.10", - "punycode": "^1.2.4", - "querystring-es3": "^0.2.0", - "readable-stream": "^2.3.3", - "stream-browserify": "^2.0.1", - "stream-http": "^2.7.2", - "string_decoder": "^1.0.0", - "timers-browserify": "^2.0.4", - "tty-browserify": "0.0.0", - "url": "^0.11.0", - "util": "^0.10.3", - "vm-browserify": "0.0.4" - } - }, - "nomnom": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/nomnom/-/nomnom-1.8.1.tgz", - "integrity": "sha1-IVH3Ikcrp55Qp2/BJbuMjy5Nwqc=", - "requires": { - "chalk": "~0.4.0", - "underscore": "~1.6.0" - }, - "dependencies": { - "ansi-styles": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.0.0.tgz", - "integrity": "sha1-yxAt8cVvUSPquLZ817mAJ6AnkXg=" - }, - "chalk": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz", - "integrity": "sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=", - "requires": { - "ansi-styles": "~1.0.0", - "has-color": "~0.1.0", - "strip-ansi": "~0.1.0" - } - }, - "strip-ansi": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz", - "integrity": "sha1-OeipjQRNFQZgq+SmgIrPcLt7yZE=" - }, - "underscore": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", - "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=" - } - } - }, - "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", - "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "requires": { - "remove-trailing-separator": "^1.0.1" - } - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "requires": { - "path-key": "^2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" - }, - "oauth-sign": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - } - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "requires": { - "isobject": "^3.0.0" - } - }, - "object.omit": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", - "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", - "requires": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "requires": { - "isobject": "^3.0.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "ora": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/ora/-/ora-0.2.3.tgz", - "integrity": "sha1-N1J9Igrc1Tw5tzVx11QVbV22V6Q=", - "requires": { - "chalk": "^1.1.1", - "cli-cursor": "^1.0.2", - "cli-spinners": "^0.1.2", - "object-assign": "^4.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "cli-cursor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", - "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", - "requires": { - "restore-cursor": "^1.0.1" - } - }, - "onetime": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", - "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=" - }, - "restore-cursor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", - "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", - "requires": { - "exit-hook": "^1.0.0", - "onetime": "^1.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } - } - }, - "os-browserify": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=" - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" - }, - "os-locale": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", - "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", - "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" - } - }, - "os-shim": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/os-shim/-/os-shim-0.1.3.tgz", - "integrity": "sha1-a2LDeRz3kJ6jXtRuF2WLtBfLORc=" - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" - }, - "p-cancelable": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", - "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==" - }, - "p-each-series": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-1.0.0.tgz", - "integrity": "sha1-kw89Et0fUOdDRFeiLNbwSsatf3E=", - "requires": { - "p-reduce": "^1.0.0" - } - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" - }, - "p-lazy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-lazy/-/p-lazy-1.0.0.tgz", - "integrity": "sha1-7FPIAvLuOsKPFmzILQsrAt4nqDU=" - }, - "p-limit": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", - "integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==", - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-map": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", - "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==" - }, - "p-reduce": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-reduce/-/p-reduce-1.0.0.tgz", - "integrity": "sha1-GMKw3ZNqRpClKfgjH1ig/bakffo=" - }, - "p-timeout": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", - "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", - "requires": { - "p-finally": "^1.0.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" - }, - "pako": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", - "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==" - }, - "parallel-transform": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz", - "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", - "requires": { - "cyclist": "~0.2.2", - "inherits": "^2.0.3", - "readable-stream": "^2.1.5" - } - }, - "parse-asn1": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.0.tgz", - "integrity": "sha1-N8T5t+06tlx0gXtfJICTf7+XxxI=", - "requires": { - "asn1.js": "^4.0.0", - "browserify-aes": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3" - } - }, - "parse-glob": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", - "requires": { - "glob-base": "^0.3.0", - "is-dotfile": "^1.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.0" - }, - "dependencies": { - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "requires": { - "is-extglob": "^1.0.0" - } - } - } - }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "requires": { - "error-ex": "^1.2.0" - } - }, - "parse-passwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=" - }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" - }, - "path-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", - "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=" - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" - }, - "path-to-regexp": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", - "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", - "requires": { - "isarray": "0.0.1" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" - } - } - }, - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "requires": { - "pify": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - } - } - }, - "pbkdf2": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.14.tgz", - "integrity": "sha512-gjsZW9O34fm0R7PaLHRJmLLVfSoesxztjPjE9o6R+qtVJij90ltg1joIovN9GKrRW3t1PzhDDG3UMEMFfZ+1wA==", - "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "performance-now": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", - "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=" - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "requires": { - "pinkie": "^2.0.0" - } - }, - "pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", - "requires": { - "find-up": "^2.1.0" - } - }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" - }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" - }, - "preserve": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", - "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=" - }, - "prettier": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.11.1.tgz", - "integrity": "sha512-T/KD65Ot0PB97xTrG8afQ46x3oiVhnfGjGESSI9NWYcG92+OUPZKkwHqGWXH2t9jK1crnQjubECW0FuOth+hxw==" - }, - "pretty-bytes": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-4.0.2.tgz", - "integrity": "sha1-sr+C5zUNZcbDOqlaqlpPYyf2HNk=" - }, - "private": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", - "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==" - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" - }, - "promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=" - }, - "promises-aplus-tests": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/promises-aplus-tests/-/promises-aplus-tests-2.1.2.tgz", - "integrity": "sha1-drfFY4locghhlpz7zYeVr9J0iFw=", - "requires": { - "mocha": "^2.5.3", - "sinon": "^1.10.3", - "underscore": "~1.8.3" - }, - "dependencies": { - "diff": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz", - "integrity": "sha1-fyjS657nsVqX79ic5j3P2qPMur8=" - }, - "mocha": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-2.5.3.tgz", - "integrity": "sha1-FhvlvetJZ3HrmzV0UFC2IrWu/Fg=", - "requires": { - "commander": "2.3.0", - "debug": "2.2.0", - "diff": "1.4.0", - "escape-string-regexp": "1.0.2", - "glob": "3.2.11", - "growl": "1.9.2", - "jade": "0.26.3", - "mkdirp": "0.5.1", - "supports-color": "1.2.0", - "to-iso-string": "0.0.2" - } - }, - "sinon": { - "version": "1.17.7", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-1.17.7.tgz", - "integrity": "sha1-RUKk9JugxFwF6y6d2dID4rjv4L8=", - "requires": { - "formatio": "1.1.1", - "lolex": "1.3.2", - "samsam": "1.1.2", - "util": ">=0.10.3 <1" - } - }, - "supports-color": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-1.2.0.tgz", - "integrity": "sha1-/x7R5hFp0Gs88tWI4YixjYhH4X4=" - } - } - }, - "prr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=" - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" - }, - "public-encrypt": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz", - "integrity": "sha1-OfaZ86RlYN1eusvKaTyvfGXBjMY=", - "requires": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1" - } - }, - "pump": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "pumpify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.4.0.tgz", - "integrity": "sha512-2kmNR9ry+Pf45opRVirpNuIFotsxUGLaYqxIwuR77AYrYRMuFCz9eryHBS52L360O+NcR383CL4QYlMKPq4zYA==", - "requires": { - "duplexify": "^3.5.3", - "inherits": "^2.0.3", - "pump": "^2.0.0" - } - }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" - }, - "qs": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", - "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=" - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" - }, - "querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" - }, - "randomatic": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", - "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "randombytes": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", - "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "requires": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, - "read-chunk": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/read-chunk/-/read-chunk-2.1.0.tgz", - "integrity": "sha1-agTAkoAF7Z1C4aasVgDhnLx/9lU=", - "requires": { - "pify": "^3.0.0", - "safe-buffer": "^5.1.1" - } - }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "requires": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" - } - }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" - } - }, - "readable-stream": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.4.tgz", - "integrity": "sha512-vuYxeWYM+fde14+rajzqgeohAI7YoJcHE7kXDAc4Nk0EbuKnJfqtY9YtRkLo/tqkuF7MsBQRhPnPeyjYITp3ZQ==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.0.3", - "util-deprecate": "~1.0.1" - } - }, - "readdirp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", - "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", - "requires": { - "graceful-fs": "^4.1.2", - "minimatch": "^3.0.2", - "readable-stream": "^2.0.2", - "set-immediate-shim": "^1.0.1" - }, - "dependencies": { - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - } - } - }, - "recast": { - "version": "0.13.2", - "resolved": "https://registry.npmjs.org/recast/-/recast-0.13.2.tgz", - "integrity": "sha512-Xqo0mKljGUWGUhnkdbODk7oJGFrMcpgKQ9cCyZ4y+G9VfoTKdum8nHbf/SxIdKx5aBSZ29VpVy20bTyt7jyC8w==", - "requires": { - "ast-types": "0.10.2", - "esprima": "~4.0.0", - "private": "~0.1.5", - "source-map": "~0.6.1" - }, - "dependencies": { - "ast-types": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.10.2.tgz", - "integrity": "sha512-ufWX953VU1eIuWqxS0nRDMYlGyFH+yxln5CsmIHlpzEt3fdYqUnRtsFt0XAsQot8OaVCwFqxT1RiwvtzYjeYeg==" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - } - } - }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "requires": { - "resolve": "^1.1.6" - } - }, - "regenerate": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.3.tgz", - "integrity": "sha512-jVpo1GadrDAK59t/0jRx5VxYWQEDkkEKi6+HjE3joFVLfDOh9Xrdh0dF1eSq+BI/SwvTQ44gSscJ8N5zYL61sg==" - }, - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" - }, - "regenerator-transform": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz", - "integrity": "sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==", - "requires": { - "babel-runtime": "^6.18.0", - "babel-types": "^6.19.0", - "private": "^0.1.6" - } - }, - "regex-cache": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", - "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", - "requires": { - "is-equal-shallow": "^0.1.3" - } - }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, - "regexpu-core": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", - "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", - "requires": { - "regenerate": "^1.2.1", - "regjsgen": "^0.2.0", - "regjsparser": "^0.1.4" - } - }, - "regjsgen": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", - "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=" - }, - "regjsparser": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", - "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", - "requires": { - "jsesc": "~0.5.0" - } - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" - }, - "repeat-element": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", - "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=" - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" - }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "requires": { - "is-finite": "^1.0.0" - } - }, - "replace-ext": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", - "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=" - }, - "request": { - "version": "2.81.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", - "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", - "requires": { - "aws-sign2": "~0.6.0", - "aws4": "^1.2.1", - "caseless": "~0.12.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.0", - "forever-agent": "~0.6.1", - "form-data": "~2.1.1", - "har-validator": "~4.2.1", - "hawk": "~3.1.3", - "http-signature": "~1.1.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.7", - "oauth-sign": "~0.8.1", - "performance-now": "^0.2.0", - "qs": "~6.4.0", - "safe-buffer": "^5.0.1", - "stringstream": "~0.0.4", - "tough-cookie": "~2.3.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.0.0" - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" - }, - "resolve": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", - "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", - "requires": { - "path-parse": "^1.0.5" - } - }, - "resolve-cwd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", - "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", - "requires": { - "resolve-from": "^3.0.0" - } - }, - "resolve-dir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", - "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", - "requires": { - "expand-tilde": "^2.0.0", - "global-modules": "^1.0.0" - } - }, - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=" - }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } - }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "requires": { - "glob": "^7.0.5" - }, - "dependencies": { - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - } - } - }, - "ripemd160": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz", - "integrity": "sha1-D0WEKVxTo2KK9+bXmsohzlfRxuc=", - "requires": { - "hash-base": "^2.0.0", - "inherits": "^2.0.1" - } - }, - "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "requires": { - "is-promise": "^2.1.0" - } - }, - "run-queue": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", - "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", - "requires": { - "aproba": "^1.1.1" - } - }, - "rx": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/rx/-/rx-4.1.0.tgz", - "integrity": "sha1-pfE/957zt0D+MKqAP7CfmIBdR4I=" - }, - "rx-lite": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", - "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=" - }, - "rx-lite-aggregates": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", - "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", - "requires": { - "rx-lite": "*" - } - }, - "rxjs": { - "version": "5.5.6", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.6.tgz", - "integrity": "sha512-v4Q5HDC0FHAQ7zcBX7T2IL6O5ltl1a2GX4ENjPXg6SjDY69Cmx9v4113C99a4wGF16ClPv5Z8mghuYorVkg/kg==", - "requires": { - "symbol-observable": "1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" - }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "requires": { - "ret": "~0.1.10" - } - }, - "samsam": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.1.2.tgz", - "integrity": "sha1-vsEf3IOp/aBjQBIQ5AF2wwJNFWc=" - }, - "schema-utils": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", - "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", - "requires": { - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0" - } - }, - "scoped-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/scoped-regex/-/scoped-regex-1.0.0.tgz", - "integrity": "sha1-o0a7Gs1CB65wvXwMfKnlZra63bg=" - }, - "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" - }, - "serialize-javascript": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.4.0.tgz", - "integrity": "sha1-fJWFFNtqwkQ6irwGLcn3iGp/YAU=" - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" - }, - "set-getter": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.1.tgz", - "integrity": "sha512-9sVWOy+gthr+0G9DzqqLaYNA7+5OKkSmcqjL9cBpDEaZrr3ShQlyX2cZ/O/ozE41oxn/Tt0LGEM/w4Rub3A3gw==", - "requires": { - "to-object-path": "^0.3.0" - } - }, - "set-immediate-shim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=" - }, - "set-value": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" - }, - "sha.js": { - "version": "2.4.10", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.10.tgz", - "integrity": "sha512-vnwmrFDlOExK4Nm16J2KMWHLrp14lBrjxMxBJpu++EnsuBmpiYaM/MEs46Vxxm/4FvdP5yTwuCTO9it5FSjrqA==", - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" - }, - "shelljs": { - "version": "0.7.8", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.8.tgz", - "integrity": "sha1-3svPh0sNHl+3LhSxZKloMEjprLM=", - "requires": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - }, - "dependencies": { - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - } - } - }, - "sigmund": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", - "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=" - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" - }, - "sinon": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-4.4.2.tgz", - "integrity": "sha512-cpOHpnRyY3Dk9dTHBYMfVBB0HUCSKIpxW07X6OGW2NiYPovs4AkcL8Q8MzecbAROjbfRA9esJCmlZgikxDz7DA==", - "requires": { - "@sinonjs/formatio": "^2.0.0", - "diff": "^3.1.0", - "lodash.get": "^4.4.2", - "lolex": "^2.2.0", - "nise": "^1.2.0", - "supports-color": "^5.1.0", - "type-detect": "^4.0.5" - }, - "dependencies": { - "lolex": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.3.2.tgz", - "integrity": "sha512-A5pN2tkFj7H0dGIAM6MFvHKMJcPnjZsOMvR7ujCjfgW5TbV6H9vb1PgxLtHvjqNZTHsUolz+6/WEO0N1xNx2ng==" - } - } - }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" - }, - "slice-ansi": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", - "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=" - }, - "slide": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", - "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=" - }, - "snapdragon": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.1.tgz", - "integrity": "sha1-4StUh/re0+PeoKyR6UAL91tAE3A=", - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^2.0.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "requires": { - "is-descriptor": "^1.0.0" - } - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "requires": { - "kind-of": "^3.2.0" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "sntp": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", - "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", - "requires": { - "hoek": "2.x.x" - } - }, - "source-list-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", - "integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==" - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" - }, - "source-map-resolve": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.1.tgz", - "integrity": "sha512-0KW2wvzfxm8NCTb30z0LMNyPqWCdDGE2viwzUaucqJdkTRXtZiSY3I+2A6nVAjmdOy0I4gU8DwnVVGsk9jvP2A==", - "requires": { - "atob": "^2.0.0", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", - "requires": { - "source-map": "^0.5.6" - } - }, - "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" - }, - "spawn-sync": { - "version": "1.0.15", - "resolved": "https://registry.npmjs.org/spawn-sync/-/spawn-sync-1.0.15.tgz", - "integrity": "sha1-sAeZVX63+wyDdsKdROih6mfldHY=", - "requires": { - "concat-stream": "^1.4.7", - "os-shim": "^0.1.2" - } - }, - "spdx-correct": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", - "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", - "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==" - }, - "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", - "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==" - }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "requires": { - "extend-shallow": "^3.0.0" - } - }, - "sshpk": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", - "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "tweetnacl": "~0.14.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } - } - }, - "ssri": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.2.4.tgz", - "integrity": "sha512-UnEAgMZa15973iH7cUi0AHjJn1ACDIkaMyZILoqwN6yzt+4P81I8tBc5Hl+qwi5auMplZtPQsHrPBR5vJLcQtQ==", - "requires": { - "safe-buffer": "^5.1.1" - } - }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - } - } - }, - "stream-browserify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", - "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", - "requires": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" - } - }, - "stream-each": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.2.tgz", - "integrity": "sha512-mc1dbFhGBxvTM3bIWmAAINbqiuAk9TATcfIQC8P+/+HJefgaiTlMn2dHvkX8qlI12KeYKSQ1Ua9RrIqrn1VPoA==", - "requires": { - "end-of-stream": "^1.1.0", - "stream-shift": "^1.0.0" - } - }, - "stream-http": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.0.tgz", - "integrity": "sha512-sZOFxI/5xw058XIRHl4dU3dZ+TTOIGJR78Dvo0oEAejIt4ou27k+3ne1zYmCV+v7UucbxIFQuOgnkTVHh8YPnw==", - "requires": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.3.3", - "to-arraybuffer": "^1.0.0", - "xtend": "^4.0.0" - } - }, - "stream-shift": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", - "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=" - }, - "stream-to-observable": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/stream-to-observable/-/stream-to-observable-0.1.0.tgz", - "integrity": "sha1-Rb8dny19wJvtgfHDB8Qw5ouEz/4=" - }, - "string-template": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/string-template/-/string-template-0.2.1.tgz", - "integrity": "sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0=" - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "stringstream": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", - "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" - }, - "strip-bom-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom-stream/-/strip-bom-stream-2.0.0.tgz", - "integrity": "sha1-+H217yYT9paKpUWr/h7HKLaoKco=", - "requires": { - "first-chunk-stream": "^2.0.0", - "strip-bom": "^2.0.0" - }, - "dependencies": { - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "requires": { - "is-utf8": "^0.2.0" - } - } - } - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" - }, - "supports-color": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz", - "integrity": "sha512-F39vS48la4YvTZUPVeTqsjsFNrvcMwrV3RLZINsmHo+7djCvuUzSIeXOnZ5hmjef4bajL1dNccN+tg5XAliO5Q==", - "requires": { - "has-flag": "^3.0.0" - } - }, - "symbol-observable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", - "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=" - }, - "tapable": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.0.0.tgz", - "integrity": "sha512-dQRhbNQkRnaqauC7WqSJ21EEksgT0fYZX2lqXzGkpo8JNig9zGZTYoMGvyI2nWmXlE2VSVXVDu7wLVGu/mQEsg==" - }, - "temp": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz", - "integrity": "sha1-4Ma8TSa5AxJEEOT+2BEDAU38H1k=", - "requires": { - "os-tmpdir": "^1.0.0", - "rimraf": "~2.2.6" - }, - "dependencies": { - "rimraf": { - "version": "2.2.8", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz", - "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=" - } - } - }, - "text-encoding": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz", - "integrity": "sha1-45mpgiV6J22uQou5KEXLcb3CbRk=" - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" - }, - "textextensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-2.2.0.tgz", - "integrity": "sha512-j5EMxnryTvKxwH2Cq+Pb43tsf6sdEgw6Pdwxk83mPaq0ToeFJt6WE4J3s5BqY7vmjlLgkgXvhtXUxo80FyBhCA==" - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" - }, - "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", - "requires": { - "readable-stream": "^2.1.5", - "xtend": "~4.0.1" - } - }, - "timed-out": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=" - }, - "timers-browserify": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.6.tgz", - "integrity": "sha512-HQ3nbYRAowdVd0ckGFvmJPPCOH/CHleFN/Y0YQCX1DVaB7t+KFvisuyN09fuP8Jtp1CpfSh8O8bMkHbdbPe6Pw==", - "requires": { - "setimmediate": "^1.0.4" - } - }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "requires": { - "os-tmpdir": "~1.0.2" - } - }, - "to-arraybuffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=" - }, - "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=" - }, - "to-iso-string": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/to-iso-string/-/to-iso-string-0.0.2.tgz", - "integrity": "sha1-TcGeZk38y+Jb2NtQiwDG2hWCVdE=" - }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - }, - "tough-cookie": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", - "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", - "requires": { - "punycode": "^1.4.1" - } - }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" - }, - "tty-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", - "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "optional": true - }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==" - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" - }, - "uglify-es": { - "version": "3.3.9", - "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", - "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", - "requires": { - "commander": "~2.13.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "commander": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", - "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - } - } - }, - "uglifyjs-webpack-plugin": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.2.tgz", - "integrity": "sha512-CG/NvzXfemUAm5Y4Guh5eEaJYHtkG7kKNpXEJHp9QpxsFVB5/qKvYWoMaq4sa99ccZ0hM3MK8vQV9XPZB4357A==", - "requires": { - "cacache": "^10.0.1", - "find-cache-dir": "^1.0.0", - "schema-utils": "^0.4.2", - "serialize-javascript": "^1.4.0", - "source-map": "^0.6.1", - "uglify-es": "^3.3.4", - "webpack-sources": "^1.1.0", - "worker-farm": "^1.5.2" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - } - } - }, - "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" - }, - "union-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", - "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^0.4.3" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", - "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" - } - } - } - }, - "unique-filename": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.0.tgz", - "integrity": "sha1-0F8v5AMlYIcfMOk8vnNe6iAVFPM=", - "requires": { - "unique-slug": "^2.0.0" - } - }, - "unique-slug": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.0.tgz", - "integrity": "sha1-22Z258fMBimHj/GWCXx4hVrp9Ks=", - "requires": { - "imurmurhash": "^0.1.4" - } - }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" - } - } - }, - "untildify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/untildify/-/untildify-2.1.0.tgz", - "integrity": "sha1-F+soB5h/dpUunASF/DEdBqgmouA=", - "requires": { - "os-homedir": "^1.0.0" - } - }, - "upath": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.0.4.tgz", - "integrity": "sha512-d4SJySNBXDaQp+DPrziv3xGS6w3d2Xt69FijJr86zMPBy23JEloMCEOUBBzuN7xCtjLCnmB9tI/z7SBCahHBOw==" - }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" - }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" - } - } - }, - "url-parse-lax": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", - "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", - "requires": { - "prepend-http": "^1.0.1" - } - }, - "url-to-options": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", - "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=" - }, - "urlgrey": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/urlgrey/-/urlgrey-0.4.4.tgz", - "integrity": "sha1-iS/pWWCAXoVRnxzUOJ8stMu3ZS8=" - }, - "use": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/use/-/use-2.0.2.tgz", - "integrity": "sha1-riig1y+TvyJCKhii43mZMRLeyOg=", - "requires": { - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "lazy-cache": "^2.0.2" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - } - } - }, - "util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "requires": { - "inherits": "2.0.1" - }, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" - } - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "uuid": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", - "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==" - }, - "v8-compile-cache": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-1.1.2.tgz", - "integrity": "sha512-ejdrifsIydN1XDH7EuR2hn8ZrkRKUYF7tUcBjBy/lhrCvs2K+zRlbW9UHc0IQ9RsYFZJFqJrieoIHfkCa0DBRA==" - }, - "validate-npm-package-license": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", - "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } - } - }, - "vinyl": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.1.0.tgz", - "integrity": "sha1-Ah+cLPlR1rk5lDyJ617lrdT9kkw=", - "requires": { - "clone": "^2.1.1", - "clone-buffer": "^1.0.0", - "clone-stats": "^1.0.0", - "cloneable-readable": "^1.0.0", - "remove-trailing-separator": "^1.0.1", - "replace-ext": "^1.0.0" - } - }, - "vinyl-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/vinyl-file/-/vinyl-file-2.0.0.tgz", - "integrity": "sha1-p+v1/779obfRjRQPyweyI++2dRo=", - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.3.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0", - "strip-bom-stream": "^2.0.0", - "vinyl": "^1.1.0" - }, - "dependencies": { - "clone": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.3.tgz", - "integrity": "sha1-KY1+IjFmD0DAA8LtMUDezz9TCF8=" - }, - "clone-stats": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", - "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=" - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - }, - "replace-ext": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", - "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=" - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "requires": { - "is-utf8": "^0.2.0" - } - }, - "vinyl": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", - "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", - "requires": { - "clone": "^1.0.0", - "clone-stats": "^0.0.1", - "replace-ext": "0.0.1" - } - } - } - }, - "vm-browserify": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", - "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", - "requires": { - "indexof": "0.0.1" - } - }, - "watchpack": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.5.0.tgz", - "integrity": "sha512-RSlipNQB1u48cq0wH/BNfCu1tD/cJ8ydFIkNYhp9o+3d+8unClkIovpW5qpFPgmL9OE48wfAnlZydXByWP82AA==", - "requires": { - "chokidar": "^2.0.2", - "graceful-fs": "^4.1.2", - "neo-async": "^2.5.0" - } - }, - "webpack": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.0.1.tgz", - "integrity": "sha512-jHQNMmKPElreOYLCxR7SHfPnbhcqRT9O7lYPOMDR6Gt5XueJ7tH7JReXm4uMFstBKf7rj2Y7AD3LiMKR2zexYA==", - "requires": { - "acorn": "^5.0.0", - "acorn-dynamic-import": "^3.0.0", - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0", - "chrome-trace-event": "^0.1.1", - "enhanced-resolve": "^4.0.0", - "eslint-scope": "^3.7.1", - "loader-runner": "^2.3.0", - "loader-utils": "^1.1.0", - "memory-fs": "~0.4.1", - "micromatch": "^3.1.8", - "mkdirp": "~0.5.0", - "neo-async": "^2.5.0", - "node-libs-browser": "^2.0.0", - "schema-utils": "^0.4.2", - "tapable": "^1.0.0", - "uglifyjs-webpack-plugin": "^1.1.1", - "watchpack": "^1.4.0", - "webpack-sources": "^1.0.1" - } - }, - "webpack-addons": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/webpack-addons/-/webpack-addons-1.1.5.tgz", - "integrity": "sha512-MGO0nVniCLFAQz1qv22zM02QPjcpAoJdy7ED0i3Zy7SY1IecgXCm460ib7H/Wq7e9oL5VL6S2BxaObxwIcag0g==", - "requires": { - "jscodeshift": "^0.4.0" - } - }, - "webpack-cli": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-2.0.9.tgz", - "integrity": "sha512-KIkOFHhrq8W7ovg5u8M7Xbduzr1aQ1Ch1aGGY0TvL5neO81T6/aCZ/NeG7R92UaXIF/BK4KCkla35wtoOoxyDQ==", - "requires": { - "chalk": "^2.0.1", - "codecov": "^3.0.0", - "cross-spawn": "^5.1.0", - "diff": "^3.3.0", - "enhanced-resolve": "^3.4.1", - "glob-all": "^3.1.0", - "global": "^4.3.2", - "global-modules": "^1.0.0", - "got": "^7.1.0", - "inquirer": "^3.2.0", - "interpret": "^1.0.4", - "jscodeshift": "^0.4.0", - "listr": "^0.12.0", - "loader-utils": "^1.1.0", - "lodash": "^4.17.4", - "log-symbols": "2.1.0", - "mkdirp": "^0.5.1", - "p-each-series": "^1.0.0", - "p-lazy": "^1.0.0", - "prettier": "^1.5.3", - "recast": "^0.13.0", - "resolve-cwd": "^2.0.0", - "supports-color": "^4.4.0", - "uglifyjs-webpack-plugin": "^1.2.2", - "v8-compile-cache": "^1.1.0", - "webpack-addons": "^1.1.5", - "webpack-fork-yeoman-generator": "^1.1.1", - "yargs": "9.0.1", - "yeoman-environment": "^2.0.0" - }, - "dependencies": { - "diff": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.4.0.tgz", - "integrity": "sha512-QpVuMTEoJMF7cKzi6bvWhRulU1fZqZnvyVQgNhPaxxuTYwyjn/j1v9falseQ/uXWwPnO56RBfwtg4h/EQXmucA==" - }, - "enhanced-resolve": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz", - "integrity": "sha1-BCHjOf1xQZs9oT0Smzl5BAIwR24=", - "requires": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.4.0", - "object-assign": "^4.0.1", - "tapable": "^0.2.7" - } - }, - "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=" - }, - "supports-color": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", - "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", - "requires": { - "has-flag": "^2.0.0" - } - }, - "tapable": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.8.tgz", - "integrity": "sha1-mTcqXJmb8t8WCvwNdL7U9HlIzSI=" - } - } - }, - "webpack-fork-yeoman-generator": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/webpack-fork-yeoman-generator/-/webpack-fork-yeoman-generator-1.1.1.tgz", - "integrity": "sha512-TrLT6Bw6gl9rJA7iZw+YJ+4xHhEUzfOQB3tHpyINBFdZDmO0tlDW9MtMSMZ5rsUNjHxcEba5yuGaAW86J84j/w==", - "requires": { - "async": "^2.0.0", - "chalk": "^1.0.0", - "cli-table": "^0.3.1", - "cross-spawn": "^5.0.1", - "dargs": "^5.1.0", - "dateformat": "^2.0.0", - "debug": "^2.1.0", - "detect-conflict": "^1.0.0", - "error": "^7.0.2", - "find-up": "^2.1.0", - "github-username": "^4.0.0", - "istextorbinary": "^2.1.0", - "lodash": "^4.11.1", - "mem-fs-editor": "^3.0.0", - "minimist": "^1.2.0", - "mkdirp": "^0.5.0", - "pretty-bytes": "^4.0.2", - "read-chunk": "^2.0.0", - "read-pkg-up": "^2.0.0", - "rimraf": "^2.2.0", - "run-async": "^2.0.0", - "shelljs": "^0.7.0", - "text-table": "^0.2.0", - "through2": "^2.0.0", - "yeoman-environment": "^1.1.0" - }, - "dependencies": { - "ansi-escapes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", - "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=" - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "async": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", - "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", - "requires": { - "lodash": "^4.14.0" - } - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "cli-cursor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", - "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", - "requires": { - "restore-cursor": "^1.0.1" - } - }, - "diff": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/diff/-/diff-2.2.3.tgz", - "integrity": "sha1-YOr9DSjukG5Oj/ClLBIpUhAzv5k=" - }, - "external-editor": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-1.1.1.tgz", - "integrity": "sha1-Etew24UPf/fnCBuvQAVwAGDEYAs=", - "requires": { - "extend": "^3.0.0", - "spawn-sync": "^1.0.15", - "tmp": "^0.0.29" - } - }, - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", - "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" - }, - "dependencies": { - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - } - } - }, - "glob": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", - "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "globby": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-4.1.0.tgz", - "integrity": "sha1-CA9UVJ7BuCpsYOYx/ILhIR2+lfg=", - "requires": { - "array-union": "^1.0.1", - "arrify": "^1.0.0", - "glob": "^6.0.1", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "inquirer": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-1.2.3.tgz", - "integrity": "sha1-TexvMvN+97sLLtPx0aXD9UUHSRg=", - "requires": { - "ansi-escapes": "^1.1.0", - "chalk": "^1.0.0", - "cli-cursor": "^1.0.1", - "cli-width": "^2.0.0", - "external-editor": "^1.1.0", - "figures": "^1.3.5", - "lodash": "^4.3.0", - "mute-stream": "0.0.6", - "pinkie-promise": "^2.0.0", - "run-async": "^2.2.0", - "rx": "^4.1.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.0", - "through": "^2.3.6" - } - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "log-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", - "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", - "requires": { - "chalk": "^1.0.0" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - }, - "mute-stream": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.6.tgz", - "integrity": "sha1-SJYrGeFp/R38JAs/HnMXYnu8R9s=" - }, - "onetime": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", - "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=" - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - }, - "restore-cursor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", - "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", - "requires": { - "exit-hook": "^1.0.0", - "onetime": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - }, - "tmp": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.29.tgz", - "integrity": "sha1-8lEl/w3Z2jzLDC3Tce4SiLuRKMA=", - "requires": { - "os-tmpdir": "~1.0.1" - } - }, - "yeoman-environment": { - "version": "1.6.6", - "resolved": "https://registry.npmjs.org/yeoman-environment/-/yeoman-environment-1.6.6.tgz", - "integrity": "sha1-zYX6Z9FWBg5EDXgH1+988NLR1nE=", - "requires": { - "chalk": "^1.0.0", - "debug": "^2.0.0", - "diff": "^2.1.2", - "escape-string-regexp": "^1.0.2", - "globby": "^4.0.0", - "grouped-queue": "^0.3.0", - "inquirer": "^1.0.2", - "lodash": "^4.11.1", - "log-symbols": "^1.0.1", - "mem-fs": "^1.1.0", - "text-table": "^0.2.0", - "untildify": "^2.0.0" - } - } - } - }, - "webpack-sources": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.1.0.tgz", - "integrity": "sha512-aqYp18kPphgoO5c/+NaUvEeACtZjMESmDChuD3NBciVpah3XpMEU9VAAtIaB1BsfJWWTSdv8Vv1m3T0aRk2dUw==", - "requires": { - "source-list-map": "^2.0.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - } - } - }, - "which": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", - "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" - }, - "worker-farm": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.5.4.tgz", - "integrity": "sha512-ITyClEvcfv0ozqJl1vmWFWhvI+OIrkbInYqkEPE50wFPXj8J9Gd3FYf8+CkZJXJJsQBYe+2DvmoK9Zhx5w8W+w==", - "requires": { - "errno": "~0.1.7", - "xtend": "~4.0.1" - } - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "^2.0.0" - } - } - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "write-file-atomic": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.4.tgz", - "integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=", - "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "slide": "^1.1.5" - } - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" - }, - "y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" - }, - "yargs": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-9.0.1.tgz", - "integrity": "sha1-UqzCP+7Kw0BCB47njAwAf1CF20w=", - "requires": { - "camelcase": "^4.1.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "read-pkg-up": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^7.0.0" - }, - "dependencies": { - "y18n": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", - "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==" - } - } - }, - "yargs-parser": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", - "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", - "requires": { - "camelcase": "^4.1.0" - } - }, - "yeoman-environment": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/yeoman-environment/-/yeoman-environment-2.0.5.tgz", - "integrity": "sha512-6/W7/B54OPHJXob0n0+pmkwFsirC8cokuQkPSmT/D0lCcSxkKtg/BA6ZnjUBIwjuGqmw3DTrT4en++htaUju5g==", - "requires": { - "chalk": "^2.1.0", - "debug": "^3.1.0", - "diff": "^3.3.1", - "escape-string-regexp": "^1.0.2", - "globby": "^6.1.0", - "grouped-queue": "^0.3.3", - "inquirer": "^3.3.0", - "is-scoped": "^1.0.0", - "lodash": "^4.17.4", - "log-symbols": "^2.1.0", - "mem-fs": "^1.1.0", - "text-table": "^0.2.0", - "untildify": "^3.0.2" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - } - }, - "diff": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.4.0.tgz", - "integrity": "sha512-QpVuMTEoJMF7cKzi6bvWhRulU1fZqZnvyVQgNhPaxxuTYwyjn/j1v9falseQ/uXWwPnO56RBfwtg4h/EQXmucA==" - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "untildify": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/untildify/-/untildify-3.0.2.tgz", - "integrity": "sha1-fx8wIFWz/qDz6B3HjrNnZstl4/E=" - } - } - } - } -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/JS-A+/package.json b/Carthage/Checkouts/PromiseKit/Tests/JS-A+/package.json deleted file mode 100644 index d7a83903c..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/JS-A+/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "scripts": { - "build": "webpack-cli", - "watch": "webpack-cli --watch --mode development" - }, - "dependencies": { - "babel-core": "^6.26.0", - "babel-loader": "^7.1.3", - "babel-preset-env": "^1.6.1", - "lodash": "^4.17.21", - "mocha": "^5.0.1", - "promises-aplus-tests": "^2.1.2", - "sinon": "^4.4.2", - "webpack": "^4.0.1", - "webpack-cli": "^2.0.9" - } -} diff --git a/Carthage/Checkouts/PromiseKit/Tests/JS-A+/webpack.config.js b/Carthage/Checkouts/PromiseKit/Tests/JS-A+/webpack.config.js deleted file mode 100644 index 1570fce1f..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/JS-A+/webpack.config.js +++ /dev/null @@ -1,32 +0,0 @@ -var webpack = require('webpack'); - -module.exports = { - mode: 'development', - context: __dirname, - entry: './index.js', - output: { - path: __dirname + '/build', - filename: 'build.js', - library: 'runTests' - }, - stats: { - warnings: false - }, - module: { - rules: [ - { - test: /\.js$/, - exclude: /(node_modules)/, - use: { - loader: 'babel-loader', - options: { - presets: ['env'] - } - } - } - ] - }, - node: { - fs: 'empty' - }, -}; diff --git a/Carthage/Checkouts/PromiseKit/Tests/LinuxMain.swift b/Carthage/Checkouts/PromiseKit/Tests/LinuxMain.swift deleted file mode 100644 index f2291bab8..000000000 --- a/Carthage/Checkouts/PromiseKit/Tests/LinuxMain.swift +++ /dev/null @@ -1,10 +0,0 @@ -import XCTest - -import APlus -import CorePromise - -var tests = [XCTestCaseEntry]() -tests += APlus.__allTests() -tests += CorePromise.__allTests() - -XCTMain(tests) diff --git a/Carthage/Checkouts/SipHash/.codecov.yml b/Carthage/Checkouts/SipHash/.codecov.yml deleted file mode 100644 index 3432d06ad..000000000 --- a/Carthage/Checkouts/SipHash/.codecov.yml +++ /dev/null @@ -1,14 +0,0 @@ -ignore: -- "/tests/*" -comment: - layout: "header, diff" - behavior: default - require_changes: no -coverage: - status: - project: - default: - target: auto - threshold: null - base: auto - paths: "sources/*" diff --git a/Carthage/Checkouts/SipHash/.gitignore b/Carthage/Checkouts/SipHash/.gitignore deleted file mode 100644 index df7824894..000000000 --- a/Carthage/Checkouts/SipHash/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/.build -/Carthage/Build -xcuserdata diff --git a/Carthage/Checkouts/SipHash/.swift-version b/Carthage/Checkouts/SipHash/.swift-version deleted file mode 100644 index 389f7740e..000000000 --- a/Carthage/Checkouts/SipHash/.swift-version +++ /dev/null @@ -1 +0,0 @@ -4.0 \ No newline at end of file diff --git a/Carthage/Checkouts/SipHash/.travis.yml b/Carthage/Checkouts/SipHash/.travis.yml deleted file mode 100644 index 7fc8aa8f5..000000000 --- a/Carthage/Checkouts/SipHash/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: objective-c -osx_image: xcode9.3 -script: -- xcrun xcodebuild -project SipHash.xcodeproj -scheme SipHash-macOS test -- xcrun xcodebuild -project SipHash.xcodeproj -scheme SipHash-iOS -- xcrun xcodebuild -project SipHash.xcodeproj -scheme SipHash-watchOS -- xcrun xcodebuild -project SipHash.xcodeproj -scheme SipHash-tvOS -- swift test -after_success: bash <(curl -s https://codecov.io/bash) diff --git a/Carthage/Checkouts/SipHash/CHANGELOG.md b/Carthage/Checkouts/SipHash/CHANGELOG.md deleted file mode 100644 index 92131317a..000000000 --- a/Carthage/Checkouts/SipHash/CHANGELOG.md +++ /dev/null @@ -1,47 +0,0 @@ -# Version 1.2.2 (2018-06-08) - -This release contains the following changes: - -* Fix some warnings for Swift 4.1. -* Fix issues with `swift test` on Linux. - -# Version 1.2.1 (2018-05-27) - -This release contains the following change: - -* Fixed a bug which resulted in a compilation error for Swift 4.1 on Linux. - -# Version 1.2.0 (2017-09-07) - -This release contains the following changes: - -* The package requires Swift 4. -* `SipHasher` now has a method for appending slices of `UnsafeRawBufferPointer`s. -* In the supplied Xcode project, bundle identifiers have been updated. The new ones start with `org.attaswift.`. - -Note that the URL for the package's Git repository has changed; please update your references. - -# Version 1.1.2 (2017-05-05) - -This release contains the following change: - -* Removed all remaining use of @inline(__always) attributes. - -# Version 1.1.1 (2017-02-07) - -This release contains the following change: - -* A Swift 3.1 compilation issue about SipHash's (ab)use of @inline(__always) was fixed. - -# Version 1.1.0 (2016-11-23) - -This release contains the following changes: - -* `SipHasher` now supports appending optional values directly. -* The deployment target for Carthage and standalone builds was set back to iOS 8.0 and macOS 10.9, - the earliest possible OS versions for Swift frameworks. This change does not affect CocoaPod builds, which - already had the same settings. - -# Version 1.0.0 (2016-11-15) - -This is the initial release of SipHash. diff --git a/Carthage/Checkouts/SipHash/LICENSE.md b/Carthage/Checkouts/SipHash/LICENSE.md deleted file mode 100644 index 07595838a..000000000 --- a/Carthage/Checkouts/SipHash/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Károly Lőrentey - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Carthage/Checkouts/SipHash/LinuxMain.swift b/Carthage/Checkouts/SipHash/LinuxMain.swift deleted file mode 100644 index e1a37c33d..000000000 --- a/Carthage/Checkouts/SipHash/LinuxMain.swift +++ /dev/null @@ -1,10 +0,0 @@ -import XCTest -@testable import SipHashTests -@testable import PrimitiveTypeTests -@testable import SipHashableTests - -XCTMain([ - testCase(SipHashTests.allTests), - testCase(PrimitiveTypeTests.allTests), - testCase(SipHashableTests.allTests), -]) diff --git a/Carthage/Checkouts/SipHash/Package.swift b/Carthage/Checkouts/SipHash/Package.swift deleted file mode 100644 index 8d5b078a8..000000000 --- a/Carthage/Checkouts/SipHash/Package.swift +++ /dev/null @@ -1,23 +0,0 @@ -// swift-tools-version:4.0 -// -// Package.swift -// SipHash -// -// Created by Károly Lőrentey on 2016-11-14. -// Copyright © 2016-2017 Károly Lőrentey. -// - -import PackageDescription - -let package = Package( - name: "SipHash", - products: [ - .library(name: "SipHash", type: .dynamic, targets: ["SipHash"]) - ], - dependencies: [], - targets: [ - .target(name: "SipHash", dependencies: [], path: "SipHash"), - .testTarget(name: "SipHashTests", dependencies: ["SipHash"], path: "SipHashTests") - ], - swiftLanguageVersions: [4] -) diff --git a/Carthage/Checkouts/SipHash/README.md b/Carthage/Checkouts/SipHash/README.md deleted file mode 100644 index 49fe93e0f..000000000 --- a/Carthage/Checkouts/SipHash/README.md +++ /dev/null @@ -1,161 +0,0 @@ -# SipHash - -[![Swift 4.0](https://img.shields.io/badge/Swift-4-blue.svg)](https://swift.org) -[![License](https://img.shields.io/badge/licence-MIT-blue.svg)](https://github.com/attaswift/SipHash/blob/master/LICENSE.md) -[![Platform](https://img.shields.io/badge/platforms-macOS%20∙%20iOS%20∙%20watchOS%20∙%20tvOS%20∙%20Linux-blue.svg)](https://developer.apple.com/platforms/) - -[![Build Status](https://travis-ci.org/attaswift/SipHash.svg?branch=master)](https://travis-ci.org/attaswift/SipHash) -[![Code Coverage](https://codecov.io/github/attaswift/SipHash/coverage.svg?branch=master)](https://codecov.io/github/attaswift/SipHash?branch=master) - -[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg)](https://github.com/Carthage/Carthage) -[![CocoaPod Version](https://img.shields.io/cocoapods/v/SipHash.svg)](http://cocoapods.org/pods/SipHash) - -`SipHash` is a pure Swift implementation of the [SipHash] hashing algorithm designed by -Jean-Philippe Aumasson and Daniel J. Bernstein in 2012: - -[SipHash]: https://131002.net/siphash - -> SipHash is a family of pseudorandom functions (a.k.a. keyed hash functions) optimized for speed on short messages. -> -> Target applications include network traffic authentication and defense against hash-flooding DoS attacks. -> -> SipHash is secure, fast, and simple (for real): -> - SipHash is simpler and faster than previous cryptographic algorithms (e.g. MACs based on universal hashing) -> - SipHash is competitive in performance with insecure non-cryptographic algorithms (e.g. MurmurHash) -> -> -- [131002.net][SipHash] - -SipHash has a variety of flavors; this package implements the one called SipHash-2-4. - -Note that the Swift Standard Library [already includes an implementation][stdlib] of SipHash-2-4 and SipHash-1-3; -however, the APIs are currently private and not available for use outside of stdlib. This package provides an -independent implementation that's available for use in third-party code. - -[stdlib]: https://github.com/apple/swift/blob/master/stdlib/public/core/SipHash.swift.gyb - -The current release of SipHash requires Swift 4. - -## Sample Code - -```swift -import SipHash - -// `SipHashable` is like `Hashable`, but simpler. -struct Book: SipHashable { - let title: String - let pageCount: Int - - // You need to implement this method instead of `hashValue`. - func appendHashes(to hasher: inout SipHasher) { - // Simply append the fields you want to include in the hash. - hasher.append(title) - hasher.append(pageCount) - } - - static func ==(left: Book, right: Book) -> Bool { - return left.title == right.title && left.pageCount == right.pageCount - } -} - -// You can now use Books in sets or as dictionary keys. -let book = Book(title: "The Colour of Magic", pageCount: 206) -let books: Set = [book] - - -// If you prefer to do so, you may also create & use hashers directly. -var hasher = SipHasher() -hasher.add(book) -hasher.add(42) -// Finalizing the hasher extracts the hash value and invalidates it. -let hash = hasher.finalize() -``` - -## Why Would I Use SipHash? - -Writing a good implementation of `hashValue` is hard, even if we just need to combine the values of a couple of fields. -We need to come up with a deterministic function that blends the field values well, producing a fixed-width -result without too many collisions on typical inputs. But how many collisions are "too many"? Do we even know what -our "typical inputs" look like? For me, the answer to both of these questions is usually "I have absolutely no idea", -and I bet you have the same problem. - -Thus, verifying that our `hashValue` implementations work well is an exercise in frustration. - -We need to somehow check the properties of the hash function by looking at its behavior given various inputs. -It is easy enough to write tests for the requirement that equal values have equal `hashValues`. -But verifying that the hash has few collisions requires making some assumptions on the -statistical properties of "typical" inputs -- and even if we'd be somehow confident enough to do that, writing the code -to do it is way too complicated. - -Instead of rolling your own ad-hoc hash function, why not just use an algorithm designed specifically to blend data -into a hash? Using a standardized algorithm means we don't need to worry about collision behavior any more: if the -algorithm was designed well, we'll always have good results. - -The SipHash algorithm is a particularly good choice for hashing. It implements a 64-bit cryptographic -message-authentication code (MAC) with a 256-bit internal state initialized from a 128-bit secret key that's (typically) -randomly generated for each execution of the binary. -SipHash is designed to protect against hash collision attacks, while remaining simple to use and fast. -It is already used by Perl, Python, Ruby, Rust, and even Swift itself -- which is why the documentation of `Hashable` -explicitly warns that the value returned by `hashValue` may be different across executions. - -The standard library already implements SipHash, but the implementation is private. (It is technically available -for use, but it is not formally part of the stdlib API, and it is subject to change/removal across even point releases.) -I expect a refactored version of stdlib's SipHash will become available as public API in a future Swift release. -But while we're waiting for that, this package provides an alternative implementation that is available today. - -## Is this code full of bugs? - -Indubitably. Please report all bugs you find! - -The package has 100% unit test coverage. Unfortunately this doesn't tell you much about its reliability in practice. - -The test suite verifies that the package generates values that match the test vectors supplied by SipHash's original -authors, which makes me reasonably confident that this package implements SipHash correctly. -Obviously, your mileage may vary. - -## Reference docs - -[Nicely formatted reference docs][docs] are available courtesy of [Jazzy]. - -[docs]: https://attaswift.github.io/SipHash/ -[Jazzy]: https://github.com/realm/jazzy - -## Installation - -### CocoaPods - -If you use CocoaPods, you can start using `SipHash` by including it as a dependency in your `Podfile`: - -``` -pod 'SipHash', '~> 1.2' -``` - -### Carthage - -For Carthage, add the following line to your `Cartfile`: - -``` -github "attaswift/SipHash" ~> 1.2 -``` - -### Swift Package Manager - -For Swift Package Manager, add `SipHash` to the dependencies list inside your `Package.swift` file: - -``` -import PackageDescription - -let package = Package( - name: "MyPackage", - dependencies: [ - .Package(url: "https://github.com/attaswift/SipHash.git", from: "1.2.1") - ] -) -``` - -### Standalone Development - -If you don't use a dependency manager, you need to clone this repo somewhere near your project, and add a reference to `SipHash.xcodeproj` to your project's `xcworkspace`. You can put the clone of SipHash wherever you like on disk, but it is a good idea to set it up as a submodule of your app's top-level Git repository. - -To link your application binary with SipHash, just add `SipHash.framework` from the SipHash project to the Embedded Binaries section of your app target's General page in Xcode. As long as the SipHash project file is referenced in your workspace, this framework will be listed in the "Choose items to add" sheet that opens when you click on the "+" button of your target's Embedded Binaries list. - -There is no need to do any additional setup beyond adding the framework targets to Embedded Binaries. diff --git a/Carthage/Checkouts/SipHash/SipHash.podspec b/Carthage/Checkouts/SipHash/SipHash.podspec deleted file mode 100644 index 682992865..000000000 --- a/Carthage/Checkouts/SipHash/SipHash.podspec +++ /dev/null @@ -1,16 +0,0 @@ -Pod::Spec.new do |spec| - spec.name = 'SipHash' - spec.version = '1.2.2' - spec.ios.deployment_target = "8.0" - spec.osx.deployment_target = "10.9" - spec.tvos.deployment_target = "9.0" - spec.watchos.deployment_target = "2.0" - spec.summary = 'Simple and secure hashing in Swift with the SipHash algorithm' - spec.author = 'Károly Lőrentey' - spec.homepage = 'https://github.com/attaswift/SipHash' - spec.license = { :type => 'MIT', :file => 'LICENSE.md' } - spec.source = { :git => 'https://github.com/attaswift/SipHash.git', :tag => 'v' + String(spec.version) } - spec.source_files = 'SipHash/*.swift' - spec.social_media_url = 'https://twitter.com/lorentey' - spec.documentation_url = 'http://attaswift.github.io/SipHash/' -end diff --git a/Carthage/Checkouts/SipHash/SipHash.xcodeproj/project.pbxproj b/Carthage/Checkouts/SipHash/SipHash.xcodeproj/project.pbxproj deleted file mode 100644 index fca92eb3e..000000000 --- a/Carthage/Checkouts/SipHash/SipHash.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1003 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - BB241BDB1DDA302F0067F917 /* Primitive Types.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241BD71DDA302F0067F917 /* Primitive Types.swift */; }; - BB241BDC1DDA302F0067F917 /* RandomUInt64.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241BD81DDA302F0067F917 /* RandomUInt64.swift */; }; - BB241BDD1DDA302F0067F917 /* SipHasher.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241BD91DDA302F0067F917 /* SipHasher.swift */; }; - BB241BDE1DDA302F0067F917 /* SipHashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241BDA1DDA302F0067F917 /* SipHashable.swift */; }; - BB241BDF1DDA33620067F917 /* SipHasher.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241BD91DDA302F0067F917 /* SipHasher.swift */; }; - BB241BE01DDA33620067F917 /* SipHashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241BDA1DDA302F0067F917 /* SipHashable.swift */; }; - BB241BE11DDA33620067F917 /* RandomUInt64.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241BD81DDA302F0067F917 /* RandomUInt64.swift */; }; - BB241BE21DDA33620067F917 /* Primitive Types.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241BD71DDA302F0067F917 /* Primitive Types.swift */; }; - BB241BE31DDA33620067F917 /* SipHasher.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241BD91DDA302F0067F917 /* SipHasher.swift */; }; - BB241BE41DDA33620067F917 /* SipHashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241BDA1DDA302F0067F917 /* SipHashable.swift */; }; - BB241BE51DDA33620067F917 /* RandomUInt64.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241BD81DDA302F0067F917 /* RandomUInt64.swift */; }; - BB241BE61DDA33620067F917 /* Primitive Types.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241BD71DDA302F0067F917 /* Primitive Types.swift */; }; - BB241BE71DDA33630067F917 /* SipHasher.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241BD91DDA302F0067F917 /* SipHasher.swift */; }; - BB241BE81DDA33630067F917 /* SipHashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241BDA1DDA302F0067F917 /* SipHashable.swift */; }; - BB241BE91DDA33630067F917 /* RandomUInt64.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241BD81DDA302F0067F917 /* RandomUInt64.swift */; }; - BB241BEA1DDA33630067F917 /* Primitive Types.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241BD71DDA302F0067F917 /* Primitive Types.swift */; }; - BB241BEC1DDA67140067F917 /* SipHashableTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241BEB1DDA67140067F917 /* SipHashableTests.swift */; }; - BB241BED1DDA67140067F917 /* SipHashableTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241BEB1DDA67140067F917 /* SipHashableTests.swift */; }; - BB241BEE1DDA67140067F917 /* SipHashableTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241BEB1DDA67140067F917 /* SipHashableTests.swift */; }; - BB241BF01DDA6AF00067F917 /* PrimitiveTypeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241BEF1DDA6AF00067F917 /* PrimitiveTypeTests.swift */; }; - BB241BF11DDA6AF00067F917 /* PrimitiveTypeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241BEF1DDA6AF00067F917 /* PrimitiveTypeTests.swift */; }; - BB241BF21DDA6AF00067F917 /* PrimitiveTypeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241BEF1DDA6AF00067F917 /* PrimitiveTypeTests.swift */; }; - BB241BF41DDA8CBB0067F917 /* generate-docs.sh in Resources */ = {isa = PBXBuildFile; fileRef = BB241BF31DDA8CBB0067F917 /* generate-docs.sh */; }; - BB241BF51DDA8CBB0067F917 /* generate-docs.sh in Resources */ = {isa = PBXBuildFile; fileRef = BB241BF31DDA8CBB0067F917 /* generate-docs.sh */; }; - BB241BF61DDA8CBB0067F917 /* generate-docs.sh in Resources */ = {isa = PBXBuildFile; fileRef = BB241BF31DDA8CBB0067F917 /* generate-docs.sh */; }; - BB241BF81DDA8CEE0067F917 /* .codecov.yml in Resources */ = {isa = PBXBuildFile; fileRef = BB241BF71DDA8CEE0067F917 /* .codecov.yml */; }; - BB241BF91DDA8CEE0067F917 /* .codecov.yml in Resources */ = {isa = PBXBuildFile; fileRef = BB241BF71DDA8CEE0067F917 /* .codecov.yml */; }; - BB241BFA1DDA8CEE0067F917 /* .codecov.yml in Resources */ = {isa = PBXBuildFile; fileRef = BB241BF71DDA8CEE0067F917 /* .codecov.yml */; }; - BBB55ABD1C8F80020050DDA9 /* SipHash.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBB55AB21C8F80020050DDA9 /* SipHash.framework */; }; - BBB55AC21C8F80020050DDA9 /* SipHashTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBB55AC11C8F80020050DDA9 /* SipHashTests.swift */; }; - BBB55ADE1C8F88F20050DDA9 /* SipHash.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBB55AD41C8F88F20050DDA9 /* SipHash.framework */; }; - BBB55B081C8F8CBC0050DDA9 /* SipHash.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBB55AFE1C8F8CBB0050DDA9 /* SipHash.framework */; }; - BBB55B151C8F8FE70050DDA9 /* SipHashTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBB55AC11C8F80020050DDA9 /* SipHashTests.swift */; }; - BBB55B161C8F8FE80050DDA9 /* SipHashTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBB55AC11C8F80020050DDA9 /* SipHashTests.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - BBB55ABE1C8F80020050DDA9 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BBB55AA91C8F80020050DDA9 /* Project object */; - proxyType = 1; - remoteGlobalIDString = BBB55AB11C8F80020050DDA9; - remoteInfo = SipHash; - }; - BBB55ADF1C8F88F20050DDA9 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BBB55AA91C8F80020050DDA9 /* Project object */; - proxyType = 1; - remoteGlobalIDString = BBB55AD31C8F88F20050DDA9; - remoteInfo = SipHash; - }; - BBB55B091C8F8CBC0050DDA9 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BBB55AA91C8F80020050DDA9 /* Project object */; - proxyType = 1; - remoteGlobalIDString = BBB55AFD1C8F8CBB0050DDA9; - remoteInfo = SipHash; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - BB241BC51DD9F6490067F917 /* Package.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; - BB241BC71DD9F7D60067F917 /* SipHash.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; path = SipHash.podspec; sourceTree = ""; }; - BB241BD71DDA302F0067F917 /* Primitive Types.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Primitive Types.swift"; sourceTree = ""; }; - BB241BD81DDA302F0067F917 /* RandomUInt64.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RandomUInt64.swift; sourceTree = ""; }; - BB241BD91DDA302F0067F917 /* SipHasher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SipHasher.swift; sourceTree = ""; }; - BB241BDA1DDA302F0067F917 /* SipHashable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SipHashable.swift; sourceTree = ""; }; - BB241BEB1DDA67140067F917 /* SipHashableTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SipHashableTests.swift; sourceTree = ""; }; - BB241BEF1DDA6AF00067F917 /* PrimitiveTypeTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PrimitiveTypeTests.swift; sourceTree = ""; }; - BB241BF31DDA8CBB0067F917 /* generate-docs.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "generate-docs.sh"; sourceTree = ""; }; - BB241BF71DDA8CEE0067F917 /* .codecov.yml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = .codecov.yml; sourceTree = ""; }; - BB241BFB1DDB49210067F917 /* CHANGELOG.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = ""; }; - BBB55AB21C8F80020050DDA9 /* SipHash.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SipHash.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - BBB55AB71C8F80020050DDA9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - BBB55ABC1C8F80020050DDA9 /* SipHash-Test.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "SipHash-Test.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - BBB55AC11C8F80020050DDA9 /* SipHashTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SipHashTests.swift; sourceTree = ""; }; - BBB55AC31C8F80020050DDA9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - BBB55ACC1C8F80660050DDA9 /* version.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = version.xcconfig; sourceTree = ""; }; - BBB55AD41C8F88F20050DDA9 /* SipHash.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SipHash.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - BBB55ADD1C8F88F20050DDA9 /* SipHash-Test.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "SipHash-Test.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - BBB55AF11C8F8BE00050DDA9 /* SipHash.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SipHash.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - BBB55AFE1C8F8CBB0050DDA9 /* SipHash.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SipHash.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - BBB55B071C8F8CBB0050DDA9 /* SipHash-Test.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "SipHash-Test.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - BBB55B1C1C8F90F60050DDA9 /* .travis.yml */ = {isa = PBXFileReference; lastKnownFileType = text; path = .travis.yml; sourceTree = ""; }; - BBB55B1D1C8F9E850050DDA9 /* LICENSE.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = LICENSE.md; sourceTree = ""; }; - BBB55B1E1C8F9E920050DDA9 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - BBB55AAE1C8F80020050DDA9 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55AB91C8F80020050DDA9 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - BBB55ABD1C8F80020050DDA9 /* SipHash.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55AD01C8F88F20050DDA9 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55ADA1C8F88F20050DDA9 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - BBB55ADE1C8F88F20050DDA9 /* SipHash.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55AED1C8F8BE00050DDA9 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55AFA1C8F8CBB0050DDA9 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55B041C8F8CBB0050DDA9 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - BBB55B081C8F8CBC0050DDA9 /* SipHash.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - BBB55AA81C8F80020050DDA9 = { - isa = PBXGroup; - children = ( - BBB55B1E1C8F9E920050DDA9 /* README.md */, - BB241BFB1DDB49210067F917 /* CHANGELOG.md */, - BBB55B1D1C8F9E850050DDA9 /* LICENSE.md */, - BB241BC51DD9F6490067F917 /* Package.swift */, - BB241BC71DD9F7D60067F917 /* SipHash.podspec */, - BBB55B1C1C8F90F60050DDA9 /* .travis.yml */, - BB241BF71DDA8CEE0067F917 /* .codecov.yml */, - BB241BF31DDA8CBB0067F917 /* generate-docs.sh */, - BBB55ACC1C8F80660050DDA9 /* version.xcconfig */, - BBB55AB41C8F80020050DDA9 /* SipHash */, - BBB55AC01C8F80020050DDA9 /* SipHashTests */, - BBB55AB31C8F80020050DDA9 /* Products */, - ); - sourceTree = ""; - }; - BBB55AB31C8F80020050DDA9 /* Products */ = { - isa = PBXGroup; - children = ( - BBB55AB21C8F80020050DDA9 /* SipHash.framework */, - BBB55ABC1C8F80020050DDA9 /* SipHash-Test.xctest */, - BBB55AD41C8F88F20050DDA9 /* SipHash.framework */, - BBB55ADD1C8F88F20050DDA9 /* SipHash-Test.xctest */, - BBB55AF11C8F8BE00050DDA9 /* SipHash.framework */, - BBB55AFE1C8F8CBB0050DDA9 /* SipHash.framework */, - BBB55B071C8F8CBB0050DDA9 /* SipHash-Test.xctest */, - ); - name = Products; - sourceTree = ""; - }; - BBB55AB41C8F80020050DDA9 /* SipHash */ = { - isa = PBXGroup; - children = ( - BB241BD91DDA302F0067F917 /* SipHasher.swift */, - BB241BDA1DDA302F0067F917 /* SipHashable.swift */, - BB241BD81DDA302F0067F917 /* RandomUInt64.swift */, - BB241BD71DDA302F0067F917 /* Primitive Types.swift */, - BBB55AB71C8F80020050DDA9 /* Info.plist */, - ); - path = SipHash; - sourceTree = ""; - }; - BBB55AC01C8F80020050DDA9 /* SipHashTests */ = { - isa = PBXGroup; - children = ( - BBB55AC11C8F80020050DDA9 /* SipHashTests.swift */, - BB241BEB1DDA67140067F917 /* SipHashableTests.swift */, - BB241BEF1DDA6AF00067F917 /* PrimitiveTypeTests.swift */, - BBB55AC31C8F80020050DDA9 /* Info.plist */, - ); - path = SipHashTests; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - BBB55AAF1C8F80020050DDA9 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55AD11C8F88F20050DDA9 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55AEE1C8F8BE00050DDA9 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55AFB1C8F8CBB0050DDA9 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - BBB55AB11C8F80020050DDA9 /* iOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = BBB55AC61C8F80020050DDA9 /* Build configuration list for PBXNativeTarget "iOS" */; - buildPhases = ( - BBB55AAD1C8F80020050DDA9 /* Sources */, - BBB55AAE1C8F80020050DDA9 /* Frameworks */, - BBB55AAF1C8F80020050DDA9 /* Headers */, - BBB55AB01C8F80020050DDA9 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = iOS; - productName = SipHash; - productReference = BBB55AB21C8F80020050DDA9 /* SipHash.framework */; - productType = "com.apple.product-type.framework"; - }; - BBB55ABB1C8F80020050DDA9 /* iOS Tests */ = { - isa = PBXNativeTarget; - buildConfigurationList = BBB55AC91C8F80020050DDA9 /* Build configuration list for PBXNativeTarget "iOS Tests" */; - buildPhases = ( - BBB55AB81C8F80020050DDA9 /* Sources */, - BBB55AB91C8F80020050DDA9 /* Frameworks */, - BBB55ABA1C8F80020050DDA9 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - BBB55ABF1C8F80020050DDA9 /* PBXTargetDependency */, - ); - name = "iOS Tests"; - productName = SipHashTests; - productReference = BBB55ABC1C8F80020050DDA9 /* SipHash-Test.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - BBB55AD31C8F88F20050DDA9 /* macOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = BBB55AE51C8F88F20050DDA9 /* Build configuration list for PBXNativeTarget "macOS" */; - buildPhases = ( - BBB55ACF1C8F88F20050DDA9 /* Sources */, - BBB55AD01C8F88F20050DDA9 /* Frameworks */, - BBB55AD11C8F88F20050DDA9 /* Headers */, - BBB55AD21C8F88F20050DDA9 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = macOS; - productName = SipHash; - productReference = BBB55AD41C8F88F20050DDA9 /* SipHash.framework */; - productType = "com.apple.product-type.framework"; - }; - BBB55ADC1C8F88F20050DDA9 /* macOS Tests */ = { - isa = PBXNativeTarget; - buildConfigurationList = BBB55AE81C8F88F20050DDA9 /* Build configuration list for PBXNativeTarget "macOS Tests" */; - buildPhases = ( - BBB55AD91C8F88F20050DDA9 /* Sources */, - BBB55ADA1C8F88F20050DDA9 /* Frameworks */, - BBB55ADB1C8F88F20050DDA9 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - BBB55AE01C8F88F20050DDA9 /* PBXTargetDependency */, - ); - name = "macOS Tests"; - productName = SipHashTests; - productReference = BBB55ADD1C8F88F20050DDA9 /* SipHash-Test.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - BBB55AF01C8F8BE00050DDA9 /* watchOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = BBB55AF61C8F8BE00050DDA9 /* Build configuration list for PBXNativeTarget "watchOS" */; - buildPhases = ( - BBB55AEC1C8F8BE00050DDA9 /* Sources */, - BBB55AED1C8F8BE00050DDA9 /* Frameworks */, - BBB55AEE1C8F8BE00050DDA9 /* Headers */, - BBB55AEF1C8F8BE00050DDA9 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = watchOS; - productName = SipHash; - productReference = BBB55AF11C8F8BE00050DDA9 /* SipHash.framework */; - productType = "com.apple.product-type.framework"; - }; - BBB55AFD1C8F8CBB0050DDA9 /* tvOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = BBB55B0F1C8F8CBC0050DDA9 /* Build configuration list for PBXNativeTarget "tvOS" */; - buildPhases = ( - BBB55AF91C8F8CBB0050DDA9 /* Sources */, - BBB55AFA1C8F8CBB0050DDA9 /* Frameworks */, - BBB55AFB1C8F8CBB0050DDA9 /* Headers */, - BBB55AFC1C8F8CBB0050DDA9 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = tvOS; - productName = SipHash; - productReference = BBB55AFE1C8F8CBB0050DDA9 /* SipHash.framework */; - productType = "com.apple.product-type.framework"; - }; - BBB55B061C8F8CBB0050DDA9 /* tvOS Tests */ = { - isa = PBXNativeTarget; - buildConfigurationList = BBB55B121C8F8CBC0050DDA9 /* Build configuration list for PBXNativeTarget "tvOS Tests" */; - buildPhases = ( - BBB55B031C8F8CBB0050DDA9 /* Sources */, - BBB55B041C8F8CBB0050DDA9 /* Frameworks */, - BBB55B051C8F8CBB0050DDA9 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - BBB55B0A1C8F8CBC0050DDA9 /* PBXTargetDependency */, - ); - name = "tvOS Tests"; - productName = SipHashTests; - productReference = BBB55B071C8F8CBB0050DDA9 /* SipHash-Test.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - BBB55AA91C8F80020050DDA9 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 0900; - ORGANIZATIONNAME = "Károly Lőrentey"; - TargetAttributes = { - BBB55AB11C8F80020050DDA9 = { - CreatedOnToolsVersion = 7.3; - LastSwiftMigration = 0810; - }; - BBB55ABB1C8F80020050DDA9 = { - CreatedOnToolsVersion = 7.3; - LastSwiftMigration = 0800; - }; - BBB55AD31C8F88F20050DDA9 = { - CreatedOnToolsVersion = 7.3; - LastSwiftMigration = 0900; - ProvisioningStyle = Automatic; - }; - BBB55ADC1C8F88F20050DDA9 = { - CreatedOnToolsVersion = 7.3; - LastSwiftMigration = 0900; - }; - BBB55AF01C8F8BE00050DDA9 = { - CreatedOnToolsVersion = 7.3; - }; - BBB55AFD1C8F8CBB0050DDA9 = { - CreatedOnToolsVersion = 7.3; - }; - BBB55B061C8F8CBB0050DDA9 = { - CreatedOnToolsVersion = 7.3; - }; - }; - }; - buildConfigurationList = BBB55AAC1C8F80020050DDA9 /* Build configuration list for PBXProject "SipHash" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = BBB55AA81C8F80020050DDA9; - productRefGroup = BBB55AB31C8F80020050DDA9 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - BBB55AB11C8F80020050DDA9 /* iOS */, - BBB55AD31C8F88F20050DDA9 /* macOS */, - BBB55AF01C8F8BE00050DDA9 /* watchOS */, - BBB55AFD1C8F8CBB0050DDA9 /* tvOS */, - BBB55ABB1C8F80020050DDA9 /* iOS Tests */, - BBB55ADC1C8F88F20050DDA9 /* macOS Tests */, - BBB55B061C8F8CBB0050DDA9 /* tvOS Tests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - BBB55AB01C8F80020050DDA9 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55ABA1C8F80020050DDA9 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BB241BF81DDA8CEE0067F917 /* .codecov.yml in Resources */, - BB241BF41DDA8CBB0067F917 /* generate-docs.sh in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55AD21C8F88F20050DDA9 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55ADB1C8F88F20050DDA9 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BB241BF91DDA8CEE0067F917 /* .codecov.yml in Resources */, - BB241BF51DDA8CBB0067F917 /* generate-docs.sh in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55AEF1C8F8BE00050DDA9 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55AFC1C8F8CBB0050DDA9 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55B051C8F8CBB0050DDA9 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BB241BFA1DDA8CEE0067F917 /* .codecov.yml in Resources */, - BB241BF61DDA8CBB0067F917 /* generate-docs.sh in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - BBB55AAD1C8F80020050DDA9 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BB241BDE1DDA302F0067F917 /* SipHashable.swift in Sources */, - BB241BDD1DDA302F0067F917 /* SipHasher.swift in Sources */, - BB241BDC1DDA302F0067F917 /* RandomUInt64.swift in Sources */, - BB241BDB1DDA302F0067F917 /* Primitive Types.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55AB81C8F80020050DDA9 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BB241BEC1DDA67140067F917 /* SipHashableTests.swift in Sources */, - BBB55AC21C8F80020050DDA9 /* SipHashTests.swift in Sources */, - BB241BF01DDA6AF00067F917 /* PrimitiveTypeTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55ACF1C8F88F20050DDA9 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BB241BE01DDA33620067F917 /* SipHashable.swift in Sources */, - BB241BDF1DDA33620067F917 /* SipHasher.swift in Sources */, - BB241BE21DDA33620067F917 /* Primitive Types.swift in Sources */, - BB241BE11DDA33620067F917 /* RandomUInt64.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55AD91C8F88F20050DDA9 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BB241BED1DDA67140067F917 /* SipHashableTests.swift in Sources */, - BBB55B151C8F8FE70050DDA9 /* SipHashTests.swift in Sources */, - BB241BF11DDA6AF00067F917 /* PrimitiveTypeTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55AEC1C8F8BE00050DDA9 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BB241BE41DDA33620067F917 /* SipHashable.swift in Sources */, - BB241BE31DDA33620067F917 /* SipHasher.swift in Sources */, - BB241BE61DDA33620067F917 /* Primitive Types.swift in Sources */, - BB241BE51DDA33620067F917 /* RandomUInt64.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55AF91C8F8CBB0050DDA9 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BB241BE81DDA33630067F917 /* SipHashable.swift in Sources */, - BB241BE71DDA33630067F917 /* SipHasher.swift in Sources */, - BB241BEA1DDA33630067F917 /* Primitive Types.swift in Sources */, - BB241BE91DDA33630067F917 /* RandomUInt64.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBB55B031C8F8CBB0050DDA9 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BB241BEE1DDA67140067F917 /* SipHashableTests.swift in Sources */, - BBB55B161C8F8FE80050DDA9 /* SipHashTests.swift in Sources */, - BB241BF21DDA6AF00067F917 /* PrimitiveTypeTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - BBB55ABF1C8F80020050DDA9 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = BBB55AB11C8F80020050DDA9 /* iOS */; - targetProxy = BBB55ABE1C8F80020050DDA9 /* PBXContainerItemProxy */; - }; - BBB55AE01C8F88F20050DDA9 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = BBB55AD31C8F88F20050DDA9 /* macOS */; - targetProxy = BBB55ADF1C8F88F20050DDA9 /* PBXContainerItemProxy */; - }; - BBB55B0A1C8F8CBC0050DDA9 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = BBB55AFD1C8F8CBB0050DDA9 /* tvOS */; - targetProxy = BBB55B091C8F8CBC0050DDA9 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - BBB55AC41C8F80020050DDA9 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = BBB55ACC1C8F80660050DDA9 /* version.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = NO; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = "$(BUILD_NUMBER)"; - DEBUG_INFORMATION_FORMAT = dwarf; - DYLIB_COMPATIBILITY_VERSION = "$(BUILD_NUMBER)"; - DYLIB_CURRENT_VERSION = "$(BUILD_NUMBER)"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - OTHER_SWIFT_FLAGS = "-DDebug"; - SWIFT_ENFORCE_EXCLUSIVE_ACCESS = full; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; - VALIDATE_PRODUCT = YES; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - BBB55AC51C8F80020050DDA9 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = BBB55ACC1C8F80660050DDA9 /* version.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = NO; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = "$(BUILD_NUMBER)"; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DYLIB_COMPATIBILITY_VERSION = "$(BUILD_NUMBER)"; - DYLIB_CURRENT_VERSION = "$(BUILD_NUMBER)"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = NO; - SWIFT_ENFORCE_EXCLUSIVE_ACCESS = full; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; - VALIDATE_PRODUCT = YES; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - BBB55AC71C8F80020050DDA9 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - DEFINES_MODULE = YES; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = SipHash/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).$(PLATFORM_DISPLAY_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(PROJECT_NAME)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - BBB55AC81C8F80020050DDA9 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - DEFINES_MODULE = YES; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = SipHash/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).$(PLATFORM_DISPLAY_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(PROJECT_NAME)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - BBB55ACA1C8F80020050DDA9 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - APPLICATION_EXTENSION_API_ONLY = NO; - INFOPLIST_FILE = SipHashTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).Tests"; - PRODUCT_NAME = "$(PROJECT_NAME)-Test"; - SDKROOT = iphoneos; - }; - name = Debug; - }; - BBB55ACB1C8F80020050DDA9 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - APPLICATION_EXTENSION_API_ONLY = NO; - INFOPLIST_FILE = SipHashTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).Tests"; - PRODUCT_NAME = "$(PROJECT_NAME)-Test"; - SDKROOT = iphoneos; - }; - name = Release; - }; - BBB55AE61C8F88F20050DDA9 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - COMBINE_HIDPI_IMAGES = YES; - DEFINES_MODULE = YES; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_VERSION = A; - INFOPLIST_FILE = SipHash/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).$(PLATFORM_DISPLAY_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(PROJECT_NAME)"; - SDKROOT = macosx; - SKIP_INSTALL = YES; - }; - name = Debug; - }; - BBB55AE71C8F88F20050DDA9 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - COMBINE_HIDPI_IMAGES = YES; - DEFINES_MODULE = YES; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_VERSION = A; - INFOPLIST_FILE = SipHash/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).$(PLATFORM_DISPLAY_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(PROJECT_NAME)"; - SDKROOT = macosx; - SKIP_INSTALL = YES; - }; - name = Release; - }; - BBB55AE91C8F88F20050DDA9 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - APPLICATION_EXTENSION_API_ONLY = NO; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = SipHashTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).Tests"; - PRODUCT_NAME = "$(PROJECT_NAME)-Test"; - SDKROOT = macosx; - }; - name = Debug; - }; - BBB55AEA1C8F88F20050DDA9 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - APPLICATION_EXTENSION_API_ONLY = NO; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = SipHashTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).Tests"; - PRODUCT_NAME = "$(PROJECT_NAME)-Test"; - SDKROOT = macosx; - }; - name = Release; - }; - BBB55AF71C8F8BE00050DDA9 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - DEFINES_MODULE = YES; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = SipHash/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).$(PLATFORM_DISPLAY_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(PROJECT_NAME)"; - SDKROOT = watchos; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = 4; - }; - name = Debug; - }; - BBB55AF81C8F8BE00050DDA9 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - DEFINES_MODULE = YES; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = SipHash/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).$(PLATFORM_DISPLAY_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(PROJECT_NAME)"; - SDKROOT = watchos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = 4; - }; - name = Release; - }; - BBB55B101C8F8CBC0050DDA9 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - DEFINES_MODULE = YES; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = SipHash/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).$(PLATFORM_DISPLAY_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(PROJECT_NAME)"; - SDKROOT = appletvos; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = 3; - }; - name = Debug; - }; - BBB55B111C8F8CBC0050DDA9 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - DEFINES_MODULE = YES; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = SipHash/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).$(PLATFORM_DISPLAY_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(PROJECT_NAME)"; - SDKROOT = appletvos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = 3; - }; - name = Release; - }; - BBB55B131C8F8CBC0050DDA9 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - APPLICATION_EXTENSION_API_ONLY = NO; - INFOPLIST_FILE = SipHashTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).Tests"; - PRODUCT_NAME = "$(PROJECT_NAME)-Test"; - SDKROOT = appletvos; - }; - name = Debug; - }; - BBB55B141C8F8CBC0050DDA9 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - APPLICATION_EXTENSION_API_ONLY = NO; - INFOPLIST_FILE = SipHashTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).Tests"; - PRODUCT_NAME = "$(PROJECT_NAME)-Test"; - SDKROOT = appletvos; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - BBB55AAC1C8F80020050DDA9 /* Build configuration list for PBXProject "SipHash" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BBB55AC41C8F80020050DDA9 /* Debug */, - BBB55AC51C8F80020050DDA9 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - BBB55AC61C8F80020050DDA9 /* Build configuration list for PBXNativeTarget "iOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BBB55AC71C8F80020050DDA9 /* Debug */, - BBB55AC81C8F80020050DDA9 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - BBB55AC91C8F80020050DDA9 /* Build configuration list for PBXNativeTarget "iOS Tests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BBB55ACA1C8F80020050DDA9 /* Debug */, - BBB55ACB1C8F80020050DDA9 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - BBB55AE51C8F88F20050DDA9 /* Build configuration list for PBXNativeTarget "macOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BBB55AE61C8F88F20050DDA9 /* Debug */, - BBB55AE71C8F88F20050DDA9 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - BBB55AE81C8F88F20050DDA9 /* Build configuration list for PBXNativeTarget "macOS Tests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BBB55AE91C8F88F20050DDA9 /* Debug */, - BBB55AEA1C8F88F20050DDA9 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - BBB55AF61C8F8BE00050DDA9 /* Build configuration list for PBXNativeTarget "watchOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BBB55AF71C8F8BE00050DDA9 /* Debug */, - BBB55AF81C8F8BE00050DDA9 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - BBB55B0F1C8F8CBC0050DDA9 /* Build configuration list for PBXNativeTarget "tvOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BBB55B101C8F8CBC0050DDA9 /* Debug */, - BBB55B111C8F8CBC0050DDA9 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - BBB55B121C8F8CBC0050DDA9 /* Build configuration list for PBXNativeTarget "tvOS Tests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BBB55B131C8F8CBC0050DDA9 /* Debug */, - BBB55B141C8F8CBC0050DDA9 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = BBB55AA91C8F80020050DDA9 /* Project object */; -} diff --git a/Carthage/Checkouts/SipHash/SipHash.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Carthage/Checkouts/SipHash/SipHash.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 998a43398..000000000 --- a/Carthage/Checkouts/SipHash/SipHash.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Carthage/Checkouts/SipHash/SipHash.xcodeproj/xcshareddata/xcschemes/SipHash-iOS.xcscheme b/Carthage/Checkouts/SipHash/SipHash.xcodeproj/xcshareddata/xcschemes/SipHash-iOS.xcscheme deleted file mode 100644 index 5ee563e39..000000000 --- a/Carthage/Checkouts/SipHash/SipHash.xcodeproj/xcshareddata/xcschemes/SipHash-iOS.xcscheme +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/SipHash/SipHash.xcodeproj/xcshareddata/xcschemes/SipHash-macOS.xcscheme b/Carthage/Checkouts/SipHash/SipHash.xcodeproj/xcshareddata/xcschemes/SipHash-macOS.xcscheme deleted file mode 100644 index 428bf2312..000000000 --- a/Carthage/Checkouts/SipHash/SipHash.xcodeproj/xcshareddata/xcschemes/SipHash-macOS.xcscheme +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/SipHash/SipHash.xcodeproj/xcshareddata/xcschemes/SipHash-tvOS.xcscheme b/Carthage/Checkouts/SipHash/SipHash.xcodeproj/xcshareddata/xcschemes/SipHash-tvOS.xcscheme deleted file mode 100644 index 118ccf6c1..000000000 --- a/Carthage/Checkouts/SipHash/SipHash.xcodeproj/xcshareddata/xcschemes/SipHash-tvOS.xcscheme +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/SipHash/SipHash.xcodeproj/xcshareddata/xcschemes/SipHash-watchOS.xcscheme b/Carthage/Checkouts/SipHash/SipHash.xcodeproj/xcshareddata/xcschemes/SipHash-watchOS.xcscheme deleted file mode 100644 index 2e2c0bf4f..000000000 --- a/Carthage/Checkouts/SipHash/SipHash.xcodeproj/xcshareddata/xcschemes/SipHash-watchOS.xcscheme +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/SipHash/SipHash/Info.plist b/Carthage/Checkouts/SipHash/SipHash/Info.plist deleted file mode 100644 index 85858d565..000000000 --- a/Carthage/Checkouts/SipHash/SipHash/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - $(VERSION_STRING) - CFBundleSignature - ???? - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Carthage/Checkouts/SipHash/SipHash/Primitive Types.swift b/Carthage/Checkouts/SipHash/SipHash/Primitive Types.swift deleted file mode 100644 index 45824562a..000000000 --- a/Carthage/Checkouts/SipHash/SipHash/Primitive Types.swift +++ /dev/null @@ -1,171 +0,0 @@ -// -// Primitive Types.swift -// SipHash -// -// Created by Károly Lőrentey on 2016-11-14. -// Copyright © 2016-2017 Károly Lőrentey. -// - -extension SipHasher { - //MARK: Appending buffer slices - - /// Add the contents of `slice` to this hash. - /// - /// - Requires: `finalize()` hasn't been called on this instance yet. - public mutating func append(_ slice: Slice) { - self.append(UnsafeRawBufferPointer(rebasing: slice)) - } - - //MARK: Appending Integers - - /// Add `value` to this hash. - /// - /// - Requires: `finalize()` hasn't been called on this instance yet. - public mutating func append(_ value: Bool) { - var data = value - append(UnsafeRawBufferPointer(start: &data, count: MemoryLayout.size)) - } - - /// Add `value` to this hash. - /// - /// - Requires: `finalize()` hasn't been called on this instance yet. - public mutating func append(_ value: Int) { - var data = value - append(UnsafeRawBufferPointer(start: &data, count: MemoryLayout.size)) - } - - /// Add `value` to this hash. - /// - /// - Requires: `finalize()` hasn't been called on this instance yet. - public mutating func append(_ value: UInt) { - var data = value - append(UnsafeRawBufferPointer(start: &data, count: MemoryLayout.size)) - } - - /// Add `value` to this hash. - /// - /// - Requires: `finalize()` hasn't been called on this instance yet. - public mutating func append(_ value: Int64) { - var data = value - append(UnsafeRawBufferPointer(start: &data, count: MemoryLayout.size)) - } - - /// Add `value` to this hash. - /// - /// - Requires: `finalize()` hasn't been called on this instance yet. - public mutating func append(_ value: UInt64) { - var data = value - append(UnsafeRawBufferPointer(start: &data, count: MemoryLayout.size)) - } - - /// Add `value` to this hash. - /// - /// - Requires: `finalize()` hasn't been called on this instance yet. - public mutating func append(_ value: Int32) { - var data = value - append(UnsafeRawBufferPointer(start: &data, count: MemoryLayout.size)) - } - - /// Add `value` to this hash. - /// - /// - Requires: `finalize()` hasn't been called on this instance yet. - public mutating func append(_ value: UInt32) { - var data = value - append(UnsafeRawBufferPointer(start: &data, count: MemoryLayout.size)) - } - - /// Add `value` to this hash. - /// - /// - Requires: `finalize()` hasn't been called on this instance yet. - public mutating func append(_ value: Int16) { - var data = value - append(UnsafeRawBufferPointer(start: &data, count: MemoryLayout.size)) - } - - /// Add `value` to this hash. - /// - /// - Requires: `finalize()` hasn't been called on this instance yet. - public mutating func append(_ value: UInt16) { - var data = value - append(UnsafeRawBufferPointer(start: &data, count: MemoryLayout.size)) - } - - /// Add `value` to this hash. - /// - /// - Requires: `finalize()` hasn't been called on this instance yet. - public mutating func append(_ value: Int8) { - var data = value - append(UnsafeRawBufferPointer(start: &data, count: MemoryLayout.size)) - } - - /// Add `value` to this hash. - /// - /// - Requires: `finalize()` hasn't been called on this instance yet. - public mutating func append(_ value: UInt8) { - var data = value - append(UnsafeRawBufferPointer(start: &data, count: MemoryLayout.size)) - } -} - -extension SipHasher { - //MARK: Appending Floating Point Types - - /// Add `value` to this hash. - /// - /// - Requires: `finalize()` hasn't been called on this instance yet. - public mutating func append(_ value: Float) { - var data = value.isZero ? 0.0 : value - append(UnsafeRawBufferPointer(start: &data, count: MemoryLayout.size)) - } - - /// Add `value` to this hash. - /// - /// - Requires: `finalize()` hasn't been called on this instance yet. - public mutating func append(_ value: Double) { - var data = value.isZero ? 0.0 : value - append(UnsafeRawBufferPointer(start: &data, count: MemoryLayout.size)) - } - - #if arch(i386) || arch(x86_64) - /// Add `value` to this hash. - /// - /// - Requires: `finalize()` hasn't been called on this instance yet. - public mutating func append(_ value: Float80) { - var data = value.isZero ? 0.0 : value - // Float80 is 16 bytes wide but the last 6 are uninitialized. - let buffer = UnsafeRawBufferPointer(start: &data, count: 10) - append(buffer) - } - #endif -} - -#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) - import CoreGraphics - - extension SipHasher { - /// Add `value` to this hash. - /// - /// - Requires: `finalize()` hasn't been called on this instance yet. - public mutating func append(_ value: CGFloat) { - var data = value.isZero ? 0.0 : value - append(UnsafeRawBufferPointer(start: &data, count: MemoryLayout.size)) - } - } -#endif - -extension SipHasher { - //MARK: Appending Optionals - - /// Add `value` to this hash. - /// - /// - Requires: `finalize()` hasn't been called on this instance yet. - public mutating func append(_ value: Value?) { - if let value = value { - self.append(1 as UInt8) - self.append(value) - } - else { - self.append(0 as UInt8) - } - } -} diff --git a/Carthage/Checkouts/SipHash/SipHash/RandomUInt64.swift b/Carthage/Checkouts/SipHash/SipHash/RandomUInt64.swift deleted file mode 100644 index d55eb0bdd..000000000 --- a/Carthage/Checkouts/SipHash/SipHash/RandomUInt64.swift +++ /dev/null @@ -1,39 +0,0 @@ -// -// RandomUInt64.swift -// SipHash -// -// Created by Károly Lőrentey on 2016-11-14. -// Copyright © 2016-2017 Károly Lőrentey. -// - -#if os(iOS) || os(macOS) || os(watchOS) || os(tvOS) - import Darwin - - func randomUInt64() -> UInt64 { - return UInt64(arc4random()) << 32 | UInt64(arc4random()) - } -#elseif os(Linux) || os(FreeBSD) - import Glibc - - func randomUInt64() -> UInt64 { - var randomArray = [UInt8](repeating: 0, count: 8) - - let fd = open("/dev/urandom", O_RDONLY) - defer { - close(fd) - } - - let _ = read(fd, &randomArray, MemoryLayout.size * 8) - - var randomInt: UInt64 = 0 - for i in 0.. UInt64 { - fatalError("Unsupported platform") - } -#endif diff --git a/Carthage/Checkouts/SipHash/SipHash/SipHashable.swift b/Carthage/Checkouts/SipHash/SipHash/SipHashable.swift deleted file mode 100644 index 5811717c4..000000000 --- a/Carthage/Checkouts/SipHash/SipHash/SipHashable.swift +++ /dev/null @@ -1,65 +0,0 @@ -// -// SipHashable.swift -// SipHash -// -// Created by Károly Lőrentey on 2016-11-14. -// Copyright © 2016-2017 Károly Lőrentey. -// - -/// A variant of `Hashable` that makes it simpler to generate good hash values. -/// -/// Instead of `hashValue`, you need to implement `addHashes`, adding -/// data that should contribute to the hash to the supplied hasher. -/// The hasher takes care of blending the supplied data together. -/// -/// Example implementation: -/// -/// ``` -/// struct Book: SipHashable { -/// var title: String -/// var pageCount: Int -/// -/// func appendHashes(to hasher: inout SipHasher) { -/// hasher.append(title) -/// hasher.append(pageCount) -/// } -/// -/// static func ==(left: Book, right: Book) -> Bool { -/// return left.title == right.title && left.pageCount == right.pageCount -/// } -/// } -/// ``` -public protocol SipHashable: Hashable { - /// Add components of `self` that should contribute to hashing to `hash`. - func appendHashes(to hasher: inout SipHasher) -} - -extension SipHashable { - /// The hash value, calculated using `addHashes`. - /// - /// Hash values are not guaranteed to be equal across different executions of your program. - /// Do not save hash values to use during a future execution. - public var hashValue: Int { - var hasher = SipHasher() - appendHashes(to: &hasher) - return hasher.finalize() - } -} - -extension SipHasher { - //MARK: Appending Hashable Values - - /// Add hashing components in `value` to this hash. This method simply calls `value.addHashes`. - /// - /// - Requires: `finalize()` hasn't been called on this instance yet. - public mutating func append(_ value: H) { - value.appendHashes(to: &self) - } - - /// Add the hash value of `value` to this hash. - /// - /// - Requires: `finalize()` hasn't been called on this instance yet. - public mutating func append(_ value: H) { - append(value.hashValue) - } -} diff --git a/Carthage/Checkouts/SipHash/SipHash/SipHasher.swift b/Carthage/Checkouts/SipHash/SipHash/SipHasher.swift deleted file mode 100644 index c1bfce62c..000000000 --- a/Carthage/Checkouts/SipHash/SipHash/SipHasher.swift +++ /dev/null @@ -1,197 +0,0 @@ -// -// SipHasher.swift -// SipHash -// -// Created by Károly Lőrentey on 2016-03-08. -// Copyright © 2016-2017 Károly Lőrentey. - -private func rotateLeft(_ value: UInt64, by amount: UInt64) -> UInt64 { - return (value << amount) | (value >> (64 - amount)) -} - -/// An implementation of the [SipHash-2-4](https://131002.net/siphash) hashing algorithm, -/// suitable for use in projects outside the Swift standard library. -/// (The Swift stdlib already includes SipHash; unfortunately its API is not public.) -/// -/// SipHash was invented by Jean-Philippe Aumasson and Daniel J. Bernstein. -public struct SipHasher { - /// The number of compression rounds. - private static let c = 2 - /// The number of finalization rounds. - private static let d = 4 - - /// The default key, used by the default initializer. - /// Each process has a unique key, chosen randomly when the first instance of `SipHasher` is initialized. - static let key: (UInt64, UInt64) = (randomUInt64(), randomUInt64()) - - /// Word 0 of the internal state, initialized to ASCII encoding of "somepseu". - var v0: UInt64 = 0x736f6d6570736575 - /// Word 1 of the internal state, initialized to ASCII encoding of "dorandom". - var v1: UInt64 = 0x646f72616e646f6d - /// Word 2 of the internal state, initialized to ASCII encoding of "lygenera". - var v2: UInt64 = 0x6c7967656e657261 - /// Word 3 of the internal state, initialized to ASCII encoding of "tedbytes". - var v3: UInt64 = 0x7465646279746573 - - /// The current partial word, not yet mixed in with the internal state. - var pendingBytes: UInt64 = 0 - /// The number of bytes that are currently pending in `tailBytes`. Guaranteed to be between 0 and 7. - var pendingByteCount = 0 - /// The number of bytes collected so far, or -1 if the hash value has already been finalized. - var byteCount = 0 - - //MARK: Initializers - - /// Initialize a new instance with the default key, generated randomly the first time this initializer is called. - public init() { - self.init(k0: SipHasher.key.0, k1: SipHasher.key.1) - } - - /// Initialize a new instance with the specified key. - /// - /// - Parameter k0: The low 64 bits of the secret key. - /// - Parameter k1: The high 64 bits of the secret key. - public init(k0: UInt64, k1: UInt64) { - v0 ^= k0 - v1 ^= k1 - v2 ^= k0 - v3 ^= k1 - } - - private mutating func sipRound() { - v0 = v0 &+ v1 - v1 = rotateLeft(v1, by: 13) - v1 ^= v0 - v0 = rotateLeft(v0, by: 32) - v2 = v2 &+ v3 - v3 = rotateLeft(v3, by: 16) - v3 ^= v2 - v0 = v0 &+ v3 - v3 = rotateLeft(v3, by: 21) - v3 ^= v0 - v2 = v2 &+ v1 - v1 = rotateLeft(v1, by: 17) - v1 ^= v2 - v2 = rotateLeft(v2, by: 32) - } - - mutating func compressWord(_ m: UInt64) { - v3 ^= m - for _ in 0 ..< SipHasher.c { - sipRound() - } - v0 ^= m - } - - mutating func _finalize() -> UInt64 { - precondition(byteCount >= 0) - pendingBytes |= UInt64(byteCount) << 56 - byteCount = -1 - - compressWord(pendingBytes) - - v2 ^= 0xff - for _ in 0 ..< SipHasher.d { - sipRound() - } - - return v0 ^ v1 ^ v2 ^ v3 - } - - //MARK: Appending data - - /// Add all bytes in `buffer` to this hash. - /// - /// - Requires: `finalize()` hasn't been called on this instance yet. - public mutating func append(_ buffer: UnsafeRawBufferPointer) { - precondition(byteCount >= 0) - - // Use the first couple of bytes to complete the pending word. - var i = 0 - if pendingByteCount > 0 { - let readCount = min(buffer.count, 8 - pendingByteCount) - var m: UInt64 = 0 - switch readCount { - case 7: - m |= UInt64(buffer[6]) << 48 - fallthrough - case 6: - m |= UInt64(buffer[5]) << 40 - fallthrough - case 5: - m |= UInt64(buffer[4]) << 32 - fallthrough - case 4: - m |= UInt64(buffer[3]) << 24 - fallthrough - case 3: - m |= UInt64(buffer[2]) << 16 - fallthrough - case 2: - m |= UInt64(buffer[1]) << 8 - fallthrough - case 1: - m |= UInt64(buffer[0]) - default: - precondition(readCount == 0) - } - pendingBytes |= m << UInt64(pendingByteCount << 3) - pendingByteCount += readCount - i += readCount - - if pendingByteCount == 8 { - compressWord(pendingBytes) - pendingBytes = 0 - pendingByteCount = 0 - } - } - - let left = (buffer.count - i) & 7 - let end = (buffer.count - i) - left - while i < end { - var m: UInt64 = 0 - withUnsafeMutableBytes(of: &m) { p in - p.copyMemory(from: .init(rebasing: buffer[i ..< i + 8])) - } - compressWord(UInt64(littleEndian: m)) - i += 8 - } - - switch left { - case 7: - pendingBytes |= UInt64(buffer[i + 6]) << 48 - fallthrough - case 6: - pendingBytes |= UInt64(buffer[i + 5]) << 40 - fallthrough - case 5: - pendingBytes |= UInt64(buffer[i + 4]) << 32 - fallthrough - case 4: - pendingBytes |= UInt64(buffer[i + 3]) << 24 - fallthrough - case 3: - pendingBytes |= UInt64(buffer[i + 2]) << 16 - fallthrough - case 2: - pendingBytes |= UInt64(buffer[i + 1]) << 8 - fallthrough - case 1: - pendingBytes |= UInt64(buffer[i]) - default: - precondition(left == 0) - } - pendingByteCount = left - - byteCount += buffer.count - } - - //MARK: Finalization - - /// Finalize this hash and return the hash value. - /// - /// - Requires: `finalize()` hasn't been called on this instance yet. - public mutating func finalize() -> Int { - return Int(truncatingIfNeeded: _finalize()) - } -} diff --git a/Carthage/Checkouts/SipHash/SipHashTests/Info.plist b/Carthage/Checkouts/SipHash/SipHashTests/Info.plist deleted file mode 100644 index ba72822e8..000000000 --- a/Carthage/Checkouts/SipHash/SipHashTests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/Carthage/Checkouts/SipHash/SipHashTests/PrimitiveTypeTests.swift b/Carthage/Checkouts/SipHash/SipHashTests/PrimitiveTypeTests.swift deleted file mode 100644 index fb8511de4..000000000 --- a/Carthage/Checkouts/SipHash/SipHashTests/PrimitiveTypeTests.swift +++ /dev/null @@ -1,492 +0,0 @@ -// -// PrimitiveTypeTests.swift -// SipHash -// -// Created by Károly Lőrentey on 2016-11-14. -// Copyright © 2016-2017 Károly Lőrentey. -// - -import XCTest -@testable import SipHash - -class PrimitiveTypeTests: XCTestCase { - func testBoolTrue() { - let tests: [(Bool, [UInt8])] = [ - (false, [0]), - (true, [1]) - ] - for (value, data) in tests { - var hash1 = SipHasher() - hash1.append(value) - let h1 = hash1.finalize() - - var hash2 = SipHasher() - data.withUnsafeBufferPointer { buffer in - hash2.append(UnsafeRawBufferPointer(buffer)) - } - let h2 = hash2.finalize() - - XCTAssertEqual(h1, h2, "Mismatching hash for \(value)") - } - } - - func testInt() { - let tests: [(Int, [UInt8])] - switch MemoryLayout.size { - case 8: - tests = [ - (0, [0, 0, 0, 0, 0, 0, 0, 0]), - (1, [1, 0, 0, 0, 0, 0, 0, 0]), - (0x0123456789abcdef, [0xef, 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0x01]), - (Int.max, [255, 255, 255, 255, 255, 255, 255, 127]), - (-1, [255, 255, 255, 255, 255, 255, 255, 255]), - (Int.min, [0, 0, 0, 0, 0, 0, 0, 128]), - ] - case 4: - tests = [ - (0, [0, 0, 0, 0]), - (1, [1, 0, 0, 0]), - (0x12345678, [0x78, 0x56, 0x34, 0x12]), - (Int.max, [255, 255, 255, 127]), - (-1, [255, 255, 255, 255]), - (Int.min, [0, 0, 0, 128]), - ] - default: - fatalError() - } - - for (value, data) in tests { - var hash1 = SipHasher() - hash1.append(value.littleEndian) - let h1 = hash1.finalize() - - var hash2 = SipHasher() - data.withUnsafeBufferPointer { buffer in - hash2.append(UnsafeRawBufferPointer(buffer)) - } - let h2 = hash2.finalize() - - XCTAssertEqual(h1, h2, "Mismatching hash for \(value)") - } - } - - func testUInt() { - let tests: [(UInt, [UInt8])] - switch MemoryLayout.size { - case 8: - tests = [ - (0, [0, 0, 0, 0, 0, 0, 0, 0]), - (1, [1, 0, 0, 0, 0, 0, 0, 0]), - (0x0123456789abcdef, [0xef, 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0x01]), - (UInt.max, [255, 255, 255, 255, 255, 255, 255, 255]), - ] - case 4: - tests = [ - (0, [0, 0, 0, 0]), - (1, [1, 0, 0, 0]), - (0x12345678, [0x78, 0x56, 0x34, 0x12]), - (0xffffffff, [255, 255, 255, 255]) - ] - default: - fatalError() - } - - for (value, data) in tests { - var hash1 = SipHasher() - hash1.append(value.littleEndian) - let h1 = hash1.finalize() - - var hash2 = SipHasher() - data.withUnsafeBufferPointer { buffer in - hash2.append(UnsafeRawBufferPointer(buffer)) - } - let h2 = hash2.finalize() - - XCTAssertEqual(h1, h2, "Mismatching hash for \(value)") - } - } - - func testInt64() { - let tests: [(Int64, [UInt8])] = [ - (0, [0, 0, 0, 0, 0, 0, 0, 0]), - (1, [1, 0, 0, 0, 0, 0, 0, 0]), - (0x0123456789abcdef, [0xef, 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0x01]), - (Int64.max, [255, 255, 255, 255, 255, 255, 255, 127]), - (-1, [255, 255, 255, 255, 255, 255, 255, 255]), - (Int64.min, [0, 0, 0, 0, 0, 0, 0, 128]), - ] - for (value, data) in tests { - var hash1 = SipHasher() - hash1.append(value.littleEndian) - let h1 = hash1.finalize() - - var hash2 = SipHasher() - data.withUnsafeBufferPointer { buffer in - hash2.append(UnsafeRawBufferPointer(buffer)) - } - let h2 = hash2.finalize() - - XCTAssertEqual(h1, h2, "Mismatching hash for \(value)") - } - } - - func testUInt64() { - let tests: [(UInt64, [UInt8])] = [ - (0, [0, 0, 0, 0, 0, 0, 0, 0]), - (1, [1, 0, 0, 0, 0, 0, 0, 0]), - (0x0123456789abcdef, [0xef, 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0x01]), - (UInt64.max, [255, 255, 255, 255, 255, 255, 255, 255]), - ] - for (value, data) in tests { - var hash1 = SipHasher() - hash1.append(value.littleEndian) - let h1 = hash1.finalize() - - var hash2 = SipHasher() - data.withUnsafeBufferPointer { buffer in - hash2.append(UnsafeRawBufferPointer(buffer)) - } - let h2 = hash2.finalize() - - XCTAssertEqual(h1, h2, "Mismatching hash for \(value)") - } - } - - func testInt32() { - let tests: [(Int32, [UInt8])] = [ - (0, [0, 0, 0, 0]), - (1, [1, 0, 0, 0]), - (0x12345678, [0x78, 0x56, 0x34, 0x12]), - (Int32.max, [255, 255, 255, 127]), - (-1, [255, 255, 255, 255]), - (Int32.min, [0, 0, 0, 128]), - ] - for (value, data) in tests { - var hash1 = SipHasher() - hash1.append(value.littleEndian) - let h1 = hash1.finalize() - - var hash2 = SipHasher() - data.withUnsafeBufferPointer { buffer in - hash2.append(UnsafeRawBufferPointer(buffer)) - } - let h2 = hash2.finalize() - - XCTAssertEqual(h1, h2, "Mismatching hash for \(value)") - } - } - - func testUInt32() { - let tests: [(UInt32, [UInt8])] = [ - (0, [0, 0, 0, 0]), - (1, [1, 0, 0, 0]), - (0x12345678, [0x78, 0x56, 0x34, 0x12]), - (0xffffffff, [255, 255, 255, 255]) - ] - for (value, data) in tests { - var hash1 = SipHasher() - hash1.append(value.littleEndian) - let h1 = hash1.finalize() - - var hash2 = SipHasher() - data.withUnsafeBufferPointer { buffer in - hash2.append(UnsafeRawBufferPointer(buffer)) - } - let h2 = hash2.finalize() - - XCTAssertEqual(h1, h2, "Mismatching hash for \(value)") - } - } - - func testInt16() { - let tests: [(Int16, [UInt8])] = [ - (0, [0, 0]), - (1, [1, 0]), - (0x1234, [0x34, 0x12]), - (0x7fff, [255, 127]), - (-1, [0xff, 0xff]), - (-42, [214, 0xff]), - (Int16.min, [0x00, 0x80]) - ] - for (value, data) in tests { - var hash1 = SipHasher() - hash1.append(value.littleEndian) - let h1 = hash1.finalize() - - var hash2 = SipHasher() - data.withUnsafeBufferPointer { buffer in - hash2.append(UnsafeRawBufferPointer(buffer)) - } - let h2 = hash2.finalize() - - XCTAssertEqual(h1, h2, "Mismatching hash for \(value)") - } - } - - func testUInt16() { - let tests: [(UInt16, [UInt8])] = [ - (0, [0, 0]), - (1, [1, 0]), - (0x1234, [0x34, 0x12]), - (0xffff, [255, 255]) - ] - for (value, data) in tests { - var hash1 = SipHasher() - hash1.append(value.littleEndian) - let h1 = hash1.finalize() - - var hash2 = SipHasher() - data.withUnsafeBufferPointer { buffer in - hash2.append(UnsafeRawBufferPointer(buffer)) - } - let h2 = hash2.finalize() - - XCTAssertEqual(h1, h2, "Mismatching hash for \(value)") - } - } - - func testInt8() { - let tests: [(Int8, [UInt8])] = [ - (0, [0]), - (1, [1]), - (42, [42]), - (127, [127]), - (-1, [255]), - (-42, [214]), - (-128, [128]) - ] - for (value, data) in tests { - var hash1 = SipHasher() - hash1.append(value) - let h1 = hash1.finalize() - - var hash2 = SipHasher() - data.withUnsafeBufferPointer { buffer in - hash2.append(UnsafeRawBufferPointer(buffer)) - } - let h2 = hash2.finalize() - - XCTAssertEqual(h1, h2, "Mismatching hash for \(value)") - } - } - - func testUInt8() { - let tests: [(UInt8, [UInt8])] = [ - (0, [0]), - (1, [1]), - (42, [42]), - (255, [255]) - ] - for (value, data) in tests { - var hash1 = SipHasher() - hash1.append(value) - let h1 = hash1.finalize() - - var hash2 = SipHasher() - data.withUnsafeBufferPointer { buffer in - hash2.append(UnsafeRawBufferPointer(buffer)) - } - let h2 = hash2.finalize() - - XCTAssertEqual(h1, h2, "Mismatching hash for \(value)") - } - } - - func testFloat() { - let zeroA: Int = { - var h = SipHasher() - h.append(0.0 as Float) - return h.finalize() - }() - - let zeroB: Int = { - var h = SipHasher() - h.append(-0.0 as Float) - return h.finalize() - }() - - XCTAssertEqual(zeroA, zeroB, "+0.0 and -0.0 should have the same hash value") - - let oneHash: Int = { - var h = SipHasher() - h.append(1.0 as Float) - return h.finalize() - }() - let oneExpected: Int = { - var h = SipHasher() - let d = Array([0, 0, 128, 63]) - d.withUnsafeBufferPointer { b in - h.append(UnsafeRawBufferPointer(b)) - } - return h.finalize() - }() - XCTAssertEqual(oneHash, oneExpected) - } - - func testDouble() { - let zeroA: Int = { - var h = SipHasher() - h.append(0.0 as Double) - return h.finalize() - }() - - let zeroB: Int = { - var h = SipHasher() - h.append(-0.0 as Double) - return h.finalize() - }() - - XCTAssertEqual(zeroA, zeroB, "+0.0 and -0.0 should have the same hash value") - - let oneHash: Int = { - var h = SipHasher() - h.append(1.0 as Double) - return h.finalize() - }() - let oneExpected: Int = { - var h = SipHasher() - let d = Array([0, 0, 0, 0, 0, 0, 240, 63]) - d.withUnsafeBufferPointer { b in - h.append(UnsafeRawBufferPointer(b)) - } - return h.finalize() - }() - XCTAssertEqual(oneHash, oneExpected) - } - - #if arch(i386) || arch(x86_64) - func testFloat80() { - let f1: Float80 = 0.0 - let f2: Float80 = -0.0 - - XCTAssertEqual(f1, f2) - - let zeroA: Int = { - var h = SipHasher() - h.append(f1) - return h.finalize() - }() - - let zeroB: Int = { - var h = SipHasher() - h.append(f2) - return h.finalize() - }() - - XCTAssertEqual(zeroA, zeroB, "+0.0 and -0.0 should have the same hash value") - - let oneHash: Int = { - var h = SipHasher() - h.append(1.0 as Float80) - return h.finalize() - }() - let oneExpected: Int = { - var h = SipHasher() - let d = Array([0, 0, 0, 0, 0, 0, 0, 128, 255, 63]) - d.withUnsafeBufferPointer { b in - h.append(UnsafeRawBufferPointer(b)) - } - return h.finalize() - }() - XCTAssertEqual(oneHash, oneExpected) - } - #endif - - #if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) - func testCGFloat() { - let zeroA: Int = { - var h = SipHasher() - h.append(0.0 as CGFloat) - return h.finalize() - }() - - let zeroB: Int = { - var h = SipHasher() - h.append(-0.0 as CGFloat) - return h.finalize() - }() - - XCTAssertEqual(zeroA, zeroB, "+0.0 and -0.0 should have the same hash value") - - let oneHash: Int = { - var h = SipHasher() - h.append(1.0 as CGFloat) - return h.finalize() - }() - let oneExpected: Int = { - var h = SipHasher() - let d: Array - if CGFloat.NativeType.self == Double.self { - d = [0, 0, 0, 0, 0, 0, 240, 63] - } - else if CGFloat.NativeType.self == Float.self { - d = [0, 0, 128, 63] - } - else { - fatalError() - } - d.withUnsafeBufferPointer { b in - h.append(UnsafeRawBufferPointer(b)) - } - return h.finalize() - }() - XCTAssertEqual(oneHash, oneExpected) - - } - #endif - - func testOptional_nil() { - let expected: Int = { - var hasher = SipHasher() - hasher.append(0 as UInt8) - return hasher.finalize() - }() - - let actual: Int = { - var hasher = SipHasher() - hasher.append(nil as Int?) - return hasher.finalize() - }() - - XCTAssertEqual(actual, expected) - } - - func testOptional_nonnil() { - let expected: Int = { - var hasher = SipHasher() - hasher.append(1 as UInt8) - hasher.append(42) - return hasher.finalize() - }() - - let actual: Int = { - var hasher = SipHasher() - hasher.append(42 as Int?) - return hasher.finalize() - }() - - XCTAssertEqual(actual, expected) - } - // - // you have to manually register linux tests here :-( - // - static var allTests = [ - ("testBoolTrue", testBoolTrue), - ("testInt", testInt), - ("testUInt", testUInt), - ("testInt64", testInt64), - ("testUInt64", testUInt64), - ("testInt32", testInt32), - ("testUInt32", testUInt32), - ("testInt16", testInt16), - ("testUInt16", testUInt16), - ("testInt8", testInt8), - ("testUInt8", testUInt8), - ("testFloat", testFloat), - ("testDouble", testDouble), - ("testFloat80", testFloat80), - // ("testCGFloat", testCGFloat), // missing in Linux - ("testOptional_nil", testOptional_nil), - ("testOptional_nonnil", testOptional_nonnil), - ] -} diff --git a/Carthage/Checkouts/SipHash/SipHashTests/SipHashTests.swift b/Carthage/Checkouts/SipHash/SipHashTests/SipHashTests.swift deleted file mode 100644 index ef6664ec2..000000000 --- a/Carthage/Checkouts/SipHash/SipHashTests/SipHashTests.swift +++ /dev/null @@ -1,151 +0,0 @@ -// -// SipHashTests.swift -// SipHash -// -// Created by Károly Lőrentey on 2016-03-08. -// Copyright © 2016-2017 Károly Lőrentey. -// - -import XCTest -@testable import SipHash - -private let vectors: [UInt8] = [ // From https://github.com/veorq/SipHash/blob/master/main.c - 0x31, 0x0e, 0x0e, 0xdd, 0x47, 0xdb, 0x6f, 0x72, - 0xfd, 0x67, 0xdc, 0x93, 0xc5, 0x39, 0xf8, 0x74, - 0x5a, 0x4f, 0xa9, 0xd9, 0x09, 0x80, 0x6c, 0x0d, - 0x2d, 0x7e, 0xfb, 0xd7, 0x96, 0x66, 0x67, 0x85, - 0xb7, 0x87, 0x71, 0x27, 0xe0, 0x94, 0x27, 0xcf, - 0x8d, 0xa6, 0x99, 0xcd, 0x64, 0x55, 0x76, 0x18, - 0xce, 0xe3, 0xfe, 0x58, 0x6e, 0x46, 0xc9, 0xcb, - 0x37, 0xd1, 0x01, 0x8b, 0xf5, 0x00, 0x02, 0xab, - 0x62, 0x24, 0x93, 0x9a, 0x79, 0xf5, 0xf5, 0x93, - 0xb0, 0xe4, 0xa9, 0x0b, 0xdf, 0x82, 0x00, 0x9e, - 0xf3, 0xb9, 0xdd, 0x94, 0xc5, 0xbb, 0x5d, 0x7a, - 0xa7, 0xad, 0x6b, 0x22, 0x46, 0x2f, 0xb3, 0xf4, - 0xfb, 0xe5, 0x0e, 0x86, 0xbc, 0x8f, 0x1e, 0x75, - 0x90, 0x3d, 0x84, 0xc0, 0x27, 0x56, 0xea, 0x14, - 0xee, 0xf2, 0x7a, 0x8e, 0x90, 0xca, 0x23, 0xf7, - 0xe5, 0x45, 0xbe, 0x49, 0x61, 0xca, 0x29, 0xa1, - 0xdb, 0x9b, 0xc2, 0x57, 0x7f, 0xcc, 0x2a, 0x3f, - 0x94, 0x47, 0xbe, 0x2c, 0xf5, 0xe9, 0x9a, 0x69, - 0x9c, 0xd3, 0x8d, 0x96, 0xf0, 0xb3, 0xc1, 0x4b, - 0xbd, 0x61, 0x79, 0xa7, 0x1d, 0xc9, 0x6d, 0xbb, - 0x98, 0xee, 0xa2, 0x1a, 0xf2, 0x5c, 0xd6, 0xbe, - 0xc7, 0x67, 0x3b, 0x2e, 0xb0, 0xcb, 0xf2, 0xd0, - 0x88, 0x3e, 0xa3, 0xe3, 0x95, 0x67, 0x53, 0x93, - 0xc8, 0xce, 0x5c, 0xcd, 0x8c, 0x03, 0x0c, 0xa8, - 0x94, 0xaf, 0x49, 0xf6, 0xc6, 0x50, 0xad, 0xb8, - 0xea, 0xb8, 0x85, 0x8a, 0xde, 0x92, 0xe1, 0xbc, - 0xf3, 0x15, 0xbb, 0x5b, 0xb8, 0x35, 0xd8, 0x17, - 0xad, 0xcf, 0x6b, 0x07, 0x63, 0x61, 0x2e, 0x2f, - 0xa5, 0xc9, 0x1d, 0xa7, 0xac, 0xaa, 0x4d, 0xde, - 0x71, 0x65, 0x95, 0x87, 0x66, 0x50, 0xa2, 0xa6, - 0x28, 0xef, 0x49, 0x5c, 0x53, 0xa3, 0x87, 0xad, - 0x42, 0xc3, 0x41, 0xd8, 0xfa, 0x92, 0xd8, 0x32, - 0xce, 0x7c, 0xf2, 0x72, 0x2f, 0x51, 0x27, 0x71, - 0xe3, 0x78, 0x59, 0xf9, 0x46, 0x23, 0xf3, 0xa7, - 0x38, 0x12, 0x05, 0xbb, 0x1a, 0xb0, 0xe0, 0x12, - 0xae, 0x97, 0xa1, 0x0f, 0xd4, 0x34, 0xe0, 0x15, - 0xb4, 0xa3, 0x15, 0x08, 0xbe, 0xff, 0x4d, 0x31, - 0x81, 0x39, 0x62, 0x29, 0xf0, 0x90, 0x79, 0x02, - 0x4d, 0x0c, 0xf4, 0x9e, 0xe5, 0xd4, 0xdc, 0xca, - 0x5c, 0x73, 0x33, 0x6a, 0x76, 0xd8, 0xbf, 0x9a, - 0xd0, 0xa7, 0x04, 0x53, 0x6b, 0xa9, 0x3e, 0x0e, - 0x92, 0x59, 0x58, 0xfc, 0xd6, 0x42, 0x0c, 0xad, - 0xa9, 0x15, 0xc2, 0x9b, 0xc8, 0x06, 0x73, 0x18, - 0x95, 0x2b, 0x79, 0xf3, 0xbc, 0x0a, 0xa6, 0xd4, - 0xf2, 0x1d, 0xf2, 0xe4, 0x1d, 0x45, 0x35, 0xf9, - 0x87, 0x57, 0x75, 0x19, 0x04, 0x8f, 0x53, 0xa9, - 0x10, 0xa5, 0x6c, 0xf5, 0xdf, 0xcd, 0x9a, 0xdb, - 0xeb, 0x75, 0x09, 0x5c, 0xcd, 0x98, 0x6c, 0xd0, - 0x51, 0xa9, 0xcb, 0x9e, 0xcb, 0xa3, 0x12, 0xe6, - 0x96, 0xaf, 0xad, 0xfc, 0x2c, 0xe6, 0x66, 0xc7, - 0x72, 0xfe, 0x52, 0x97, 0x5a, 0x43, 0x64, 0xee, - 0x5a, 0x16, 0x45, 0xb2, 0x76, 0xd5, 0x92, 0xa1, - 0xb2, 0x74, 0xcb, 0x8e, 0xbf, 0x87, 0x87, 0x0a, - 0x6f, 0x9b, 0xb4, 0x20, 0x3d, 0xe7, 0xb3, 0x81, - 0xea, 0xec, 0xb2, 0xa3, 0x0b, 0x22, 0xa8, 0x7f, - 0x99, 0x24, 0xa4, 0x3c, 0xc1, 0x31, 0x57, 0x24, - 0xbd, 0x83, 0x8d, 0x3a, 0xaf, 0xbf, 0x8d, 0xb7, - 0x0b, 0x1a, 0x2a, 0x32, 0x65, 0xd5, 0x1a, 0xea, - 0x13, 0x50, 0x79, 0xa3, 0x23, 0x1c, 0xe6, 0x60, - 0x93, 0x2b, 0x28, 0x46, 0xe4, 0xd7, 0x06, 0x66, - 0xe1, 0x91, 0x5f, 0x5c, 0xb1, 0xec, 0xa4, 0x6c, - 0xf3, 0x25, 0x96, 0x5c, 0xa1, 0x6d, 0x62, 0x9f, - 0x57, 0x5f, 0xf2, 0x8e, 0x60, 0x38, 0x1b, 0xe5, - 0x72, 0x45, 0x06, 0xeb, 0x4c, 0x32, 0x8a, 0x95, -] - -private func vector(_ i: Int) -> Int { - let v: UInt64 = vectors.withUnsafeBufferPointer { buffer in - let b = UnsafeRawBufferPointer(buffer) - return b.load(fromByteOffset: 8 * i, as: UInt64.self) - } - return Int(truncatingIfNeeded: v) -} - -private let (k0, k1): (UInt64, UInt64) = Array(UInt8(0) ..< UInt8(16)).withUnsafeBufferPointer { buffer in - let b = UnsafeRawBufferPointer(buffer) - return (b.load(fromByteOffset: 0, as: UInt64.self), b.load(fromByteOffset: 8, as: UInt64.self)) -} - -private let input: [UInt8] = Array(0 ..< 63) - -class SipHashTests: XCTestCase { - func testVectors() { - input.withUnsafeBufferPointer { buffer in - for i in 0 ..< 64 { - let b = UnsafeRawBufferPointer(buffer)[0 ..< i] - let expected = vector(i) - var hash = SipHasher(k0: k0, k1: k1) - hash.append(b) - let actual = hash.finalize() - XCTAssertEqual(actual, expected, "Test vector failed for \(i) bytes") - } - } - } - - func testSplits() { - for i in 0 ..< 64 { - input.withUnsafeBufferPointer { buffer in - let b = UnsafeRawBufferPointer(buffer) - let expected = vector(63) - - var hash = SipHasher(k0: k0, k1: k1) - hash.append(b[0 ..< i]) - hash.append(b[i ..< 63]) - let actual = hash.finalize() - XCTAssertEqual(actual, expected, "Test vector #63 failed for split at \(i) bytes") - } - } - } - - func testDefaultKey() { - // Well, we can't really test that the key is random. - // But we can check that it doesn't change. - - input.withUnsafeBufferPointer { buffer in - for i in 0 ..< 64 { - let b = UnsafeRawBufferPointer(buffer)[0 ..< i] - - var hash1 = SipHasher() - hash1.append(b) - let h1 = hash1.finalize() - - var hash2 = SipHasher() - hash2.append(b) - let h2 = hash2.finalize() - - XCTAssertEqual(h1, h2) - } - } - } - // - // you have to manually register linux tests here :-( - // - static var allTests = [ - ("testVectors", testVectors), - ("testSplits", testSplits), - ("testDefaultKey", testDefaultKey), - ] -} diff --git a/Carthage/Checkouts/SipHash/SipHashTests/SipHashableTests.swift b/Carthage/Checkouts/SipHash/SipHashTests/SipHashableTests.swift deleted file mode 100644 index cdc04cfc0..000000000 --- a/Carthage/Checkouts/SipHash/SipHashTests/SipHashableTests.swift +++ /dev/null @@ -1,67 +0,0 @@ -// -// SipHashableTests.swift -// SipHash -// -// Created by Károly Lőrentey on 2016-11-14. -// Copyright © 2016-2017 Károly Lőrentey. -// - -import XCTest -@testable import SipHash - -private struct Book: SipHashable { - let title: String - let pageCount: Int - - func appendHashes(to hasher: inout SipHasher) { - hasher.append(title) - hasher.append(pageCount) - } - - static func ==(left: Book, right: Book) -> Bool { - return left.title == right.title && left.pageCount == right.pageCount - } -} - -class SipHashableTests: XCTestCase { - func testBookHashValue() { - let book = Book(title: "The Colour of Magic", pageCount: 206) - let actual = book.hashValue - - var hasher = SipHasher() - hasher.append(book.title.hashValue) - hasher.append(book.pageCount) - let expected = hasher.finalize() - - XCTAssertEqual(actual, expected) - } - - func testBookEquality() { - let book1 = Book(title: "The Colour of Magic", pageCount: 206) - let hash1 = book1.hashValue - - let book2 = Book(title: "The Colour of Magic", pageCount: 206) - let hash2 = book2.hashValue - - XCTAssertEqual(hash1, hash2) - } - - func testAddSipHashable() { - let book = Book(title: "The Colour of Magic", pageCount: 206) - let hash1 = book.hashValue - - var hasher = SipHasher() - hasher.append(book) - let hash2 = hasher.finalize() - - XCTAssertEqual(hash1, hash2) - } - // - // you have to manually register linux tests here :-( - // - static var allTests = [ - ("testBookHashValue", testBookHashValue), - ("testBookEquality", testBookEquality), - ("testAddSipHashable", testAddSipHashable), - ] -} diff --git a/Carthage/Checkouts/SipHash/docs/Protocols.html b/Carthage/Checkouts/SipHash/docs/Protocols.html deleted file mode 100644 index c9469dae6..000000000 --- a/Carthage/Checkouts/SipHash/docs/Protocols.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - Protocols Reference - - - - - - - - - - - - -
-

- - SipHash Docs - - (100% documented) -

- -

- - - View on GitHub - -

- -

- - - Install in Dash - -

-
- - - -
- -
- -
-
-

Protocols

-

The following protocols are available globally.

- -
-
- -
-
-
-
    -
  • -
    - - - - SipHashable - -
    -
    -
    -
    -
    -
    -

    A variant of Hashable that makes it simpler to generate good hash values.

    - -

    Instead of hashValue, you need to implement addHashes, adding -data that should contribute to the hash to the supplied hasher. -The hasher takes care of blending the supplied data together.

    - -

    Example implementation:

    - -
    struct Book: SipHashable {
    -    var title: String
    -    var pageCount: Int
    -
    -    func appendHashes(to hasher: inout SipHasher) {
    -        hasher.append(title)
    -        hasher.append(pageCount)
    -    }
    -
    -    static func ==(left: Book, right: Book) -> Bool {
    -        return left.title == right.title && left.pageCount == right.pageCount
    -    }
    -}
    -
    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public protocol SipHashable: Hashable
    - -
    -
    - -
    -
    -
  • -
-
-
-
- -
-
- - -
- diff --git a/Carthage/Checkouts/SipHash/docs/Protocols/SipHashable.html b/Carthage/Checkouts/SipHash/docs/Protocols/SipHashable.html deleted file mode 100644 index 6ff0b3fd0..000000000 --- a/Carthage/Checkouts/SipHash/docs/Protocols/SipHashable.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - SipHashable Protocol Reference - - - - - - - - - - - - - -
-

- - SipHash Docs - - (100% documented) -

- -

- - - View on GitHub - -

- -

- - - Install in Dash - -

-
- - - -
- -
- -
-
-

SipHashable

-
-
-
public protocol SipHashable: Hashable
- -
-
-

A variant of Hashable that makes it simpler to generate good hash values.

- -

Instead of hashValue, you need to implement addHashes, adding -data that should contribute to the hash to the supplied hasher. -The hasher takes care of blending the supplied data together.

- -

Example implementation:

- -
struct Book: SipHashable {
-    var title: String
-    var pageCount: Int
-
-    func appendHashes(to hasher: inout SipHasher) {
-        hasher.append(title)
-        hasher.append(pageCount)
-    }
-
-    static func ==(left: Book, right: Book) -> Bool {
-        return left.title == right.title && left.pageCount == right.pageCount
-    }
-}
-
- -
-
- -
-
-
-
    -
  • -
    - - - - appendHashes(to:) - -
    -
    -
    -
    -
    -
    -

    Add components of self that should contribute to hashing to hash.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    func appendHashes(to hasher: inout SipHasher)
    - -
    -
    - -
    -
    -
  • -
-
-
-
    -
  • -
    - - - - hashValue - - - Extension method - -
    -
    -
    -
    -
    -
    -

    The hash value, calculated using addHashes.

    - -

    Hash values are not guaranteed to be equal across different executions of your program. -Do not save hash values to use during a future execution.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var hashValue: Int
    - -
    -
    - -
    -
    -
  • -
-
-
-
- -
-
- - -
- diff --git a/Carthage/Checkouts/SipHash/docs/Structs.html b/Carthage/Checkouts/SipHash/docs/Structs.html deleted file mode 100644 index 5d5d09443..000000000 --- a/Carthage/Checkouts/SipHash/docs/Structs.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - Structs Reference - - - - - - - - - - - - -
-

- - SipHash Docs - - (100% documented) -

- -

- - - View on GitHub - -

- -

- - - Install in Dash - -

-
- - - -
- -
- -
-
-

Structs

-

The following structs are available globally.

- -
-
- -
-
-
-
    -
  • -
    - - - - SipHasher - -
    -
    -
    -
    -
    -
    -

    An implementation of the SipHash-2-4 hashing algorithm, -suitable for use in projects outside the Swift standard library. -(The Swift stdlib already includes SipHash; unfortunately its API is not public.)

    - -

    SipHash was invented by Jean-Philippe Aumasson and Daniel J. Bernstein.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct SipHasher
    - -
    -
    - -
    -
    -
  • -
-
-
-
- -
-
- - -
- diff --git a/Carthage/Checkouts/SipHash/docs/Structs/SipHasher.html b/Carthage/Checkouts/SipHash/docs/Structs/SipHasher.html deleted file mode 100644 index 58d2f368c..000000000 --- a/Carthage/Checkouts/SipHash/docs/Structs/SipHasher.html +++ /dev/null @@ -1,1007 +0,0 @@ - - - - SipHasher Struct Reference - - - - - - - - - - - - - -
-

- - SipHash Docs - - (100% documented) -

- -

- - - View on GitHub - -

- -

- - - Install in Dash - -

-
- - - -
- -
- -
-
-

SipHasher

-
-
-
public struct SipHasher
- -
-
-

An implementation of the SipHash-2-4 hashing algorithm, -suitable for use in projects outside the Swift standard library. -(The Swift stdlib already includes SipHash; unfortunately its API is not public.)

- -

SipHash was invented by Jean-Philippe Aumasson and Daniel J. Bernstein.

- -
-
- -
-
-
- -
    -
  • -
    - - - - init() - -
    -
    -
    -
    -
    -
    -

    Initialize a new instance with the default key, generated randomly the first time this initializer is called.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init()
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(k0:k1:) - -
    -
    -
    -
    -
    -
    -

    Initialize a new instance with the specified key.

    - -
    -

    Parameter

    - Parameter k0: The low 64 bits of the secret key. - -
    - -
    -

    Parameter

    - Parameter k1: The high 64 bits of the secret key. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(k0: UInt64, k1: UInt64)
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - k0 - - -
    -

    The low 64 bits of the secret key.

    - -
    -
    - - k1 - - -
    -

    The high 64 bits of the secret key.

    - -
    -
    -
    - -
    -
    -
  • -
-
-
- -
    -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add all bytes in buffer to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append(_ buffer: UnsafeRawBufferPointer)
    - -
    -
    - -
    -
    -
  • -
-
-
- -
    -
  • -
    - - - - finalize() - -
    -
    -
    -
    -
    -
    -

    Finalize this hash and return the hash value.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func finalize() -> Int
    - -
    -
    - -
    -
    -
  • -
-
-
- -
    -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add hashing components in value to this hash. This method simply calls value.addHashes.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append<H: SipHashable>(_ value: H)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add the hash value of value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append<H: Hashable>(_ value: H)
    - -
    -
    - -
    -
    -
  • -
-
-
- -
    -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append(_ value: Bool)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append(_ value: Int)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append(_ value: UInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append(_ value: Int64)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append(_ value: UInt64)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append(_ value: Int32)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append(_ value: UInt32)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append(_ value: Int16)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append(_ value: UInt16)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append(_ value: Int8)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append(_ value: UInt8)
    - -
    -
    - -
    -
    -
  • -
-
-
- -
    -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append(_ value: Float)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append(_ value: Double)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append(_ value: Float80)
    - -
    -
    - -
    -
    -
  • -
-
-
-
    -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append(_ value: CGFloat)
    - -
    -
    - -
    -
    -
  • -
-
-
- -
    -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append<Value: Hashable>(_ value: Value?)
    - -
    -
    - -
    -
    -
  • -
-
-
-
- -
-
- - -
- diff --git a/Carthage/Checkouts/SipHash/docs/css/highlight.css b/Carthage/Checkouts/SipHash/docs/css/highlight.css deleted file mode 100644 index d0db0e13b..000000000 --- a/Carthage/Checkouts/SipHash/docs/css/highlight.css +++ /dev/null @@ -1,200 +0,0 @@ -/* Credit to https://gist.github.com/wataru420/2048287 */ -.highlight { - /* Comment */ - /* Error */ - /* Keyword */ - /* Operator */ - /* Comment.Multiline */ - /* Comment.Preproc */ - /* Comment.Single */ - /* Comment.Special */ - /* Generic.Deleted */ - /* Generic.Deleted.Specific */ - /* Generic.Emph */ - /* Generic.Error */ - /* Generic.Heading */ - /* Generic.Inserted */ - /* Generic.Inserted.Specific */ - /* Generic.Output */ - /* Generic.Prompt */ - /* Generic.Strong */ - /* Generic.Subheading */ - /* Generic.Traceback */ - /* Keyword.Constant */ - /* Keyword.Declaration */ - /* Keyword.Pseudo */ - /* Keyword.Reserved */ - /* Keyword.Type */ - /* Literal.Number */ - /* Literal.String */ - /* Name.Attribute */ - /* Name.Builtin */ - /* Name.Class */ - /* Name.Constant */ - /* Name.Entity */ - /* Name.Exception */ - /* Name.Function */ - /* Name.Namespace */ - /* Name.Tag */ - /* Name.Variable */ - /* Operator.Word */ - /* Text.Whitespace */ - /* Literal.Number.Float */ - /* Literal.Number.Hex */ - /* Literal.Number.Integer */ - /* Literal.Number.Oct */ - /* Literal.String.Backtick */ - /* Literal.String.Char */ - /* Literal.String.Doc */ - /* Literal.String.Double */ - /* Literal.String.Escape */ - /* Literal.String.Heredoc */ - /* Literal.String.Interpol */ - /* Literal.String.Other */ - /* Literal.String.Regex */ - /* Literal.String.Single */ - /* Literal.String.Symbol */ - /* Name.Builtin.Pseudo */ - /* Name.Variable.Class */ - /* Name.Variable.Global */ - /* Name.Variable.Instance */ - /* Literal.Number.Integer.Long */ } - .highlight .c { - color: #999988; - font-style: italic; } - .highlight .err { - color: #a61717; - background-color: #e3d2d2; } - .highlight .k { - color: #000000; - font-weight: bold; } - .highlight .o { - color: #000000; - font-weight: bold; } - .highlight .cm { - color: #999988; - font-style: italic; } - .highlight .cp { - color: #999999; - font-weight: bold; } - .highlight .c1 { - color: #999988; - font-style: italic; } - .highlight .cs { - color: #999999; - font-weight: bold; - font-style: italic; } - .highlight .gd { - color: #000000; - background-color: #ffdddd; } - .highlight .gd .x { - color: #000000; - background-color: #ffaaaa; } - .highlight .ge { - color: #000000; - font-style: italic; } - .highlight .gr { - color: #aa0000; } - .highlight .gh { - color: #999999; } - .highlight .gi { - color: #000000; - background-color: #ddffdd; } - .highlight .gi .x { - color: #000000; - background-color: #aaffaa; } - .highlight .go { - color: #888888; } - .highlight .gp { - color: #555555; } - .highlight .gs { - font-weight: bold; } - .highlight .gu { - color: #aaaaaa; } - .highlight .gt { - color: #aa0000; } - .highlight .kc { - color: #000000; - font-weight: bold; } - .highlight .kd { - color: #000000; - font-weight: bold; } - .highlight .kp { - color: #000000; - font-weight: bold; } - .highlight .kr { - color: #000000; - font-weight: bold; } - .highlight .kt { - color: #445588; } - .highlight .m { - color: #009999; } - .highlight .s { - color: #d14; } - .highlight .na { - color: #008080; } - .highlight .nb { - color: #0086B3; } - .highlight .nc { - color: #445588; - font-weight: bold; } - .highlight .no { - color: #008080; } - .highlight .ni { - color: #800080; } - .highlight .ne { - color: #990000; - font-weight: bold; } - .highlight .nf { - color: #990000; } - .highlight .nn { - color: #555555; } - .highlight .nt { - color: #000080; } - .highlight .nv { - color: #008080; } - .highlight .ow { - color: #000000; - font-weight: bold; } - .highlight .w { - color: #bbbbbb; } - .highlight .mf { - color: #009999; } - .highlight .mh { - color: #009999; } - .highlight .mi { - color: #009999; } - .highlight .mo { - color: #009999; } - .highlight .sb { - color: #d14; } - .highlight .sc { - color: #d14; } - .highlight .sd { - color: #d14; } - .highlight .s2 { - color: #d14; } - .highlight .se { - color: #d14; } - .highlight .sh { - color: #d14; } - .highlight .si { - color: #d14; } - .highlight .sx { - color: #d14; } - .highlight .sr { - color: #009926; } - .highlight .s1 { - color: #d14; } - .highlight .ss { - color: #990073; } - .highlight .bp { - color: #999999; } - .highlight .vc { - color: #008080; } - .highlight .vg { - color: #008080; } - .highlight .vi { - color: #008080; } - .highlight .il { - color: #009999; } diff --git a/Carthage/Checkouts/SipHash/docs/css/jazzy.css b/Carthage/Checkouts/SipHash/docs/css/jazzy.css deleted file mode 100644 index 75b54333b..000000000 --- a/Carthage/Checkouts/SipHash/docs/css/jazzy.css +++ /dev/null @@ -1,329 +0,0 @@ -*, *:before, *:after { - box-sizing: inherit; } - -body { - margin: 0; - background: #fff; - color: #333; - font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif; - letter-spacing: .2px; - -webkit-font-smoothing: antialiased; - box-sizing: border-box; } - -h1 { - font-size: 2rem; - font-weight: 700; - margin: 1.275em 0 0.6em; } - -h2 { - font-size: 1.75rem; - font-weight: 700; - margin: 1.275em 0 0.3em; } - -h3 { - font-size: 1.5rem; - font-weight: 700; - margin: 1em 0 0.3em; } - -h4 { - font-size: 1.25rem; - font-weight: 700; - margin: 1.275em 0 0.85em; } - -h5 { - font-size: 1rem; - font-weight: 700; - margin: 1.275em 0 0.85em; } - -h6 { - font-size: 1rem; - font-weight: 700; - margin: 1.275em 0 0.85em; - color: #777; } - -p { - margin: 0 0 1em; } - -ul, ol { - padding: 0 0 0 2em; - margin: 0 0 0.85em; } - -blockquote { - margin: 0 0 0.85em; - padding: 0 15px; - color: #858585; - border-left: 4px solid #e5e5e5; } - -img { - max-width: 100%; } - -a { - color: #4183c4; - text-decoration: none; } - a:hover, a:focus { - outline: 0; - text-decoration: underline; } - -table { - background: #fff; - width: 100%; - border-collapse: collapse; - border-spacing: 0; - overflow: auto; - margin: 0 0 0.85em; } - -tr:nth-child(2n) { - background-color: #fbfbfb; } - -th, td { - padding: 6px 13px; - border: 1px solid #ddd; } - -pre { - margin: 0 0 1.275em; - padding: .85em 1em; - overflow: auto; - background: #f7f7f7; - font-size: .85em; - font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; } - -code { - font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; } - -p > code, li > code { - background: #f7f7f7; - padding: .2em; } - p > code:before, p > code:after, li > code:before, li > code:after { - letter-spacing: -.2em; - content: "\00a0"; } - -pre code { - padding: 0; - white-space: pre; } - -.content-wrapper { - display: flex; - flex-direction: column; } - @media (min-width: 768px) { - .content-wrapper { - flex-direction: row; } } - -.header { - display: flex; - padding: 8px; - font-size: 0.875em; - background: #444; - color: #999; } - -.header-col { - margin: 0; - padding: 0 8px; } - -.header-col--primary { - flex: 1; } - -.header-link { - color: #fff; } - -.header-icon { - padding-right: 6px; - vertical-align: -4px; - height: 16px; } - -.breadcrumbs { - font-size: 0.875em; - padding: 8px 16px; - margin: 0; - background: #fbfbfb; - border-bottom: 1px solid #ddd; } - -.carat { - height: 10px; - margin: 0 5px; } - -.navigation { - order: 2; } - @media (min-width: 768px) { - .navigation { - order: 1; - width: 25%; - max-width: 300px; - padding-bottom: 64px; - overflow: hidden; - word-wrap: normal; - background: #fbfbfb; - border-right: 1px solid #ddd; } } - -.nav-groups { - list-style-type: none; - padding-left: 0; } - -.nav-group-name { - border-bottom: 1px solid #ddd; - padding: 8px 0 8px 16px; } - -.nav-group-name-link { - color: #333; } - -.nav-group-tasks { - margin: 8px 0; - padding: 0 0 0 8px; } - -.nav-group-task { - font-size: 1em; - list-style-type: none; - white-space: nowrap; } - -.nav-group-task-link { - color: #808080; } - -.main-content { - order: 1; } - @media (min-width: 768px) { - .main-content { - order: 2; - flex: 1; - padding-bottom: 60px; } } - -.section { - padding: 0 32px; - border-bottom: 1px solid #ddd; } - -.section-content { - max-width: 834px; - margin: 0 auto; - padding: 16px 0; } - -.section-name { - color: #666; - display: block; } - -.declaration .highlight { - overflow-x: initial; - padding: 8px 0; - margin: 0; - background-color: transparent; - border: none; } - -.task-group-section { - border-top: 1px solid #ddd; } - -.task-group { - padding-top: 0px; } - -.task-name-container a[name]:before { - content: ""; - display: block; } - -.item-container { - padding: 0; } - -.item { - padding-top: 8px; - width: 100%; - list-style-type: none; } - .item a[name]:before { - content: ""; - display: block; } - .item .token { - padding-left: 3px; - margin-left: 0px; - font-size: 1rem; } - .item .declaration-note { - font-size: .85em; - color: #808080; - font-style: italic; } - -.pointer-container { - border-bottom: 1px solid #ddd; - left: -23px; - padding-bottom: 13px; - position: relative; - width: 110%; } - -.pointer { - left: 21px; - top: 7px; - display: block; - position: absolute; - width: 12px; - height: 12px; - border-left: 1px solid #ddd; - border-top: 1px solid #ddd; - background: #fff; - transform: rotate(45deg); } - -.height-container { - display: none; - position: relative; - width: 100%; - overflow: hidden; } - .height-container .section { - background: #fff; - border: 1px solid #ddd; - border-top-width: 0; - padding-top: 10px; - padding-bottom: 5px; - padding: 8px 16px; } - -.aside, .language { - padding: 6px 12px; - margin: 12px 0; - border-left: 5px solid #dddddd; - overflow-y: hidden; } - .aside .aside-title, .language .aside-title { - font-size: 9px; - letter-spacing: 2px; - text-transform: uppercase; - padding-bottom: 0; - margin: 0; - color: #aaa; - -webkit-user-select: none; } - .aside p:last-child, .language p:last-child { - margin-bottom: 0; } - -.language { - border-left: 5px solid #cde9f4; } - .language .aside-title { - color: #4183c4; } - -.aside-warning { - border-left: 5px solid #ff6666; } - .aside-warning .aside-title { - color: #ff0000; } - -.graybox { - border-collapse: collapse; - width: 100%; } - .graybox p { - margin: 0; - word-break: break-word; - min-width: 50px; } - .graybox td { - border: 1px solid #ddd; - padding: 5px 25px 5px 10px; - vertical-align: middle; } - .graybox tr td:first-of-type { - text-align: right; - padding: 7px; - vertical-align: top; - word-break: normal; - width: 40px; } - -.slightly-smaller { - font-size: 0.9em; } - -.footer { - padding: 8px 16px; - background: #444; - color: #ddd; - font-size: 0.8em; } - .footer p { - margin: 8px 0; } - .footer a { - color: #fff; } - -html.dash .header, html.dash .breadcrumbs, html.dash .navigation { - display: none; } -html.dash .height-container { - display: block; } diff --git a/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Info.plist b/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Info.plist deleted file mode 100644 index b138eba13..000000000 --- a/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Info.plist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - CFBundleIdentifier - com.jazzy.siphash - CFBundleName - SipHash - DocSetPlatformFamily - siphash - isDashDocset - - dashIndexFilePath - index.html - isJavaScriptEnabled - - DashDocSetFamily - dashtoc - - diff --git a/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/Protocols.html b/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/Protocols.html deleted file mode 100644 index c9469dae6..000000000 --- a/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/Protocols.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - Protocols Reference - - - - - - - - - - - - -
-

- - SipHash Docs - - (100% documented) -

- -

- - - View on GitHub - -

- -

- - - Install in Dash - -

-
- - - -
- -
- -
-
-

Protocols

-

The following protocols are available globally.

- -
-
- -
-
-
-
    -
  • -
    - - - - SipHashable - -
    -
    -
    -
    -
    -
    -

    A variant of Hashable that makes it simpler to generate good hash values.

    - -

    Instead of hashValue, you need to implement addHashes, adding -data that should contribute to the hash to the supplied hasher. -The hasher takes care of blending the supplied data together.

    - -

    Example implementation:

    - -
    struct Book: SipHashable {
    -    var title: String
    -    var pageCount: Int
    -
    -    func appendHashes(to hasher: inout SipHasher) {
    -        hasher.append(title)
    -        hasher.append(pageCount)
    -    }
    -
    -    static func ==(left: Book, right: Book) -> Bool {
    -        return left.title == right.title && left.pageCount == right.pageCount
    -    }
    -}
    -
    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public protocol SipHashable: Hashable
    - -
    -
    - -
    -
    -
  • -
-
-
-
- -
-
- - -
- diff --git a/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/Protocols/SipHashable.html b/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/Protocols/SipHashable.html deleted file mode 100644 index 6ff0b3fd0..000000000 --- a/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/Protocols/SipHashable.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - SipHashable Protocol Reference - - - - - - - - - - - - - -
-

- - SipHash Docs - - (100% documented) -

- -

- - - View on GitHub - -

- -

- - - Install in Dash - -

-
- - - -
- -
- -
-
-

SipHashable

-
-
-
public protocol SipHashable: Hashable
- -
-
-

A variant of Hashable that makes it simpler to generate good hash values.

- -

Instead of hashValue, you need to implement addHashes, adding -data that should contribute to the hash to the supplied hasher. -The hasher takes care of blending the supplied data together.

- -

Example implementation:

- -
struct Book: SipHashable {
-    var title: String
-    var pageCount: Int
-
-    func appendHashes(to hasher: inout SipHasher) {
-        hasher.append(title)
-        hasher.append(pageCount)
-    }
-
-    static func ==(left: Book, right: Book) -> Bool {
-        return left.title == right.title && left.pageCount == right.pageCount
-    }
-}
-
- -
-
- -
-
-
-
    -
  • -
    - - - - appendHashes(to:) - -
    -
    -
    -
    -
    -
    -

    Add components of self that should contribute to hashing to hash.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    func appendHashes(to hasher: inout SipHasher)
    - -
    -
    - -
    -
    -
  • -
-
-
-
    -
  • -
    - - - - hashValue - - - Extension method - -
    -
    -
    -
    -
    -
    -

    The hash value, calculated using addHashes.

    - -

    Hash values are not guaranteed to be equal across different executions of your program. -Do not save hash values to use during a future execution.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var hashValue: Int
    - -
    -
    - -
    -
    -
  • -
-
-
-
- -
-
- - -
- diff --git a/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/Structs.html b/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/Structs.html deleted file mode 100644 index 5d5d09443..000000000 --- a/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/Structs.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - Structs Reference - - - - - - - - - - - - -
-

- - SipHash Docs - - (100% documented) -

- -

- - - View on GitHub - -

- -

- - - Install in Dash - -

-
- - - -
- -
- -
-
-

Structs

-

The following structs are available globally.

- -
-
- -
-
-
-
    -
  • -
    - - - - SipHasher - -
    -
    -
    -
    -
    -
    -

    An implementation of the SipHash-2-4 hashing algorithm, -suitable for use in projects outside the Swift standard library. -(The Swift stdlib already includes SipHash; unfortunately its API is not public.)

    - -

    SipHash was invented by Jean-Philippe Aumasson and Daniel J. Bernstein.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct SipHasher
    - -
    -
    - -
    -
    -
  • -
-
-
-
- -
-
- - -
- diff --git a/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/Structs/SipHasher.html b/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/Structs/SipHasher.html deleted file mode 100644 index 58d2f368c..000000000 --- a/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/Structs/SipHasher.html +++ /dev/null @@ -1,1007 +0,0 @@ - - - - SipHasher Struct Reference - - - - - - - - - - - - - -
-

- - SipHash Docs - - (100% documented) -

- -

- - - View on GitHub - -

- -

- - - Install in Dash - -

-
- - - -
- -
- -
-
-

SipHasher

-
-
-
public struct SipHasher
- -
-
-

An implementation of the SipHash-2-4 hashing algorithm, -suitable for use in projects outside the Swift standard library. -(The Swift stdlib already includes SipHash; unfortunately its API is not public.)

- -

SipHash was invented by Jean-Philippe Aumasson and Daniel J. Bernstein.

- -
-
- -
-
-
- -
    -
  • -
    - - - - init() - -
    -
    -
    -
    -
    -
    -

    Initialize a new instance with the default key, generated randomly the first time this initializer is called.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init()
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - init(k0:k1:) - -
    -
    -
    -
    -
    -
    -

    Initialize a new instance with the specified key.

    - -
    -

    Parameter

    - Parameter k0: The low 64 bits of the secret key. - -
    - -
    -

    Parameter

    - Parameter k1: The high 64 bits of the secret key. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(k0: UInt64, k1: UInt64)
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - k0 - - -
    -

    The low 64 bits of the secret key.

    - -
    -
    - - k1 - - -
    -

    The high 64 bits of the secret key.

    - -
    -
    -
    - -
    -
    -
  • -
-
-
- -
    -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add all bytes in buffer to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append(_ buffer: UnsafeRawBufferPointer)
    - -
    -
    - -
    -
    -
  • -
-
-
- -
    -
  • -
    - - - - finalize() - -
    -
    -
    -
    -
    -
    -

    Finalize this hash and return the hash value.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func finalize() -> Int
    - -
    -
    - -
    -
    -
  • -
-
-
- -
    -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add hashing components in value to this hash. This method simply calls value.addHashes.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append<H: SipHashable>(_ value: H)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add the hash value of value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append<H: Hashable>(_ value: H)
    - -
    -
    - -
    -
    -
  • -
-
-
- -
    -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append(_ value: Bool)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append(_ value: Int)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append(_ value: UInt)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append(_ value: Int64)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append(_ value: UInt64)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append(_ value: Int32)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append(_ value: UInt32)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append(_ value: Int16)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append(_ value: UInt16)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append(_ value: Int8)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append(_ value: UInt8)
    - -
    -
    - -
    -
    -
  • -
-
-
- -
    -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append(_ value: Float)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append(_ value: Double)
    - -
    -
    - -
    -
    -
  • -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append(_ value: Float80)
    - -
    -
    - -
    -
    -
  • -
-
-
-
    -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append(_ value: CGFloat)
    - -
    -
    - -
    -
    -
  • -
-
-
- -
    -
  • -
    - - - - append(_:) - -
    -
    -
    -
    -
    -
    -

    Add value to this hash.

    - -
    -

    Requires

    - finalize() hasn’t been called on this instance yet. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public mutating func append<Value: Hashable>(_ value: Value?)
    - -
    -
    - -
    -
    -
  • -
-
-
-
- -
-
- - -
- diff --git a/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/css/highlight.css b/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/css/highlight.css deleted file mode 100644 index d0db0e13b..000000000 --- a/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/css/highlight.css +++ /dev/null @@ -1,200 +0,0 @@ -/* Credit to https://gist.github.com/wataru420/2048287 */ -.highlight { - /* Comment */ - /* Error */ - /* Keyword */ - /* Operator */ - /* Comment.Multiline */ - /* Comment.Preproc */ - /* Comment.Single */ - /* Comment.Special */ - /* Generic.Deleted */ - /* Generic.Deleted.Specific */ - /* Generic.Emph */ - /* Generic.Error */ - /* Generic.Heading */ - /* Generic.Inserted */ - /* Generic.Inserted.Specific */ - /* Generic.Output */ - /* Generic.Prompt */ - /* Generic.Strong */ - /* Generic.Subheading */ - /* Generic.Traceback */ - /* Keyword.Constant */ - /* Keyword.Declaration */ - /* Keyword.Pseudo */ - /* Keyword.Reserved */ - /* Keyword.Type */ - /* Literal.Number */ - /* Literal.String */ - /* Name.Attribute */ - /* Name.Builtin */ - /* Name.Class */ - /* Name.Constant */ - /* Name.Entity */ - /* Name.Exception */ - /* Name.Function */ - /* Name.Namespace */ - /* Name.Tag */ - /* Name.Variable */ - /* Operator.Word */ - /* Text.Whitespace */ - /* Literal.Number.Float */ - /* Literal.Number.Hex */ - /* Literal.Number.Integer */ - /* Literal.Number.Oct */ - /* Literal.String.Backtick */ - /* Literal.String.Char */ - /* Literal.String.Doc */ - /* Literal.String.Double */ - /* Literal.String.Escape */ - /* Literal.String.Heredoc */ - /* Literal.String.Interpol */ - /* Literal.String.Other */ - /* Literal.String.Regex */ - /* Literal.String.Single */ - /* Literal.String.Symbol */ - /* Name.Builtin.Pseudo */ - /* Name.Variable.Class */ - /* Name.Variable.Global */ - /* Name.Variable.Instance */ - /* Literal.Number.Integer.Long */ } - .highlight .c { - color: #999988; - font-style: italic; } - .highlight .err { - color: #a61717; - background-color: #e3d2d2; } - .highlight .k { - color: #000000; - font-weight: bold; } - .highlight .o { - color: #000000; - font-weight: bold; } - .highlight .cm { - color: #999988; - font-style: italic; } - .highlight .cp { - color: #999999; - font-weight: bold; } - .highlight .c1 { - color: #999988; - font-style: italic; } - .highlight .cs { - color: #999999; - font-weight: bold; - font-style: italic; } - .highlight .gd { - color: #000000; - background-color: #ffdddd; } - .highlight .gd .x { - color: #000000; - background-color: #ffaaaa; } - .highlight .ge { - color: #000000; - font-style: italic; } - .highlight .gr { - color: #aa0000; } - .highlight .gh { - color: #999999; } - .highlight .gi { - color: #000000; - background-color: #ddffdd; } - .highlight .gi .x { - color: #000000; - background-color: #aaffaa; } - .highlight .go { - color: #888888; } - .highlight .gp { - color: #555555; } - .highlight .gs { - font-weight: bold; } - .highlight .gu { - color: #aaaaaa; } - .highlight .gt { - color: #aa0000; } - .highlight .kc { - color: #000000; - font-weight: bold; } - .highlight .kd { - color: #000000; - font-weight: bold; } - .highlight .kp { - color: #000000; - font-weight: bold; } - .highlight .kr { - color: #000000; - font-weight: bold; } - .highlight .kt { - color: #445588; } - .highlight .m { - color: #009999; } - .highlight .s { - color: #d14; } - .highlight .na { - color: #008080; } - .highlight .nb { - color: #0086B3; } - .highlight .nc { - color: #445588; - font-weight: bold; } - .highlight .no { - color: #008080; } - .highlight .ni { - color: #800080; } - .highlight .ne { - color: #990000; - font-weight: bold; } - .highlight .nf { - color: #990000; } - .highlight .nn { - color: #555555; } - .highlight .nt { - color: #000080; } - .highlight .nv { - color: #008080; } - .highlight .ow { - color: #000000; - font-weight: bold; } - .highlight .w { - color: #bbbbbb; } - .highlight .mf { - color: #009999; } - .highlight .mh { - color: #009999; } - .highlight .mi { - color: #009999; } - .highlight .mo { - color: #009999; } - .highlight .sb { - color: #d14; } - .highlight .sc { - color: #d14; } - .highlight .sd { - color: #d14; } - .highlight .s2 { - color: #d14; } - .highlight .se { - color: #d14; } - .highlight .sh { - color: #d14; } - .highlight .si { - color: #d14; } - .highlight .sx { - color: #d14; } - .highlight .sr { - color: #009926; } - .highlight .s1 { - color: #d14; } - .highlight .ss { - color: #990073; } - .highlight .bp { - color: #999999; } - .highlight .vc { - color: #008080; } - .highlight .vg { - color: #008080; } - .highlight .vi { - color: #008080; } - .highlight .il { - color: #009999; } diff --git a/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/css/jazzy.css b/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/css/jazzy.css deleted file mode 100644 index 75b54333b..000000000 --- a/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/css/jazzy.css +++ /dev/null @@ -1,329 +0,0 @@ -*, *:before, *:after { - box-sizing: inherit; } - -body { - margin: 0; - background: #fff; - color: #333; - font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif; - letter-spacing: .2px; - -webkit-font-smoothing: antialiased; - box-sizing: border-box; } - -h1 { - font-size: 2rem; - font-weight: 700; - margin: 1.275em 0 0.6em; } - -h2 { - font-size: 1.75rem; - font-weight: 700; - margin: 1.275em 0 0.3em; } - -h3 { - font-size: 1.5rem; - font-weight: 700; - margin: 1em 0 0.3em; } - -h4 { - font-size: 1.25rem; - font-weight: 700; - margin: 1.275em 0 0.85em; } - -h5 { - font-size: 1rem; - font-weight: 700; - margin: 1.275em 0 0.85em; } - -h6 { - font-size: 1rem; - font-weight: 700; - margin: 1.275em 0 0.85em; - color: #777; } - -p { - margin: 0 0 1em; } - -ul, ol { - padding: 0 0 0 2em; - margin: 0 0 0.85em; } - -blockquote { - margin: 0 0 0.85em; - padding: 0 15px; - color: #858585; - border-left: 4px solid #e5e5e5; } - -img { - max-width: 100%; } - -a { - color: #4183c4; - text-decoration: none; } - a:hover, a:focus { - outline: 0; - text-decoration: underline; } - -table { - background: #fff; - width: 100%; - border-collapse: collapse; - border-spacing: 0; - overflow: auto; - margin: 0 0 0.85em; } - -tr:nth-child(2n) { - background-color: #fbfbfb; } - -th, td { - padding: 6px 13px; - border: 1px solid #ddd; } - -pre { - margin: 0 0 1.275em; - padding: .85em 1em; - overflow: auto; - background: #f7f7f7; - font-size: .85em; - font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; } - -code { - font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; } - -p > code, li > code { - background: #f7f7f7; - padding: .2em; } - p > code:before, p > code:after, li > code:before, li > code:after { - letter-spacing: -.2em; - content: "\00a0"; } - -pre code { - padding: 0; - white-space: pre; } - -.content-wrapper { - display: flex; - flex-direction: column; } - @media (min-width: 768px) { - .content-wrapper { - flex-direction: row; } } - -.header { - display: flex; - padding: 8px; - font-size: 0.875em; - background: #444; - color: #999; } - -.header-col { - margin: 0; - padding: 0 8px; } - -.header-col--primary { - flex: 1; } - -.header-link { - color: #fff; } - -.header-icon { - padding-right: 6px; - vertical-align: -4px; - height: 16px; } - -.breadcrumbs { - font-size: 0.875em; - padding: 8px 16px; - margin: 0; - background: #fbfbfb; - border-bottom: 1px solid #ddd; } - -.carat { - height: 10px; - margin: 0 5px; } - -.navigation { - order: 2; } - @media (min-width: 768px) { - .navigation { - order: 1; - width: 25%; - max-width: 300px; - padding-bottom: 64px; - overflow: hidden; - word-wrap: normal; - background: #fbfbfb; - border-right: 1px solid #ddd; } } - -.nav-groups { - list-style-type: none; - padding-left: 0; } - -.nav-group-name { - border-bottom: 1px solid #ddd; - padding: 8px 0 8px 16px; } - -.nav-group-name-link { - color: #333; } - -.nav-group-tasks { - margin: 8px 0; - padding: 0 0 0 8px; } - -.nav-group-task { - font-size: 1em; - list-style-type: none; - white-space: nowrap; } - -.nav-group-task-link { - color: #808080; } - -.main-content { - order: 1; } - @media (min-width: 768px) { - .main-content { - order: 2; - flex: 1; - padding-bottom: 60px; } } - -.section { - padding: 0 32px; - border-bottom: 1px solid #ddd; } - -.section-content { - max-width: 834px; - margin: 0 auto; - padding: 16px 0; } - -.section-name { - color: #666; - display: block; } - -.declaration .highlight { - overflow-x: initial; - padding: 8px 0; - margin: 0; - background-color: transparent; - border: none; } - -.task-group-section { - border-top: 1px solid #ddd; } - -.task-group { - padding-top: 0px; } - -.task-name-container a[name]:before { - content: ""; - display: block; } - -.item-container { - padding: 0; } - -.item { - padding-top: 8px; - width: 100%; - list-style-type: none; } - .item a[name]:before { - content: ""; - display: block; } - .item .token { - padding-left: 3px; - margin-left: 0px; - font-size: 1rem; } - .item .declaration-note { - font-size: .85em; - color: #808080; - font-style: italic; } - -.pointer-container { - border-bottom: 1px solid #ddd; - left: -23px; - padding-bottom: 13px; - position: relative; - width: 110%; } - -.pointer { - left: 21px; - top: 7px; - display: block; - position: absolute; - width: 12px; - height: 12px; - border-left: 1px solid #ddd; - border-top: 1px solid #ddd; - background: #fff; - transform: rotate(45deg); } - -.height-container { - display: none; - position: relative; - width: 100%; - overflow: hidden; } - .height-container .section { - background: #fff; - border: 1px solid #ddd; - border-top-width: 0; - padding-top: 10px; - padding-bottom: 5px; - padding: 8px 16px; } - -.aside, .language { - padding: 6px 12px; - margin: 12px 0; - border-left: 5px solid #dddddd; - overflow-y: hidden; } - .aside .aside-title, .language .aside-title { - font-size: 9px; - letter-spacing: 2px; - text-transform: uppercase; - padding-bottom: 0; - margin: 0; - color: #aaa; - -webkit-user-select: none; } - .aside p:last-child, .language p:last-child { - margin-bottom: 0; } - -.language { - border-left: 5px solid #cde9f4; } - .language .aside-title { - color: #4183c4; } - -.aside-warning { - border-left: 5px solid #ff6666; } - .aside-warning .aside-title { - color: #ff0000; } - -.graybox { - border-collapse: collapse; - width: 100%; } - .graybox p { - margin: 0; - word-break: break-word; - min-width: 50px; } - .graybox td { - border: 1px solid #ddd; - padding: 5px 25px 5px 10px; - vertical-align: middle; } - .graybox tr td:first-of-type { - text-align: right; - padding: 7px; - vertical-align: top; - word-break: normal; - width: 40px; } - -.slightly-smaller { - font-size: 0.9em; } - -.footer { - padding: 8px 16px; - background: #444; - color: #ddd; - font-size: 0.8em; } - .footer p { - margin: 8px 0; } - .footer a { - color: #fff; } - -html.dash .header, html.dash .breadcrumbs, html.dash .navigation { - display: none; } -html.dash .height-container { - display: block; } diff --git a/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/img/carat.png b/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/img/carat.png deleted file mode 100755 index 29d2f7fd4..000000000 Binary files a/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/img/carat.png and /dev/null differ diff --git a/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/img/dash.png b/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/img/dash.png deleted file mode 100755 index 6f694c7a0..000000000 Binary files a/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/img/dash.png and /dev/null differ diff --git a/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/img/gh.png b/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/img/gh.png deleted file mode 100755 index 628da97c7..000000000 Binary files a/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/img/gh.png and /dev/null differ diff --git a/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/index.html b/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/index.html deleted file mode 100644 index 29353347d..000000000 --- a/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/index.html +++ /dev/null @@ -1,225 +0,0 @@ - - - - SipHash Reference - - - - - - - - - - - - -
-

- - SipHash Docs - - (100% documented) -

- -

- - - View on GitHub - -

- -

- - - Install in Dash - -

-
- - - -
- -
- -
-
- -

SipHash

- -

Swift 3.0 -License -Platform

- -

Build Status -Code Coverage -Documented

- -

Carthage compatible -CocoaPod Version

- -

SipHash is a pure Swift implementation of the SipHash hashing algorithm designed by -Jean-Philippe Aumasson and Daniel J. Bernstein in 2012:

- -
-

SipHash is a family of pseudorandom functions (a.k.a. keyed hash functions) optimized for speed on short messages.

- -

Target applications include network traffic authentication and defense against hash-flooding DoS attacks.

- -

SipHash is secure, fast, and simple (for real): -- SipHash is simpler and faster than previous cryptographic algorithms (e.g. MACs based on universal hashing) -- SipHash is competitive in performance with insecure non-cryptographic algorithms (e.g. MurmurHash)

- -

131002.net

-
- -

SipHash has a variety of flavors; this package implements the one called SipHash-2-4.

- -

Note that the Swift Standard Library already includes an implementation of SipHash-2-4 and SipHash-1-3; -however, the APIs are currently private and not available for use outside of stdlib. This package provides an -independent implementation that’s available for use in third-party code.

- -

SipHash requires Swift 3.0.1.

-

Sample Code

-
import SipHash
-
-// `SipHashable` is like `Hashable`, but simpler.
-struct Book: SipHashable {
-    let title: String
-    let pageCount: Int
-
-    // You need to implement this method instead of `hashValue`. 
-    func appendHashes(to hasher: inout SipHasher) {
-         // Simply append the fields you want to include in the hash.
-         hasher.append(title)
-         hasher.append(pageCount)
-    }
-
-    static func ==(left: Book, right: Book) -> Bool {
-         return left.title == right.title && left.pageCount == right.pageCount
-    }
-}
-
-// You can now use Books in sets or as dictionary keys.
-let book = Book(title: "The Colour of Magic", pageCount: 206)
-let books: Set<Book> = [book]
-
-
-// If you prefer to do so, you may also create & use hashers directly.
-var hasher = SipHasher()
-hasher.add(book)
-hasher.add(42)
-// Finalizing the hasher extracts the hash value and invalidates it.
-let hash = hasher.finalize() 
-
-

Why Would I Use SipHash?

- -

Writing a good implementation of hashValue is hard, even if we just need to combine the values of a couple of fields. -We need to come up with a deterministic function that blends the field values well, producing a fixed-width -result without too many collisions on typical inputs. But how many collisions are too many? Do we even know what -our typical inputs look like? For me, the answer to both of these questions is usually I have absolutely no idea, -and I bet you have the same problem.

- -

Thus, verifying that our hashValue implementations work well is an exercise in frustration.

- -

We need to somehow check the properties of the hash function by looking at its behavior given various inputs. -It is easy enough to write tests for the requirement that equal values have equal hashValues. -But verifying that the hash has few collisions requires making some assumptions on the -statistical properties of typical inputs – and even if we’d be somehow confident enough to do that, writing the code -to do it is way too complicated.

- -

Instead of rolling your own ad-hoc hash function, why not just use an algorithm designed specifically to blend data -into a hash? Using a standardized algorithm means we don’t need to worry about collision behavior any more: if the -algorithm was designed well, we’ll always have good results.

- -

The SipHash algorithm is a particularly good choice for hashing. It implements a 64-bit cryptographic -message-authentication code (MAC) with a 256-bit internal state initialized from a 128-bit secret key that’s (typically) -randomly generated for each execution of the binary. -SipHash is designed to protect against hash collision attacks, while remaining simple to use and fast. -It is already used by Perl, Python, Ruby, Rust, and even Swift itself – which is why the documentation of Hashable -explicitly warns that the value returned by hashValue may be different across executions.

- -

The standard library already implements SipHash, but the implementation is private. (It is technically available -for use, but it is not formally part of the stdlib API, and it is subject to change/removal across even point releases.) -I expect a refactored version of stdlib’s SipHash will become available as public API in a future Swift release. -But while we’re waiting for that, this package provides an alternative implementation that is available today.

-

Is this code full of bugs?

- -

Indubitably. Please report all bugs you find!

- -

The package has 100% unit test coverage. Unfortunately this doesn’t tell you much about its reliability in practice.

- -

The test suite verifies that the package generates values that match the test vectors supplied by SipHash’s original -authors, which makes me reasonably confident that this package implements SipHash correctly. -Obviously, your mileage may vary.

-

Reference docs

- -

Nicely formatted reference docs are available courtesy of Jazzy.

-

Installation

-

CocoaPods

- -

If you use CocoaPods, you can start using SipHash by including it as a dependency in your Podfile:

-
pod 'SipHash', '~> 1.0'
-
-

Carthage

- -

For Carthage, add the following line to your Cartfile:

-
github "lorentey/SipHash" ~> 1.0
-
-

Swift Package Manager

- -

For Swift Package Manager, add SipHash to the dependencies list inside your Package.swift file:

-
import PackageDescription
-
-let package = Package(
-    name: "MyPackage",
-    dependencies: [
-        .Package(url: "https://github.com/lorentey/SipHash.git", majorVersion: 1)
-    ]
-)
-
-

Standalone Development

- -

If you don’t use a dependency manager, you need to clone this repo somewhere near your project, and add a reference to SipHash.xcodeproj to your project’s xcworkspace. You can put the clone of SipHash wherever you like on disk, but it is a good idea to set it up as a submodule of your app’s top-level Git repository.

- -

To link your application binary with SipHash, just add SipHash.framework from the SipHash project to the Embedded Binaries section of your app target’s General page in Xcode. As long as the SipHash project file is referenced in your workspace, this framework will be listed in the Choose items to add sheet that opens when you click on the + button of your target’s Embedded Binaries list.

- -

There is no need to do any additional setup beyond adding the framework targets to Embedded Binaries.

- -
-
- - -
-
- - -
- diff --git a/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/js/jazzy.js b/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/js/jazzy.js deleted file mode 100755 index e2b491dc2..000000000 --- a/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/js/jazzy.js +++ /dev/null @@ -1,37 +0,0 @@ -window.jazzy = {'docset': false} -if (typeof window.dash != 'undefined') { - document.documentElement.className += ' dash' - window.jazzy.docset = true -} -if (navigator.userAgent.match(/xcode/i)) { - document.documentElement.className += ' xcode' - window.jazzy.docset = true -} - -// On doc load, toggle the URL hash discussion if present -$(document).ready(function() { - if (!window.jazzy.docset) { - var linkToHash = $('a[href="' + window.location.hash +'"]'); - linkToHash.trigger("click"); - } -}); - -// On token click, toggle its discussion and animate token.marginLeft -$(".token").click(function(event) { - if (window.jazzy.docset) { - return; - } - var link = $(this); - var animationDuration = 300; - $content = link.parent().parent().next(); - $content.slideToggle(animationDuration); - - // Keeps the document from jumping to the hash. - var href = $(this).attr('href'); - if (history.pushState) { - history.pushState({}, '', href); - } else { - location.hash = href; - } - event.preventDefault(); -}); diff --git a/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/js/jquery.min.js b/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/js/jquery.min.js deleted file mode 100755 index ab28a2472..000000000 --- a/Carthage/Checkouts/SipHash/docs/docsets/SipHash.docset/Contents/Resources/Documents/js/jquery.min.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ -!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="
",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h; -if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML="
a",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/\s*$/g,rb={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:k.htmlSerialize?[0,"",""]:[1,"X
","
"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?""!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("