diff --git a/osx/Nide.xcodeproj/Pau.mode1v3 b/osx/Nide.xcodeproj/Pau.mode1v3 new file mode 100644 index 0000000..5b06bac --- /dev/null +++ b/osx/Nide.xcodeproj/Pau.mode1v3 @@ -0,0 +1,1382 @@ + + + + + ActivePerspectiveName + Project + AllowedModules + + + BundleLoadPath + + MaxInstances + n + Module + PBXSmartGroupTreeModule + Name + Groups and Files Outline View + + + BundleLoadPath + + MaxInstances + n + Module + PBXNavigatorGroup + Name + Editor + + + BundleLoadPath + + MaxInstances + n + Module + XCTaskListModule + Name + Task List + + + BundleLoadPath + + MaxInstances + n + Module + XCDetailModule + Name + File and Smart Group Detail Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXBuildResultsModule + Name + Detailed Build Results Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXProjectFindModule + Name + Project Batch Find Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCProjectFormatConflictsModule + Name + Project Format Conflicts List + + + BundleLoadPath + + MaxInstances + n + Module + PBXBookmarksModule + Name + Bookmarks Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXClassBrowserModule + Name + Class Browser + + + BundleLoadPath + + MaxInstances + n + Module + PBXCVSModule + Name + Source Code Control Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXDebugBreakpointsModule + Name + Debug Breakpoints Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCDockableInspector + Name + Inspector + + + BundleLoadPath + + MaxInstances + n + Module + PBXOpenQuicklyModule + Name + Open Quickly Tool + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugSessionModule + Name + Debugger + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugCLIModule + Name + Debug Console + + + BundleLoadPath + + MaxInstances + n + Module + XCSnapshotModule + Name + Snapshots Tool + + + BundlePath + /Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources + Description + DefaultDescriptionKey + DockingSystemVisible + + Extension + mode1v3 + FavBarConfig + + PBXProjectModuleGUID + 5FD74C7315F8AB3700338F56 + XCBarModuleItemNames + + XCBarModuleItems + + + FirstTimeWindowDisplayed + + Identifier + com.apple.perspectives.project.mode1v3 + MajorVersion + 33 + MinorVersion + 0 + Name + Default + Notifications + + OpenEditors + + PerspectiveWidths + + -1 + -1 + + Perspectives + + + ChosenToolbarItems + + active-combo-popup + action + NSToolbarFlexibleSpaceItem + debugger-enable-breakpoints + build-and-go + com.apple.ide.PBXToolbarStopButton + get-info + NSToolbarFlexibleSpaceItem + com.apple.pbx.toolbar.searchfield + + ControllerClassBaseName + + IconName + WindowOfProjectWithEditor + Identifier + perspective.project + IsVertical + + Layout + + + BecomeActive + + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 186 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + F5B0127914B482B900145F5E + 1C37FABC05509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {186, 445}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + + XCSharingToken + com.apple.Xcode.GFSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {203, 463}} + GroupTreeTableConfiguration + + MainColumn + 186 + + RubberWindowFrame + 246 401 788 504 0 0 1280 1002 + + Module + PBXSmartGroupTreeModule + Proportion + 203pt + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CE0B20306471E060097A5F4 + PBXProjectModuleLabel + MyNewFile14.java + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CE0B20406471E060097A5F4 + PBXProjectModuleLabel + MyNewFile14.java + + SplitCount + 1 + + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {580, 277}} + RubberWindowFrame + 246 401 788 504 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 277pt + + + ContentConfiguration + + PBXProjectModuleGUID + 1CE0B20506471E060097A5F4 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{0, 282}, {580, 181}} + RubberWindowFrame + 246 401 788 504 0 0 1280 1002 + + Module + XCDetailModule + Proportion + 181pt + + + Proportion + 580pt + + + Name + Project + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + XCModuleDock + PBXNavigatorGroup + XCDetailModule + + TableOfContents + + 5FD74C7115F8AB3700338F56 + 1CE0B1FE06471DED0097A5F4 + 5FD74C7215F8AB3700338F56 + 1CE0B20306471E060097A5F4 + 1CE0B20506471E060097A5F4 + + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarConfiguration + xcode.toolbar.config.defaultV3 + + + ControllerClassBaseName + + IconName + WindowOfProject + Identifier + perspective.morph + IsVertical + 0 + Layout + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C08E77C0454961000C914BD + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + + PBXProjectModuleGUID + 11E0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 186 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 29B97314FDCFA39411CA2CEA + 1C37FABC05509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {186, 337}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 1 + XCSharingToken + com.apple.Xcode.GFSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {203, 355}} + GroupTreeTableConfiguration + + MainColumn + 186 + + RubberWindowFrame + 373 269 690 397 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 100% + + + Name + Morph + PreferredWidth + 300 + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + + TableOfContents + + 11E0B1FE06471DED0097A5F4 + + ToolbarConfiguration + xcode.toolbar.config.default.shortV3 + + + PerspectivesBarVisible + + ShelfIsVisible + + SourceDescription + file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec' + StatusbarIsVisible + + TimeStamp + 0.0 + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarDisplayMode + 1 + ToolbarIsVisible + + ToolbarSizeMode + 1 + Type + Perspectives + UpdateMessage + The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the "Metro-Morph" feature). You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature. Do you wish to update to the latest Workspace defaults for project '%@'? + WindowJustification + 5 + WindowOrderList + + 1CD10A99069EF8BA00B06720 + 5FD74C7415F8AB3700338F56 + /Users/Pau/Proyectos/nide/osx/Nide.xcodeproj + + WindowString + 246 401 788 504 0 0 1280 1002 + WindowToolsV3 + + + FirstTimeWindowDisplayed + + Identifier + windowTool.build + IsVertical + + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528F0623707200166675 + PBXProjectModuleLabel + + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {994, 124}} + RubberWindowFrame + 267 476 994 406 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 124pt + + + BecomeActive + + ContentConfiguration + + PBXProjectModuleGUID + XCMainBuildResultsModuleGUID + PBXProjectModuleLabel + Build Results + XCBuildResultsTrigger_Collapse + 1021 + XCBuildResultsTrigger_Open + 1011 + + GeometryConfiguration + + Frame + {{0, 129}, {994, 236}} + RubberWindowFrame + 267 476 994 406 0 0 1280 1002 + + Module + PBXBuildResultsModule + Proportion + 236pt + + + Proportion + 365pt + + + Name + Build Results + ServiceClasses + + PBXBuildResultsModule + + StatusbarIsVisible + + TableOfContents + + 5FD74C7415F8AB3700338F56 + 5FD74C7515F8AB3700338F56 + 1CD0528F0623707200166675 + XCMainBuildResultsModuleGUID + + ToolbarConfiguration + xcode.toolbar.config.buildV3 + WindowContentMinSize + 486 300 + WindowString + 267 476 994 406 0 0 1280 1002 + WindowToolGUID + 5FD74C7415F8AB3700338F56 + WindowToolIsVisible + + + + FirstTimeWindowDisplayed + + Identifier + windowTool.debugger + IsVertical + + Layout + + + Dock + + + ContentConfiguration + + Debugger + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {316, 185}} + {{316, 0}, {378, 185}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {694, 185}} + {{0, 185}, {694, 196}} + + + + LauncherConfigVersion + 8 + PBXProjectModuleGUID + 1C162984064C10D400B95A72 + PBXProjectModuleLabel + Debug - GLUTExamples (Underwater) + + GeometryConfiguration + + DebugConsoleVisible + None + DebugConsoleWindowFrame + {{200, 200}, {500, 300}} + DebugSTDIOWindowFrame + {{200, 200}, {500, 300}} + Frame + {{0, 0}, {694, 381}} + PBXDebugSessionStackFrameViewKey + + DebugVariablesTableConfiguration + + Name + 120 + Value + 85 + Summary + 148 + + Frame + {{316, 0}, {378, 185}} + RubberWindowFrame + 267 460 694 422 0 0 1280 1002 + + RubberWindowFrame + 267 460 694 422 0 0 1280 1002 + + Module + PBXDebugSessionModule + Proportion + 381pt + + + Proportion + 381pt + + + Name + Debugger + ServiceClasses + + PBXDebugSessionModule + + StatusbarIsVisible + + TableOfContents + + 1CD10A99069EF8BA00B06720 + 5FD74C8215F8AB7500338F56 + 1C162984064C10D400B95A72 + 5FD74C8315F8AB7500338F56 + 5FD74C8415F8AB7500338F56 + 5FD74C8515F8AB7500338F56 + 5FD74C8615F8AB7500338F56 + 5FD74C8715F8AB7500338F56 + + ToolbarConfiguration + xcode.toolbar.config.debugV3 + WindowString + 267 460 694 422 0 0 1280 1002 + WindowToolGUID + 1CD10A99069EF8BA00B06720 + WindowToolIsVisible + + + + Identifier + windowTool.find + Layout + + + Dock + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CDD528C0622207200134675 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CD0528D0623707200166675 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {781, 167}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 781pt + + + Proportion + 50% + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528E0623707200166675 + PBXProjectModuleLabel + Project Find + + GeometryConfiguration + + Frame + {{8, 0}, {773, 254}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXProjectFindModule + Proportion + 50% + + + Proportion + 428pt + + + Name + Project Find + ServiceClasses + + PBXProjectFindModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C530D57069F1CE1000CFCEE + 1C530D58069F1CE1000CFCEE + 1C530D59069F1CE1000CFCEE + 1CDD528C0622207200134675 + 1C530D5A069F1CE1000CFCEE + 1CE0B1FE06471DED0097A5F4 + 1CD0528E0623707200166675 + + WindowString + 62 385 781 470 0 0 1440 878 + WindowToolGUID + 1C530D57069F1CE1000CFCEE + WindowToolIsVisible + 0 + + + Identifier + MENUSEPARATOR + + + Identifier + windowTool.debuggerConsole + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAAC065D492600B07095 + PBXProjectModuleLabel + Debugger Console + + GeometryConfiguration + + Frame + {{0, 0}, {650, 250}} + RubberWindowFrame + 516 632 650 250 0 0 1680 1027 + + Module + PBXDebugCLIModule + Proportion + 209pt + + + Proportion + 209pt + + + Name + Debugger Console + ServiceClasses + + PBXDebugCLIModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAAD065D492600B07095 + 1C78EAAE065D492600B07095 + 1C78EAAC065D492600B07095 + + ToolbarConfiguration + xcode.toolbar.config.consoleV3 + WindowString + 650 41 650 250 0 0 1280 1002 + WindowToolGUID + 1C78EAAD065D492600B07095 + WindowToolIsVisible + 0 + + + Identifier + windowTool.snapshots + Layout + + + Dock + + + Module + XCSnapshotModule + Proportion + 100% + + + Proportion + 100% + + + Name + Snapshots + ServiceClasses + + XCSnapshotModule + + StatusbarIsVisible + Yes + ToolbarConfiguration + xcode.toolbar.config.snapshots + WindowString + 315 824 300 550 0 0 1440 878 + WindowToolIsVisible + Yes + + + Identifier + windowTool.scm + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAB2065D492600B07095 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1C78EAB3065D492600B07095 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {452, 0}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 0pt + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD052920623707200166675 + PBXProjectModuleLabel + SCM + + GeometryConfiguration + + ConsoleFrame + {{0, 259}, {452, 0}} + Frame + {{0, 7}, {452, 259}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + TableConfiguration + + Status + 30 + FileName + 199 + Path + 197.0950012207031 + + TableFrame + {{0, 0}, {452, 250}} + + Module + PBXCVSModule + Proportion + 262pt + + + Proportion + 266pt + + + Name + SCM + ServiceClasses + + PBXCVSModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAB4065D492600B07095 + 1C78EAB5065D492600B07095 + 1C78EAB2065D492600B07095 + 1CD052920623707200166675 + + ToolbarConfiguration + xcode.toolbar.config.scm + WindowString + 743 379 452 308 0 0 1280 1002 + + + Identifier + windowTool.breakpoints + IsVertical + 0 + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C77FABC04509CD000000102 + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + no + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 168 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 1C77FABC04509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {168, 350}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 0 + + GeometryConfiguration + + Frame + {{0, 0}, {185, 368}} + GroupTreeTableConfiguration + + MainColumn + 168 + + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 185pt + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA1AED706398EBD00589147 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{190, 0}, {554, 368}} + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + XCDetailModule + Proportion + 554pt + + + Proportion + 368pt + + + MajorVersion + 3 + MinorVersion + 0 + Name + Breakpoints + ServiceClasses + + PBXSmartGroupTreeModule + XCDetailModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CDDB66807F98D9800BB5817 + 1CDDB66907F98D9800BB5817 + 1CE0B1FE06471DED0097A5F4 + 1CA1AED706398EBD00589147 + + ToolbarConfiguration + xcode.toolbar.config.breakpointsV3 + WindowString + 315 424 744 409 0 0 1440 878 + WindowToolGUID + 1CDDB66807F98D9800BB5817 + WindowToolIsVisible + 1 + + + Identifier + windowTool.debugAnimator + Layout + + + Dock + + + Module + PBXNavigatorGroup + Proportion + 100% + + + Proportion + 100% + + + Name + Debug Visualizer + ServiceClasses + + PBXNavigatorGroup + + StatusbarIsVisible + 1 + ToolbarConfiguration + xcode.toolbar.config.debugAnimatorV3 + WindowString + 100 100 700 500 0 0 1280 1002 + + + Identifier + windowTool.bookmarks + Layout + + + Dock + + + Module + PBXBookmarksModule + Proportion + 100% + + + Proportion + 100% + + + Name + Bookmarks + ServiceClasses + + PBXBookmarksModule + + StatusbarIsVisible + 0 + WindowString + 538 42 401 187 0 0 1280 1002 + + + Identifier + windowTool.projectFormatConflicts + Layout + + + Dock + + + Module + XCProjectFormatConflictsModule + Proportion + 100% + + + Proportion + 100% + + + Name + Project Format Conflicts + ServiceClasses + + XCProjectFormatConflictsModule + + StatusbarIsVisible + 0 + WindowContentMinSize + 450 300 + WindowString + 50 850 472 307 0 0 1440 877 + + + Identifier + windowTool.classBrowser + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + OptionsSetName + Hierarchy, all classes + PBXProjectModuleGUID + 1CA6456E063B45B4001379D8 + PBXProjectModuleLabel + Class Browser - NSObject + + GeometryConfiguration + + ClassesFrame + {{0, 0}, {374, 96}} + ClassesTreeTableConfiguration + + PBXClassNameColumnIdentifier + 208 + PBXClassBookColumnIdentifier + 22 + + Frame + {{0, 0}, {630, 331}} + MembersFrame + {{0, 105}, {374, 395}} + MembersTreeTableConfiguration + + PBXMemberTypeIconColumnIdentifier + 22 + PBXMemberNameColumnIdentifier + 216 + PBXMemberTypeColumnIdentifier + 97 + PBXMemberBookColumnIdentifier + 22 + + PBXModuleWindowStatusBarHidden2 + 1 + RubberWindowFrame + 385 179 630 352 0 0 1440 878 + + Module + PBXClassBrowserModule + Proportion + 332pt + + + Proportion + 332pt + + + Name + Class Browser + ServiceClasses + + PBXClassBrowserModule + + StatusbarIsVisible + 0 + TableOfContents + + 1C0AD2AF069F1E9B00FABCE6 + 1C0AD2B0069F1E9B00FABCE6 + 1CA6456E063B45B4001379D8 + + ToolbarConfiguration + xcode.toolbar.config.classbrowser + WindowString + 385 179 630 352 0 0 1440 878 + WindowToolGUID + 1C0AD2AF069F1E9B00FABCE6 + WindowToolIsVisible + 0 + + + Identifier + windowTool.refactoring + IncludeInToolsMenu + 0 + Layout + + + Dock + + + BecomeActive + 1 + GeometryConfiguration + + Frame + {0, 0}, {500, 335} + RubberWindowFrame + {0, 0}, {500, 335} + + Module + XCRefactoringModule + Proportion + 100% + + + Proportion + 100% + + + Name + Refactoring + ServiceClasses + + XCRefactoringModule + + WindowString + 200 200 500 356 0 0 1920 1200 + + + + diff --git a/osx/Nide.xcodeproj/Pau.pbxuser b/osx/Nide.xcodeproj/Pau.pbxuser new file mode 100644 index 0000000..f9693e2 --- /dev/null +++ b/osx/Nide.xcodeproj/Pau.pbxuser @@ -0,0 +1,88 @@ +// !$*UTF8*$! +{ + 5FD74C5E15F8AB3400338F56 /* Nide */ = { + isa = PBXExecutable; + activeArgIndices = ( + ); + argumentStrings = ( + ); + autoAttachOnCrash = 1; + breakpointsEnabled = 0; + configStateDict = { + }; + customDataFormattersEnabled = 1; + dataTipCustomDataFormattersEnabled = 1; + dataTipShowTypeColumn = 1; + dataTipSortType = 0; + debuggerPlugin = GDBDebugging; + disassemblyDisplayState = 0; + enableDebugStr = 1; + environmentEntries = ( + ); + executableSystemSymbolLevel = 0; + executableUserSymbolLevel = 0; + libgmallocEnabled = 0; + name = Nide; + showTypeColumn = 0; + sourceDirectories = ( + ); + }; + 5FD74C7615F8AB3800338F56 /* Source Control */ = { + isa = PBXSourceControlManager; + fallbackIsa = XCSourceControlManager; + isSCMEnabled = 0; + scmConfiguration = { + repositoryNamesForRoots = { + "" = ""; + }; + }; + }; + 5FD74C7715F8AB3800338F56 /* Code sense */ = { + isa = PBXCodeSenseManager; + indexTemplatePath = ""; + }; + F5B0127B14B482B900145F5E /* Project object */ = { + activeBuildConfigurationName = Debug; + activeExecutable = 5FD74C5E15F8AB3400338F56 /* Nide */; + activeTarget = F5B0128314B482BA00145F5E /* Nide */; + codeSenseManager = 5FD74C7715F8AB3800338F56 /* Code sense */; + executables = ( + 5FD74C5E15F8AB3400338F56 /* Nide */, + ); + perUserDictionary = { + PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 341, + 20, + 48.16259765625, + 43, + 43, + 20, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + PBXFileDataSource_Target_ColumnID, + ); + }; + PBXPerProjectTemplateStateSaveDate = 368618292; + PBXWorkspaceStateSaveDate = 368618292; + }; + sourceControlManager = 5FD74C7615F8AB3800338F56 /* Source Control */; + userBuildSettings = { + }; + }; + F5B0128314B482BA00145F5E /* Nide */ = { + activeExec = 0; + executables = ( + 5FD74C5E15F8AB3400338F56 /* Nide */, + ); + }; +} diff --git a/osx/build/Debug/Nide.app/Contents/Info.plist b/osx/build/Debug/Nide.app/Contents/Info.plist new file mode 100644 index 0000000..434efbb --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Info.plist @@ -0,0 +1,48 @@ + + + + + BuildMachineOSBuild + 10K549 + CFBundleDevelopmentRegion + en + CFBundleExecutable + Nide + CFBundleIconFile + nide.icns + CFBundleIdentifier + com.github.coreh.Nide + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Nide + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 0.2 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 10M2518 + DTPlatformVersion + PG + DTSDKBuild + 10M2518 + DTSDKName + macosx10.6 + DTXcode + 0400 + DTXcodeBuild + 10M2518 + LSMinimumSystemVersion + 10.6 + NSHumanReadableCopyright + Copyright © 2012 Marco Aurélio. All rights reserved. + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/osx/build/Debug/Nide.app/Contents/MacOS/Nide b/osx/build/Debug/Nide.app/Contents/MacOS/Nide new file mode 100755 index 0000000..e437232 Binary files /dev/null and b/osx/build/Debug/Nide.app/Contents/MacOS/Nide differ diff --git a/osx/build/Debug/Nide.app/Contents/PkgInfo b/osx/build/Debug/Nide.app/Contents/PkgInfo new file mode 100644 index 0000000..bd04210 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/PkgInfo @@ -0,0 +1 @@ +APPL???? \ No newline at end of file diff --git a/osx/build/Debug/Nide.app/Contents/Resources/ProjectWindow.nib b/osx/build/Debug/Nide.app/Contents/Resources/ProjectWindow.nib new file mode 100644 index 0000000..65bb813 Binary files /dev/null and b/osx/build/Debug/Nide.app/Contents/Resources/ProjectWindow.nib differ diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/css/codemirror-default.css b/osx/build/Debug/Nide.app/Contents/Resources/client/css/codemirror-default.css new file mode 100644 index 0000000..2f5a363 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/css/codemirror-default.css @@ -0,0 +1,41 @@ +.cm-s-default span.cm-keyword { + color: #708; +/* background: rgba(200,50,180, 0.1); + border-radius: 4px; + padding: 2px; + text-shadow: 0 1px 0 white;*/ +} +.cm-s-default span.cm-atom {color: #219;} +.cm-s-default span.cm-number {color: #164;} +.cm-s-default span.cm-def {color: #00f;} +.cm-s-default span.cm-variable {color: #222;} +.cm-s-default span.cm-variable-2 {color: #05a;} +.cm-s-default span.cm-variable-3 {color: #0a5;} +.cm-s-default span.cm-property {color: #338;} +.cm-s-default span.cm-operator {color: #777;} +.cm-s-default span.cm-comment { + color: #a50; + background: rgba(200,180,50, 0.05); + border-radius: 4px; + padding: 2px 0; + text-shadow: 0 1px 0 white; + opacity: 0.5; +} +.cm-s-default span.cm-comment:hover { + opacity: 1.0; +} +.cm-s-default span.cm-string { + color: #a11; + background: rgba(200,50,180, 0.05); + border-radius: 4px; + padding: 2px 0; + text-shadow: 0 1px 0 white; +} +.cm-s-default span.cm-string-2 {color: #f50;} +.cm-s-default span.cm-meta {color: #555;} +.cm-s-default span.cm-error {color: #f00;} +.cm-s-default span.cm-qualifier {color: #555;} +.cm-s-default span.cm-builtin {color: #30a;} +.cm-s-default span.cm-bracket {color: #cc7;} +.cm-s-default span.cm-tag {color: #170;} +.cm-s-default span.cm-attribute {color: #00c;} diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/css/codemirror-solarized.less b/osx/build/Debug/Nide.app/Contents/Resources/client/css/codemirror-solarized.less new file mode 100644 index 0000000..c2b3b17 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/css/codemirror-solarized.less @@ -0,0 +1,107 @@ +// SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B RGB HSB +// --------- ------- ---- ------- ----------- ---------- ----------- ----------- +// base03 #002b36 8/4 brblack 234 #1c1c1c 15 -12 -12 0 43 54 193 100 21 +// base02 #073642 0/4 black 235 #262626 20 -12 -12 7 54 66 192 90 26 +// base01 #586e75 10/7 brgreen 240 #585858 45 -07 -07 88 110 117 194 25 46 +// base00 #657b83 11/7 bryellow 241 #626262 50 -07 -07 101 123 131 195 23 51 +// base0 #839496 12/6 brblue 244 #808080 60 -06 -03 131 148 150 186 13 59 +// base1 #93a1a1 14/4 brcyan 245 #8a8a8a 65 -05 -02 147 161 161 180 9 63 +// base2 #eee8d5 7/7 white 254 #e4e4e4 92 -00 10 238 232 213 44 11 93 +// base3 #fdf6e3 15/7 brwhite 230 #ffffd7 97 00 10 253 246 227 44 10 99 +// yellow #b58900 3/3 yellow 136 #af8700 60 10 65 181 137 0 45 100 71 +// orange #cb4b16 9/3 brred 166 #d75f00 50 50 55 203 75 22 18 89 80 +// red #dc322f 1/1 red 160 #d70000 50 65 45 220 50 47 1 79 86 +// magenta #d33682 5/5 magenta 125 #af005f 50 65 -05 211 54 130 331 74 83 +// violet #6c71c4 13/5 brmagenta 61 #5f5faf 50 15 -45 108 113 196 237 45 77 +// blue #268bd2 4/4 blue 33 #0087ff 55 -10 -45 38 139 210 205 82 82 +// cyan #2aa198 6/6 cyan 37 #00afaf 60 -35 -05 42 161 152 175 74 63 +// green #859900 2/2 green 64 #5f8700 60 -20 65 133 153 0 68 100 60 + +@base03: #002b36; +@base02: #073642; +@base01: #586e75; +@base00: #657b83; +@base0: #839496; +@base1: #93a1a1; +@base2: #eee8d5; +@base3: #fdf6e3; +@yellow: #b58900; +@orange: #cb4b16; +@red: #dc322f; +@magenta: #d33682; +@violet: #6c71c4; +@blue: #268bd2; +@cyan: #2aa198; +@green: #859900; + +html * { + color-profile: sRGB; + rendering-intent: auto; +} + +.rebase(@rebase03,@rebase02,@rebase01,@rebase00,@rebase0,@rebase1,@rebase2,@rebase3) { + background-color: @rebase03; + color: @rebase0; + + .emphasis { font-weight:bold;} + .dotted { border-bottom: 1px dotted @orange; } + + .CodeMirror-gutter { + background-color: @rebase02; + border-right: 3px solid @rebase02; + .CodeMirror-gutter-text { + color: @rebase01; + } + } + .CodeMirror-cursor { + border-left-color: @rebase3 !important; + } + + .CodeMirror-matchingbracket { + color: @rebase3; + background-color: @rebase02; + box-shadow: 0 0 10px @rebase02; + .emphasis; + } + .CodeMirror-nonmatchingbracket { + .CodeMirror-matchingbracket; + color: @red; + .dotted; + } + + span { + &.cm-keyword { color: @rebase0; .emphasis; } + &.cm-atom { color: @cyan; } + &.cm-number { color: @rebase1; } + &.cm-def { color: @blue; } + + &.cm-variable{ color: @orange; } + &.cm-variable-2{ .cm-variable; } + &.cm-variable-3{ .cm-variable; } + + &.cm-comment { color: @rebase01; } + + &.cm-property { color: @yellow; } + &.cm-operator { color: @rebase0; } + &.cm-string { color: @violet; } + &.cm-error{ .emphasis; .dotted; } + &.cm-bracket { color: @orange; } + + &.cm-tag { color: @rebase0; } + &.cm-attribute { color: @rebase1; .emphasis; } + &.cm-meta { color: @blue; } + + // Unstyled + &.cm-qualifier{ } + &.cm-builtin { } + &.cm-null {} + &.cm-undefined {} + } +} + +.cm-s-solarized-light { + .rebase(@base3, @base2, @base1, @base0, @base00, @base01, @base02, @base03); +} +.cm-s-solarized-dark { + .rebase(@base03, @base02, @base01, @base00, @base0, @base1, @base2, @base3); +} diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/css/codemirror.css b/osx/build/Debug/Nide.app/Contents/Resources/client/css/codemirror.css new file mode 100644 index 0000000..0b089db --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/css/codemirror.css @@ -0,0 +1,70 @@ +.CodeMirror { + line-height: 1em; + font-family: monospace; +} + +.CodeMirror-gutter { + position: absolute; left: 0; top: 0; + background-color: #f7f7f7; + border-right: 1px solid #eee; + min-width: 2em; + height: 100%; +} +.CodeMirror-gutter-text { + color: #aaa; + text-align: right; + padding: .4em .2em .4em .4em; +} +.CodeMirror-lines { + padding: .4em; +} + +.CodeMirror pre { + -moz-border-radius: 0; + -webkit-border-radius: 0; + -o-border-radius: 0; + border-radius: 0; + border-width: 0; margin: 0; padding: 0; background: transparent; + font-family: inherit; + font-size: inherit; + padding: 0; margin: 0; + white-space: pre; + word-wrap: normal; +} + +.CodeMirror textarea { + font-family: inherit !important; + font-size: inherit !important; +} + +.CodeMirror-cursor { + z-index: 10; + position: absolute; + visibility: hidden; + border-left: 1px solid black !important; +} +.CodeMirror-focused .CodeMirror-cursor { + visibility: visible; +} + +span.CodeMirror-selected { + background: #ccc !important; + color: HighlightText !important; + padding: 2px 0; + border-radius: 0 !important; +} +.CodeMirror-focused span.CodeMirror-selected { + background: Highlight !important; +} + +.CodeMirror-matchingbracket { + color: #641 !important; + background: #fe7; + box-shadow: 0 0 10px #fe7; + border-radius: 4px; +} +.CodeMirror-nonmatchingbracket { + color: #f22 !important; + box-shadow: 0 0 2px #f22; + border-radius: 4px; +} diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/css/style.css b/osx/build/Debug/Nide.app/Contents/Resources/client/css/style.css new file mode 100644 index 0000000..d60ac5a --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/css/style.css @@ -0,0 +1,541 @@ +body { + background: #666; + font-family: 'Lucida Grande', 'Segoe UI', 'Ubuntu', sans-serif; + font-size: 9pt; + overflow: hidden; +} + +#options { + position: absolute; + left: 0; + width: 249px; + height: 20px; + padding: 0 0 5px 0; + bottom: 0; + background: url('../img/noise.png') #eee; + -moz-user-select: none; + -webkit-user-select: none; + overflow: hidden; + box-shadow: 0 0 10px rgba(0,0,0,0.125), 0 1px 0 rgba(0,0,0,0.25) inset +} + +#options button, button.gradient { + background: #fafafa; + border: 1px solid rgba(0,0,0,0.25); + box-shadow: 0 -10px rgba(0,0,0,0.05) inset, 0 1px 2px white; + padding: 2px 4px; + vertical-align: -10%; + margin: 0 0 0 -1px; + height: 26px; +} + +#options button img, button.gradient img { + -webkit-user-drag: none; + -moz-user-drag: none; +} + +#options button:active, button.gradient:active { + background: #ccc; +} + +#search { + display: none; +} + +#sidebar { + position: absolute; + left: 0; + top: 0; + bottom: 25px; + width: 239px; + padding-left: 10px; + padding-top: 10px; + background: url('../img/noise.png') #eee; + box-shadow: 0 5px 15px -10px rgba(0,0,0,0.5) inset; + -moz-user-select: none; + -webkit-user-select: none; + overflow: auto; + cursor: default; +} + +#sidebar ul { + margin: 8px 0; + padding-left: 0; +} + +#sidebar ul ul { + margin: 0; +} + +#sidebar li { + padding-left: 20px; + list-style: none; + white-space: nowrap; +} + +#sidebar li.hidden { + display: none !important; +} + +#sidebar.show-hidden li.hidden { + display: block !important; + opacity: 0.25; +} + +#sidebar li.folder { + background: url('../img/right-arrow.png') 6px 4px no-repeat; +} + +#sidebar li.folder > ul { + display: none; +} + +#sidebar li.folder.open { + background: url('../img/down-arrow.png') 6px 4px no-repeat; +} + +#sidebar li.folder.open > ul { + display: block; +} + +#sidebar li.root { + padding-left: 0; +} + +#sidebar li.selected, #sidebar li.folder.selected { + background-color: rgba(55,120,194,0.3); + border-radius: 5px 0 0 5px; + box-shadow: 0 1px 2px rgba(0,0,0,0.2) inset, 0 1px 0 rgba(255,255,255,0.5); + color: #3d5979; + text-shadow: 0 1px 0 rgba(255,255,255,0.5); +} + +#sidebar li.selected.syncing { + background-image: url('../img/ajax-loader.gif'); + background-repeat: no-repeat; + background-position: right center; +} + +#sidebar li img { + margin: 4px; + vertical-align: -7px; + min-width: 16px; + min-height: 16px; +} + +#sidebar li i { + font-size: 8pt; + color: #444; +} + +#sidebar input[type="search"] { + display: block; + width: 225px; + margin: 0; + padding: 0; +} + +#content { + position: absolute; + left: 250px; + right: 0; + top: 0; + bottom: 0; + background: url('../img/nide.png') center center no-repeat, url('../img/noise.png') #aaa; +} + +.code-editor { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + overflow: auto; + background: #eee; + z-index: 100; +} + +.code-editor.windowed { + border-radius: 5px; + border: 5px solid rgba(0,0,0,0.5); + box-shadow: 0 0 10px rgba(255,255,255,0.5); + background-clip: padding-box; +} + +.code-editor .error { + background: #ffd url('../img/error.png') no-repeat 10px 10px; + padding: 18px 10px 18px 50px; + min-height: 16px; + margin: 10px 20px; + box-shadow: 0 0 1px black, 0 0 10px rgba(0,0,0,0.15), 0 1px 0 rgba(255,255,255,0.75) inset; + border-radius: 8px; +} + +.code-editor img.view { + background: white url('../img/checkerboard.png'); + box-shadow: 0 0 1px black, 0 0 10px rgba(0,0,0,0.15); + display: block; + margin: 0 auto; +} + +.galaxy-background { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + overflow: auto; + background: url('../img/galaxy.jpg') center center #000; + background-size: cover; +} + +.galaxy-background h1.now { + position: absolute; + width: 50%; + left: 0; + right: 50%; + top: 10px; + color: white; + text-align: center; + font-size: 10pt; + font-weight: normal; + text-shadow: 0 1px 1px black; + z-index: 99 +} + +.galaxy-background h1.then { + position: absolute; + width: 50%; + left: 50%; + right: 0; + top: 10px; + color: white; + text-align: center; + font-size: 10pt; + font-weight: normal; + text-shadow: 0 1px 1px black; + z-index: 99 +} + +.galaxy-background > button { + background: rgba(0,0,0,0.5); + border: 1px solid rgba(255,255,255,0.5); + border-radius: 5px; + padding: 5px 20px; + color: white; + box-shadow: 0 23px 5px -10px rgba(255,255,255,0.25) inset, 0 2px 5px black; + font-family: inherit; + font-size: inherit; + text-shadow: 0 1px 1px black; + z-index: 99 +} + +.galaxy-background > button:active { + box-shadow: 0 23px 5px -10px rgba(255,255,255,0.125) inset, 0 2px 5px black; + color: #aaa; +} + +.galaxy-background > button.done { + position: absolute; + right: 52.5%; + bottom: 10px; +} + +.galaxy-background > button.revert { + position: absolute; + left: 52.5%; + bottom: 10px; +} + +.galaxy-background > button.backward { + position: absolute; + right: 25%; + bottom: 10px; +} + +.galaxy-background > button.forward { + position: absolute; + left: 75%; + bottom: 10px; +} + +.galaxy-background .no-previous { + color: white; + position: absolute; + left: 50%; + right: 0; + width: 50%; + top: 50%; + margin-top: -0.5em; + text-align: center; + text-shadow: 0 1px 1px black; +} + +.directory-editor { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + overflow: auto; + background: url('../img/folder-large.png') no-repeat center center, url('../img/noise.png') #adbdc8; + text-shadow: 0 1px 0 rgba(255,255,255,0.5); + color: rgba(0,0,0,0.75) +} + +#content .npm-editor { + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + background: url('../img/noise.png'), url('../img/npm-logo.png') no-repeat 90% 90% #eee; + padding: 8px; + overflow: auto; +} + +#content .npm-editor .packages { + font-family: inherit; + font-size: 110%; + margin: 0; + width: 100%; + height: 400px; + display: block; + outline: none; + background: rgba(255,255,255,0.9) +} + +#content .npm-editor .package:nth-child(2n) { + background: #fafafa; +} + +#content .npm-editor .package.extraneous { + color: rgba(0,0,0,0.5) +} + +#content .npm-editor .package.unmet { + color: rgb(180,0,0) +} + +#content .documentation-viewer { + width: 100%; + height: 100%; + background: url('../img/noise.png') #fff; +} + +#content .documentation-viewer iframe { + border: none; + position: absolute; + display: block; + width: 100%; + height: 100%; + top: 0; + left: 0; + right: 0; + bottom: 0; +} + +#content .actions { + padding: 8px; + white-space: nowrap; + overflow: hidden; +} + +#content .CodeMirror { + background: white; + box-shadow: 0 0 10px rgba(0,0,0,0.5); + line-height: 1.5em; + display: inline-block; +} + +#content .CodeMirror-scroll { + height: auto; + overflow: visible; + min-width: 55em; +} + +#lightbox { + position: absolute; + background: rgba(0,0,0,0.25); + left: 0; + right: 0; + top: 0; + bottom: 0; + display: none; +} + +.setup { + position: absolute; + top: 50px; + left: 50%; + width: 600px; + background: url('../img/noise.png') #ddd; + border-radius: 5px; + margin-left: -300px; + box-shadow: 0 10px 20px rgba(0,0,0,0.5), 0 0 1px rgba(0,0,0,0.5), 0 5px 5px rgba(255,255,255,0.25) inset, 0 1px 0 rgba(255,255,255,0.5) inset, 0 -7px 5px -5px rgba(0,0,0,0.125) inset +} + +.setup h1 { + font-weight: normal; + padding: 5px 20px; + text-shadow: 0 1px white; + font-size: 13pt; +} + +.setup .content { + background: #fcfcfc; + padding: 20px; + box-shadow: 0 0 1px rgba(0,0,0,0.5); + border-radius: 0 0 5px 5px; +} + +.setup p { + margin-top: 0; + line-height: 1.5em; +} + +.setup input.default { + font-family: inherit; + font-weight: bold !important; + -webkit-appearance: default-button; +} + +.setup input[type='text'] { + width: 400px; + font-family: inherit; + font-size: inherit; + padding: 3px; + display: inline; +} + +.setup small { + display: block; +} + +.setup table { + width: 100%; +} + +.setup td { + text-align: right; +} + +.setup .actions { + text-align: right; + margin-top: 10px; +} + +.popup-menu { + position: absolute; + margin: 0; + background: rgba(255,255,255,0.95); + border-radius: 4px; + padding: 4px 0; + box-shadow: 0 0 0 1px rgba(0,0,0,0.15), 0 10px 15px rgba(0,0,0,0.25); + font-size: 10pt; + -webkit-user-select: none; + -moz-user-select: none; + cursor: default; + display: none; +} + +.popup-menu li { + padding: 2px 15px 2px 20px; + list-style: none; +} + +.popup-menu li.checkbox { + padding-left: 0; +} + +.popup-menu li.checkbox input[type='checkbox'] { + margin-left: 5px; + position: absolute; + visibility: hidden; +} + +.popup-menu li.checkbox input[type='checkbox']:checked + label::before { + content: '✓'; + margin-left: 6px; + position: absolute; + left: 0; + opacity: 0.8; +} + +.popup-menu li.separator { + padding: 1px; +} + +.popup-menu li.separator:hover { + background: none; + box-shadow: none; +} + +.popup-menu li.separator hr { + height: 1px; + border: none; + background: rgba(0,0,0,0.15); + margin: 4px 0; +} + +.popup-menu li.checkbox label { + padding-left: 20px; +} + +.popup-menu li:hover { + background: #3355f7; + box-shadow: 0 1px 0 #4b60ed inset, 0 -1px 0 #2b50ea inset, 0 10px 5px -5px #5569f7 inset; + color: white; +} + +#gear-menu-popup { + bottom: 25px; + left: 225px; + z-index: 100; +} + +.right { + float: right; + position: relative; + left: 1px; +} + +#dialog-overlay { + position: absolute; + overflow: hidden; + left: 0; top: 0; right: 0; bottom: 0; + background: #000; + opacity: .3; + z-index: 900 +} + +.dialog { + position: fixed; + max-width: 600px; + min-width: 250px; + padding: 15px; + border: 1px solid #eee; + background: white; + z-index: 1000; + box-shadow: 0 1px 8px 0 black +} + +.dialog h1 { + margin: 0 0 5px 0; + font-size: 16px; + font-weight: normal +} + +.dialog .dialog-close { + position: absolute; + top: 3px; + right: 10px; + text-decoration: none; + color: #888; + font-size: 16px; + font-weight: bold +} + +.dialog .dialog-content { + padding : 40px 20px +} \ No newline at end of file diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/dialog.html b/osx/build/Debug/Nide.app/Contents/Resources/client/dialog.html new file mode 100644 index 0000000..0f1a5d8 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/dialog.html @@ -0,0 +1,7 @@ +
+
+

+ × +
+
+
\ No newline at end of file diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/img/add.png b/osx/build/Debug/Nide.app/Contents/Resources/client/img/add.png new file mode 100644 index 0000000..dff2eaf Binary files /dev/null and b/osx/build/Debug/Nide.app/Contents/Resources/client/img/add.png differ diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/img/ajax-loader.gif b/osx/build/Debug/Nide.app/Contents/Resources/client/img/ajax-loader.gif new file mode 100644 index 0000000..0c42c2a Binary files /dev/null and b/osx/build/Debug/Nide.app/Contents/Resources/client/img/ajax-loader.gif differ diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/img/backward.png b/osx/build/Debug/Nide.app/Contents/Resources/client/img/backward.png new file mode 100644 index 0000000..1fffbd9 Binary files /dev/null and b/osx/build/Debug/Nide.app/Contents/Resources/client/img/backward.png differ diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/img/checkerboard.png b/osx/build/Debug/Nide.app/Contents/Resources/client/img/checkerboard.png new file mode 100644 index 0000000..dae31b6 Binary files /dev/null and b/osx/build/Debug/Nide.app/Contents/Resources/client/img/checkerboard.png differ diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/img/create-folder.png b/osx/build/Debug/Nide.app/Contents/Resources/client/img/create-folder.png new file mode 100644 index 0000000..49fa93f Binary files /dev/null and b/osx/build/Debug/Nide.app/Contents/Resources/client/img/create-folder.png differ diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/img/documentation.png b/osx/build/Debug/Nide.app/Contents/Resources/client/img/documentation.png new file mode 100644 index 0000000..8b23aab Binary files /dev/null and b/osx/build/Debug/Nide.app/Contents/Resources/client/img/documentation.png differ diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/img/down-arrow.png b/osx/build/Debug/Nide.app/Contents/Resources/client/img/down-arrow.png new file mode 100644 index 0000000..899da75 Binary files /dev/null and b/osx/build/Debug/Nide.app/Contents/Resources/client/img/down-arrow.png differ diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/img/error.png b/osx/build/Debug/Nide.app/Contents/Resources/client/img/error.png new file mode 100644 index 0000000..b37c417 Binary files /dev/null and b/osx/build/Debug/Nide.app/Contents/Resources/client/img/error.png differ diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/img/file.png b/osx/build/Debug/Nide.app/Contents/Resources/client/img/file.png new file mode 100644 index 0000000..b7d6d59 Binary files /dev/null and b/osx/build/Debug/Nide.app/Contents/Resources/client/img/file.png differ diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/img/folder-large.png b/osx/build/Debug/Nide.app/Contents/Resources/client/img/folder-large.png new file mode 100644 index 0000000..df21976 Binary files /dev/null and b/osx/build/Debug/Nide.app/Contents/Resources/client/img/folder-large.png differ diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/img/folder.png b/osx/build/Debug/Nide.app/Contents/Resources/client/img/folder.png new file mode 100644 index 0000000..29a7965 Binary files /dev/null and b/osx/build/Debug/Nide.app/Contents/Resources/client/img/folder.png differ diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/img/forward.png b/osx/build/Debug/Nide.app/Contents/Resources/client/img/forward.png new file mode 100644 index 0000000..933f7b4 Binary files /dev/null and b/osx/build/Debug/Nide.app/Contents/Resources/client/img/forward.png differ diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/img/galaxy.jpg b/osx/build/Debug/Nide.app/Contents/Resources/client/img/galaxy.jpg new file mode 100644 index 0000000..e1cb916 Binary files /dev/null and b/osx/build/Debug/Nide.app/Contents/Resources/client/img/galaxy.jpg differ diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/img/gear.png b/osx/build/Debug/Nide.app/Contents/Resources/client/img/gear.png new file mode 100644 index 0000000..b5edff8 Binary files /dev/null and b/osx/build/Debug/Nide.app/Contents/Resources/client/img/gear.png differ diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/img/nide.png b/osx/build/Debug/Nide.app/Contents/Resources/client/img/nide.png new file mode 100644 index 0000000..f664248 Binary files /dev/null and b/osx/build/Debug/Nide.app/Contents/Resources/client/img/nide.png differ diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/img/noise.png b/osx/build/Debug/Nide.app/Contents/Resources/client/img/noise.png new file mode 100644 index 0000000..3395128 Binary files /dev/null and b/osx/build/Debug/Nide.app/Contents/Resources/client/img/noise.png differ diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/img/npm-logo.png b/osx/build/Debug/Nide.app/Contents/Resources/client/img/npm-logo.png new file mode 100644 index 0000000..fce3bb7 Binary files /dev/null and b/osx/build/Debug/Nide.app/Contents/Resources/client/img/npm-logo.png differ diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/img/npm.png b/osx/build/Debug/Nide.app/Contents/Resources/client/img/npm.png new file mode 100644 index 0000000..605784a Binary files /dev/null and b/osx/build/Debug/Nide.app/Contents/Resources/client/img/npm.png differ diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/img/project.png b/osx/build/Debug/Nide.app/Contents/Resources/client/img/project.png new file mode 100644 index 0000000..5286299 Binary files /dev/null and b/osx/build/Debug/Nide.app/Contents/Resources/client/img/project.png differ diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/img/refresh.png b/osx/build/Debug/Nide.app/Contents/Resources/client/img/refresh.png new file mode 100644 index 0000000..7c28afa Binary files /dev/null and b/osx/build/Debug/Nide.app/Contents/Resources/client/img/refresh.png differ diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/img/remove.png b/osx/build/Debug/Nide.app/Contents/Resources/client/img/remove.png new file mode 100644 index 0000000..3295c7a Binary files /dev/null and b/osx/build/Debug/Nide.app/Contents/Resources/client/img/remove.png differ diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/img/right-arrow.png b/osx/build/Debug/Nide.app/Contents/Resources/client/img/right-arrow.png new file mode 100644 index 0000000..5e21224 Binary files /dev/null and b/osx/build/Debug/Nide.app/Contents/Resources/client/img/right-arrow.png differ diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/img/search.png b/osx/build/Debug/Nide.app/Contents/Resources/client/img/search.png new file mode 100644 index 0000000..c165a63 Binary files /dev/null and b/osx/build/Debug/Nide.app/Contents/Resources/client/img/search.png differ diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/index.html b/osx/build/Debug/Nide.app/Contents/Resources/client/index.html new file mode 100644 index 0000000..63a8b54 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/index.html @@ -0,0 +1,108 @@ + + + + nide + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ + + + diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/CodeEditor.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/CodeEditor.js new file mode 100644 index 0000000..19e348a --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/CodeEditor.js @@ -0,0 +1,362 @@ +(function() { + + var VERSIONS_ANIMATION_DURATION = 1000 + + var inferCodeMirrorModeFromPath = function(path){ + switch (true) { + case !!path.match(/\.js$/): return 'javascript' + case !!path.match(/\.coffee$/): return 'coffeescript' + case !!path.match(/\.json$/): return { name: 'javascript', json: true } + case !!path.match(/\.x?html?$/): return 'htmlmixed' + case !!path.match(/\.php$/): return 'php' + case !!path.match(/\.py$/): return 'python' + case !!path.match(/\.rb$/): return 'ruby' + case !!path.match(/\.lua$/): return 'lua' + case !!path.match(/\.(c|h|cpp|hpp|cc|m|cs|java)$/): return 'clike' + case !!path.match(/\.css$/): return 'css' + case !!path.match(/\.(xml|svg|od(t|p|s))$/): return 'xml' + case !!path.match(/\.ejs$/): return 'application/x-ejs' + case !!path.match(/\.jsp$/): return 'application/x-jsp' + case !!path.match(/\.aspx$/): return 'application/x-aspx' + case !!path.match(/\.m(arkdown|d)$/): return 'text/x-markdown' + default: return 'text/plain'; + } + } + + var makeViewPath = function(path) { + return document.location.protocol + "//" + document.location.hostname + ':' + ((parseInt(document.location.port) || 80) + 1) + path + } + + var createCodeMirror = function(parentNode, contents, path, options) { + var mode = inferCodeMirrorModeFromPath(path); + var options = { + theme: $.cookie('editor-theme') || 'default', + value: contents, + mode: mode, + lineNumbers: true, + onChange: options.onChange, + readOnly: options.readOnly, + indentUnit: 4, + enterMode: 'keep', + tabMode: 'shift', + electricChars: false, + smartHome: true, + matchBrackets: true + } + return CodeMirror(parentNode, options); + } + + var createGalaxyBackground = function(name) { + var galaxyBackground = document.createElement('div') + galaxyBackground.innerHTML = + '

Now (' + name + ')

' + + '

Then

' + + '' + + '' + + '' + + '' + + '
There are no previous versions for this file.
'; + + galaxyBackground.now = $(".now", galaxyBackground)[0]; + galaxyBackground.then = $(".then", galaxyBackground)[0]; + galaxyBackground.done = $(".done", galaxyBackground)[0]; + galaxyBackground.revert = $(".revert", galaxyBackground)[0]; + galaxyBackground.backward = $(".backward", galaxyBackground)[0]; + galaxyBackground.forward = $(".forward", galaxyBackground)[0]; + galaxyBackground.noPrevious = $(".no-previous", galaxyBackground)[0]; + + return galaxyBackground; + } + + var createActionsBar = function(path) { + var actionsBar = document.createElement('div') + actionsBar.className = 'actions' + actionsBar.innerHTML = '' + cwd + path + ' ' + + actionsBar.renameButton = document.createElement('button') + actionsBar.renameButton.innerHTML = 'Rename' + actionsBar.appendChild(actionsBar.renameButton) + + actionsBar.versionsButton = document.createElement('button') + actionsBar.versionsButton.innerHTML = 'Versions' + actionsBar.appendChild(actionsBar.versionsButton) + + if (path.match(/\.(x?html?|svg)$/)) { + actionsBar.viewButton = document.createElement('button') + actionsBar.viewButton.innerHTML = 'View' + actionsBar.appendChild(actionsBar.viewButton) + } + + return actionsBar; + } + + window.CodeEditor = function(entry) { + var codeMirror; + var currentVersion; + var galaxyBackground = createGalaxyBackground(entry.name) + var actionsBar = createActionsBar(entry.path) + var editor = document.createElement('div') + var versionEditors = [] + var versions; + + $(actionsBar.renameButton).click(function(e) { + var newName = prompt('New filename:', entry.name) + if (newName) { + connection.renameFile(entry.path, entry.path.replace(/\/[^\/]+$/, '/' + newName)) + } + }) + + if (actionsBar.viewButton) { + $(actionsBar.viewButton).click(function(e) { + var url = makeViewPath(entry.path); + window.open(url, 'view-window'); + }) + } + + var loadVersionNumbered = function(i) { + if (!versions[i].content) { + connection.loadVersion(versions[i].uuid, function(err, contents) { + galaxyBackground.revert.disabled = false; + if (err) { + contents = ''; + galaxyBackground.revert.disabled = true; + } + var codeMirror = createCodeMirror(versionEditors[i], contents, entry.path, { readOnly: true }) + versions[i].content = contents; + }) + } + } + + function showVersions() { + currentVersion = versions.length - 1; + + // "Morph" the user interface into versions mode + $(actionsBar).slideUp(VERSIONS_ANIMATION_DURATION); + + $(galaxyBackground).animate({ + left: '-250px' + }, VERSIONS_ANIMATION_DURATION) + + $(editor).animate({ + left: '5%', + top: '50px', + bottom: '50px', + right: '52.5%' + }, VERSIONS_ANIMATION_DURATION).addClass('windowed') + + // Change the user interface if no previous versions are available + if (versions.length == 0) { + $(galaxyBackground.noPrevious).show() + $(".revert, .backward, .forward", galaxyBackground).hide() + return; + } + + $(galaxyBackground.noPrevious).hide() + $(".revert, .backward, .forward", galaxyBackground).show() + + var currentVersionDate = (new Date(versions[currentVersion].date)).toString(); + galaxyBackground.then.title = currentVersionDate; + $(galaxyBackground.then).easydate() + + for (var i = 0; i < versions.length; i++) { + var version = versions[i] + + var versionEditor = document.createElement('div') + + versionEditor.className = 'code-editor' + versionEditor.style.zIndex = 98; + versionEditors.push(versionEditor) + + galaxyBackground.appendChild(versionEditor) + + $(versionEditor).animate({ + right: '5%', + top: '50px', + bottom: '50px', + left: '52.5%' + }, VERSIONS_ANIMATION_DURATION).addClass('windowed'); + + if (versions.length - 1 - i > 3) { + $(versionEditor).hide() + } else { + $(versionEditor).css({ + scale: (1 - (versions.length - 1 - i) * 0.05), + translateY: -(versions.length - 1 - i)*20, + opacity: (1 - (versions.length - 1 - i) * (1/3)) + }) + + loadVersionNumbered(i); + } + } + } + + $(galaxyBackground.revert).click(function(){ + versionEditors[currentVersion].style.zIndex = 100 + $(versionEditors[currentVersion]).animate({ + left: '5%', + top: '50px', + bottom: '50px', + right: '52.5%' + }, VERSIONS_ANIMATION_DURATION, function() { + codeMirror.setValue(versions[currentVersion].content) + $(versionEditors[currentVersion]).hide() + hideVersions() + }) + }) + + $(galaxyBackground.backward).click(function(){ + goToVersion(-1) + }) + + $(galaxyBackground.forward).click(function(){ + goToVersion(1) + }) + + var goToVersion = function(delta) { + if (versions === undefined || currentVersion === undefined || versionEditors.length === 0) { + throw new Error("Trying to navigate in version history with no versions loaded.") + } + + currentVersion += delta; + if (currentVersion >= versions.length) { + currentVersion = versions.length - 1; + } + if (currentVersion <= 0) { + currentVersion = 0; + } + + var currentVersionDate = (new Date(versions[currentVersion].date)).toString(); + galaxyBackground.then.title = currentVersionDate + $(galaxyBackground.then).easydate() + + for (var i = 0; i < versions.length; i++) { + var version = versions[i] + var versionEditor = versionEditors[i] + var hidden = false; + if (currentVersion - i > 3) { + $(versionEditor).fadeOut() + hidden = true + } else if (currentVersion - i < 0) { + $(versionEditor).fadeOut() + hidden = true + } else { + $(versionEditor).fadeIn() + } + if (hidden) { + $(versionEditor).animate({ + scale: (1 - (currentVersion - i) * 0.05), + translateY: -(currentVersion - i)*20, + }, { queue: false }) + } else { + loadVersionNumbered(i) + $(versionEditor).animate({ + scale: (1 - (currentVersion - i) * 0.05), + translateY: -(currentVersion - i)*20, + opacity: (1 - (currentVersion - i) * (1/3)) + }, { queue: false }) + } + } + } + + var hideVersions = function() { + $(actionsBar).slideDown(VERSIONS_ANIMATION_DURATION); + $(galaxyBackground).animate({ + left: 0 + }, VERSIONS_ANIMATION_DURATION) + $(editor).animate({ + left: '0%', + top: '0px', + bottom: '0px', + right: '0%' + }, VERSIONS_ANIMATION_DURATION, function() { + $(editor).removeClass('windowed') + for (var i = 0; i < versionEditors.length; i++) { + galaxyBackground.removeChild(versionEditors[i]) + } + versionEditors = [] + versions = undefined + currentVersion = undefined + }) + } + + $(actionsBar.versionsButton).click(function(e) { + connection.loadVersions(entry.path, function(err, v) { + if (err) { + alert('Could not load versions: ' + err) + } else { + versions = v + showVersions() + } + }) + }) + + $(galaxyBackground.done).click(function(e) { + hideVersions(); + }) + + editor.appendChild(actionsBar) + editor.className = 'code-editor' + + if (entry.path.match(/\.(jpe?g|png|gif|bmp)$/)) { + var image = document.createElement('img') + image.src = makeViewPath(entry.path); + image.className = 'view' + editor.appendChild(image); + $(actionsBar.versionsButton).hide(); + } else { + connection.loadFile(entry.path, function(err, file) { + if (err) { + var errorBar = document.createElement('div'); + errorBar.className = 'error' + errorBar.innerHTML = 'Unable to open file: ' + err; + editor.appendChild(errorBar); + $(errorBar).hide(); + $(errorBar).fadeIn(250); + } else { + codeMirror = createCodeMirror(editor, file, entry.path, { onChange: function(editor) { + content = editor.getValue() + changed = true + }}) + codeMirror.focus() + + var content = file + var changed = false; + var saving = false; + + setInterval(function() { + if (changed && !saving) { + var done = false; + saving = true; + var selected = $('.selected') + selected.addClass('syncing') + connection.saveFile(entry.path, content, function(err){ + if (!err) { + changed = false + done = true; + selected.removeClass('syncing') + } + saving = false + }) + setTimeout(function() { + if (!done) { + saving = false + } + }, 8000) + } + }, 3000) + } + }) + } + + galaxyBackground.appendChild(editor) + galaxyBackground.className = 'galaxy-background' + + galaxyBackground.focus = function() { + if (codeMirror) { + codeMirror.focus() + } + } + + return galaxyBackground + } +})() diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/DirectoryEditor.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/DirectoryEditor.js new file mode 100644 index 0000000..0d0d183 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/DirectoryEditor.js @@ -0,0 +1,18 @@ +var DirectoryEditor = function(entry) { + var editor = document.createElement('div') + editor.className = 'directory-editor' + var actionsBar = document.createElement('div') + actionsBar.className = 'actions' + actionsBar.innerHTML = '' + cwd + entry.path + ' ' + var renameButton = document.createElement('button') + renameButton.innerHTML = 'Rename' + $(renameButton).click(function(e) { + var newName = prompt('New folder name:', entry.name) + if (newName) { + connection.renameFile(entry.path, entry.path.replace(/\/[^\/]+$/, '/' + newName)) + } + }) + actionsBar.appendChild(renameButton) + editor.appendChild(actionsBar) + return editor +} diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/DocumentationViewer.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/DocumentationViewer.js new file mode 100644 index 0000000..0334167 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/DocumentationViewer.js @@ -0,0 +1,11 @@ +var documentationIframe +var DocumentationViewer = function(entry) { + var editor = document.createElement('div') + editor.className = 'documentation-viewer' + if (!documentationIframe) { + documentationIframe = document.createElement('iframe') + documentationIframe.src = 'http://nodejs.org/docs/' + nodeVersion + '/api/index.html' + } + editor.appendChild(documentationIframe) + return editor +} \ No newline at end of file diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/EditorPool.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/EditorPool.js new file mode 100644 index 0000000..a819447 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/EditorPool.js @@ -0,0 +1,51 @@ +(function() { + var MAX_EDITORS = 8 + + var EditorPool = window.EditorPool = function() { + this.editors = [] + } + + EditorPool.prototype.editorForEntry = function(entry, withDiscarted) { + var editor; + for (var i=0; i < this.editors.length; i++) { + if (this.editors[i].path == entry.path && + this.editors[i].type == entry.type) { + // Move editor to the first position in array + editor = this.editors.splice(i, 1)[0] + this.editors.splice(0, 0, editor); + return editor.element + } + } + + editor = { + type: entry.type, + path: entry.path + } + + switch(entry.type) { + case "file": + editor.element = new CodeEditor(entry) + break; + case "directory": + editor.element = new DirectoryEditor(entry) + break; + case "documentation": + editor.element = new DocumentationViewer(entry) + break; + case "npm": + editor.element = new NPMEditor(entry) + break; + } + + this.editors.splice(0, 0, editor) + + if (this.editors.length > MAX_EDITORS) { + var discarted = this.editors.pop() + if (withDiscarted) { + withDiscarted(discarted) + } + } + + return editor.element + } +})() \ No newline at end of file diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/NPMEditor.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/NPMEditor.js new file mode 100644 index 0000000..1c89d83 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/NPMEditor.js @@ -0,0 +1,63 @@ +var packages = [] +var updatePackages = function() {} + +var NPMEditor = function(entry) { + var editor = document.createElement('div') + var sidebarEntry = $('.selected') + editor.className = 'npm-editor' + editor.innerHTML = + '
Node Package Manager - Installed Packages
' + + '
' + + '
' + + '' + + ' ' + + '' + '
' + updatePackages = function() { + $(".packages", editor)[0].innerHTML = ''; + for (var i = 0; i < packages.length; i++) { + var pack = document.createElement("option") + pack.className = 'package' + if (packages[i].match(/ extraneous$/)) { + pack.className += ' extraneous'; + } + if (packages[i].match(/^UNMET DEPENDENCY /)) { + pack.className += ' unmet'; + } + pack.innerHTML = packages[i] + pack.value = packages[i] + $(".packages", editor).append(pack) + } + sidebarEntry.removeClass('syncing') + } + updatePackages() + $(".add", editor).click(function(){ + var package = prompt('Package to be installed:', 'package-name') + var save = $(".save", editor)[0].checked + if (package) { + connection.installPackage(package, save); + sidebarEntry.addClass('syncing') + } + }) + $(".remove", editor).click(function(){ + if (confirm('Are you sure?')) { + var packageSelect = $(".packages", editor)[0] + var selected = []; + for (var i = 0; i < packageSelect.options.length; i++) { + if (packageSelect.options[i].selected) { + selected.push(packageSelect.options[i].value.replace(/ extraneous$/,'').replace(/\@.+$/,'')); + } + } + if (selected.length > 0) { + var save = $(".save", editor)[0].checked + connection.uninstallPackage(selected, save); + sidebarEntry.addClass('syncing') + } + } + }) + $(".refresh", editor).click(function(){ + connection.refreshPackages() + sidebarEntry.addClass('syncing') + }) + return editor +} \ No newline at end of file diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/ServerConnection.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/ServerConnection.js new file mode 100644 index 0000000..8888a00 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/ServerConnection.js @@ -0,0 +1,163 @@ +var ServerConnection = function() { + var socket = io.connect(window.location.origin, {'connect timeout': 25000}); + + socket.on('cwd', function(path) { + cwd = path + }) + + socket.on('node-version', function(version) { + nodeVersion = version + }) + + socket.on('packages', function(reportedPackages) { + packages = reportedPackages + updatePackages() + }) + + socket.on('welcome', function() { + ui.displayWelcomeScreen(); + }) + + socket.on('list', function (data) { + ui.updateFileListing(data.children) + }); + + this.renameFile = function(oldpath, newpath) { + socket.emit('rename', { oldpath: oldpath, newpath: newpath }) + } + + socket.on('rename-success', function(data) { + ui.selectFile({ + type: 'file', + path: data.path + }); + }) + + this.removeFile = function(path) { + socket.emit('remove', path) + } + + this.addFolder = function(path) { + socket.emit('add-folder', path); + } + + this.addFile = function(path) { + socket.emit('add', path); + } + + var loadFileCallbacks = {} + this.loadFile = function(path, callback) { + socket.emit('load', path) + if (!loadFileCallbacks[path]) { + loadFileCallbacks[path] = [callback] + } else { + loadFileCallbacks[path].push(callback) + } + } + + socket.on('file', function(data) { + var callbacks = loadFileCallbacks[data.path] || [] + for (var i = 0; i < callbacks.length; i++) { + callbacks[i](data.error, data.file) + } + delete loadFileCallbacks[data.path] + }) + + var saveFileCallbacks = {} + this.saveFile = function(path, content, callback) { + socket.emit('save', {path: path, content: content}) + if (!saveFileCallbacks[path]) { + saveFileCallbacks[path] = [callback] + } else { + saveFileCallbacks[path].push(callback) + } + } + + socket.on('save-success', function(data) { + var callbacks = saveFileCallbacks[data.path] || [] + for (var i = 0; i < callbacks.length; i++) { + callbacks[i](null) + } + delete saveFileCallbacks[data.path] + }) + + socket.on('save-error', function(data) { + var callbacks = saveFileCallbacks[data.path] || [] + for (var i = 0; i < callbacks.length; i++) { + callbacks[i](data.error) + } + delete saveFileCallbacks[data.path] + }) + + var versionsCallbacks = {} + this.loadVersions = function(path, callback) { + socket.emit('versions', path) + if (!versionsCallbacks[path]) { + versionsCallbacks[path] = [callback] + } else { + versionsCallbacks[path].push(callback) + } + } + + socket.on('versions', function(data) { + var callbacks = versionsCallbacks[data.path] || [] + for (var i = 0; i < callbacks.length; i++) { + callbacks[i](data.error, data.versions) + } + delete versionsCallbacks[data.path] + }) + + var versionCallbacks = {} + this.loadVersion = function(uuid, callback) { + socket.emit('version', uuid) + if (!versionCallbacks[uuid]) { + versionCallbacks[uuid] = [callback] + } else { + versionCallbacks[uuid].push(callback) + } + } + + socket.on('version-success', function(data) { + var callbacks = versionCallbacks[data.uuid] || [] + for (var i = 0; i < callbacks.length; i++) { + callbacks[i](null, data.content) + } + delete versionCallbacks[data.uuid] + }) + + socket.on('version-error', function(data) { + var callbacks = versionCallbacks[data.uuid] || [] + for (var i = 0; i < callbacks.length; i++) { + callbacks[i](data.error) + } + delete versionCallbacks[data.uuid] + }) + + socket.on('install-error', function(message) { + alert('Could not install package:\n\n' + message) + }) + + socket.on('uninstall-error', function(message) { + alert('Could not uninstall package:\n\n' + message) + }) + + this.installPackage = function(package, shouldSaveOnPackageJson) { + socket.emit('install', { package: package, save: shouldSaveOnPackageJson }) + } + + this.uninstallPackage = function(packages, shouldSaveOnPackageJson) { + socket.emit('uninstall', { package: packages.join(' '), save: shouldSaveOnPackageJson }) + } + + this.refreshPackages = function() { + socket.emit('packages-refresh'); + } + + this.skipWelcome = function() { + socket.emit('skip-welcome') + } + + this.list = function() { + socket.emit('list') + } +} \ No newline at end of file diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/UserInterfaceController.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/UserInterfaceController.js new file mode 100644 index 0000000..a712e27 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/UserInterfaceController.js @@ -0,0 +1,351 @@ +var UserInterfaceController = function() { + var _this = this; + + var currentFile + var searchResultHtmlElementByPath + var fileHtmlElementByPath + var stateByPath = {} + var fileEntries = [] + var editorThemes = (function() { + // Getting available themes + var themes = []; + $('link[rel^="stylesheet"][name]').each(function() { + var $link = $(this); + $.each($link.attr('name').split(','), function(id, item) { + var theme = {}; + theme.name = item.replace(/(^\s*|\s*$)/, ''); + theme.value = theme.name.toLowerCase().replace(/[^a-z0-9]/g, '-'); + themes.push(theme); + }); + }); + return themes; + })(); + + var ignore = ['.git', '.nide', '.DS_Store'] + var limitRecursion = ['node_modules'] + + var addHTMLElementForFileEntry = function(entry, parentElement, fileEntriesArray, htmlElementByPathTable, ownContext, doLimitRecursion) { + + if (ignore.indexOf(entry.name) != -1) { + return; + } + + var thisElement = document.createElement("li"); + htmlElementByPathTable[entry.path] = thisElement + + if (fileEntriesArray && !doLimitRecursion) { + fileEntriesArray.push(entry) + } + + if (entry.type == "directory") { + thisElement.className = 'folder' + if (stateByPath[entry.path] == 'open') { + thisElement.className += ' open' + } + thisElement.innerHTML = '' + entry.name + (ownContext ? (' (' + entry.path + ')') : '') + $(thisElement).click(function(e) { + if (!e.offsetX) e.offsetX = e.clientX - $(e.target).position().left; + if (!e.offsetY) e.offsetY = e.clientY - $(e.target).position().top; + if (e.target == thisElement && e.offsetY < 24) { + if (e.offsetX < 24) { + $(this).toggleClass('open'); + stateByPath[entry.path] = $(this).hasClass('open') ? 'open' : ''; + e.stopPropagation() + } else { + _this.selectFile(entry, htmlElementByPathTable) + e.stopPropagation() + } + } + }) + var ul = document.createElement("ul") + thisElement.appendChild(ul) + for (var childEntry in entry.children) { + addHTMLElementForFileEntry(entry.children[childEntry], ul, fileEntriesArray, ownContext ? {} : htmlElementByPathTable, false, doLimitRecursion || limitRecursion.indexOf(entry.name) != -1) + } + } else { + thisElement.innerHTML = '' + entry.name + (ownContext ? (' (' + entry.path + ')') : '') + $(thisElement).click(function(e) { + _this.selectFile(entry, htmlElementByPathTable) + }) + } + if (entry.name.charAt(0) == '.') { + thisElement.className += ' hidden' + } + parentElement.appendChild(thisElement) + } + + $('#show-hidden').click(function() { + $('#sidebar').toggleClass('show-hidden') + }) + + var doSearch = function() { + if (this.value != '') { + for (var i = 0; i < fileEntries.length; i++) { + if (fileEntries[i].name.match(this.value)) { + $(searchResultHtmlElementByPath[fileEntries[i].path]).slideDown() + } else { + $(searchResultHtmlElementByPath[fileEntries[i].path]).slideUp() + } + } + $('#project').slideUp(); + $('#search').slideDown(); + } else { + $('#project').slideDown(); + $('#search').slideUp(); + } + } + $('#search-field').keyup(doSearch).click(doSearch) + + $('#project').click(function(e) { + if (e.target == $('#project')[0]) { + _this.selectFile({ + type: 'project', + path: '/' + }, null, $('#project')[0]) + } + }) + + $('#npm').click(function(e) { + if (e.target == $('#npm')[0]) { + _this.selectFile({ + type: 'npm', + path: '/' + }, null, $('#npm')[0]) + } + }) + + $('#docs').click(function(e) { + if (e.target == $('#docs')[0]) { + _this.selectFile({ + type: 'documentation', + path: '/' + }, null, $('#docs')[0]) + } + }) + + $('#add-file').click(function(e) { + var filename = prompt('Type in a filename for the new file:', 'untitled.js') + if (filename) { + var path; + if (!currentFile) { + path = '/' + } else { + switch(currentFile.type) { + case 'directory': + path = currentFile.path + '/' + break; + case 'file': + path = currentFile.path.replace(/\/[^\/]+$/, '/') + break; + default: + path = '/' + break; + } + } + + connection.addFile(path + filename) + } + }) + + $('#add-folder').click(function(e) { + var filename = prompt('Type in a filename for the new folder', 'folder') + if (filename) { + var path; + if (!currentFile) { + path = '/' + } else { + switch(currentFile.type) { + case 'directory': + path = currentFile.path + '/' + break; + case 'file': + path = currentFile.path.replace(/\/[^\/]+$/, '/') + break; + default: + path = '/' + break; + } + } + connection.addFolder(path + filename) + } + }) + + $('#remove-file').click(function(e) { + if (currentFile) { + var confirmed + if (currentFile.type == 'file') { + confirmed = confirm('Are you sure?') + } else if (currentFile.type == 'directory') { + confirmed = confirm('This will remove the directory and all its contents. Are you sure?') + } else { + confirmed = false + } + if (confirmed) { + connection.removeFile(currentFile.path) + } + } + }) + + $('#project-refresh').click(function(e) { + connection.list() + }) + + $('#preference-settings').click(function(e) { + e.preventDefault(); + // Create Overlay + $.get('dialog.html', function(response) { + $('body').append(response); + $('.dialog-title').html('Preferences'); + $('.dialog-content').html( + '' + ); + + // Center Dialog + $(window).resize(function() { + $('.dialog').css({ + 'top' : ($(window).height() - $('.dialog').outerHeight()) / 2, + 'left' : ($(window).width() - $('.dialog').outerWidth()) / 2 + }); + }).resize(); + + var $theme_selection = $('#theme-selection'); + $.each(editorThemes || [], function() { + $('') + .attr('selected', ($.cookie('editor-theme') == this.value)) + .appendTo($theme_selection); + }); + $theme_selection.change(function() { + $('.CodeMirror-scroll') + .removeClass(editorThemes.map(function(it) {return 'cm-s-' + it.value;}).join(' ')) + .addClass('cm-s-' + $(this).val()); + // Store current value to a cookie + $.cookie('editor-theme', $(this).val(), {expires: 30}); + }); + + $('.dialog-close').click(function(e) { + e.preventDefault(); + $('#dialog-overlay, .dialog').fadeOut(200, function() { + $(this).remove(); + }); + }); + }); + }); + + var shouldDismissGearMenuOnMouseUp = false; + var hasJustDisplayedGearMenu = false; + $('#gear-menu').mousedown(function(e){ + shouldDismissGearMenuOnMouseUp = false; + hasJustDisplayedGearMenu = true; + $('#gear-menu-popup').show() + setTimeout(function(){ + shouldDismissGearMenuOnMouseUp = true; + }, 500) + setTimeout(function(){ + hasJustDisplayedGearMenu = false; + }, 0) + }) + + $('#gear-menu').mouseup(function(){ + if (shouldDismissGearMenuOnMouseUp) { + $('#gear-menu-popup').fadeOut(200) + } + }) + + $('#gear-menu-popup').mousedown(function(e) { + e.stopPropagation(); + }) + + $('#gear-menu-popup').mouseup(function(e) { + $('#gear-menu-popup').fadeOut(200); + }) + + $(document.body).mousedown(function() { + if (!hasJustDisplayedGearMenu) { + $('#gear-menu-popup').fadeOut(200); + } + }) + + $(window).bind('blur resize', function() { + $('#gear-menu-popup').fadeOut(200); + }) + + this.updateFileListing = function(files) { + searchResultHtmlElementByPath = {} + fileHtmlElementByPath = {} + fileEntries = [] + var ul = document.createElement("ul") + for (var file in files) { + addHTMLElementForFileEntry(files[file], ul, fileEntries, fileHtmlElementByPath) + } + document.getElementById('files').innerHTML = ''; + document.getElementById('files').appendChild(ul); + + ul = document.createElement("ul") + for (var i = 0; i < fileEntries.length; i++) { + addHTMLElementForFileEntry(fileEntries[i], ul, null, searchResultHtmlElementByPath, true) + } + document.getElementById('search-results').innerHTML = ''; + document.getElementById('search-results').appendChild(ul); + } + + var editorPool = new EditorPool(); + + var setCurrentEditor = function(editor) { + var children = $('#content').children() + children.css({ visibility: 'hidden', zIndex: -1 }); + if ($.inArray(editor, children) >= 0) { + $(editor).css({ visibility: 'visible', zIndex: 1 }) + } else { + $('#content').append(editor) + } + editor.focus() + } + + this.displayWelcomeScreen = function() { + $('#lightbox').fadeIn() + $('.setup form').bind('submit', function(e) { + var name = $(".setup input[name='name']")[0].value; + var description = $(".setup input[name='description']")[0].value; + var author = $(".setup input[name='author']")[0].value; + var version = $(".setup input[name='version']")[0].value; + if (!version.match(/^[0-9]+\.[0-9]+\.[0-9]+$/)) { + alert('Please enter the version number in the X.Y.Z format.') + e.preventDefault(); + return; + } + e.preventDefault() + connection.addFile('/package.json') + connection.saveFile('/package.json', JSON.stringify({ + name: name, + description: description, + version: version, + author: author, + dependencies: {}, + devDependencies: {} + }, undefined, ' '), function() { + $('#lightbox').fadeOut() + connection.skipWelcome() + }) + }) + $('.setup .skip').click(function(){ + $('#lightbox').fadeOut() + connection.skipWelcome() + }) + } + + this.selectFile = function(entry, htmlElementByPathTable, htmlElement) { + if (!htmlElementByPathTable) { + htmlElementByPathTable = fileHtmlElementByPath; + } + + $('.selected').removeClass('selected') + currentFile = entry + $(htmlElement || htmlElementByPathTable[currentFile.path]).addClass('selected') + + var editor = editorPool.editorForEntry(entry, function(discarted){ + $(discarted).remove() + }) + + setCurrentEditor(editor) + } +} diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/codemirror.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/codemirror.js new file mode 100644 index 0000000..76d22b5 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/codemirror.js @@ -0,0 +1,2157 @@ +// All functions that need access to the editor's state live inside +// the CodeMirror function. Below that, at the bottom of the file, +// some utilities are defined. + +// CodeMirror is the only global var we claim +var CodeMirror = (function() { + // This is the function that produces an editor instance. It's + // closure is used to store the editor state. + function CodeMirror(place, givenOptions) { + // Determine effective options based on given values and defaults. + var options = {}, defaults = CodeMirror.defaults; + for (var opt in defaults) + if (defaults.hasOwnProperty(opt)) + options[opt] = (givenOptions && givenOptions.hasOwnProperty(opt) ? givenOptions : defaults)[opt]; + + var targetDocument = options["document"]; + // The element in which the editor lives. + var wrapper = targetDocument.createElement("div"); + wrapper.className = "CodeMirror"; + // This mess creates the base DOM structure for the editor. + wrapper.innerHTML = + '
' + // Wraps and hides input textarea + '
' + + '
' + + '
' + // Set to the height of the text, causes scrolling + '
' + + '
' + // Moved around its parent to cover visible view + '
' + + // Provides positioning relative to (visible) text origin + '
' + + '
 
' + // Absolutely positioned blinky cursor + '
' + // This DIV contains the actual code + '
'; + if (place.appendChild) place.appendChild(wrapper); else place(wrapper); + // I've never seen more elegant code in my life. + var inputDiv = wrapper.firstChild, input = inputDiv.firstChild, + scroller = wrapper.lastChild, code = scroller.firstChild, + measure = code.firstChild, mover = measure.nextSibling, + gutter = mover.firstChild, gutterText = gutter.firstChild, + lineSpace = gutter.nextSibling.firstChild, + cursor = lineSpace.firstChild, lineDiv = cursor.nextSibling; + if (options.tabindex != null) input.tabindex = options.tabindex; + if (!options.gutter && !options.lineNumbers) gutter.style.display = "none"; + + // Delayed object wrap timeouts, making sure only one is active. blinker holds an interval. + var poll = new Delayed(), highlight = new Delayed(), blinker; + + // mode holds a mode API object. lines an array of Line objects + // (see Line constructor), work an array of lines that should be + // parsed, and history the undo history (instance of History + // constructor). + var mode, lines = [new Line("")], work, history = new History(), focused; + loadMode(); + // The selection. These are always maintained to point at valid + // positions. Inverted is used to remember that the user is + // selecting bottom-to-top. + var sel = {from: {line: 0, ch: 0}, to: {line: 0, ch: 0}, inverted: false}; + // Selection-related flags. shiftSelecting obviously tracks + // whether the user is holding shift. reducedSelection is a hack + // to get around the fact that we can't create inverted + // selections. See below. + var shiftSelecting, reducedSelection, lastDoubleClick; + // Variables used by startOperation/endOperation to track what + // happened during the operation. + var updateInput, changes, textChanged, selectionChanged, leaveInputAlone; + // Current visible range (may be bigger than the view window). + var showingFrom = 0, showingTo = 0, lastHeight = 0, curKeyId = null; + // editing will hold an object describing the things we put in the + // textarea, to help figure out whether something changed. + // bracketHighlighted is used to remember that a backet has been + // marked. + var editing, bracketHighlighted; + // Tracks the maximum line length so that the horizontal scrollbar + // can be kept static when scrolling. + var maxLine = "", maxWidth; + + // Initialize the content. + operation(function(){setValue(options.value || ""); updateInput = false;})(); + + // Register our event handlers. + connect(scroller, "mousedown", operation(onMouseDown)); + // Gecko browsers fire contextmenu *after* opening the menu, at + // which point we can't mess with it anymore. Context menu is + // handled in onMouseDown for Gecko. + if (!gecko) connect(scroller, "contextmenu", onContextMenu); + connect(code, "dblclick", operation(onDblClick)); + connect(scroller, "scroll", function() {updateDisplay([]); if (options.onScroll) options.onScroll(instance);}); + connect(window, "resize", function() {updateDisplay(true);}); + connect(input, "keyup", operation(onKeyUp)); + connect(input, "keydown", operation(onKeyDown)); + connect(input, "keypress", operation(onKeyPress)); + connect(input, "focus", onFocus); + connect(input, "blur", onBlur); + + connect(scroller, "dragenter", e_stop); + connect(scroller, "dragover", e_stop); + connect(scroller, "drop", operation(onDrop)); + connect(scroller, "paste", function(){focusInput(); fastPoll();}); + connect(input, "paste", function(){fastPoll();}); + connect(input, "cut", function(){fastPoll();}); + + // IE throws unspecified error in certain cases, when + // trying to access activeElement before onload + var hasFocus; try { hasFocus = (targetDocument.activeElement == input); } catch(e) { } + if (hasFocus) setTimeout(onFocus, 20); + else onBlur(); + + function isLine(l) {return l >= 0 && l < lines.length;} + // The instance object that we'll return. Mostly calls out to + // local functions in the CodeMirror function. Some do some extra + // range checking and/or clipping. operation is used to wrap the + // call so that changes it makes are tracked, and the display is + // updated afterwards. + var instance = { + getValue: getValue, + setValue: operation(setValue), + getSelection: getSelection, + replaceSelection: operation(replaceSelection), + focus: function(){focusInput(); onFocus(); fastPoll();}, + setOption: function(option, value) { + options[option] = value; + if (option == "lineNumbers" || option == "gutter" || option == "firstLineNumber") gutterChanged(); + else if (option == "mode" || option == "indentUnit") loadMode(); + else if (option == "readOnly" && value == "nocursor") input.blur(); + else if (option == "theme") scroller.className = scroller.className.replace(/cm-s-\w+/, "cm-s-" + value); + }, + getOption: function(option) {return options[option];}, + undo: operation(undo), + redo: operation(redo), + indentLine: operation(function(n, dir) { + if (isLine(n)) indentLine(n, dir == null ? "smart" : dir ? "add" : "subtract"); + }), + historySize: function() {return {undo: history.done.length, redo: history.undone.length};}, + matchBrackets: operation(function(){matchBrackets(true);}), + getTokenAt: function(pos) { + pos = clipPos(pos); + return lines[pos.line].getTokenAt(mode, getStateBefore(pos.line), pos.ch); + }, + getStateAfter: function(line) { + line = clipLine(line == null ? lines.length - 1: line); + return getStateBefore(line + 1); + }, + cursorCoords: function(start){ + if (start == null) start = sel.inverted; + return pageCoords(start ? sel.from : sel.to); + }, + charCoords: function(pos){return pageCoords(clipPos(pos));}, + coordsChar: function(coords) { + var off = eltOffset(lineSpace); + var line = clipLine(Math.min(lines.length - 1, showingFrom + Math.floor((coords.y - off.top) / lineHeight()))); + return clipPos({line: line, ch: charFromX(clipLine(line), coords.x - off.left)}); + }, + getSearchCursor: function(query, pos, caseFold) {return new SearchCursor(query, pos, caseFold);}, + markText: operation(function(a, b, c){return operation(markText(a, b, c));}), + setMarker: addGutterMarker, + clearMarker: removeGutterMarker, + setLineClass: operation(setLineClass), + lineInfo: lineInfo, + addWidget: function(pos, node, scroll, where) { + pos = localCoords(clipPos(pos)); + var top = pos.yBot, left = pos.x; + node.style.position = "absolute"; + code.appendChild(node); + node.style.left = left + "px"; + if (where == "over") top = pos.y; + else if (where == "near") { + var vspace = Math.max(scroller.offsetHeight, lines.length * lineHeight()), + hspace = Math.max(code.clientWidth, lineSpace.clientWidth) - paddingLeft(); + if (pos.yBot + node.offsetHeight > vspace && pos.y > node.offsetHeight) + top = pos.y - node.offsetHeight; + if (left + node.offsetWidth > hspace) + left = hspace - node.offsetWidth; + } + node.style.top = (top + paddingTop()) + "px"; + node.style.left = (left + paddingLeft()) + "px"; + if (scroll) + scrollIntoView(left, top, left + node.offsetWidth, top + node.offsetHeight); + }, + + lineCount: function() {return lines.length;}, + getCursor: function(start) { + if (start == null) start = sel.inverted; + return copyPos(start ? sel.from : sel.to); + }, + somethingSelected: function() {return !posEq(sel.from, sel.to);}, + setCursor: operation(function(line, ch) { + if (ch == null && typeof line.line == "number") setCursor(line.line, line.ch); + else setCursor(line, ch); + }), + setSelection: operation(function(from, to) {setSelection(clipPos(from), clipPos(to || from));}), + getLine: function(line) {if (isLine(line)) return lines[line].text;}, + setLine: operation(function(line, text) { + if (isLine(line)) replaceRange(text, {line: line, ch: 0}, {line: line, ch: lines[line].text.length}); + }), + removeLine: operation(function(line) { + if (isLine(line)) replaceRange("", {line: line, ch: 0}, clipPos({line: line+1, ch: 0})); + }), + replaceRange: operation(replaceRange), + getRange: function(from, to) {return getRange(clipPos(from), clipPos(to));}, + + operation: function(f){return operation(f)();}, + refresh: function(){updateDisplay(true);}, + getInputField: function(){return input;}, + getWrapperElement: function(){return wrapper;}, + getScrollerElement: function(){return scroller;}, + getGutterElement: function(){return gutter;} + }; + + function setValue(code) { + history = null; + var top = {line: 0, ch: 0}; + updateLines(top, {line: lines.length - 1, ch: lines[lines.length-1].text.length}, + splitLines(code), top, top); + history = new History(); + } + function getValue(code) { + var text = []; + for (var i = 0, l = lines.length; i < l; ++i) + text.push(lines[i].text); + return text.join("\n"); + } + + function onMouseDown(e) { + // Check whether this is a click in a widget + for (var n = e_target(e); n != wrapper; n = n.parentNode) + if (n.parentNode == code && n != mover) return; + var ld = lastDoubleClick; lastDoubleClick = null; + // First, see if this is a click in the gutter + for (var n = e_target(e); n != wrapper; n = n.parentNode) + if (n.parentNode == gutterText) { + if (options.onGutterClick) + options.onGutterClick(instance, indexOf(gutterText.childNodes, n) + showingFrom); + return e_preventDefault(e); + } + + var start = posFromMouse(e); + + switch (e_button(e)) { + case 3: + if (gecko && !mac) onContextMenu(e); + return; + case 2: + if (start) setCursor(start.line, start.ch, true); + return; + } + // For button 1, if it was clicked inside the editor + // (posFromMouse returning non-null), we have to adjust the + // selection. + if (!start) {if (e_target(e) == scroller) e_preventDefault(e); return;} + + if (!focused) onFocus(); + e_preventDefault(e); + if (ld && +new Date - ld < 400) return selectLine(start.line); + + setCursor(start.line, start.ch, true); + var last = start, going; + // And then we have to see if it's a drag event, in which case + // the dragged-over text must be selected. + function end() { + focusInput(); + updateInput = true; + move(); up(); + } + function extend(e) { + var cur = posFromMouse(e, true); + if (cur && !posEq(cur, last)) { + if (!focused) onFocus(); + last = cur; + setSelectionUser(start, cur); + updateInput = false; + var visible = visibleLines(); + if (cur.line >= visible.to || cur.line < visible.from) + going = setTimeout(operation(function(){extend(e);}), 150); + } + } + + var move = connect(targetDocument, "mousemove", operation(function(e) { + clearTimeout(going); + e_preventDefault(e); + extend(e); + }), true); + var up = connect(targetDocument, "mouseup", operation(function(e) { + clearTimeout(going); + var cur = posFromMouse(e); + if (cur) setSelectionUser(start, cur); + e_preventDefault(e); + end(); + }), true); + } + function onDblClick(e) { + var pos = posFromMouse(e); + if (!pos) return; + selectWordAt(pos); + e_preventDefault(e); + lastDoubleClick = +new Date; + } + function onDrop(e) { + e.preventDefault(); + var pos = posFromMouse(e, true), files = e.dataTransfer.files; + if (!pos || options.readOnly) return; + if (files && files.length && window.FileReader && window.File) { + function loadFile(file, i) { + var reader = new FileReader; + reader.onload = function() { + text[i] = reader.result; + if (++read == n) replaceRange(text.join(""), clipPos(pos), clipPos(pos)); + }; + reader.readAsText(file); + } + var n = files.length, text = Array(n), read = 0; + for (var i = 0; i < n; ++i) loadFile(files[i], i); + } + else { + try { + var text = e.dataTransfer.getData("Text"); + if (text) replaceRange(text, pos, pos); + } + catch(e){} + } + } + function onKeyDown(e) { + if (!focused) onFocus(); + + var code = e.keyCode; + // IE does strange things with escape. + if (ie && code == 27) { e.returnValue = false; } + // Tries to detect ctrl on non-mac, cmd on mac. + var mod = (mac ? e.metaKey : e.ctrlKey) && !e.altKey, anyMod = e.ctrlKey || e.altKey || e.metaKey; + if (code == 16 || e.shiftKey) shiftSelecting = shiftSelecting || (sel.inverted ? sel.to : sel.from); + else shiftSelecting = null; + // First give onKeyEvent option a chance to handle this. + if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e))) return; + + if (code == 33 || code == 34) {scrollPage(code == 34); return e_preventDefault(e);} // page up/down + if (mod && ((code == 36 || code == 35) || // ctrl-home/end + mac && (code == 38 || code == 40))) { // cmd-up/down + scrollEnd(code == 36 || code == 38); return e_preventDefault(e); + } + if (mod && code == 65) {selectAll(); return e_preventDefault(e);} // ctrl-a + if (!options.readOnly) { + if (!anyMod && code == 13) {return;} // enter + if (!anyMod && code == 9 && handleTab(e.shiftKey)) return e_preventDefault(e); // tab + if (mod && code == 90) {undo(); return e_preventDefault(e);} // ctrl-z + if (mod && ((e.shiftKey && code == 90) || code == 89)) {redo(); return e_preventDefault(e);} // ctrl-shift-z, ctrl-y + } + if (code == 36) { if (options.smartHome) { smartHome(); return e_preventDefault(e); } } + + // Key id to use in the movementKeys map. We also pass it to + // fastPoll in order to 'self learn'. We need this because + // reducedSelection, the hack where we collapse the selection to + // its start when it is inverted and a movement key is pressed + // (and later restore it again), shouldn't be used for + // non-movement keys. + curKeyId = (mod ? "c" : "") + (e.altKey ? "a" : "") + code; + if (sel.inverted && movementKeys[curKeyId] === true) { + var range = selRange(input); + if (range) { + reducedSelection = {anchor: range.start}; + setSelRange(input, range.start, range.start); + } + } + // Don't save the key as a movementkey unless it had a modifier + if (!mod && !e.altKey) curKeyId = null; + fastPoll(curKeyId); + } + function onKeyUp(e) { + if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e))) return; + if (reducedSelection) { + reducedSelection = null; + updateInput = true; + } + if (e.keyCode == 16) shiftSelecting = null; + } + function onKeyPress(e) { + if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e))) return; + if (options.electricChars && mode.electricChars) { + var ch = String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode); + if (mode.electricChars.indexOf(ch) > -1) + setTimeout(operation(function() {indentLine(sel.to.line, "smart");}), 50); + } + var code = e.keyCode; + // Re-stop tab and enter. Necessary on some browsers. + if (code == 13) {if (!options.readOnly) handleEnter(); e_preventDefault(e);} + else if (!e.ctrlKey && !e.altKey && !e.metaKey && code == 9 && options.tabMode != "default") e_preventDefault(e); + else fastPoll(curKeyId); + } + + function onFocus() { + if (options.readOnly == "nocursor") return; + if (!focused) { + if (options.onFocus) options.onFocus(instance); + focused = true; + if (wrapper.className.search(/\bCodeMirror-focused\b/) == -1) + wrapper.className += " CodeMirror-focused"; + if (!leaveInputAlone) prepareInput(); + } + slowPoll(); + restartBlink(); + } + function onBlur() { + if (focused) { + if (options.onBlur) options.onBlur(instance); + focused = false; + wrapper.className = wrapper.className.replace(" CodeMirror-focused", ""); + } + clearInterval(blinker); + setTimeout(function() {if (!focused) shiftSelecting = null;}, 150); + } + + // Replace the range from from to to by the strings in newText. + // Afterwards, set the selection to selFrom, selTo. + function updateLines(from, to, newText, selFrom, selTo) { + if (history) { + var old = []; + for (var i = from.line, e = to.line + 1; i < e; ++i) old.push(lines[i].text); + history.addChange(from.line, newText.length, old); + while (history.done.length > options.undoDepth) history.done.shift(); + } + updateLinesNoUndo(from, to, newText, selFrom, selTo); + } + function unredoHelper(from, to) { + var change = from.pop(); + if (change) { + var replaced = [], end = change.start + change.added; + for (var i = change.start; i < end; ++i) replaced.push(lines[i].text); + to.push({start: change.start, added: change.old.length, old: replaced}); + var pos = clipPos({line: change.start + change.old.length - 1, + ch: editEnd(replaced[replaced.length-1], change.old[change.old.length-1])}); + updateLinesNoUndo({line: change.start, ch: 0}, {line: end - 1, ch: lines[end-1].text.length}, change.old, pos, pos); + updateInput = true; + } + } + function undo() {unredoHelper(history.done, history.undone);} + function redo() {unredoHelper(history.undone, history.done);} + + function updateLinesNoUndo(from, to, newText, selFrom, selTo) { + var recomputeMaxLength = false, maxLineLength = maxLine.length; + for (var i = from.line; i <= to.line; ++i) { + if (lines[i].text.length == maxLineLength) {recomputeMaxLength = true; break;} + } + + var nlines = to.line - from.line, firstLine = lines[from.line], lastLine = lines[to.line]; + // First adjust the line structure, taking some care to leave highlighting intact. + if (firstLine == lastLine) { + if (newText.length == 1) + firstLine.replace(from.ch, to.ch, newText[0]); + else { + lastLine = firstLine.split(to.ch, newText[newText.length-1]); + var spliceargs = [from.line + 1, nlines]; + firstLine.replace(from.ch, firstLine.text.length, newText[0]); + for (var i = 1, e = newText.length - 1; i < e; ++i) spliceargs.push(new Line(newText[i])); + spliceargs.push(lastLine); + lines.splice.apply(lines, spliceargs); + } + } + else if (newText.length == 1) { + firstLine.replace(from.ch, firstLine.text.length, newText[0] + lastLine.text.slice(to.ch)); + lines.splice(from.line + 1, nlines); + } + else { + var spliceargs = [from.line + 1, nlines - 1]; + firstLine.replace(from.ch, firstLine.text.length, newText[0]); + lastLine.replace(0, to.ch, newText[newText.length-1]); + for (var i = 1, e = newText.length - 1; i < e; ++i) spliceargs.push(new Line(newText[i])); + lines.splice.apply(lines, spliceargs); + } + + + for (var i = from.line, e = i + newText.length; i < e; ++i) { + var l = lines[i].text; + if (l.length > maxLineLength) { + maxLine = l; maxLineLength = l.length; maxWidth = null; + recomputeMaxLength = false; + } + } + if (recomputeMaxLength) { + maxLineLength = 0; maxLine = ""; maxWidth = null; + for (var i = 0, e = lines.length; i < e; ++i) { + var l = lines[i].text; + if (l.length > maxLineLength) { + maxLineLength = l.length; maxLine = l; + } + } + } + + // Add these lines to the work array, so that they will be + // highlighted. Adjust work lines if lines were added/removed. + var newWork = [], lendiff = newText.length - nlines - 1; + for (var i = 0, l = work.length; i < l; ++i) { + var task = work[i]; + if (task < from.line) newWork.push(task); + else if (task > to.line) newWork.push(task + lendiff); + } + if (newText.length < 5) { + highlightLines(from.line, from.line + newText.length); + newWork.push(from.line + newText.length); + } else { + newWork.push(from.line); + } + work = newWork; + startWorker(100); + // Remember that these lines changed, for updating the display + changes.push({from: from.line, to: to.line + 1, diff: lendiff}); + textChanged = {from: from, to: to, text: newText}; + + // Update the selection + function updateLine(n) {return n <= Math.min(to.line, to.line + lendiff) ? n : n + lendiff;} + setSelection(selFrom, selTo, updateLine(sel.from.line), updateLine(sel.to.line)); + + // Make sure the scroll-size div has the correct height. + code.style.height = (lines.length * lineHeight() + 2 * paddingTop()) + "px"; + } + + function replaceRange(code, from, to) { + from = clipPos(from); + if (!to) to = from; else to = clipPos(to); + code = splitLines(code); + function adjustPos(pos) { + if (posLess(pos, from)) return pos; + if (!posLess(to, pos)) return end; + var line = pos.line + code.length - (to.line - from.line) - 1; + var ch = pos.ch; + if (pos.line == to.line) + ch += code[code.length-1].length - (to.ch - (to.line == from.line ? from.ch : 0)); + return {line: line, ch: ch}; + } + var end; + replaceRange1(code, from, to, function(end1) { + end = end1; + return {from: adjustPos(sel.from), to: adjustPos(sel.to)}; + }); + return end; + } + function replaceSelection(code, collapse) { + replaceRange1(splitLines(code), sel.from, sel.to, function(end) { + if (collapse == "end") return {from: end, to: end}; + else if (collapse == "start") return {from: sel.from, to: sel.from}; + else return {from: sel.from, to: end}; + }); + } + function replaceRange1(code, from, to, computeSel) { + var endch = code.length == 1 ? code[0].length + from.ch : code[code.length-1].length; + var newSel = computeSel({line: from.line + code.length - 1, ch: endch}); + updateLines(from, to, code, newSel.from, newSel.to); + } + + function getRange(from, to) { + var l1 = from.line, l2 = to.line; + if (l1 == l2) return lines[l1].text.slice(from.ch, to.ch); + var code = [lines[l1].text.slice(from.ch)]; + for (var i = l1 + 1; i < l2; ++i) code.push(lines[i].text); + code.push(lines[l2].text.slice(0, to.ch)); + return code.join("\n"); + } + function getSelection() { + return getRange(sel.from, sel.to); + } + + var pollingFast = false; // Ensures slowPoll doesn't cancel fastPoll + function slowPoll() { + if (pollingFast) return; + poll.set(2000, function() { + startOperation(); + readInput(); + if (focused) slowPoll(); + endOperation(); + }); + } + function fastPoll(keyId) { + var missed = false; + pollingFast = true; + function p() { + startOperation(); + var changed = readInput(); + if (changed && keyId) { + if (changed == "moved" && movementKeys[keyId] == null) movementKeys[keyId] = true; + if (changed == "changed") movementKeys[keyId] = false; + } + if (!changed && !missed) {missed = true; poll.set(80, p);} + else {pollingFast = false; slowPoll();} + endOperation(); + } + poll.set(20, p); + } + + // Inspects the textarea, compares its state (content, selection) + // to the data in the editing variable, and updates the editor + // content or cursor if something changed. + function readInput() { + if (leaveInputAlone || !focused) return; + var changed = false, text = input.value, sr = selRange(input); + if (!sr) return false; + var changed = editing.text != text, rs = reducedSelection; + var moved = changed || sr.start != editing.start || sr.end != (rs ? editing.start : editing.end); + if (!moved && !rs) return false; + if (changed) { + shiftSelecting = reducedSelection = null; + if (options.readOnly) {updateInput = true; return "changed";} + } + + // Compute selection start and end based on start/end offsets in textarea + function computeOffset(n, startLine) { + var pos = 0; + for (;;) { + var found = text.indexOf("\n", pos); + if (found == -1 || (text.charAt(found-1) == "\r" ? found - 1 : found) >= n) + return {line: startLine, ch: n - pos}; + ++startLine; + pos = found + 1; + } + } + var from = computeOffset(sr.start, editing.from), + to = computeOffset(sr.end, editing.from); + // Here we have to take the reducedSelection hack into account, + // so that you can, for example, press shift-up at the start of + // your selection and have the right thing happen. + if (rs) { + var head = sr.start == rs.anchor ? to : from; + var tail = shiftSelecting ? sel.to : sr.start == rs.anchor ? from : to; + if (sel.inverted = posLess(head, tail)) { from = head; to = tail; } + else { reducedSelection = null; from = tail; to = head; } + } + + // In some cases (cursor on same line as before), we don't have + // to update the textarea content at all. + if (from.line == to.line && from.line == sel.from.line && from.line == sel.to.line && !shiftSelecting) + updateInput = false; + + // Magic mess to extract precise edited range from the changed + // string. + if (changed) { + var start = 0, end = text.length, len = Math.min(end, editing.text.length); + var c, line = editing.from, nl = -1; + while (start < len && (c = text.charAt(start)) == editing.text.charAt(start)) { + ++start; + if (c == "\n") {line++; nl = start;} + } + var ch = nl > -1 ? start - nl : start, endline = editing.to - 1, edend = editing.text.length; + for (;;) { + c = editing.text.charAt(edend); + if (text.charAt(end) != c) {++end; ++edend; break;} + if (c == "\n") endline--; + if (edend <= start || end <= start) break; + --end; --edend; + } + var nl = editing.text.lastIndexOf("\n", edend - 1), endch = nl == -1 ? edend : edend - nl - 1; + updateLines({line: line, ch: ch}, {line: endline, ch: endch}, splitLines(text.slice(start, end)), from, to); + if (line != endline || from.line != line) updateInput = true; + } + else setSelection(from, to); + + editing.text = text; editing.start = sr.start; editing.end = sr.end; + return changed ? "changed" : moved ? "moved" : false; + } + + // Set the textarea content and selection range to match the + // editor state. + function prepareInput() { + var text = []; + var from = Math.max(0, sel.from.line - 1), to = Math.min(lines.length, sel.to.line + 2); + for (var i = from; i < to; ++i) text.push(lines[i].text); + text = input.value = text.join(lineSep); + var startch = sel.from.ch, endch = sel.to.ch; + for (var i = from; i < sel.from.line; ++i) + startch += lineSep.length + lines[i].text.length; + for (var i = from; i < sel.to.line; ++i) + endch += lineSep.length + lines[i].text.length; + editing = {text: text, from: from, to: to, start: startch, end: endch}; + setSelRange(input, startch, reducedSelection ? startch : endch); + } + function focusInput() { + if (options.readOnly != "nocursor") input.focus(); + } + + function scrollEditorIntoView() { + if (!cursor.getBoundingClientRect) return; + var rect = cursor.getBoundingClientRect(); + var winH = window.innerHeight || document.body.offsetHeight || document.documentElement.offsetHeight; + if (rect.top < 0 || rect.bottom > winH) cursor.scrollIntoView(); + } + function scrollCursorIntoView() { + var cursor = localCoords(sel.inverted ? sel.from : sel.to); + return scrollIntoView(cursor.x, cursor.y, cursor.x, cursor.yBot); + } + function scrollIntoView(x1, y1, x2, y2) { + var pl = paddingLeft(), pt = paddingTop(), lh = lineHeight(); + y1 += pt; y2 += pt; x1 += pl; x2 += pl; + var screen = scroller.clientHeight, screentop = scroller.scrollTop, scrolled = false, result = true; + if (y1 < screentop) {scroller.scrollTop = Math.max(0, y1 - 2*lh); scrolled = true;} + else if (y2 > screentop + screen) {scroller.scrollTop = y2 + lh - screen; scrolled = true;} + + var screenw = scroller.clientWidth, screenleft = scroller.scrollLeft; + if (x1 < screenleft) { + if (x1 < 50) x1 = 0; + scroller.scrollLeft = Math.max(0, x1 - 10); + scrolled = true; + } + else if (x2 > screenw + screenleft) { + scroller.scrollLeft = x2 + 10 - screenw; + scrolled = true; + if (x2 > code.clientWidth) result = false; + } + if (scrolled && options.onScroll) options.onScroll(instance); + return result; + } + + function visibleLines() { + var lh = lineHeight(), top = scroller.scrollTop - paddingTop(); + return {from: Math.min(lines.length, Math.max(0, Math.floor(top / lh))), + to: Math.min(lines.length, Math.ceil((top + scroller.clientHeight) / lh))}; + } + // Uses a set of changes plus the current scroll position to + // determine which DOM updates have to be made, and makes the + // updates. + function updateDisplay(changes) { + if (!scroller.clientWidth) { + showingFrom = showingTo = 0; + return; + } + // First create a range of theoretically intact lines, and punch + // holes in that using the change info. + var intact = changes === true ? [] : [{from: showingFrom, to: showingTo, domStart: 0}]; + for (var i = 0, l = changes.length || 0; i < l; ++i) { + var change = changes[i], intact2 = [], diff = change.diff || 0; + for (var j = 0, l2 = intact.length; j < l2; ++j) { + var range = intact[j]; + if (change.to <= range.from) + intact2.push({from: range.from + diff, to: range.to + diff, domStart: range.domStart}); + else if (range.to <= change.from) + intact2.push(range); + else { + if (change.from > range.from) + intact2.push({from: range.from, to: change.from, domStart: range.domStart}) + if (change.to < range.to) + intact2.push({from: change.to + diff, to: range.to + diff, + domStart: range.domStart + (change.to - range.from)}); + } + } + intact = intact2; + } + + // Then, determine which lines we'd want to see, and which + // updates have to be made to get there. + var visible = visibleLines(); + var from = Math.min(showingFrom, Math.max(visible.from - 3, 0)), + to = Math.min(lines.length, Math.max(showingTo, visible.to + 3)), + updates = [], domPos = 0, domEnd = showingTo - showingFrom, pos = from, changedLines = 0; + + for (var i = 0, l = intact.length; i < l; ++i) { + var range = intact[i]; + if (range.to <= from) continue; + if (range.from >= to) break; + if (range.domStart > domPos || range.from > pos) { + updates.push({from: pos, to: range.from, domSize: range.domStart - domPos, domStart: domPos}); + changedLines += range.from - pos; + } + pos = range.to; + domPos = range.domStart + (range.to - range.from); + } + if (domPos != domEnd || pos != to) { + changedLines += Math.abs(to - pos); + updates.push({from: pos, to: to, domSize: domEnd - domPos, domStart: domPos}); + } + + if (!updates.length) return; + lineDiv.style.display = "none"; + // If more than 30% of the screen needs update, just do a full + // redraw (which is quicker than patching) + if (changedLines > (visible.to - visible.from) * .3) + refreshDisplay(from = Math.max(visible.from - 10, 0), to = Math.min(visible.to + 7, lines.length)); + // Otherwise, only update the stuff that needs updating. + else + patchDisplay(updates); + lineDiv.style.display = ""; + + // Position the mover div to align with the lines it's supposed + // to be showing (which will cover the visible display) + var different = from != showingFrom || to != showingTo || lastHeight != scroller.clientHeight; + showingFrom = from; showingTo = to; + mover.style.top = (from * lineHeight()) + "px"; + if (different) { + lastHeight = scroller.clientHeight; + code.style.height = (lines.length * lineHeight() + 2 * paddingTop()) + "px"; + } + if (different || updates.length) updateGutter(); + + if (maxWidth == null) maxWidth = stringWidth(maxLine); + if (maxWidth > scroller.clientWidth) { + lineSpace.style.width = maxWidth + "px"; + // Needed to prevent odd wrapping/hiding of widgets placed in here. + code.style.width = ""; + code.style.width = scroller.scrollWidth + "px"; + } else { + lineSpace.style.width = code.style.width = ""; + } + + // Since this is all rather error prone, it is honoured with the + // only assertion in the whole file. + if (lineDiv.childNodes.length != showingTo - showingFrom) + throw new Error("BAD PATCH! " + JSON.stringify(updates) + " size=" + (showingTo - showingFrom) + + " nodes=" + lineDiv.childNodes.length); + updateCursor(); + } + + function refreshDisplay(from, to) { + var html = [], start = {line: from, ch: 0}, inSel = posLess(sel.from, start) && !posLess(sel.to, start); + for (var i = from; i < to; ++i) { + var ch1 = null, ch2 = null; + if (inSel) { + ch1 = 0; + if (sel.to.line == i) {inSel = false; ch2 = sel.to.ch;} + } + else if (sel.from.line == i) { + if (sel.to.line == i) {ch1 = sel.from.ch; ch2 = sel.to.ch;} + else {inSel = true; ch1 = sel.from.ch;} + } + html.push(lines[i].getHTML(ch1, ch2, true)); + } + lineDiv.innerHTML = html.join(""); + } + function patchDisplay(updates) { + // Slightly different algorithm for IE (badInnerHTML), since + // there .innerHTML on PRE nodes is dumb, and discards + // whitespace. + var sfrom = sel.from.line, sto = sel.to.line, off = 0, + scratch = badInnerHTML && targetDocument.createElement("div"); + for (var i = 0, e = updates.length; i < e; ++i) { + var rec = updates[i]; + var extra = (rec.to - rec.from) - rec.domSize; + var nodeAfter = lineDiv.childNodes[rec.domStart + rec.domSize + off] || null; + if (badInnerHTML) + for (var j = Math.max(-extra, rec.domSize); j > 0; --j) + lineDiv.removeChild(nodeAfter ? nodeAfter.previousSibling : lineDiv.lastChild); + else if (extra) { + for (var j = Math.max(0, extra); j > 0; --j) + lineDiv.insertBefore(targetDocument.createElement("pre"), nodeAfter); + for (var j = Math.max(0, -extra); j > 0; --j) + lineDiv.removeChild(nodeAfter ? nodeAfter.previousSibling : lineDiv.lastChild); + } + var node = lineDiv.childNodes[rec.domStart + off], inSel = sfrom < rec.from && sto >= rec.from; + for (var j = rec.from; j < rec.to; ++j) { + var ch1 = null, ch2 = null; + if (inSel) { + ch1 = 0; + if (sto == j) {inSel = false; ch2 = sel.to.ch;} + } + else if (sfrom == j) { + if (sto == j) {ch1 = sel.from.ch; ch2 = sel.to.ch;} + else {inSel = true; ch1 = sel.from.ch;} + } + if (badInnerHTML) { + scratch.innerHTML = lines[j].getHTML(ch1, ch2, true); + lineDiv.insertBefore(scratch.firstChild, nodeAfter); + } + else { + node.innerHTML = lines[j].getHTML(ch1, ch2, false); + node.className = lines[j].className || ""; + node = node.nextSibling; + } + } + off += extra; + } + } + + function updateGutter() { + if (!options.gutter && !options.lineNumbers) return; + var hText = mover.offsetHeight, hEditor = scroller.clientHeight; + gutter.style.height = (hText - hEditor < 2 ? hEditor : hText) + "px"; + var html = []; + for (var i = showingFrom; i < Math.max(showingTo, showingFrom + 1); ++i) { + var marker = lines[i].gutterMarker; + var text = options.lineNumbers ? i + options.firstLineNumber : null; + if (marker && marker.text) + text = marker.text.replace("%N%", text != null ? text : ""); + else if (text == null) + text = "\u00a0"; + html.push((marker && marker.style ? '
' : "
"), text, "
"); + } + gutter.style.display = "none"; + gutterText.innerHTML = html.join(""); + var minwidth = String(lines.length).length, firstNode = gutterText.firstChild, val = eltText(firstNode), pad = ""; + while (val.length + pad.length < minwidth) pad += "\u00a0"; + if (pad) firstNode.insertBefore(targetDocument.createTextNode(pad), firstNode.firstChild); + gutter.style.display = ""; + lineSpace.style.marginLeft = gutter.offsetWidth + "px"; + } + function updateCursor() { + var head = sel.inverted ? sel.from : sel.to, lh = lineHeight(); + var x = charX(head.line, head.ch); + inputDiv.style.top = (head.line * lh - scroller.scrollTop) + "px"; + inputDiv.style.left = (x - scroller.scrollLeft) + "px"; + if (posEq(sel.from, sel.to)) { + cursor.style.top = (head.line - showingFrom) * lh + "px"; + cursor.style.left = x + "px"; + cursor.style.display = ""; + } + else cursor.style.display = "none"; + } + + function setSelectionUser(from, to) { + var sh = shiftSelecting && clipPos(shiftSelecting); + if (sh) { + if (posLess(sh, from)) from = sh; + else if (posLess(to, sh)) to = sh; + } + setSelection(from, to); + } + // Update the selection. Last two args are only used by + // updateLines, since they have to be expressed in the line + // numbers before the update. + function setSelection(from, to, oldFrom, oldTo) { + if (posEq(sel.from, from) && posEq(sel.to, to)) return; + if (posLess(to, from)) {var tmp = to; to = from; from = tmp;} + + if (posEq(from, to)) sel.inverted = false; + else if (posEq(from, sel.to)) sel.inverted = false; + else if (posEq(to, sel.from)) sel.inverted = true; + + // Some ugly logic used to only mark the lines that actually did + // see a change in selection as changed, rather than the whole + // selected range. + if (oldFrom == null) {oldFrom = sel.from.line; oldTo = sel.to.line;} + if (posEq(from, to)) { + if (!posEq(sel.from, sel.to)) + changes.push({from: oldFrom, to: oldTo + 1}); + } + else if (posEq(sel.from, sel.to)) { + changes.push({from: from.line, to: to.line + 1}); + } + else { + if (!posEq(from, sel.from)) { + if (from.line < oldFrom) + changes.push({from: from.line, to: Math.min(to.line, oldFrom) + 1}); + else + changes.push({from: oldFrom, to: Math.min(oldTo, from.line) + 1}); + } + if (!posEq(to, sel.to)) { + if (to.line < oldTo) + changes.push({from: Math.max(oldFrom, from.line), to: oldTo + 1}); + else + changes.push({from: Math.max(from.line, oldTo), to: to.line + 1}); + } + } + sel.from = from; sel.to = to; + selectionChanged = true; + } + function setCursor(line, ch, user) { + var pos = clipPos({line: line, ch: ch || 0}); + (user ? setSelectionUser : setSelection)(pos, pos); + } + + function clipLine(n) {return Math.max(0, Math.min(n, lines.length-1));} + function clipPos(pos) { + if (pos.line < 0) return {line: 0, ch: 0}; + if (pos.line >= lines.length) return {line: lines.length-1, ch: lines[lines.length-1].text.length}; + var ch = pos.ch, linelen = lines[pos.line].text.length; + if (ch == null || ch > linelen) return {line: pos.line, ch: linelen}; + else if (ch < 0) return {line: pos.line, ch: 0}; + else return pos; + } + + function scrollPage(down) { + var linesPerPage = Math.floor(scroller.clientHeight / lineHeight()), head = sel.inverted ? sel.from : sel.to; + setCursor(head.line + (Math.max(linesPerPage - 1, 1) * (down ? 1 : -1)), head.ch, true); + } + function scrollEnd(top) { + var pos = top ? {line: 0, ch: 0} : {line: lines.length - 1, ch: lines[lines.length-1].text.length}; + setSelectionUser(pos, pos); + } + function selectAll() { + var endLine = lines.length - 1; + setSelection({line: 0, ch: 0}, {line: endLine, ch: lines[endLine].text.length}); + } + function selectWordAt(pos) { + var line = lines[pos.line].text; + var start = pos.ch, end = pos.ch; + while (start > 0 && /\w/.test(line.charAt(start - 1))) --start; + while (end < line.length && /\w/.test(line.charAt(end))) ++end; + setSelectionUser({line: pos.line, ch: start}, {line: pos.line, ch: end}); + } + function selectLine(line) { + setSelectionUser({line: line, ch: 0}, {line: line, ch: lines[line].text.length}); + } + function handleEnter() { + replaceSelection("\n", "end"); + if (options.enterMode != "flat") + indentLine(sel.from.line, options.enterMode == "keep" ? "prev" : "smart"); + } + function handleTab(shift) { + function indentSelected(mode) { + if (posEq(sel.from, sel.to)) return indentLine(sel.from.line, mode); + var e = sel.to.line - (sel.to.ch ? 0 : 1); + for (var i = sel.from.line; i <= e; ++i) indentLine(i, mode); + } + shiftSelecting = null; + switch (options.tabMode) { + case "default": + return false; + case "indent": + indentSelected("smart"); + break; + case "classic": + if (posEq(sel.from, sel.to)) { + if (shift) indentLine(sel.from.line, "smart"); + else replaceSelection("\t", "end"); + break; + } + case "shift": + indentSelected(shift ? "subtract" : "add"); + break; + } + return true; + } + function smartHome() { + var firstNonWS = Math.max(0, lines[sel.from.line].text.search(/\S/)); + setCursor(sel.from.line, sel.from.ch <= firstNonWS && sel.from.ch ? 0 : firstNonWS, true); + } + + function indentLine(n, how) { + if (how == "smart") { + if (!mode.indent) how = "prev"; + else var state = getStateBefore(n); + } + + var line = lines[n], curSpace = line.indentation(), curSpaceString = line.text.match(/^\s*/)[0], indentation; + if (how == "prev") { + if (n) indentation = lines[n-1].indentation(); + else indentation = 0; + } + else if (how == "smart") indentation = mode.indent(state, line.text.slice(curSpaceString.length)); + else if (how == "add") indentation = curSpace + options.indentUnit; + else if (how == "subtract") indentation = curSpace - options.indentUnit; + indentation = Math.max(0, indentation); + var diff = indentation - curSpace; + + if (!diff) { + if (sel.from.line != n && sel.to.line != n) return; + var indentString = curSpaceString; + } + else { + var indentString = "", pos = 0; + if (options.indentWithTabs) + for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += "\t";} + while (pos < indentation) {++pos; indentString += " ";} + } + + replaceRange(indentString, {line: n, ch: 0}, {line: n, ch: curSpaceString.length}); + } + + function loadMode() { + mode = CodeMirror.getMode(options, options.mode); + for (var i = 0, l = lines.length; i < l; ++i) + lines[i].stateAfter = null; + work = [0]; + startWorker(); + } + function gutterChanged() { + var visible = options.gutter || options.lineNumbers; + gutter.style.display = visible ? "" : "none"; + if (visible) updateGutter(); + else lineDiv.parentNode.style.marginLeft = 0; + } + + function markText(from, to, className) { + from = clipPos(from); to = clipPos(to); + var accum = []; + function add(line, from, to, className) { + var line = lines[line], mark = line.addMark(from, to, className); + mark.line = line; + accum.push(mark); + } + if (from.line == to.line) add(from.line, from.ch, to.ch, className); + else { + add(from.line, from.ch, null, className); + for (var i = from.line + 1, e = to.line; i < e; ++i) + add(i, 0, null, className); + add(to.line, 0, to.ch, className); + } + changes.push({from: from.line, to: to.line + 1}); + return function() { + var start, end; + for (var i = 0; i < accum.length; ++i) { + var mark = accum[i], found = indexOf(lines, mark.line); + mark.line.removeMark(mark); + if (found > -1) { + if (start == null) start = found; + end = found; + } + } + if (start != null) changes.push({from: start, to: end + 1}); + }; + } + + function addGutterMarker(line, text, className) { + if (typeof line == "number") line = lines[clipLine(line)]; + line.gutterMarker = {text: text, style: className}; + updateGutter(); + return line; + } + function removeGutterMarker(line) { + if (typeof line == "number") line = lines[clipLine(line)]; + line.gutterMarker = null; + updateGutter(); + } + function setLineClass(line, className) { + if (typeof line == "number") { + var no = line; + line = lines[clipLine(line)]; + } + else { + var no = indexOf(lines, line); + if (no == -1) return null; + } + if (line.className != className) { + line.className = className; + changes.push({from: no, to: no + 1}); + } + return line; + } + + function lineInfo(line) { + if (typeof line == "number") { + var n = line; + line = lines[line]; + if (!line) return null; + } + else { + var n = indexOf(lines, line); + if (n == -1) return null; + } + var marker = line.gutterMarker; + return {line: n, text: line.text, markerText: marker && marker.text, markerClass: marker && marker.style}; + } + + function stringWidth(str) { + measure.innerHTML = "
x
"; + measure.firstChild.firstChild.firstChild.nodeValue = str; + return measure.firstChild.firstChild.offsetWidth || 10; + } + // These are used to go from pixel positions to character + // positions, taking varying character widths into account. + function charX(line, pos) { + if (pos == 0) return 0; + measure.innerHTML = "
" + lines[line].getHTML(null, null, false, pos) + "
"; + return measure.firstChild.firstChild.offsetWidth; + } + function charFromX(line, x) { + if (x <= 0) return 0; + var lineObj = lines[line], text = lineObj.text; + function getX(len) { + measure.innerHTML = "
" + lineObj.getHTML(null, null, false, len) + "
"; + return measure.firstChild.firstChild.offsetWidth; + } + var from = 0, fromX = 0, to = text.length, toX; + // Guess a suitable upper bound for our search. + var estimated = Math.min(to, Math.ceil(x / stringWidth("x"))); + for (;;) { + var estX = getX(estimated); + if (estX <= x && estimated < to) estimated = Math.min(to, Math.ceil(estimated * 1.2)); + else {toX = estX; to = estimated; break;} + } + if (x > toX) return to; + // Try to guess a suitable lower bound as well. + estimated = Math.floor(to * 0.8); estX = getX(estimated); + if (estX < x) {from = estimated; fromX = estX;} + // Do a binary search between these bounds. + for (;;) { + if (to - from <= 1) return (toX - x > x - fromX) ? from : to; + var middle = Math.ceil((from + to) / 2), middleX = getX(middle); + if (middleX > x) {to = middle; toX = middleX;} + else {from = middle; fromX = middleX;} + } + } + + function localCoords(pos, inLineWrap) { + var lh = lineHeight(), line = pos.line - (inLineWrap ? showingFrom : 0); + return {x: charX(pos.line, pos.ch), y: line * lh, yBot: (line + 1) * lh}; + } + function pageCoords(pos) { + var local = localCoords(pos, true), off = eltOffset(lineSpace); + return {x: off.left + local.x, y: off.top + local.y, yBot: off.top + local.yBot}; + } + + function lineHeight() { + var nlines = lineDiv.childNodes.length; + if (nlines) return (lineDiv.offsetHeight / nlines) || 1; + measure.innerHTML = "
x
"; + return measure.firstChild.offsetHeight || 1; + } + function paddingTop() {return lineSpace.offsetTop;} + function paddingLeft() {return lineSpace.offsetLeft;} + + function posFromMouse(e, liberal) { + var offW = eltOffset(scroller, true), x, y; + // Fails unpredictably on IE[67] when mouse is dragged around quickly. + try { x = e.clientX; y = e.clientY; } catch (e) { return null; } + // This is a mess of a heuristic to try and determine whether a + // scroll-bar was clicked or not, and to return null if one was + // (and !liberal). + if (!liberal && (x - offW.left > scroller.clientWidth || y - offW.top > scroller.clientHeight)) + return null; + var offL = eltOffset(lineSpace, true); + var line = showingFrom + Math.floor((y - offL.top) / lineHeight()); + return clipPos({line: line, ch: charFromX(clipLine(line), x - offL.left)}); + } + function onContextMenu(e) { + var pos = posFromMouse(e); + if (!pos || window.opera) return; // Opera is difficult. + if (posEq(sel.from, sel.to) || posLess(pos, sel.from) || !posLess(pos, sel.to)) + operation(setCursor)(pos.line, pos.ch); + + var oldCSS = input.style.cssText; + inputDiv.style.position = "absolute"; + input.style.cssText = "position: fixed; width: 30px; height: 30px; top: " + (e.clientY - 5) + + "px; left: " + (e.clientX - 5) + "px; z-index: 1000; background: white; " + + "border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);"; + leaveInputAlone = true; + var val = input.value = getSelection(); + focusInput(); + setSelRange(input, 0, input.value.length); + function rehide() { + var newVal = splitLines(input.value).join("\n"); + if (newVal != val) operation(replaceSelection)(newVal, "end"); + inputDiv.style.position = "relative"; + input.style.cssText = oldCSS; + leaveInputAlone = false; + prepareInput(); + slowPoll(); + } + + if (gecko) { + e_stop(e); + var mouseup = connect(window, "mouseup", function() { + mouseup(); + setTimeout(rehide, 20); + }, true); + } + else { + setTimeout(rehide, 50); + } + } + + // Cursor-blinking + function restartBlink() { + clearInterval(blinker); + var on = true; + cursor.style.visibility = ""; + blinker = setInterval(function() { + cursor.style.visibility = (on = !on) ? "" : "hidden"; + }, 650); + } + + var matching = {"(": ")>", ")": "(<", "[": "]>", "]": "[<", "{": "}>", "}": "{<"}; + function matchBrackets(autoclear) { + var head = sel.inverted ? sel.from : sel.to, line = lines[head.line], pos = head.ch - 1; + var match = (pos >= 0 && matching[line.text.charAt(pos)]) || matching[line.text.charAt(++pos)]; + if (!match) return; + var ch = match.charAt(0), forward = match.charAt(1) == ">", d = forward ? 1 : -1, st = line.styles; + for (var off = pos + 1, i = 0, e = st.length; i < e; i+=2) + if ((off -= st[i].length) <= 0) {var style = st[i+1]; break;} + + var stack = [line.text.charAt(pos)], re = /[(){}[\]]/; + function scan(line, from, to) { + if (!line.text) return; + var st = line.styles, pos = forward ? 0 : line.text.length - 1, cur; + for (var i = forward ? 0 : st.length - 2, e = forward ? st.length : -2; i != e; i += 2*d) { + var text = st[i]; + if (st[i+1] != null && st[i+1] != style) {pos += d * text.length; continue;} + for (var j = forward ? 0 : text.length - 1, te = forward ? text.length : -1; j != te; j += d, pos+=d) { + if (pos >= from && pos < to && re.test(cur = text.charAt(j))) { + var match = matching[cur]; + if (match.charAt(1) == ">" == forward) stack.push(cur); + else if (stack.pop() != match.charAt(0)) return {pos: pos, match: false}; + else if (!stack.length) return {pos: pos, match: true}; + } + } + } + } + for (var i = head.line, e = forward ? Math.min(i + 100, lines.length) : Math.max(-1, i - 100); i != e; i+=d) { + var line = lines[i], first = i == head.line; + var found = scan(line, first && forward ? pos + 1 : 0, first && !forward ? pos : line.text.length); + if (found) break; + } + if (!found) found = {pos: null, match: false}; + var style = found.match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket"; + var one = markText({line: head.line, ch: pos}, {line: head.line, ch: pos+1}, style), + two = found.pos != null + ? markText({line: i, ch: found.pos}, {line: i, ch: found.pos + 1}, style) + : function() {}; + var clear = operation(function(){one(); two();}); + if (autoclear) setTimeout(clear, 800); + else bracketHighlighted = clear; + } + + // Finds the line to start with when starting a parse. Tries to + // find a line with a stateAfter, so that it can start with a + // valid state. If that fails, it returns the line with the + // smallest indentation, which tends to need the least context to + // parse correctly. + function findStartLine(n) { + var minindent, minline; + for (var search = n, lim = n - 40; search > lim; --search) { + if (search == 0) return 0; + var line = lines[search-1]; + if (line.stateAfter) return search; + var indented = line.indentation(); + if (minline == null || minindent > indented) { + minline = search - 1; + minindent = indented; + } + } + return minline; + } + function getStateBefore(n) { + var start = findStartLine(n), state = start && lines[start-1].stateAfter; + if (!state) state = startState(mode); + else state = copyState(mode, state); + for (var i = start; i < n; ++i) { + var line = lines[i]; + line.highlight(mode, state); + line.stateAfter = copyState(mode, state); + } + if (n < lines.length && !lines[n].stateAfter) work.push(n); + return state; + } + function highlightLines(start, end) { + var state = getStateBefore(start); + for (var i = start; i < end; ++i) { + var line = lines[i]; + line.highlight(mode, state); + line.stateAfter = copyState(mode, state); + } + } + function highlightWorker() { + var end = +new Date + options.workTime; + var foundWork = work.length; + while (work.length) { + if (!lines[showingFrom].stateAfter) var task = showingFrom; + else var task = work.pop(); + if (task >= lines.length) continue; + var start = findStartLine(task), state = start && lines[start-1].stateAfter; + if (state) state = copyState(mode, state); + else state = startState(mode); + + var unchanged = 0, compare = mode.compareStates, realChange = false; + for (var i = start, l = lines.length; i < l; ++i) { + var line = lines[i], hadState = line.stateAfter; + if (+new Date > end) { + work.push(i); + startWorker(options.workDelay); + if (realChange) changes.push({from: task, to: i + 1}); + return; + } + var changed = line.highlight(mode, state); + if (changed) realChange = true; + line.stateAfter = copyState(mode, state); + if (compare) { + if (hadState && compare(hadState, state)) break; + } else { + if (changed !== false || !hadState) unchanged = 0; + else if (++unchanged > 3) break; + } + } + if (realChange) changes.push({from: task, to: i + 1}); + } + if (foundWork && options.onHighlightComplete) + options.onHighlightComplete(instance); + } + function startWorker(time) { + if (!work.length) return; + highlight.set(time, operation(highlightWorker)); + } + + // Operations are used to wrap changes in such a way that each + // change won't have to update the cursor and display (which would + // be awkward, slow, and error-prone), but instead updates are + // batched and then all combined and executed at once. + function startOperation() { + updateInput = null; changes = []; textChanged = selectionChanged = false; + } + function endOperation() { + var reScroll = false; + if (selectionChanged) reScroll = !scrollCursorIntoView(); + if (changes.length) updateDisplay(changes); + else if (selectionChanged) updateCursor(); + if (reScroll) scrollCursorIntoView(); + if (selectionChanged) {scrollEditorIntoView(); restartBlink();} + + // updateInput can be set to a boolean value to force/prevent an + // update. + if (focused && !leaveInputAlone && + (updateInput === true || (updateInput !== false && selectionChanged))) + prepareInput(); + + if (selectionChanged && options.matchBrackets) + setTimeout(operation(function() { + if (bracketHighlighted) {bracketHighlighted(); bracketHighlighted = null;} + matchBrackets(false); + }), 20); + var tc = textChanged; // textChanged can be reset by cursoractivity callback + if (selectionChanged && options.onCursorActivity) + options.onCursorActivity(instance); + if (tc && options.onChange && instance) + options.onChange(instance, tc); + } + var nestedOperation = 0; + function operation(f) { + return function() { + if (!nestedOperation++) startOperation(); + try {var result = f.apply(this, arguments);} + finally {if (!--nestedOperation) endOperation();} + return result; + }; + } + + function SearchCursor(query, pos, caseFold) { + this.atOccurrence = false; + if (caseFold == null) caseFold = typeof query == "string" && query == query.toLowerCase(); + + if (pos && typeof pos == "object") pos = clipPos(pos); + else pos = {line: 0, ch: 0}; + this.pos = {from: pos, to: pos}; + + // The matches method is filled in based on the type of query. + // It takes a position and a direction, and returns an object + // describing the next occurrence of the query, or null if no + // more matches were found. + if (typeof query != "string") // Regexp match + this.matches = function(reverse, pos) { + if (reverse) { + var line = lines[pos.line].text.slice(0, pos.ch), match = line.match(query), start = 0; + while (match) { + var ind = line.indexOf(match[0]); + start += ind; + line = line.slice(ind + 1); + var newmatch = line.match(query); + if (newmatch) match = newmatch; + else break; + start++; + } + } + else { + var line = lines[pos.line].text.slice(pos.ch), match = line.match(query), + start = match && pos.ch + line.indexOf(match[0]); + } + if (match) + return {from: {line: pos.line, ch: start}, + to: {line: pos.line, ch: start + match[0].length}, + match: match}; + }; + else { // String query + if (caseFold) query = query.toLowerCase(); + var fold = caseFold ? function(str){return str.toLowerCase();} : function(str){return str;}; + var target = query.split("\n"); + // Different methods for single-line and multi-line queries + if (target.length == 1) + this.matches = function(reverse, pos) { + var line = fold(lines[pos.line].text), len = query.length, match; + if (reverse ? (pos.ch >= len && (match = line.lastIndexOf(query, pos.ch - len)) != -1) + : (match = line.indexOf(query, pos.ch)) != -1) + return {from: {line: pos.line, ch: match}, + to: {line: pos.line, ch: match + len}}; + }; + else + this.matches = function(reverse, pos) { + var ln = pos.line, idx = (reverse ? target.length - 1 : 0), match = target[idx], line = fold(lines[ln].text); + var offsetA = (reverse ? line.indexOf(match) + match.length : line.lastIndexOf(match)); + if (reverse ? offsetA >= pos.ch || offsetA != match.length + : offsetA <= pos.ch || offsetA != line.length - match.length) + return; + for (;;) { + if (reverse ? !ln : ln == lines.length - 1) return; + line = fold(lines[ln += reverse ? -1 : 1].text); + match = target[reverse ? --idx : ++idx]; + if (idx > 0 && idx < target.length - 1) { + if (line != match) return; + else continue; + } + var offsetB = (reverse ? line.lastIndexOf(match) : line.indexOf(match) + match.length); + if (reverse ? offsetB != line.length - match.length : offsetB != match.length) + return; + var start = {line: pos.line, ch: offsetA}, end = {line: ln, ch: offsetB}; + return {from: reverse ? end : start, to: reverse ? start : end}; + } + }; + } + } + + SearchCursor.prototype = { + findNext: function() {return this.find(false);}, + findPrevious: function() {return this.find(true);}, + + find: function(reverse) { + var self = this, pos = clipPos(reverse ? this.pos.from : this.pos.to); + function savePosAndFail(line) { + var pos = {line: line, ch: 0}; + self.pos = {from: pos, to: pos}; + self.atOccurrence = false; + return false; + } + + for (;;) { + if (this.pos = this.matches(reverse, pos)) { + this.atOccurrence = true; + return this.pos.match || true; + } + if (reverse) { + if (!pos.line) return savePosAndFail(0); + pos = {line: pos.line-1, ch: lines[pos.line-1].text.length}; + } + else { + if (pos.line == lines.length - 1) return savePosAndFail(lines.length); + pos = {line: pos.line+1, ch: 0}; + } + } + }, + + from: function() {if (this.atOccurrence) return copyPos(this.pos.from);}, + to: function() {if (this.atOccurrence) return copyPos(this.pos.to);}, + + replace: function(newText) { + var self = this; + if (this.atOccurrence) + operation(function() { + self.pos.to = replaceRange(newText, self.pos.from, self.pos.to); + })(); + } + }; + + for (var ext in extensions) + if (extensions.propertyIsEnumerable(ext) && + !instance.propertyIsEnumerable(ext)) + instance[ext] = extensions[ext]; + return instance; + } // (end of function CodeMirror) + + // The default configuration options. + CodeMirror.defaults = { + value: "", + mode: null, + theme: "default", + indentUnit: 2, + indentWithTabs: false, + tabMode: "classic", + enterMode: "indent", + electricChars: true, + onKeyEvent: null, + lineNumbers: false, + gutter: false, + firstLineNumber: 1, + readOnly: false, + smartHome: true, + onChange: null, + onCursorActivity: null, + onGutterClick: null, + onHighlightComplete: null, + onFocus: null, onBlur: null, onScroll: null, + matchBrackets: false, + workTime: 100, + workDelay: 200, + undoDepth: 40, + tabindex: null, + document: window.document + }; + + // Known modes, by name and by MIME + var modes = {}, mimeModes = {}; + CodeMirror.defineMode = function(name, mode) { + if (!CodeMirror.defaults.mode && name != "null") CodeMirror.defaults.mode = name; + modes[name] = mode; + }; + CodeMirror.defineMIME = function(mime, spec) { + mimeModes[mime] = spec; + }; + CodeMirror.getMode = function(options, spec) { + if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) + spec = mimeModes[spec]; + if (typeof spec == "string") + var mname = spec, config = {}; + else if (spec != null) + var mname = spec.name, config = spec; + var mfactory = modes[mname]; + if (!mfactory) { + if (window.console) console.warn("No mode " + mname + " found, falling back to plain text."); + return CodeMirror.getMode(options, "text/plain"); + } + return mfactory(options, config || {}); + }; + CodeMirror.listModes = function() { + var list = []; + for (var m in modes) + if (modes.propertyIsEnumerable(m)) list.push(m); + return list; + }; + CodeMirror.listMIMEs = function() { + var list = []; + for (var m in mimeModes) + if (mimeModes.propertyIsEnumerable(m)) list.push(m); + return list; + }; + + var extensions = {}; + CodeMirror.defineExtension = function(name, func) { + extensions[name] = func; + }; + + CodeMirror.fromTextArea = function(textarea, options) { + if (!options) options = {}; + options.value = textarea.value; + if (!options.tabindex && textarea.tabindex) + options.tabindex = textarea.tabindex; + + function save() {textarea.value = instance.getValue();} + if (textarea.form) { + // Deplorable hack to make the submit method do the right thing. + var rmSubmit = connect(textarea.form, "submit", save, true); + if (typeof textarea.form.submit == "function") { + var realSubmit = textarea.form.submit; + function wrappedSubmit() { + save(); + textarea.form.submit = realSubmit; + textarea.form.submit(); + textarea.form.submit = wrappedSubmit; + } + textarea.form.submit = wrappedSubmit; + } + } + + textarea.style.display = "none"; + var instance = CodeMirror(function(node) { + textarea.parentNode.insertBefore(node, textarea.nextSibling); + }, options); + instance.save = save; + instance.toTextArea = function() { + save(); + textarea.parentNode.removeChild(instance.getWrapperElement()); + textarea.style.display = ""; + if (textarea.form) { + rmSubmit(); + if (typeof textarea.form.submit == "function") + textarea.form.submit = realSubmit; + } + }; + return instance; + }; + + // Utility functions for working with state. Exported because modes + // sometimes need to do this. + function copyState(mode, state) { + if (state === true) return state; + if (mode.copyState) return mode.copyState(state); + var nstate = {}; + for (var n in state) { + var val = state[n]; + if (val instanceof Array) val = val.concat([]); + nstate[n] = val; + } + return nstate; + } + CodeMirror.startState = startState; + function startState(mode, a1, a2) { + return mode.startState ? mode.startState(a1, a2) : true; + } + CodeMirror.copyState = copyState; + + // The character stream used by a mode's parser. + function StringStream(string) { + this.pos = this.start = 0; + this.string = string; + } + StringStream.prototype = { + eol: function() {return this.pos >= this.string.length;}, + sol: function() {return this.pos == 0;}, + peek: function() {return this.string.charAt(this.pos);}, + next: function() { + if (this.pos < this.string.length) + return this.string.charAt(this.pos++); + }, + eat: function(match) { + var ch = this.string.charAt(this.pos); + if (typeof match == "string") var ok = ch == match; + else var ok = ch && (match.test ? match.test(ch) : match(ch)); + if (ok) {++this.pos; return ch;} + }, + eatWhile: function(match) { + var start = this.pos; + while (this.eat(match)){} + return this.pos > start; + }, + eatSpace: function() { + var start = this.pos; + while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos; + return this.pos > start; + }, + skipToEnd: function() {this.pos = this.string.length;}, + skipTo: function(ch) { + var found = this.string.indexOf(ch, this.pos); + if (found > -1) {this.pos = found; return true;} + }, + backUp: function(n) {this.pos -= n;}, + column: function() {return countColumn(this.string, this.start);}, + indentation: function() {return countColumn(this.string);}, + match: function(pattern, consume, caseInsensitive) { + if (typeof pattern == "string") { + function cased(str) {return caseInsensitive ? str.toLowerCase() : str;} + if (cased(this.string).indexOf(cased(pattern), this.pos) == this.pos) { + if (consume !== false) this.pos += pattern.length; + return true; + } + } + else { + var match = this.string.slice(this.pos).match(pattern); + if (match && consume !== false) this.pos += match[0].length; + return match; + } + }, + current: function(){return this.string.slice(this.start, this.pos);} + }; + CodeMirror.StringStream = StringStream; + + // Line objects. These hold state related to a line, including + // highlighting info (the styles array). + function Line(text, styles) { + this.styles = styles || [text, null]; + this.stateAfter = null; + this.text = text; + this.marked = this.gutterMarker = this.className = null; + } + Line.prototype = { + // Replace a piece of a line, keeping the styles around it intact. + replace: function(from, to, text) { + var st = [], mk = this.marked; + copyStyles(0, from, this.styles, st); + if (text) st.push(text, null); + copyStyles(to, this.text.length, this.styles, st); + this.styles = st; + this.text = this.text.slice(0, from) + text + this.text.slice(to); + this.stateAfter = null; + if (mk) { + var diff = text.length - (to - from), end = this.text.length; + function fix(n) {return n <= Math.min(to, to + diff) ? n : n + diff;} + for (var i = 0; i < mk.length; ++i) { + var mark = mk[i], del = false; + if (mark.from >= end) del = true; + else {mark.from = fix(mark.from); if (mark.to != null) mark.to = fix(mark.to);} + if (del || mark.from >= mark.to) {mk.splice(i, 1); i--;} + } + } + }, + // Split a line in two, again keeping styles intact. + split: function(pos, textBefore) { + var st = [textBefore, null]; + copyStyles(pos, this.text.length, this.styles, st); + return new Line(textBefore + this.text.slice(pos), st); + }, + addMark: function(from, to, style) { + var mk = this.marked, mark = {from: from, to: to, style: style}; + if (this.marked == null) this.marked = []; + this.marked.push(mark); + this.marked.sort(function(a, b){return a.from - b.from;}); + return mark; + }, + removeMark: function(mark) { + var mk = this.marked; + if (!mk) return; + for (var i = 0; i < mk.length; ++i) + if (mk[i] == mark) {mk.splice(i, 1); break;} + }, + // Run the given mode's parser over a line, update the styles + // array, which contains alternating fragments of text and CSS + // classes. + highlight: function(mode, state) { + var stream = new StringStream(this.text), st = this.styles, pos = 0; + var changed = false, curWord = st[0], prevWord; + if (this.text == "" && mode.blankLine) mode.blankLine(state); + while (!stream.eol()) { + var style = mode.token(stream, state); + var substr = this.text.slice(stream.start, stream.pos); + stream.start = stream.pos; + if (pos && st[pos-1] == style) + st[pos-2] += substr; + else if (substr) { + if (!changed && (st[pos+1] != style || (pos && st[pos-2] != prevWord))) changed = true; + st[pos++] = substr; st[pos++] = style; + prevWord = curWord; curWord = st[pos]; + } + // Give up when line is ridiculously long + if (stream.pos > 5000) { + st[pos++] = this.text.slice(stream.pos); st[pos++] = null; + break; + } + } + if (st.length != pos) {st.length = pos; changed = true;} + if (pos && st[pos-2] != prevWord) changed = true; + // Short lines with simple highlights return null, and are + // counted as changed by the driver because they are likely to + // highlight the same way in various contexts. + return changed || (st.length < 5 && this.text.length < 10 ? null : false); + }, + // Fetch the parser token for a given character. Useful for hacks + // that want to inspect the mode state (say, for completion). + getTokenAt: function(mode, state, ch) { + var txt = this.text, stream = new StringStream(txt); + while (stream.pos < ch && !stream.eol()) { + stream.start = stream.pos; + var style = mode.token(stream, state); + } + return {start: stream.start, + end: stream.pos, + string: stream.current(), + className: style || null, + state: state}; + }, + indentation: function() {return countColumn(this.text);}, + // Produces an HTML fragment for the line, taking selection, + // marking, and highlighting into account. + getHTML: function(sfrom, sto, includePre, endAt) { + var html = []; + if (includePre) + html.push(this.className ? '
': "
");
+      function span(text, style) {
+        if (!text) return;
+        if (style) html.push('', htmlEscape(text), "");
+        else html.push(htmlEscape(text));
+      }
+      var st = this.styles, allText = this.text, marked = this.marked;
+      if (sfrom == sto) sfrom = null;
+      var len = allText.length;
+      if (endAt != null) len = Math.min(endAt, len);
+
+      if (!allText && endAt == null)
+        span(" ", sfrom != null && sto == null ? "CodeMirror-selected" : null);
+      else if (!marked && sfrom == null)
+        for (var i = 0, ch = 0; ch < len; i+=2) {
+          var str = st[i], l = str.length;
+          if (ch + l > len) str = str.slice(0, len - ch);
+          ch += l;
+          span(str, "cm-" + st[i+1]);
+        }
+      else {
+        var pos = 0, i = 0, text = "", style, sg = 0;
+        var markpos = -1, mark = null;
+        function nextMark() {
+          if (marked) {
+            markpos += 1;
+            mark = (markpos < marked.length) ? marked[markpos] : null;
+          }
+        }
+        nextMark();
+        while (pos < len) {
+          var upto = len;
+          var extraStyle = "";
+          if (sfrom != null) {
+            if (sfrom > pos) upto = sfrom;
+            else if (sto == null || sto > pos) {
+              extraStyle = " CodeMirror-selected";
+              if (sto != null) upto = Math.min(upto, sto);
+            }
+          }
+          while (mark && mark.to != null && mark.to <= pos) nextMark();
+          if (mark) {
+            if (mark.from > pos) upto = Math.min(upto, mark.from);
+            else {
+              extraStyle += " " + mark.style;
+              if (mark.to != null) upto = Math.min(upto, mark.to);
+            }
+          }
+          for (;;) {
+            var end = pos + text.length;
+            var appliedStyle = style;
+            if (extraStyle) appliedStyle = style ? style + extraStyle : extraStyle;
+            span(end > upto ? text.slice(0, upto - pos) : text, appliedStyle);
+            if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;}
+            pos = end;
+            text = st[i++]; style = "cm-" + st[i++];
+          }
+        }
+        if (sfrom != null && sto == null) span(" ", "CodeMirror-selected");
+      }
+      if (includePre) html.push("
"); + return html.join(""); + } + }; + // Utility used by replace and split above + function copyStyles(from, to, source, dest) { + for (var i = 0, pos = 0, state = 0; pos < to; i+=2) { + var part = source[i], end = pos + part.length; + if (state == 0) { + if (end > from) dest.push(part.slice(from - pos, Math.min(part.length, to - pos)), source[i+1]); + if (end >= from) state = 1; + } + else if (state == 1) { + if (end > to) dest.push(part.slice(0, to - pos), source[i+1]); + else dest.push(part, source[i+1]); + } + pos = end; + } + } + + // The history object 'chunks' changes that are made close together + // and at almost the same time into bigger undoable units. + function History() { + this.time = 0; + this.done = []; this.undone = []; + } + History.prototype = { + addChange: function(start, added, old) { + this.undone.length = 0; + var time = +new Date, last = this.done[this.done.length - 1]; + if (time - this.time > 400 || !last || + last.start > start + added || last.start + last.added < start - last.added + last.old.length) + this.done.push({start: start, added: added, old: old}); + else { + var oldoff = 0; + if (start < last.start) { + for (var i = last.start - start - 1; i >= 0; --i) + last.old.unshift(old[i]); + last.added += last.start - start; + last.start = start; + } + else if (last.start < start) { + oldoff = start - last.start; + added += oldoff; + } + for (var i = last.added - oldoff, e = old.length; i < e; ++i) + last.old.push(old[i]); + if (last.added < added) last.added = added; + } + this.time = time; + } + }; + + function stopMethod() {e_stop(this);} + // Ensure an event has a stop method. + function addStop(event) { + if (!event.stop) event.stop = stopMethod; + return event; + } + + function e_preventDefault(e) { + if (e.preventDefault) e.preventDefault(); + else e.returnValue = false; + } + function e_stopPropagation(e) { + if (e.stopPropagation) e.stopPropagation(); + else e.cancelBubble = true; + } + function e_stop(e) {e_preventDefault(e); e_stopPropagation(e);} + function e_target(e) {return e.target || e.srcElement;} + function e_button(e) { + if (e.which) return e.which; + else if (e.button & 1) return 1; + else if (e.button & 2) return 3; + else if (e.button & 4) return 2; + } + + // Event handler registration. If disconnect is true, it'll return a + // function that unregisters the handler. + function connect(node, type, handler, disconnect) { + function wrapHandler(event) {handler(event || window.event);} + if (typeof node.addEventListener == "function") { + node.addEventListener(type, wrapHandler, false); + if (disconnect) return function() {node.removeEventListener(type, wrapHandler, false);}; + } + else { + node.attachEvent("on" + type, wrapHandler); + if (disconnect) return function() {node.detachEvent("on" + type, wrapHandler);}; + } + } + + function Delayed() {this.id = null;} + Delayed.prototype = {set: function(ms, f) {clearTimeout(this.id); this.id = setTimeout(f, ms);}}; + + // Some IE versions don't preserve whitespace when setting the + // innerHTML of a PRE tag. + var badInnerHTML = (function() { + var pre = document.createElement("pre"); + pre.innerHTML = " "; return !pre.innerHTML; + })(); + + var gecko = /gecko\/\d{7}/i.test(navigator.userAgent); + var ie = /MSIE \d/.test(navigator.userAgent); + var safari = /Apple Computer/.test(navigator.vendor); + + var lineSep = "\n"; + // Feature-detect whether newlines in textareas are converted to \r\n + (function () { + var te = document.createElement("textarea"); + te.value = "foo\nbar"; + if (te.value.indexOf("\r") > -1) lineSep = "\r\n"; + }()); + + var tabSize = 8; + var mac = /Mac/.test(navigator.platform); + var movementKeys = {}; + for (var i = 35; i <= 40; ++i) + movementKeys[i] = movementKeys["c" + i] = true; + + // Counts the column offset in a string, taking tabs into account. + // Used mostly to find indentation. + function countColumn(string, end) { + if (end == null) { + end = string.search(/[^\s\u00a0]/); + if (end == -1) end = string.length; + } + for (var i = 0, n = 0; i < end; ++i) { + if (string.charAt(i) == "\t") n += tabSize - (n % tabSize); + else ++n; + } + return n; + } + + function computedStyle(elt) { + if (elt.currentStyle) return elt.currentStyle; + return window.getComputedStyle(elt, null); + } + // Find the position of an element by following the offsetParent chain. + // If screen==true, it returns screen (rather than page) coordinates. + function eltOffset(node, screen) { + var doc = node.ownerDocument.body; + var x = 0, y = 0, skipDoc = false; + for (var n = node; n; n = n.offsetParent) { + x += n.offsetLeft; y += n.offsetTop; + if (screen && computedStyle(n).position == "fixed") + skipDoc = true; + } + var e = screen && !skipDoc ? null : doc; + for (var n = node.parentNode; n != e; n = n.parentNode) + if (n.scrollLeft != null) { x -= n.scrollLeft; y -= n.scrollTop;} + return {left: x, top: y}; + } + // Get a node's text content. + function eltText(node) { + return node.textContent || node.innerText || node.nodeValue || ""; + } + + // Operations on {line, ch} objects. + function posEq(a, b) {return a.line == b.line && a.ch == b.ch;} + function posLess(a, b) {return a.line < b.line || (a.line == b.line && a.ch < b.ch);} + function copyPos(x) {return {line: x.line, ch: x.ch};} + + var escapeElement = document.createElement("div"); + function htmlEscape(str) { + escapeElement.innerText = escapeElement.textContent = str; + return escapeElement.innerHTML; + } + CodeMirror.htmlEscape = htmlEscape; + + // Used to position the cursor after an undo/redo by finding the + // last edited character. + function editEnd(from, to) { + if (!to) return from ? from.length : 0; + if (!from) return to.length; + for (var i = from.length, j = to.length; i >= 0 && j >= 0; --i, --j) + if (from.charAt(i) != to.charAt(j)) break; + return j + 1; + } + + function indexOf(collection, elt) { + if (collection.indexOf) return collection.indexOf(elt); + for (var i = 0, e = collection.length; i < e; ++i) + if (collection[i] == elt) return i; + return -1; + } + + // See if "".split is the broken IE version, if so, provide an + // alternative way to split lines. + var splitLines, selRange, setSelRange; + if ("\n\nb".split(/\n/).length != 3) + splitLines = function(string) { + var pos = 0, nl, result = []; + while ((nl = string.indexOf("\n", pos)) > -1) { + result.push(string.slice(pos, string.charAt(nl-1) == "\r" ? nl - 1 : nl)); + pos = nl + 1; + } + result.push(string.slice(pos)); + return result; + }; + else + splitLines = function(string){return string.split(/\r?\n/);}; + CodeMirror.splitLines = splitLines; + + // Sane model of finding and setting the selection in a textarea + if (window.getSelection) { + selRange = function(te) { + try {return {start: te.selectionStart, end: te.selectionEnd};} + catch(e) {return null;} + }; + if (safari) + // On Safari, selection set with setSelectionRange are in a sort + // of limbo wrt their anchor. If you press shift-left in them, + // the anchor is put at the end, and the selection expanded to + // the left. If you press shift-right, the anchor ends up at the + // front. This is not what CodeMirror wants, so it does a + // spurious modify() call to get out of limbo. + setSelRange = function(te, start, end) { + if (start == end) + te.setSelectionRange(start, end); + else { + te.setSelectionRange(start, end - 1); + window.getSelection().modify("extend", "forward", "character"); + } + }; + else + setSelRange = function(te, start, end) { + try {te.setSelectionRange(start, end);} + catch(e) {} // Fails on Firefox when textarea isn't part of the document + }; + } + // IE model. Don't ask. + else { + selRange = function(te) { + try {var range = te.ownerDocument.selection.createRange();} + catch(e) {return null;} + if (!range || range.parentElement() != te) return null; + var val = te.value, len = val.length, localRange = te.createTextRange(); + localRange.moveToBookmark(range.getBookmark()); + var endRange = te.createTextRange(); + endRange.collapse(false); + + if (localRange.compareEndPoints("StartToEnd", endRange) > -1) + return {start: len, end: len}; + + var start = -localRange.moveStart("character", -len); + for (var i = val.indexOf("\r"); i > -1 && i < start; i = val.indexOf("\r", i+1), start++) {} + + if (localRange.compareEndPoints("EndToEnd", endRange) > -1) + return {start: start, end: len}; + + var end = -localRange.moveEnd("character", -len); + for (var i = val.indexOf("\r"); i > -1 && i < end; i = val.indexOf("\r", i+1), end++) {} + return {start: start, end: end}; + }; + setSelRange = function(te, start, end) { + var range = te.createTextRange(); + range.collapse(true); + var endrange = range.duplicate(); + var newlines = 0, txt = te.value; + for (var pos = txt.indexOf("\n"); pos > -1 && pos < start; pos = txt.indexOf("\n", pos + 1)) + ++newlines; + range.move("character", start - newlines); + for (; pos > -1 && pos < end; pos = txt.indexOf("\n", pos + 1)) + ++newlines; + endrange.move("character", end - newlines); + range.setEndPoint("EndToEnd", endrange); + range.select(); + }; + } + + CodeMirror.defineMode("null", function() { + return {token: function(stream) {stream.skipToEnd();}}; + }); + CodeMirror.defineMIME("text/plain", "null"); + + return CodeMirror; +})() +; \ No newline at end of file diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/jquery-1.6.2.min.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/jquery-1.6.2.min.js new file mode 100644 index 0000000..48590ec --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/jquery-1.6.2.min.js @@ -0,0 +1,18 @@ +/*! + * jQuery JavaScript Library v1.6.2 + * http://jquery.com/ + * + * Copyright 2011, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Thu Jun 30 14:16:56 2011 -0400 + */ +(function(a,b){function cv(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cs(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"":"")+""),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cr(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cq(){cn=b}function cp(){setTimeout(cq,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bx(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bm(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(be,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bl(a){f.nodeName(a,"input")?bk(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bk)}function bk(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bj(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bi(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bh(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i=0===c})}function V(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function N(a,b){return(a&&a!=="*"?a+".":"")+b.replace(z,"`").replace(A,"&")}function M(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;ic)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function K(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function E(){return!0}function D(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"$1-$2").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z])/ig,x=function(a,b){return b.toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!A){A=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a);return c===b||D.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(b,c,d){a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),d=c.documentElement,(!d||!d.nodeName||d.nodeName==="parsererror")&&e.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c
a",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0},m&&f.extend(p,{position:"absolute",left:-1e3,top:-1e3});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="
t
",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0),o.innerHTML="",n.removeChild(o);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([a-z])([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g=f.expando,h=typeof c=="string",i,j=a.nodeType,k=j?f.cache:a,l=j?a[f.expando]:a[f.expando]&&f.expando;if((!l||e&&l&&!k[l][g])&&h&&d===b)return;l||(j?a[f.expando]=l=++f.uuid:l=f.expando),k[l]||(k[l]={},j||(k[l].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?k[l][g]=f.extend(k[l][g],c):k[l]=f.extend(k[l],c);i=k[l],e&&(i[g]||(i[g]={}),i=i[g]),d!==b&&(i[f.camelCase(c)]=d);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[f.camelCase(c)]||i[c]:i}},removeData:function(b,c,d){if(!!f.acceptData(b)){var e=f.expando,g=b.nodeType,h=g?f.cache:b,i=g?b[f.expando]:f.expando;if(!h[i])return;if(c){var j=d?h[i][e]:h[i];if(j){delete j[c];if(!l(j))return}}if(d){delete h[i][e];if(!l(h[i]))return}var k=h[i][e];f.support.deleteExpando||h!=a?delete h[i]:h[i]=null,k?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=k):g&&(f.support.deleteExpando?delete b[f.expando]:b.removeAttribute?b.removeAttribute(f.expando):b[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);j&&(c=f.attrFix[c]||c,i=f.attrHooks[c],i||(t.test(c)?i=w:v&&c!=="className"&&(f.nodeName(a,"form")||u.test(c))&&(i=v)));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j&&(h=i.get(a,c))!==null)return h;h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.support.getSetAttribute?a.removeAttribute(b):(f.attr(a,b,""),a.removeAttributeNode(a.getAttributeNode(b))),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},tabIndex:{get:function(a){var c=a.getAttributeNode("tabIndex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}},value:{get:function(a,b){if(v&&f.nodeName(a,"button"))return v.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(v&&f.nodeName(a,"button"))return v.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);i&&(c=f.propFix[c]||c,h=f.propHooks[c]);return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==b?g:a[c]},propHooks:{}}),w={get:function(a,c){return f.prop(a,c)?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},f.support.getSetAttribute||(f.attrFix=f.propFix,v=f.attrHooks.name=f.attrHooks.title=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,c){var d=a.getAttributeNode(c);if(d){d.nodeValue=b;return b}}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var x=/\.(.*)$/,y=/^(?:textarea|input|select)$/i,z=/\./g,A=/ /g,B=/[^\w\s.|`]/g,C=function(a){return a.replace(B,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=D;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=D);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),C).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i. +shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d!=null?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},J=function(c){var d=c.target,e,g;if(!!y.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=I(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:J,beforedeactivate:J,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&J.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&J.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",I(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in H)f.event.add(this,c+".specialChange",H[c]);return y.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return y.test(this.nodeName)}},H=f.event.special.change.filters,H.focus=H.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g0)for(h=g;h0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=T.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a=="string")return f.inArray(this[0],a?f(a):this.parent().children());return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(V(c[0])||V(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=S.call(arguments);O.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!U[a]?f.unique(e):e,(this.length>1||Q.test(d))&&P.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var X=/ jQuery\d+="(?:\d+|null)"/g,Y=/^\s+/,Z=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,$=/<([\w:]+)/,_=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};bf.optgroup=bf.option,bf.tbody=bf.tfoot=bf.colgroup=bf.caption=bf.thead,bf.th=bf.td,f.support.htmlSerialize||(bf._default=[1,"div
","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(X,""):null;if(typeof a=="string"&&!bb.test(a)&&(f.support.leadingWhitespace||!Y.test(a))&&!bf[($.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Z,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j +)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bi(a,d),e=bj(a),g=bj(d);for(h=0;e[h];++h)bi(e[h],g[h])}if(b){bh(a,d);if(c){e=bj(a),g=bj(d);for(h=0;e[h];++h)bh(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!ba.test(k))k=b.createTextNode(k);else{k=k.replace(Z,"<$1>");var l=($.exec(k)||["",""])[1].toLowerCase(),m=bf[l]||bf._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=_.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&Y.test(k)&&o.insertBefore(b.createTextNode(Y.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bo.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle;c.zoom=1;var e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.filter=bn.test(g)?g.replace(bn,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bx(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(by=function(a,c){var d,e,g;c=c.replace(bp,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bz=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bq.test(d)&&br.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bx=by||bz,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bB=/%20/g,bC=/\[\]$/,bD=/\r?\n/g,bE=/#.*$/,bF=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bG=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bH=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,bI=/^(?:GET|HEAD)$/,bJ=/^\/\//,bK=/\?/,bL=/)<[^<]*)*<\/script>/gi,bM=/^(?:select|textarea)/i,bN=/\s+/,bO=/([?&])_=[^&]*/,bP=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bQ=f.fn.load,bR={},bS={},bT,bU;try{bT=e.href}catch(bV){bT=c.createElement("a"),bT.href="",bT=bT.href}bU=bP.exec(bT.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bQ)return bQ.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bL,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bM.test(this.nodeName)||bG.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bD,"\r\n")}}):{name:b.name,value:c.replace(bD,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?f.extend(!0,a,f.ajaxSettings,b):(b=a,a=f.extend(!0,f.ajaxSettings,b));for(var c in{context:1,url:1})c in b?a[c]=b[c]:c in f.ajaxSettings&&(a[c]=f.ajaxSettings[c]);return a},ajaxSettings:{url:bT,isLocal:bH.test(bU[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML}},ajaxPrefilter:bW(bR),ajaxTransport:bW(bS),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a?4:0;var o,r,u,w=l?bZ(d,v,l):b,x,y;if(a>=200&&a<300||a===304){if(d.ifModified){if(x=v.getResponseHeader("Last-Modified"))f.lastModified[k]=x;if(y=v.getResponseHeader("Etag"))f.etag[k]=y}if(a===304)c="notmodified",o=!0;else try{r=b$(d,w),c="success",o=!0}catch(z){c="parsererror",u=z}}else{u=c;if(!c||a)c="error",a<0&&(a=0)}v.status=a,v.statusText=c,o?h.resolveWith(e,[r,c,v]):h.rejectWith(e,[v,c,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,c]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bF.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bE,"").replace(bJ,bU[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bN),d.crossDomain==null&&(r=bP.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bU[1]&&r[2]==bU[2]&&(r[3]||(r[1]==="http:"?80:443))==(bU[3]||(bU[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bX(bR,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bI.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bK.test(d.url)?"&":"?")+d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bO,"$1_="+x);d.url=y+(y===d.url?(bK.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", */*; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bX(bS,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){status<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)bY(g,a[g],c,e);return d.join("&").replace(bB,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var b_=f.now(),ca=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+b_++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ca.test(b.url)||e&&ca.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ca,l),b.url===j&&(e&&(k=k.replace(ca,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cb=a.ActiveXObject?function(){for(var a in cd)cd[a](0,1)}:!1,cc=0,cd;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ce()||cf()}:ce,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cb&&delete cd[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cc,cb&&(cd||(cd={},f(a).unload(cb)),cd[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cg={},ch,ci,cj=/^(?:toggle|show|hide)$/,ck=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cl,cm=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cn,co=a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cr("show",3),a,b,c);for(var g=0,h=this.length;g=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b
";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cu.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cu.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cv(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cv(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a&&a.style?parseFloat(f.css(a,d,"padding")):null},f.fn["outer"+c]=function(a){var b=this[0];return b&&b.style?parseFloat(f.css(b,d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c];return e.document.compatMode==="CSS1Compat"&&g||e.document.body["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var h=f.css(e,d),i=parseFloat(h);return f.isNaN(i)?h:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window); \ No newline at end of file diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/jquery.cookie.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/jquery.cookie.js new file mode 100644 index 0000000..6d5974a --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/jquery.cookie.js @@ -0,0 +1,47 @@ +/*! + * jQuery Cookie Plugin + * https://github.com/carhartl/jquery-cookie + * + * Copyright 2011, Klaus Hartl + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://www.opensource.org/licenses/mit-license.php + * http://www.opensource.org/licenses/GPL-2.0 + */ +(function($) { + $.cookie = function(key, value, options) { + + // key and at least value given, set cookie... + if (arguments.length > 1 && (!/Object/.test(Object.prototype.toString.call(value)) || value === null || value === undefined)) { + options = $.extend({}, options); + + if (value === null || value === undefined) { + options.expires = -1; + } + + if (typeof options.expires === 'number') { + var days = options.expires, t = options.expires = new Date(); + t.setDate(t.getDate() + days); + } + + value = String(value); + + return (document.cookie = [ + encodeURIComponent(key), '=', options.raw ? value : encodeURIComponent(value), + options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE + options.path ? '; path=' + options.path : '', + options.domain ? '; domain=' + options.domain : '', + options.secure ? '; secure' : '' + ].join('')); + } + + // key and possibly options given, get cookie... + options = value || {}; + var decode = options.raw ? function(s) { return s; } : decodeURIComponent; + + var pairs = document.cookie.split('; '); + for (var i = 0, pair; pair = pairs[i] && pairs[i].split('='); i++) { + if (decode(pair[0]) === key) return decode(pair[1] || ''); // IE saves cookies with empty string as "c; ", e.g. without "=" as opposed to EOMB, thus pair[1] may be undefined + } + return null; + }; +})(jQuery); diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/jquery.easydate-0.2.4.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/jquery.easydate-0.2.4.js new file mode 100644 index 0000000..1400bf4 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/jquery.easydate-0.2.4.js @@ -0,0 +1,364 @@ +(function($) +{ + /* + * jQuery EasyDate 0.2.4 ($Rev: 54 $) + * Copyright (c) 2009 Parsha Pourkhomami (parshap@gmail.com) + * Licensed under the MIT license. + */ + + $.easydate = { }; + $.easydate.locales = { }; + $.easydate.locales.enUS = { + "future_format": "%s %t", + "past_format": "%t %s", + "second": "second", + "seconds": "seconds", + "minute": "minute", + "minutes": "minutes", + "hour": "hour", + "hours": "hours", + "day": "day", + "days": "days", + "week": "week", + "weeks": "weeks", + "month": "month", + "months": "months", + "year": "year", + "years": "years", + "yesterday": "yesterday", + "tomorrow": "tomorrow", + "now": "just now", + "ago": "ago", + "in": "in" + }; + + var defaults = { + live: true, + set_title: true, + format_future: true, + format_past: true, + units: [ + { name: "now", limit: 5 }, + { name: "second", limit: 60, in_seconds: 1 }, + { name: "minute", limit: 3600, in_seconds: 60 }, + { name: "hour", limit: 86400, in_seconds: 3600 }, + { name: "yesterday", limit: 172800, past_only: true }, + { name: "tomorrow", limit: 172800, future_only: true }, + { name: "day", limit: 604800, in_seconds: 86400 }, + { name: "week", limit: 2629743, in_seconds: 604800 }, + { name: "month", limit: 31556926, in_seconds: 2629743 }, + { name: "year", limit: Infinity, in_seconds: 31556926 } + ], + uneasy_format: function(date) + { + return date.toLocaleDateString(); + }, + locale: $.easydate.locales.enUS + }; + + // Difference (in milliseconds) between the local system time and the time + // that should be used as "now". This is set by using set_now. + var now_diff = 0; + + // A mapping of unique element IDs of elements that are waiting to be + // updated to the ID of the timeout returned by setTimeOut. + var updates = {}; + + // A la updates, but contains element IDs for elements that are paused. + var paused_updates = {}; + + // A mapping of unique element IDs to the jQuery DOM elements it + // represents. + var elements = {}; + + function __(str, value, settings) + { + if(!isNaN(value) && value != 1) + str = str + "s"; + return settings.locale[str] || str; + } + + // Pauses live updates of elements matching the given selector. If the + // selector argument is omitted then all updating will be paused. + var pause = $.easydate.pause = function(selector) + { + var p = function(element_id) + { + clearTimeout(updates[element_id]); + delete updates[element_id]; + paused_updates[element_id] = true; + }; + + if(!selector) + { + for(var element_id in updates) + p(element_id) + } + else + { + $(selector).each(function() + { + var element_id = jQuery.data(this); + if(!isNaN(updates[element_id])) + p(element_id); + }); + } + }; + + // Pauses updates on paused elements matching the given selector. If no + // selector is provided, all updates will be resumed. + var resume = $.easydate.resume = function(selector) + { + var r = function(element_id) + { + delete paused_updates[element_id]; + update_time(elements[element_id]); + }; + + if(!selector) + { + for(var element_id in paused_updates) + r(element_id); + } + else + { + $(selector).each(function() + { + var element_id = jQuery.data(this); + if(!isNaN(paused_updates[element_id])) + r(element_id); + }); + } + }; + + // Makes all future time calculations relative to the given date argument + // instead of the system clock. The date argument can be a JavaScript Date + // object or a RFC 1123 valid timestamp string. This is useful for + // synchronizing the user's clock with a server-side clock. + var set_now = $.easydate.set_now = function(date) + { + var time; + if(date instanceof Date) + time = date.getTime(); + else + time = Date.parse(date); + + if(isNaN(time)) + return; + + now_diff = time - (new Date()).getTime(); + + // Re-adjust any previously formatted dates. + for(var element_id in elements) + { + if(!isNaN[updates[element_id]]) + clearTimeout(updates[element_id]); + update_time(elements[element_id]); + } + }; + + var get_now = $.easydate.get_now = function() + { + var now = new Date(); + now.setTime(now.getTime() + now_diff); + return now; + }; + + // Formats a Date object to a human-readable localized string. + var format_date = $.easydate.format_date = function(date, options) + { + var settings = $.extend({}, defaults, options); + + var diff = ((get_now().getTime() - date.getTime()) / 1000); + var diff_abs = Math.abs(diff); + + if(isNaN(diff)) + return; + + // Return if we shouldn't format this date because it is in the past + // or future and our setting does not allow it. + if((!settings.format_future && diff < 0) || + (!settings.format_past && diff > 0)) + return; + + for(var i in settings.units) + { + var unit = settings.units[i]; + + // Skip this unit if it's for past dates only and this is a future + // date, or if it's for future dates only and this is a past date. + if((unit.past_only && diff < 0) || (unit.future_only && diff > 0)) + continue; + + if(diff_abs < unit.limit) + { + // Case for units that are not really measurement units - e.g., + // "yesterday" or "now". + if(isNaN(unit.in_seconds)) + return __(unit.name, NaN, settings); + + var val = diff_abs / unit.in_seconds; + val = Math.round(val); + var format_string; + if(diff < 0) + format_string = __("future_format", NaN, settings) + .replace("%s", __("in", NaN, settings)) + else + format_string = __("past_format", NaN, settings) + .replace("%s", __("ago", NaN, settings)) + return format_string + .replace("%t", val + " " + __(unit.name, val, settings)); + } + } + + // The date does not fall into any units' limits - use uneasy format. + return settings.uneasy_format(date); + } + + // Returns how long (in milliseconds) the timout until the next update for + // the given date should be. + function get_timeout_delay(date, settings) + { + var now = get_now(); + var diff = ((now.getTime() - date.getTime()) / 1000); + var diff_abs = Math.abs(diff); + + if(isNaN(diff)) + return; + + var last_limit = 0; + for(var i in settings.units) + { + var unit = settings.units[i]; + + // Skip this unit if it's for past dates only and this is a future + // date, or if it's for future dates only and this is a past date. + if((unit.past_only && diff < 0) || (unit.future_only && diff > 0)) + continue; + + if(diff_abs < unit.limit) + { + // @todo: check edge cases (diff == 0) + if(isNaN(unit.in_seconds)) + { + // This is not a real unit of time, so only update once we + // pass the limit of this unit. + if(diff < 0) + return (last_limit - diff_abs) * 1000 + 100; + else + return (unit.limit - diff_abs) * 1000 + 100; + } + else + { + // Real unit of time - update every tick of this time unit. + if(diff < 0) + return (diff_abs % unit.in_seconds) * 1000 + 100 + else + return (unit.in_seconds - (diff_abs % unit.in_seconds)) * + 1000 + 100 + } + } + last_limit = unit.limit; + } + + // Date is out of range of all units' limits. If this is a future date, + // update once the date comes in range of a future unit. + if(diff < 0) + { + for(var i = settings.units.length - 1; i >= 0; i--) + { + var unit = settings.units[i]; + + if(unit.past_only) + continue; + + return (unit.limit - diff_abs) * 1000 + 100 + } + } + } + + // Returns a date object for the date represented by the given DOM element + // from the following sources (in order): + // 1) element.data("easydate.date") (in case we previously cached it) + // 2) DOM element's title (if it is a valid RFC 1123 timestamp) + // 3) DOM element's innerHTML (if it is a valid RFC 1123 timestamp) + function get_date(element, settings) + { + var date = element.data("easydate.date"); + + if(isNaN(date)) + { + var timestamp; + var time = Date.parse(timestamp = element.attr("title")) || + Date.parse(timestamp = element.html()); + if(!isNaN(time)) + { + date = new Date(); + date.setTime(time); + element.data("easydate.date", date); + if(settings.set_title && !element.attr("title")) + element.attr("title", timestamp); + } + } + + return date; + } + + // Updates the given element's innerHTML based on the time it represents. + function update_time(element) + { + var settings = element.data("easydate.settings"); + + var element_id = $.data(element[0]); + elements[element_id] = element; + delete updates[element_id]; + + var date = get_date(element, settings); + + if(isNaN(date)) + return; + + element.html(format_date(date, settings)); + + if(settings.live) + { + var timeout = get_timeout_delay(date, settings); + if(!isNaN(timeout)) + { + if(timeout > 2147483647) + timeout = 2147483647; // max Firefox timeout delay + + var id = setTimeout( + function() { update_time(element); }, + Math.round(timeout) + ); + updates[element_id] = id; + } + } + } + + $.fn.easydate = function(options) + { + var settings = $.extend({}, defaults, options); + this.data("easydate.settings", settings); + + // Clear any cached dates in case the timestamp has been updated since + // the last easydate() call on any of these elements. + this.removeData("easydate.date"); + + this.each(function() + { + // Make sure that we aren't updating the element multiple times in + // case easydate() was called on the same element more than once. + var element_id = $.data(this); + if(!isNaN(updates[element_id])) + { + clearTimeout(updates[element_id]); + delete updates[element_id]; + } + + update_time($(this)); + }); + }; + +})(jQuery); \ No newline at end of file diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/less-1.2.1.min.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/less-1.2.1.min.js new file mode 100644 index 0000000..89b7637 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/less-1.2.1.min.js @@ -0,0 +1,9 @@ +// +// LESS - Leaner CSS v1.2.1 +// http://lesscss.org +// +// Copyright (c) 2009-2011, Alexis Sellier +// Licensed under the Apache 2.0 License. +// +(function(a,b){function c(b){return a.less[b.split("/")[1]]}function m(){var a=document.getElementsByTagName("style");for(var b=0;b0?d.firstChild.nodeValue!==a.nodeValue&&d.replaceChild(a,d.firstChild):d.appendChild(a)})(document.createTextNode(a));c&&h&&(v("saving "+e+" to cache."),h.setItem(e,a),h.setItem(e+":timestamp",c))}function s(a,b,c,e){function i(b,c,d){b.status>=200&&b.status<300?c(b.responseText,b.getResponseHeader("Last-Modified")):typeof d=="function"&&d(b.status,a)}var f=t(),h=g?!1:d.async;typeof f.overrideMimeType=="function"&&f.overrideMimeType("text/css"),f.open("GET",a,h),f.setRequestHeader("Accept",b||"text/x-less, text/css; q=0.9, */*; q=0.5"),f.send(null),g?f.status===0||f.status>=200&&f.status<300?c(f.responseText):e(f.status,a):h?f.onreadystatechange=function(){f.readyState==4&&i(f,c,e)}:i(f,c,e)}function t(){if(a.XMLHttpRequest)return new XMLHttpRequest;try{return new ActiveXObject("MSXML2.XMLHTTP.3.0")}catch(b){return v("browser doesn't support AJAX."),null}}function u(a){return a&&a.parentNode.removeChild(a)}function v(a){d.env=="development"&&typeof console!="undefined"&&console.log("less: "+a)}function w(a,b){var c="less-error-message:"+q(b),e='
  • {content}
  • ',f=document.createElement("div"),g,h,i=[],j=a.filename||b;f.id=c,f.className="less-error-message",h="

    "+(a.message||"There is an error in your .less file")+"

    "+'

    in '+j+" ";var k=function(a,b,c){a.extract[b]&&i.push(e.replace(/\{line\}/,parseInt(a.line)+(b-1)).replace(/\{class\}/,c).replace(/\{content\}/,a.extract[b]))};a.stack?h+="
    "+a.stack.split("\n").slice(1).join("
    "):a.extract&&(k(a,0,""),k(a,1,"line"),k(a,2,""),h+="on line "+a.line+", column "+(a.column+1)+":

    "+"
      "+i.join("")+"
    "),f.innerHTML=h,r([".less-error-message ul, .less-error-message li {","list-style-type: none;","margin-right: 15px;","padding: 4px 0;","margin: 0;","}",".less-error-message label {","font-size: 12px;","margin-right: 15px;","padding: 4px 0;","color: #cc7777;","}",".less-error-message pre {","color: #dd6666;","padding: 4px 0;","margin: 0;","display: inline-block;","}",".less-error-message pre.line {","color: #ff0000;","}",".less-error-message h3 {","font-size: 20px;","font-weight: bold;","padding: 15px 0 5px 0;","margin: 0;","}",".less-error-message a {","color: #10a","}",".less-error-message .error {","color: red;","font-weight: bold;","padding-bottom: 2px;","border-bottom: 1px dashed red;","}"].join("\n"),{title:"error-message"}),f.style.cssText=["font-family: Arial, sans-serif","border: 1px solid #e00","background-color: #eee","border-radius: 5px","-webkit-border-radius: 5px","-moz-border-radius: 5px","color: #e00","padding: 15px","margin-bottom: 15px"].join(";"),d.env=="development"&&(g=setInterval(function(){document.body&&(document.getElementById(c)?document.body.replaceChild(f,document.getElementById(c)):document.body.insertBefore(f,document.body.firstChild),clearInterval(g))},10))}Array.isArray||(Array.isArray=function(a){return Object.prototype.toString.call(a)==="[object Array]"||a instanceof Array}),Array.prototype.forEach||(Array.prototype.forEach=function(a,b){var c=this.length>>>0;for(var d=0;d>>0,c=new Array(b),d=arguments[1];for(var e=0;e>>0,c=0;if(b===0&&arguments.length===1)throw new TypeError;if(arguments.length>=2)var d=arguments[1];else do{if(c in this){d=this[c++];break}if(++c>=b)throw new TypeError}while(!0);for(;c=b)return-1;c<0&&(c+=b);for(;cn&&(m[i]=m[i].slice(h-n),n=h)}function w(a){var b,c,d,e,f,j,k,l;if(a instanceof Function)return a.call(o.parsers);if(typeof a=="string")b=g.charAt(h)===a?a:null,d=1,v();else{v();if(!(b=a.exec(m[i])))return null;d=b[0].length}if(b){l=h+=d,j=h+m[i].length-d;while(h=0&&b.charAt(c)!=="\n";c--)d++;return{line:typeof a=="number"?(b.slice(0,a).match(/\n/g)||"").length:null,column:d}}function C(a,b){var c=A(a,b),d=B(a.index,c),e=d.line,f=d.column,g=c.split("\n");this.type=a.type||"Syntax",this.message=a.message,this.filename=a.filename||b.filename,this.index=a.index,this.line=typeof e=="number"?e+1:null,this.callLine=a.call&&B(a.call,c)+1,this.callExtract=g[B(a.call,c)],this.stack=a.stack,this.column=f,this.extract=[g[e-1],g[e],g[e+1]]}var g,h,i,j,k,l,m,n,o,q=this,r=function(){},s=this.imports={paths:b&&b.paths||[],queue:[],files:{},contents:{},mime:b&&b.mime,error:null,push:function(a,c){var e=this;this.queue.push(a),d.Parser.importer(a,this.paths,function(b,d,f){e.queue.splice(e.queue.indexOf(a),1),e.files[a]=d,e.contents[a]=f,b&&!e.error&&(e.error=b),c(b,d),e.queue.length===0&&r()},b)}};return this.env=b=b||{},this.optimization="optimization"in this.env?this.env.optimization:1,this.env.filename=this.env.filename||null,o={imports:s,parse:function(a,e){var j,k,p,q,s,t,u=[],v,x=null;h=i=n=l=0,m=[],g=a.replace(/\r\n/g,"\n"),m=function(a){var c=0,d=/[^"'`\{\}\/\(\)]+/g,e=/\/\*(?:[^*]|\*+[^\/*])*\*+\/|\/\/.*/g,f=0,h,i=a[0],j,k;for(var l=0,m,n;l0)throw{type:"Syntax",message:"Missing closing `}`",filename:b.filename};return a.map(function(a){return a.join("")})}([[]]);try{j=new f.Ruleset([],w(this.parsers.primary)),j.root=!0}catch(y){return e(new C(y,b))}j.toCSS=function(a){var e,g,h;return function(e,g){var h=[],i;e=e||{},typeof g=="object"&&!Array.isArray(g)&&(g=Object.keys(g).map(function(a){var b=g[a];return b instanceof f.Value||(b instanceof f.Expression||(b=new f.Expression([b])),b=new f.Value([b])),new f.Rule("@"+a,b,!1,0)}),h=[new f.Ruleset(null,g)]);try{var j=a.call(this,{frames:h}).toCSS([],{compress:e.compress||!1})}catch(k){throw new C(k,b)}if(i=o.imports.error)throw i instanceof C?i:new C(i,b);return e.yuicompress&&d.mode==="node"?c("./cssmin").compressor.cssmin(j):e.compress?j.replace(/(\s)+/g,"$1"):j}}(j.eval);if(h=0&&g.charAt(z)!=="\n";z--)A++;x={type:"Parse",message:"Syntax Error on line "+s,index:h,filename:b.filename,line:s,column:A,extract:[t[s-2],t[s-1],t[s]]}}this.imports.queue.length>0?r=function(){e(x,j)}:e(x,j)},parsers:{primary:function(){var a,b=[];while((a=w(this.mixin.definition)||w(this.rule)||w(this.ruleset)||w(this.mixin.call)||w(this.comment)||w(this.directive))||w(/^[\s\n]+/))a&&b.push(a);return b},comment:function(){var a;if(g.charAt(h)!=="/")return;if(g.charAt(h+1)==="/")return new f.Comment(w(/^\/\/.*/),!0);if(a=w(/^\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/))return new f.Comment(a)},entities:{quoted:function(){var a,b=h,c;g.charAt(b)==="~"&&(b++,c=!0);if(g.charAt(b)!=='"'&&g.charAt(b)!=="'")return;c&&w("~");if(a=w(/^"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/))return new f.Quoted(a[0],a[1]||a[2],c)},keyword:function(){var a;if(a=w(/^[_A-Za-z-][_A-Za-z0-9-]*/))return f.colors.hasOwnProperty(a)?new f.Color(f.colors[a].slice(1)):new f.Keyword(a)},call:function(){var a,c,d=h;if(!(a=/^([\w-]+|%|progid:[\w\.]+)\(/.exec(m[i])))return;a=a[1].toLowerCase();if(a==="url")return null;h+=a.length;if(a==="alpha")return w(this.alpha);w("("),c=w(this.entities.arguments);if(!w(")"))return;if(a)return new f.Call(a,c,d,b.filename)},arguments:function(){var a=[],b;while(b=w(this.entities.assignment)||w(this.expression)){a.push(b);if(!w(","))break}return a},literal:function(){return w(this.entities.dimension)||w(this.entities.color)||w(this.entities.quoted)},assignment:function(){var a,b;if((a=w(/^\w+(?=\s?=)/i))&&w("=")&&(b=w(this.entity)))return new f.Assignment(a,b)},url:function(){var a;if(g.charAt(h)!=="u"||!w(/^url\(/))return;return a=w(this.entities.quoted)||w(this.entities.variable)||w(this.entities.dataURI)||w(/^[-\w%@$\/.&=:;#+?~]+/)||"",x(")"),new f.URL(a.value||a.data||a instanceof f.Variable?a:new f.Anonymous(a),s.paths)},dataURI:function(){var a;if(w(/^data:/)){a={},a.mime=w(/^[^\/]+\/[^,;)]+/)||"",a.charset=w(/^;\s*charset=[^,;)]+/)||"",a.base64=w(/^;\s*base64/)||"",a.data=w(/^,\s*[^)]+/);if(a.data)return a}},variable:function(){var a,c=h;if(g.charAt(h)==="@"&&(a=w(/^@@?[\w-]+/)))return new f.Variable(a,c,b.filename)},color:function(){var a;if(g.charAt(h)==="#"&&(a=w(/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/)))return new f.Color(a[1])},dimension:function(){var a,b=g.charCodeAt(h);if(b>57||b<45||b===47)return;if(a=w(/^(-?\d*\.?\d+)(px|%|em|rem|pc|ex|in|deg|s|ms|pt|cm|mm|rad|grad|turn)?/))return new f.Dimension(a[1],a[2])},javascript:function(){var a,b=h,c;g.charAt(b)==="~"&&(b++,c=!0);if(g.charAt(b)!=="`")return;c&&w("~");if(a=w(/^`([^`]*)`/))return new f.JavaScript(a[1],h,c)}},variable:function(){var a;if(g.charAt(h)==="@"&&(a=w(/^(@[\w-]+)\s*:/)))return a[1]},shorthand:function(){var a,b;if(!z(/^[@\w.%-]+\/[@\w.-]+/))return;if((a=w(this.entity))&&w("/")&&(b=w(this.entity)))return new f.Shorthand(a,b)},mixin:{call:function(){var a=[],c,d,e,i=h,j=g.charAt(h),k=!1;if(j!=="."&&j!=="#")return;while(c=w(/^[#.](?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+/))a.push(new f.Element(d,c,h)),d=w(">");w("(")&&(e=w(this.entities.arguments))&&w(")"),w(this.important)&&(k=!0);if(a.length>0&&(w(";")||z("}")))return new f.mixin.Call(a,e,i,b.filename,k)},definition:function(){var a,b=[],c,d,e,i,j;if(g.charAt(h)!=="."&&g.charAt(h)!=="#"||z(/^[^{]*(;|})/))return;t();if(c=w(/^([#.](?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+)\s*\(/)){a=c[1];while(e=w(this.entities.variable)||w(this.entities.literal)||w(this.entities.keyword)){e instanceof f.Variable?w(":")?(i=x(this.expression,"expected expression"),b.push({name:e.name,value:i})):b.push({name:e.name}):b.push({value:e});if(!w(","))break}x(")"),w(/^when/)&&(j=x(this.conditions,"expected condition")),d=w(this.block);if(d)return new f.mixin.Definition(a,b,d,j);u()}}},entity:function(){return w(this.entities.literal)||w(this.entities.variable)||w(this.entities.url)||w(this.entities.call)||w(this.entities.keyword)||w(this.entities.javascript)||w(this.comment)},end:function(){return w(";")||z("}")},alpha:function(){var a;if(!w(/^\(opacity=/i))return;if(a=w(/^\d+/)||w(this.entities.variable))return x(")"),new f.Alpha(a)},element:function(){var a,b,c,d;c=w(this.combinator),a=w(/^(?:\d+\.\d+|\d+)%/)||w(/^(?:[.#]?|:*)(?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+/)||w("*")||w(this.attribute)||w(/^\([^)@]+\)/),a||w("(")&&(d=w(this.entities.variable))&&w(")")&&(a=new f.Paren(d));if(a)return new f.Element(c,a,h);if(c.value&&c.value.charAt(0)==="&")return new f.Element(c,null,h)},combinator:function(){var a,b=g.charAt(h);if(b===">"||b==="+"||b==="~"){h++;while(g.charAt(h)===" ")h++;return new f.Combinator(b)}if(b==="&"){a="&",h++,g.charAt(h)===" "&&(a="& ");while(g.charAt(h)===" ")h++;return new f.Combinator(a)}if(b===":"&&g.charAt(h+1)===":"){h+=2;while(g.charAt(h)===" ")h++;return new f.Combinator("::")}return g.charAt(h-1)===" "?new f.Combinator(" "):new f.Combinator(null)},selector:function(){var a,b,c=[],d,e;while(b=w(this.element)){d=g.charAt(h),c.push(b);if(d==="{"||d==="}"||d===";"||d===",")break}if(c.length>0)return new f.Selector(c)},tag:function(){return w(/^[a-zA-Z][a-zA-Z-]*[0-9]?/)||w("*")},attribute:function(){var a="",b,c,d;if(!w("["))return;if(b=w(/^[a-zA-Z-]+/)||w(this.entities.quoted))(d=w(/^[|~*$^]?=/))&&(c=w(this.entities.quoted)||w(/^[\w-]+/))?a=[b,d,c.toCSS?c.toCSS():c].join(""):a=b;if(!w("]"))return;if(a)return"["+a+"]"},block:function(){var a;if(w("{")&&(a=w(this.primary))&&w("}"))return a},ruleset:function(){var a=[],b,c,d;t();while(b=w(this.selector)){a.push(b),w(this.comment);if(!w(","))break;w(this.comment)}if(a.length>0&&(c=w(this.block)))return new f.Ruleset(a,c);l=h,u()},rule:function(){var a,b,c=g.charAt(h),d,e;t();if(c==="."||c==="#"||c==="&")return;if(a=w(this.variable)||w(this.property)){a.charAt(0)!="@"&&(e=/^([^@+\/'"*`(;{}-]*);/.exec(m[i]))?(h+=e[0].length-1,b=new f.Anonymous(e[1])):a==="font"?b=w(this.font):b=w(this.value),d=w(this.important);if(b&&w(this.end))return new f.Rule(a,b,d,k);l=h,u()}},"import":function(){var a,b,c=h;if(w(/^@import\s+/)&&(a=w(this.entities.quoted)||w(this.entities.url))){b=w(this.mediaFeatures);if(w(";"))return new f.Import(a,s,b,c)}},mediaFeature:function(){var a=[];do if(e=w(this.entities.keyword))a.push(e);else if(w("(")){p=w(this.property),e=w(this.entity);if(!w(")"))return null;if(p&&e)a.push(new f.Paren(new f.Rule(p,e,null,h,!0)));else{if(!e)return null;a.push(new f.Paren(e))}}while(e);if(a.length>0)return new f.Expression(a)},mediaFeatures:function(){var a,b=[];while(a=w(this.mediaFeature)){b.push(a);if(!w(","))break}return b.length>0?b:null},media:function(){var a;if(w(/^@media/)){a=w(this.mediaFeatures);if(rules=w(this.block))return new f.Directive("@media",rules,a)}},directive:function(){var a,b,c,d,e,i;if(g.charAt(h)!=="@")return;if(b=w(this["import"])||w(this.media))return b;if(a=w(/^@page|@keyframes/)||w(/^@(?:-webkit-|-moz-|-o-|-ms-)[a-z0-9-]+/)){d=(w(/^[^{]+/)||"").trim();if(c=w(this.block))return new f.Directive(a+" "+d,c)}else if(a=w(/^@[-a-z]+/))if(a==="@font-face"){if(c=w(this.block))return new f.Directive(a,c)}else if((b=w(this.entity))&&w(";"))return new f.Directive(a,b)},font:function(){var a=[],b=[],c,d,e,g;while(g=w(this.shorthand)||w(this.entity))b.push(g);a.push(new f.Expression(b));if(w(","))while(g=w(this.expression)){a.push(g);if(!w(","))break}return new f.Value(a)},value:function(){var a,b=[],c;while(a=w(this.expression)){b.push(a);if(!w(","))break}if(b.length>0)return new f.Value(b)},important:function(){if(g.charAt(h)==="!")return w(/^! *important/)},sub:function(){var a;if(w("(")&&(a=w(this.expression))&&w(")"))return a},multiplication:function(){var a,b,c,d;if(a=w(this.operand)){while(!z(/^\/\*/)&&(c=w("/")||w("*"))&&(b=w(this.operand)))d=new f.Operation(c,[d||a,b]);return d||a}},addition:function(){var a,b,c,d;if(a=w(this.multiplication)){while((c=w(/^[-+]\s+/)||g.charAt(h-1)!=" "&&(w("+")||w("-")))&&(b=w(this.multiplication)))d=new f.Operation(c,[d||a,b]);return d||a}},conditions:function(){var a,b,c=h,d;if(a=w(this.condition)){while(w(",")&&(b=w(this.condition)))d=new f.Condition("or",d||a,b,c);return d||a}},condition:function(){var a,b,c,d,e=h,g=!1;w(/^not/)&&(g=!0),x("(");if(a=w(this.addition)||w(this.entities.keyword)||w(this.entities.quoted))return(d=w(/^(?:>=|=<|[<=>])/))?(b=w(this.addition)||w(this.entities.keyword)||w(this.entities.quoted))?c=new f.Condition(d,a,b,e,g):y("expected expression"):c=new f.Condition("=",a,new f.Keyword("true"),e,g),x(")"),w(/^and/)?new f.Condition("and",c,w(this.condition)):c},operand:function(){var a,b=g.charAt(h+1);g.charAt(h)==="-"&&(b==="@"||b==="(")&&(a=w("-"));var c=w(this.sub)||w(this.entities.dimension)||w(this.entities.color)||w(this.entities.variable)||w(this.entities.call);return a?new f.Operation("*",[new f.Dimension(-1),c]):c},expression:function(){var a,b,c=[],d;while(a=w(this.addition)||w(this.entity))c.push(a);if(c.length>0)return new f.Expression(c)},property:function(){var a;if(a=w(/^(\*?-?[-a-z_0-9]+)\s*:/))return a[1]}}}};if(d.mode==="browser"||d.mode==="rhino")d.Parser.importer=function(a,b,c,d){a.charAt(0)!=="/"&&b.length>0&&(a=b[0]+a),o({href:a,title:a,type:d.mime},c,!0)};(function(a){function b(b){return a.functions.hsla(b.h,b.s,b.l,b.a)}function c(b){if(b instanceof a.Dimension)return parseFloat(b.unit=="%"?b.value/100:b.value);if(typeof b=="number")return b;throw{error:"RuntimeError",message:"color functions take numbers as parameters"}}function d(a){return Math.min(1,Math.max(0,a))}a.functions={rgb:function(a,b,c){return this.rgba(a,b,c,1)},rgba:function(b,d,e,f){var g=[b,d,e].map(function(a){return c(a)}),f=c(f);return new a.Color(g,f)},hsl:function(a,b,c){return this.hsla(a,b,c,1)},hsla:function(a,b,d,e){function h(a){return a=a<0?a+1:a>1?a-1:a,a*6<1?g+(f-g)*a*6:a*2<1?f:a*3<2?g+(f-g)*(2/3-a)*6:g}a=c(a)%360/360,b=c(b),d=c(d),e=c(e);var f=d<=.5?d*(b+1):d+b-d*b,g=d*2-f;return this.rgba(h(a+1/3)*255,h(a)*255,h(a-1/3)*255,e)},hue:function(b){return new a.Dimension(Math.round(b.toHSL().h))},saturation:function(b){return new a.Dimension(Math.round(b.toHSL().s*100),"%")},lightness:function(b){return new a.Dimension(Math.round(b.toHSL().l*100),"%")},alpha:function(b){return new a.Dimension(b.toHSL().a)},saturate:function(a,c){var e=a.toHSL();return e.s+=c.value/100,e.s=d(e.s),b(e)},desaturate:function(a,c){var e=a.toHSL();return e.s-=c.value/100,e.s=d(e.s),b(e)},lighten:function(a,c){var e=a.toHSL();return e.l+=c.value/100,e.l=d(e.l),b(e)},darken:function(a,c){var e=a.toHSL();return e.l-=c.value/100,e.l=d(e.l),b(e)},fadein:function(a,c){var e=a.toHSL();return e.a+=c.value/100,e.a=d(e.a),b(e)},fadeout:function(a,c){var e=a.toHSL();return e.a-=c.value/100,e.a=d(e.a),b(e)},fade:function(a,c){var e=a.toHSL();return e.a=c.value/100,e.a=d(e.a),b(e)},spin:function(a,c){var d=a.toHSL(),e=(d.h+c.value)%360;return d.h=e<0?360+e:e,b(d)},mix:function(b,c,d){var e=d.value/100,f=e*2-1,g=b.toHSL().a-c.toHSL().a,h=((f*g==-1?f:(f+g)/(1+f*g))+1)/2,i=1-h,j=[b.rgb[0]*h+c.rgb[0]*i,b.rgb[1]*h+c.rgb[1]*i,b.rgb[2]*h+c.rgb[2]*i],k=b.alpha*e+c.alpha*(1-e);return new a.Color(j,k)},greyscale:function(b){return this.desaturate(b,new a.Dimension(100))},e:function(b){return new a.Anonymous(b instanceof a.JavaScript?b.evaluated:b)},escape:function(b){return new a.Anonymous(encodeURI(b.value).replace(/=/g,"%3D").replace(/:/g,"%3A").replace(/#/g,"%23").replace(/;/g,"%3B").replace(/\(/g,"%28").replace(/\)/g,"%29"))},"%":function(b){var c=Array.prototype.slice.call(arguments,1),d=b.value;for(var e=0;e255?255:a<0?0:a).toString(16),a.length===1?"0"+a:a}).join("")},operate:function(b,c){var d=[];c instanceof a.Color||(c=c.toColor());for(var e=0;e<3;e++)d[e]=a.operate(b,this.rgb[e],c.rgb[e]);return new a.Color(d,this.alpha+c.alpha)},toHSL:function(){var a=this.rgb[0]/255,b=this.rgb[1]/255,c=this.rgb[2]/255,d=this.alpha,e=Math.max(a,b,c),f=Math.min(a,b,c),g,h,i=(e+f)/2,j=e-f;if(e===f)g=h=0;else{h=i>.5?j/(2-e-f):j/(e+f);switch(e){case a:g=(b-c)/j+(b255?255:a<0?0:a).toString(16),a.length===1?"0"+a:a}).join("")}}}(c("../tree")),function(a){a.Comment=function(a,b){this.value=a,this.silent=!!b},a.Comment.prototype={toCSS:function(a){return a.compress?"":this.value},eval:function(){return this}}}(c("../tree")),function(a){a.Condition=function(a,b,c,d,e){this.op=a.trim(),this.lvalue=b,this.rvalue=c,this.index=d,this.negate=e},a.Condition.prototype.eval=function(a){var b=this.lvalue.eval(a),c=this.rvalue.eval(a),d=this.index,e,e=function(a){switch(a){case"and":return b&&c;case"or":return b||c;default:if(b.compare)e=b.compare(c);else{if(!c.compare)throw{type:"Type",message:"Unable to perform comparison",index:d};e=c.compare(b)}switch(e){case-1:return a==="<"||a==="=<";case 0:return a==="="||a===">="||a==="=<";case 1:return a===">"||a===">="}}}(this.op);return this.negate?!e:e}}(c("../tree")),function(a){a.Dimension=function(a,b){this.value=parseFloat(a),this.unit=b||null},a.Dimension.prototype={eval:function(){return this},toColor:function(){return new a.Color([this.value,this.value,this.value])},toCSS:function(){var a=this.value+this.unit;return a},operate:function(b,c){return new a.Dimension(a.operate(b,this.value,c.value),this.unit||c.unit)},compare:function(b){return b instanceof a.Dimension?b.value>this.value?-1:b.value":a.compress?">":" > "}[this.value]}}(c("../tree")),function(a){a.Expression=function(a){this.value=a},a.Expression.prototype={eval:function(b){return this.value.length>1?new a.Expression(this.value.map(function(a){return a.eval(b)})):this.value.length===1?this.value[0].eval(b):this},toCSS:function(a){return this.value.map(function(b){return b.toCSS?b.toCSS(a):""}).join(" ")}}}(c("../tree")),function(a){a.Import=function(b,c,d,e){var f=this;this.index=e,this._path=b,this.features=d&&new a.Value(d),b instanceof a.Quoted?this.path=/\.(le?|c)ss(\?.*)?$/.test(b.value)?b.value:b.value+".less":this.path=b.value.value||b.value,this.css=/css(\?.*)?$/.test(this.path),this.css||c.push(this.path,function(b,c){b&&(b.index=e),f.root=c||new a.Ruleset([],[])})},a.Import.prototype={toCSS:function(a){var b=this.features?" "+this.features.toCSS(a):"";return this.css?"@import "+this._path.toCSS()+b+";\n":""},eval:function(b){var c,d=this.features&&this.features.eval(b);if(this.css)return this;c=new a.Ruleset([],this.root.rules.slice(0));for(var e=0;e0){c=this.arguments&&this.arguments.map(function(b){return b.eval(a)});for(var g=0;g0&&c>this.params.length)return!1;if(this.condition&&!this.condition.eval({frames:[this.evalParams(b,a)].concat(b.frames)}))return!1;d=Math.min(c,this.arity);for(var f=0;fe.selectors[g].elements.length?Array.prototype.push.apply(d,e.find(new a.Selector(b.elements.slice(1)),c)):d.push(e);break}}),this._lookups[g]=d)},toCSS:function(b,c){var d=[],e=[],f=[],g=[],h,i;this.root||(b.length===0?g=this.selectors.map(function(a){return[a]}):this.joinSelectors(g,b,this.selectors));for(var j=0;j0&&(h=g.map(function(a){return a.map(function(a){return a.toCSS(c)}).join("").trim()}).join(c.compress?",":g.length>3?",\n":", "),d.push(h,(c.compress?"{":" {\n ")+e.join(c.compress?"":"\n ")+(c.compress?"}":"\n}\n"))),d.push(f),d.join("")+(c.compress?"\n":"")},joinSelectors:function(a,b,c){for(var d=0;d0&&e.push(new a.Selector(g)),h.length>0&&f.push(new a.Selector(h));for(var l=0;l0&&(b.value=c[0]+(b.value.charAt(0)==="/"?b.value.slice(1):b.value)),this.value=b,this.paths=c)},b.URL.prototype={toCSS:function(){return"url("+(this.attrs?"data:"+this.attrs.mime+this.attrs.charset+this.attrs.base64+this.attrs.data:this.value.toCSS())+")"},eval:function(a){return this.attrs?this:new b.URL(this.value.eval(a),this.paths)}}}(c("../tree")),function(a){a.Value=function(a){this.value=a,this.is="value"},a.Value.prototype={eval:function(b){return this.value.length===1?this.value[0].eval(b):new a.Value(this.value.map(function(a){return a.eval(b)}))},toCSS:function(a){return this.value.map(function(b){return b.toCSS(a)}).join(a.compress?",":", ")}}}(c("../tree")),function(a){a.Variable=function(a,b,c){this.name=a,this.index=b,this.file=c},a.Variable.prototype={eval:function(b){var c,d,e=this.name;e.indexOf("@@")==0&&(e="@"+(new a.Variable(e.slice(1))).eval(b).value);if(c=a.find(b.frames,function(a){if(d=a.variable(e))return d.value.eval(b)}))return c;throw{type:"Name",message:"variable "+e+" is undefined",filename:this.file,index:this.index}}}}(c("../tree")),function(a){a.find=function(a,b){for(var c=0,d;c1?"["+a.value.map(function(a){return a.toCSS(!1)}).join(", ")+"]":a.toCSS(!1)}}(c("./tree"));var g=location.protocol==="file:"||location.protocol==="chrome:"||location.protocol==="chrome-extension:"||location.protocol==="resource:";d.env=d.env||(location.hostname=="127.0.0.1"||location.hostname=="0.0.0.0"||location.hostname=="localhost"||location.port.length>0||g?"development":"production"),d.async=!1,d.poll=d.poll||(g?1e3:1500),d.watch=function(){return this.watchMode=!0},d.unwatch=function(){return this.watchMode=!1},d.env==="development"?(d.optimization=0,/!watch/.test(location.hash)&&d.watch(),d.watchTimer=setInterval(function(){d.watchMode&&n(function(a,b,c,d,e){b&&r(b.toCSS(),d,e.lastModified)})},d.poll)):d.optimization=3;var h;try{h=typeof a.localStorage=="undefined"?null:a.localStorage}catch(i){h=null}var j=document.getElementsByTagName("link"),k=/^text\/(x-)?less$/;d.sheets=[];for(var l=0;l!?|\/]/; + + var curPunc; + + function tokenBase(stream, state) { + var ch = stream.next(); + if (hooks[ch]) { + var result = hooks[ch](stream, state); + if (result !== false) return result; + } + if (ch == '"' || ch == "'") { + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } + if (/[\[\]{}\(\),;\:\.]/.test(ch)) { + curPunc = ch; + return null + } + if (/\d/.test(ch)) { + stream.eatWhile(/[\w\.]/); + return "number"; + } + if (ch == "/") { + if (stream.eat("*")) { + state.tokenize = tokenComment; + return tokenComment(stream, state); + } + if (stream.eat("/")) { + stream.skipToEnd(); + return "comment"; + } + } + if (isOperatorChar.test(ch)) { + stream.eatWhile(isOperatorChar); + return "operator"; + } + stream.eatWhile(/[\w\$_]/); + var cur = stream.current(); + if (keywords.propertyIsEnumerable(cur)) { + if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement"; + return "keyword"; + } + if (atoms.propertyIsEnumerable(cur)) return "atom"; + return "word"; + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, next, end = false; + while ((next = stream.next()) != null) { + if (next == quote && !escaped) {end = true; break;} + escaped = !escaped && next == "\\"; + } + if (end || !(escaped || multiLineStrings)) + state.tokenize = tokenBase; + return "string"; + }; + } + + function tokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == "/" && maybeEnd) { + state.tokenize = tokenBase; + break; + } + maybeEnd = (ch == "*"); + } + return "comment"; + } + + function Context(indented, column, type, align, prev) { + this.indented = indented; + this.column = column; + this.type = type; + this.align = align; + this.prev = prev; + } + function pushContext(state, col, type) { + return state.context = new Context(state.indented, col, type, null, state.context); + } + function popContext(state) { + var t = state.context.type; + if (t == ")" || t == "]" || t == "}") + state.indented = state.context.indented; + return state.context = state.context.prev; + } + + // Interface + + return { + startState: function(basecolumn) { + return { + tokenize: null, + context: new Context((basecolumn || 0) - indentUnit, 0, "top", false), + indented: 0, + startOfLine: true + }; + }, + + token: function(stream, state) { + var ctx = state.context; + if (stream.sol()) { + if (ctx.align == null) ctx.align = false; + state.indented = stream.indentation(); + state.startOfLine = true; + } + if (stream.eatSpace()) return null; + curPunc = null; + var style = (state.tokenize || tokenBase)(stream, state); + if (style == "comment" || style == "meta") return style; + if (ctx.align == null) ctx.align = true; + + if ((curPunc == ";" || curPunc == ":") && ctx.type == "statement") popContext(state); + else if (curPunc == "{") pushContext(state, stream.column(), "}"); + else if (curPunc == "[") pushContext(state, stream.column(), "]"); + else if (curPunc == "(") pushContext(state, stream.column(), ")"); + else if (curPunc == "}") { + while (ctx.type == "statement") ctx = popContext(state); + if (ctx.type == "}") ctx = popContext(state); + while (ctx.type == "statement") ctx = popContext(state); + } + else if (curPunc == ctx.type) popContext(state); + else if (ctx.type == "}" || ctx.type == "top" || (ctx.type == "statement" && curPunc == "newstatement")) + pushContext(state, stream.column(), "statement"); + state.startOfLine = false; + return style; + }, + + indent: function(state, textAfter) { + if (state.tokenize != tokenBase && state.tokenize != null) return 0; + var firstChar = textAfter && textAfter.charAt(0), ctx = state.context, closing = firstChar == ctx.type; + if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : indentUnit); + else if (ctx.align) return ctx.column + (closing ? 0 : 1); + else return ctx.indented + (closing ? 0 : indentUnit); + }, + + electricChars: "{}" + }; +}); + +(function() { + function words(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + var cKeywords = "auto if break int case long char register continue return default short do sizeof " + + "double static else struct entry switch extern typedef float union for unsigned " + + "goto while enum void const signed volatile"; + + function cppHook(stream, state) { + if (!state.startOfLine) return false; + stream.skipToEnd(); + return "meta"; + } + + // C#-style strings where "" escapes a quote. + function tokenAtString(stream, state) { + var next; + while ((next = stream.next()) != null) { + if (next == '"' && !stream.eat('"')) { + state.tokenize = null; + break; + } + } + return "string"; + } + + CodeMirror.defineMIME("text/x-csrc", { + name: "clike", + keywords: words(cKeywords), + blockKeywords: words("case do else for if switch while struct"), + atoms: words("null"), + hooks: {"#": cppHook} + }); + CodeMirror.defineMIME("text/x-c++src", { + name: "clike", + keywords: words(cKeywords + " asm dynamic_cast namespace reinterpret_cast try bool explicit new " + + "static_cast typeid catch operator template typename class friend private " + + "this using const_cast inline public throw virtual delete mutable protected " + + "wchar_t"), + blockKeywords: words("catch class do else finally for if struct switch try while"), + atoms: words("true false null"), + hooks: {"#": cppHook} + }); + CodeMirror.defineMIME("text/x-java", { + name: "clike", + keywords: words("abstract assert boolean break byte case catch char class const continue default " + + "do double else enum extends final finally float for goto if implements import " + + "instanceof int interface long native new package private protected public " + + "return short static strictfp super switch synchronized this throw throws transient " + + "try void volatile while"), + blockKeywords: words("catch class do else finally for if switch try while"), + atoms: words("true false null"), + hooks: { + "@": function(stream, state) { + stream.eatWhile(/[\w\$_]/); + return "meta"; + } + } + }); + CodeMirror.defineMIME("text/x-csharp", { + name: "clike", + keywords: words("abstract as base bool break byte case catch char checked class const continue decimal" + + " default delegate do double else enum event explicit extern finally fixed float for" + + " foreach goto if implicit in int interface internal is lock long namespace new object" + + " operator out override params private protected public readonly ref return sbyte sealed short" + + " sizeof stackalloc static string struct switch this throw try typeof uint ulong unchecked" + + " unsafe ushort using virtual void volatile while add alias ascending descending dynamic from get" + + " global group into join let orderby partial remove select set value var yield"), + blockKeywords: words("catch class do else finally for foreach if struct switch try while"), + atoms: words("true false null"), + hooks: { + "@": function(stream, state) { + if (stream.eat('"')) { + state.tokenize = tokenAtString; + return tokenAtString(stream, state); + } + stream.eatWhile(/[\w\$_]/); + return "meta"; + } + } + }); + CodeMirror.defineMIME("text/x-groovy", { + name: "clike", + keywords: words("abstract as assert boolean break byte case catch char class const continue def default " + + "do double else enum extends final finally float for goto if implements import " + + "in instanceof int interface long native new package property private protected public " + + "return short static strictfp super switch synchronized this throw throws transient " + + "try void volatile while"), + atoms: words("true false null"), + hooks: { + "@": function(stream, state) { + stream.eatWhile(/[\w\$_]/); + return "meta"; + } + } + }); +}()); diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/clike/index.html b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/clike/index.html new file mode 100644 index 0000000..89241c0 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/clike/index.html @@ -0,0 +1,102 @@ + + + + CodeMirror 2: C-like mode + + + + + + + + +

    CodeMirror 2: C-like mode

    + +
    + + + +

    Simple mode that tries to handle C-like languages as well as it + can. Takes two configuration parameters: keywords, an + object whose property names are the keywords in the language, + and useCPP, which determines whether C preprocessor + directives are recognized.

    + +

    MIME types defined: text/x-csrc + (C code), text/x-c++src (C++ + code), text/x-java (Java + code), text/x-groovy (Groovy code).

    + + diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/coffeescript/LICENSE b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/coffeescript/LICENSE new file mode 100644 index 0000000..977e284 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/coffeescript/LICENSE @@ -0,0 +1,22 @@ +The MIT License + +Copyright (c) 2011 Jeff Pickhardt +Modified from the Python CodeMirror mode, Copyright (c) 2010 Timothy Farrell + +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. \ No newline at end of file diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/coffeescript/coffeescript.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/coffeescript/coffeescript.js new file mode 100644 index 0000000..86db42a --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/coffeescript/coffeescript.js @@ -0,0 +1,308 @@ +/** + * Link to the project's GitHub page: + * https://github.com/pickhardt/coffeescript-codemirror-mode + */ +CodeMirror.defineMode('coffeescript', function(conf) { + var ERRORCLASS = 'error'; + + function wordRegexp(words) { + return new RegExp("^((" + words.join(")|(") + "))\\b"); + } + + var singleOperators = new RegExp("^[\\+\\-\\*/%&|\\^~<>!\?]"); + var singleDelimiters = new RegExp('^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]'); + var doubleOperators = new RegExp("^((\\+\\+)|(\\+\\=)|(\\-\\-)|(\\-\\=)|(\\*\\*)|(\\*\\=)|(\\/\\/)|(\\/\\=)|(==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(//))"); + var doubleDelimiters = new RegExp("^((\->)|(\\.\\.)|(\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"); + var tripleDelimiters = new RegExp("^((\\.\\.\\.)|(//=)|(>>=)|(<<=)|(\\*\\*=))"); + var identifiers = new RegExp("^[_A-Za-z][_A-Za-z0-9]*"); + + var wordOperators = wordRegexp(['and', 'or', 'not', + 'is', 'isnt', 'in', + 'instanceof', 'typeof']); + var commonKeywords = ['break', 'by', 'catch', 'class', 'continue', + 'debugger', 'delete', 'do', 'else', 'finally', + 'for', 'in', 'of', 'if', 'new', 'return', + 'switch', 'then', 'this', 'throw', 'try', + 'unless', 'when', 'while', 'until', 'loop']; + var keywords = wordRegexp(commonKeywords); + + + var stringPrefixes = new RegExp("^(([rub]|(ur)|(br))?('{3}|\"{3}|['\"]))", "i"); + var commonConstants = ['Infinity', 'NaN', 'undefined', 'true', 'false', 'yes', 'no', 'on', 'off', 'null']; + var constants = wordRegexp(commonConstants); + + // Tokenizers + function tokenBase(stream, state) { + // Handle scope changes + if (stream.sol()) { + var scopeOffset = state.scopes[0].offset; + if (stream.eatSpace()) { + var lineOffset = stream.indentation(); + if (lineOffset > scopeOffset) { + return 'indent'; + } else if (lineOffset < scopeOffset) { + return 'dedent'; + } + return null; + } else { + if (scopeOffset > 0) { + dedent(stream, state); + } + } + } + if (stream.eatSpace()) { + return null; + } + + var ch = stream.peek(); + + // Handle comments + if (ch === '#') { + stream.skipToEnd(); + return 'comment'; + } + + // Handle number literals + if (stream.match(/^-?[0-9\.]/, false)) { + var floatLiteral = false; + // Floats + if (stream.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)) { + floatLiteral = true; + } + if (stream.match(/^-?\d+\.\d*/)) { + floatLiteral = true; + } + if (stream.match(/^-?\.\d+/)) { + floatLiteral = true; + } + if (floatLiteral) { + return 'number'; + } + // Integers + var intLiteral = false; + // Hex + if (stream.match(/^-?0x[0-9a-f]+/i)) { + intLiteral = true; + } + // Decimal + if (stream.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)) { + intLiteral = true; + } + // Zero by itself with no other piece of number. + if (stream.match(/^-?0(?![\dx])/i)) { + intLiteral = true; + } + if (intLiteral) { + return 'number'; + } + } + + // Handle strings + if (stream.match(stringPrefixes)) { + state.tokenize = tokenStringFactory(stream.current()); + return state.tokenize(stream, state); + } + + // Handle operators and delimiters + if (stream.match(tripleDelimiters) || stream.match(doubleDelimiters)) { + return 'punctuation'; + } + if (stream.match(doubleOperators) + || stream.match(singleOperators) + || stream.match(wordOperators)) { + return 'operator'; + } + if (stream.match(singleDelimiters)) { + return 'punctuation'; + } + + if (stream.match(constants)) { + return 'atom'; + } + + if (stream.match(keywords)) { + return 'keyword'; + } + + if (stream.match(identifiers)) { + return 'variable'; + } + + // Handle non-detected items + stream.next(); + return ERRORCLASS; + } + + function tokenStringFactory(delimiter) { + while ('rub'.indexOf(delimiter[0].toLowerCase()) >= 0) { + delimiter = delimiter.substr(1); + } + var delim_re = new RegExp(delimiter); + var singleline = delimiter.length == 1; + var OUTCLASS = 'string'; + + return function tokenString(stream, state) { + while (!stream.eol()) { + stream.eatWhile(/[^'"\\]/); + if (stream.eat('\\')) { + stream.next(); + if (singleline && stream.eol()) { + return OUTCLASS; + } + } else if (stream.match(delim_re)) { + state.tokenize = tokenBase; + return OUTCLASS; + } else { + stream.eat(/['"]/); + } + } + if (singleline) { + if (conf.mode.singleLineStringErrors) { + OUTCLASS = ERRORCLASS + } else { + state.tokenize = tokenBase; + } + } + return OUTCLASS; + }; + } + + function indent(stream, state, type) { + type = type || 'coffee'; + var indentUnit = 0; + if (type === 'coffee') { + for (var i = 0; i < state.scopes.length; i++) { + if (state.scopes[i].type === 'coffee') { + indentUnit = state.scopes[i].offset + conf.indentUnit; + break; + } + } + } else { + indentUnit = stream.column() + stream.current().length; + } + state.scopes.unshift({ + offset: indentUnit, + type: type + }); + } + + function dedent(stream, state) { + if (state.scopes.length == 1) return; + if (state.scopes[0].type === 'coffee') { + var _indent = stream.indentation(); + var _indent_index = -1; + for (var i = 0; i < state.scopes.length; ++i) { + if (_indent === state.scopes[i].offset) { + _indent_index = i; + break; + } + } + if (_indent_index === -1) { + return true; + } + while (state.scopes[0].offset !== _indent) { + state.scopes.shift(); + } + return false + } else { + state.scopes.shift(); + return false; + } + } + + function tokenLexer(stream, state) { + var style = state.tokenize(stream, state); + var current = stream.current(); + + // Handle '.' connected identifiers + if (current === '.') { + style = state.tokenize(stream, state); + current = stream.current(); + if (style === 'variable') { + return 'variable'; + } else { + return ERRORCLASS; + } + } + + // Handle decorators + if (current === '@') { + style = state.tokenize(stream, state); + current = stream.current(); + if (style === 'variable') { + return 'variable-2'; + } else { + return ERRORCLASS; + } + } + + // Handle scope changes. + if (current === 'pass' || current === 'return') { + state.dedent += 1; + } + if ((current === '->' && + !state.lambda && + state.scopes[0].type == 'coffee' && + stream.peek() === '') + || style === 'indent') { + indent(stream, state); + } + var delimiter_index = '[({'.indexOf(current); + if (delimiter_index !== -1) { + indent(stream, state, '])}'.slice(delimiter_index, delimiter_index+1)); + } + if (style === 'dedent') { + if (dedent(stream, state)) { + return ERRORCLASS; + } + } + delimiter_index = '])}'.indexOf(current); + if (delimiter_index !== -1) { + if (dedent(stream, state)) { + return ERRORCLASS; + } + } + if (state.dedent > 0 && stream.eol() && state.scopes[0].type == 'coffee') { + if (state.scopes.length > 1) state.scopes.shift(); + state.dedent -= 1; + } + + return style; + } + + var external = { + startState: function(basecolumn) { + return { + tokenize: tokenBase, + scopes: [{offset:basecolumn || 0, type:'coffee'}], + lastToken: null, + lambda: false, + dedent: 0 + }; + }, + + token: function(stream, state) { + var style = tokenLexer(stream, state); + + state.lastToken = {style:style, content: stream.current()}; + + if (stream.eol() && stream.lambda) { + state.lambda = false; + } + + return style; + }, + + indent: function(state, textAfter) { + if (state.tokenize != tokenBase) { + return 0; + } + + return state.scopes[0].offset; + } + + }; + return external; +}); + +CodeMirror.defineMIME('text/x-coffeescript', 'coffeescript'); diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/coffeescript/index.html b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/coffeescript/index.html new file mode 100644 index 0000000..c1984df --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/coffeescript/index.html @@ -0,0 +1,722 @@ + + + + CodeMirror 2: CoffeeScript mode + + + + + + + + +

    CodeMirror 2: CoffeeScript mode

    +
    + + +

    MIME types defined: text/x-coffeescript.

    + +

    The CoffeeScript mode was written by Jeff Pickhardt (license).

    + + + diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/css/css.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/css/css.js new file mode 100644 index 0000000..6c239fc --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/css/css.js @@ -0,0 +1,124 @@ +CodeMirror.defineMode("css", function(config) { + var indentUnit = config.indentUnit, type; + function ret(style, tp) {type = tp; return style;} + + function tokenBase(stream, state) { + var ch = stream.next(); + if (ch == "@") {stream.eatWhile(/\w/); return ret("meta", stream.current());} + else if (ch == "/" && stream.eat("*")) { + state.tokenize = tokenCComment; + return tokenCComment(stream, state); + } + else if (ch == "<" && stream.eat("!")) { + state.tokenize = tokenSGMLComment; + return tokenSGMLComment(stream, state); + } + else if (ch == "=") ret(null, "compare"); + else if ((ch == "~" || ch == "|") && stream.eat("=")) return ret(null, "compare"); + else if (ch == "\"" || ch == "'") { + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } + else if (ch == "#") { + stream.eatWhile(/\w/); + return ret("atom", "hash"); + } + else if (ch == "!") { + stream.match(/^\s*\w*/); + return ret("keyword", "important"); + } + else if (/\d/.test(ch)) { + stream.eatWhile(/[\w.%]/); + return ret("number", "unit"); + } + else if (/[,.+>*\/]/.test(ch)) { + return ret(null, "select-op"); + } + else if (/[;{}:\[\]]/.test(ch)) { + return ret(null, ch); + } + else { + stream.eatWhile(/[\w\\\-_]/); + return ret("variable", "variable"); + } + } + + function tokenCComment(stream, state) { + var maybeEnd = false, ch; + while ((ch = stream.next()) != null) { + if (maybeEnd && ch == "/") { + state.tokenize = tokenBase; + break; + } + maybeEnd = (ch == "*"); + } + return ret("comment", "comment"); + } + + function tokenSGMLComment(stream, state) { + var dashes = 0, ch; + while ((ch = stream.next()) != null) { + if (dashes >= 2 && ch == ">") { + state.tokenize = tokenBase; + break; + } + dashes = (ch == "-") ? dashes + 1 : 0; + } + return ret("comment", "comment"); + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, ch; + while ((ch = stream.next()) != null) { + if (ch == quote && !escaped) + break; + escaped = !escaped && ch == "\\"; + } + if (!escaped) state.tokenize = tokenBase; + return ret("string", "string"); + }; + } + + return { + startState: function(base) { + return {tokenize: tokenBase, + baseIndent: base || 0, + stack: []}; + }, + + token: function(stream, state) { + if (stream.eatSpace()) return null; + var style = state.tokenize(stream, state); + + var context = state.stack[state.stack.length-1]; + if (type == "hash" && context == "rule") style = "atom"; + else if (style == "variable") { + if (context == "rule") style = "number"; + else if (!context || context == "@media{") style = "tag"; + } + + if (context == "rule" && /^[\{\};]$/.test(type)) + state.stack.pop(); + if (type == "{") { + if (context == "@media") state.stack[state.stack.length-1] = "@media{"; + else state.stack.push("{"); + } + else if (type == "}") state.stack.pop(); + else if (type == "@media") state.stack.push("@media"); + else if (context == "{" && type != "comment") state.stack.push("rule"); + return style; + }, + + indent: function(state, textAfter) { + var n = state.stack.length; + if (/^\}/.test(textAfter)) + n -= state.stack[state.stack.length-1] == "rule" ? 2 : 1; + return state.baseIndent + n * indentUnit; + }, + + electricChars: "}" + }; +}); + +CodeMirror.defineMIME("text/css", "css"); diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/css/index.html b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/css/index.html new file mode 100644 index 0000000..7d01e36 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/css/index.html @@ -0,0 +1,56 @@ + + + + CodeMirror 2: CSS mode + + + + + + + + +

    CodeMirror 2: CSS mode

    +
    + + +

    MIME types defined: text/css.

    + + + diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/diff/diff.css b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/diff/diff.css new file mode 100644 index 0000000..16f8d33 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/diff/diff.css @@ -0,0 +1,3 @@ +.cm-s-default span.cm-rangeinfo {color: #a0b;} +.cm-s-default span.cm-minus {color: #a22;} +.cm-s-default span.cm-plus {color: #2b2;} diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/diff/diff.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/diff/diff.js new file mode 100644 index 0000000..725bb2c --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/diff/diff.js @@ -0,0 +1,13 @@ +CodeMirror.defineMode("diff", function() { + return { + token: function(stream) { + var ch = stream.next(); + stream.skipToEnd(); + if (ch == "+") return "plus"; + if (ch == "-") return "minus"; + if (ch == "@") return "rangeinfo"; + } + }; +}); + +CodeMirror.defineMIME("text/x-diff", "diff"); diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/diff/index.html b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/diff/index.html new file mode 100644 index 0000000..2748f2f --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/diff/index.html @@ -0,0 +1,99 @@ + + + + CodeMirror 2: Diff mode + + + + + + + + +

    CodeMirror 2: Diff mode

    +
    + + +

    MIME types defined: text/x-diff.

    + + + diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/haskell/haskell.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/haskell/haskell.js new file mode 100644 index 0000000..aac5041 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/haskell/haskell.js @@ -0,0 +1,242 @@ +CodeMirror.defineMode("haskell", function(cmCfg, modeCfg) { + + function switchState(source, setState, f) { + setState(f); + return f(source, setState); + } + + // These should all be Unicode extended, as per the Haskell 2010 report + var smallRE = /[a-z_]/; + var largeRE = /[A-Z]/; + var digitRE = /[0-9]/; + var hexitRE = /[0-9A-Fa-f]/; + var octitRE = /[0-7]/; + var idRE = /[a-z_A-Z0-9']/; + var symbolRE = /[-!#$%&*+.\/<=>?@\\^|~:]/; + var specialRE = /[(),;[\]`{}]/; + var whiteCharRE = /[ \t\v\f]/; // newlines are handled in tokenizer + + function normal(source, setState) { + if (source.eatWhile(whiteCharRE)) { + return null; + } + + var ch = source.next(); + if (specialRE.test(ch)) { + if (ch == '{' && source.eat('-')) { + var t = "comment"; + if (source.eat('#')) { + t = "meta"; + } + return switchState(source, setState, ncomment(t, 1)); + } + return null; + } + + if (ch == '\'') { + if (source.eat('\\')) { + source.next(); // should handle other escapes here + } + else { + source.next(); + } + if (source.eat('\'')) { + return "string"; + } + return "error"; + } + + if (ch == '"') { + return switchState(source, setState, stringLiteral); + } + + if (largeRE.test(ch)) { + source.eatWhile(idRE); + if (source.eat('.')) { + return "qualifier"; + } + return "variable-2"; + } + + if (smallRE.test(ch)) { + source.eatWhile(idRE); + return "variable"; + } + + if (digitRE.test(ch)) { + if (ch == '0') { + if (source.eat(/[xX]/)) { + source.eatWhile(hexitRE); // should require at least 1 + return "integer"; + } + if (source.eat(/[oO]/)) { + source.eatWhile(octitRE); // should require at least 1 + return "number"; + } + } + source.eatWhile(digitRE); + var t = "number"; + if (source.eat('.')) { + t = "number"; + source.eatWhile(digitRE); // should require at least 1 + } + if (source.eat(/[eE]/)) { + t = "number"; + source.eat(/[-+]/); + source.eatWhile(digitRE); // should require at least 1 + } + return t; + } + + if (symbolRE.test(ch)) { + if (ch == '-' && source.eat(/-/)) { + source.eatWhile(/-/); + if (!source.eat(symbolRE)) { + source.skipToEnd(); + return "comment"; + } + } + var t = "variable"; + if (ch == ':') { + t = "variable-2"; + } + source.eatWhile(symbolRE); + return t; + } + + return "error"; + } + + function ncomment(type, nest) { + if (nest == 0) { + return normal; + } + return function(source, setState) { + var currNest = nest; + while (!source.eol()) { + var ch = source.next(); + if (ch == '{' && source.eat('-')) { + ++currNest; + } + else if (ch == '-' && source.eat('}')) { + --currNest; + if (currNest == 0) { + setState(normal); + return type; + } + } + } + setState(ncomment(type, currNest)); + return type; + } + } + + function stringLiteral(source, setState) { + while (!source.eol()) { + var ch = source.next(); + if (ch == '"') { + setState(normal); + return "string"; + } + if (ch == '\\') { + if (source.eol() || source.eat(whiteCharRE)) { + setState(stringGap); + return "string"; + } + if (source.eat('&')) { + } + else { + source.next(); // should handle other escapes here + } + } + } + setState(normal); + return "error"; + } + + function stringGap(source, setState) { + if (source.eat('\\')) { + return switchState(source, setState, stringLiteral); + } + source.next(); + setState(normal); + return "error"; + } + + + var wellKnownWords = (function() { + var wkw = {}; + function setType(t) { + return function () { + for (var i = 0; i < arguments.length; i++) + wkw[arguments[i]] = t; + } + } + + setType("keyword")( + "case", "class", "data", "default", "deriving", "do", "else", "foreign", + "if", "import", "in", "infix", "infixl", "infixr", "instance", "let", + "module", "newtype", "of", "then", "type", "where", "_"); + + setType("keyword")( + "\.\.", ":", "::", "=", "\\", "\"", "<-", "->", "@", "~", "=>"); + + setType("builtin")( + "!!", "$!", "$", "&&", "+", "++", "-", ".", "/", "/=", "<", "<=", "=<<", + "==", ">", ">=", ">>", ">>=", "^", "^^", "||", "*", "**"); + + setType("builtin")( + "Bool", "Bounded", "Char", "Double", "EQ", "Either", "Enum", "Eq", + "False", "FilePath", "Float", "Floating", "Fractional", "Functor", "GT", + "IO", "IOError", "Int", "Integer", "Integral", "Just", "LT", "Left", + "Maybe", "Monad", "Nothing", "Num", "Ord", "Ordering", "Rational", "Read", + "ReadS", "Real", "RealFloat", "RealFrac", "Right", "Show", "ShowS", + "String", "True"); + + setType("builtin")( + "abs", "acos", "acosh", "all", "and", "any", "appendFile", "asTypeOf", + "asin", "asinh", "atan", "atan2", "atanh", "break", "catch", "ceiling", + "compare", "concat", "concatMap", "const", "cos", "cosh", "curry", + "cycle", "decodeFloat", "div", "divMod", "drop", "dropWhile", "either", + "elem", "encodeFloat", "enumFrom", "enumFromThen", "enumFromThenTo", + "enumFromTo", "error", "even", "exp", "exponent", "fail", "filter", + "flip", "floatDigits", "floatRadix", "floatRange", "floor", "fmap", + "foldl", "foldl1", "foldr", "foldr1", "fromEnum", "fromInteger", + "fromIntegral", "fromRational", "fst", "gcd", "getChar", "getContents", + "getLine", "head", "id", "init", "interact", "ioError", "isDenormalized", + "isIEEE", "isInfinite", "isNaN", "isNegativeZero", "iterate", "last", + "lcm", "length", "lex", "lines", "log", "logBase", "lookup", "map", + "mapM", "mapM_", "max", "maxBound", "maximum", "maybe", "min", "minBound", + "minimum", "mod", "negate", "not", "notElem", "null", "odd", "or", + "otherwise", "pi", "pred", "print", "product", "properFraction", + "putChar", "putStr", "putStrLn", "quot", "quotRem", "read", "readFile", + "readIO", "readList", "readLn", "readParen", "reads", "readsPrec", + "realToFrac", "recip", "rem", "repeat", "replicate", "return", "reverse", + "round", "scaleFloat", "scanl", "scanl1", "scanr", "scanr1", "seq", + "sequence", "sequence_", "show", "showChar", "showList", "showParen", + "showString", "shows", "showsPrec", "significand", "signum", "sin", + "sinh", "snd", "span", "splitAt", "sqrt", "subtract", "succ", "sum", + "tail", "take", "takeWhile", "tan", "tanh", "toEnum", "toInteger", + "toRational", "truncate", "uncurry", "undefined", "unlines", "until", + "unwords", "unzip", "unzip3", "userError", "words", "writeFile", "zip", + "zip3", "zipWith", "zipWith3"); + + return wkw; + })(); + + + + return { + startState: function () { return { f: normal }; }, + copyState: function (s) { return { f: s.f }; }, + + token: function(stream, state) { + var t = state.f(stream, function(s) { state.f = s; }); + var w = stream.current(); + return (w in wellKnownWords) ? wellKnownWords[w] : t; + } + }; + +}); + +CodeMirror.defineMIME("text/x-haskell", "haskell"); diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/haskell/index.html b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/haskell/index.html new file mode 100644 index 0000000..6ea7f5e --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/haskell/index.html @@ -0,0 +1,60 @@ + + + + CodeMirror 2: Haskell mode + + + + + + + + +

    CodeMirror 2: Haskell mode

    + +
    + + + +

    MIME types defined: text/x-haskell.

    + + diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/htmlembedded/htmlembedded.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/htmlembedded/htmlembedded.js new file mode 100644 index 0000000..08e170e --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/htmlembedded/htmlembedded.js @@ -0,0 +1,68 @@ +CodeMirror.defineMode("htmlembedded", function(config, parserConfig) { + + //config settings + var scriptStartRegex = parserConfig.scriptStartRegex || /^<%/i, + scriptEndRegex = parserConfig.scriptEndRegex || /^%>/i; + + //inner modes + var scriptingMode, htmlMixedMode; + + //tokenizer when in html mode + function htmlDispatch(stream, state) { + if (stream.match(scriptStartRegex, false)) { + state.token=scriptingDispatch; + return scriptingMode.token(stream, state.scriptState); + } + else + return htmlMixedMode.token(stream, state.htmlState); + } + + //tokenizer when in scripting mode + function scriptingDispatch(stream, state) { + if (stream.match(scriptEndRegex, false)) { + state.token=htmlDispatch; + return htmlMixedMode.token(stream, state.htmlState); + } + else + return scriptingMode.token(stream, state.scriptState); + } + + + return { + startState: function() { + scriptingMode = scriptingMode || CodeMirror.getMode(config, parserConfig.scriptingModeSpec); + htmlMixedMode = htmlMixedMode || CodeMirror.getMode(config, "htmlmixed"); + return { + token : parserConfig.startOpen ? scriptingDispatch : htmlDispatch, + htmlState : htmlMixedMode.startState(), + scriptState : scriptingMode.startState() + } + }, + + token: function(stream, state) { + return state.token(stream, state); + }, + + indent: function(state, textAfter) { + if (state.token == htmlDispatch) + return htmlMixedMode.indent(state.htmlState, textAfter); + else + return scriptingMode.indent(state.scriptState, textAfter); + }, + + copyState: function(state) { + return { + token : state.token, + htmlState : CodeMirror.copyState(htmlMixedMode, state.htmlState), + scriptState : CodeMirror.copyState(scriptingMode, state.scriptState) + } + }, + + + electricChars: "/{}:" + } +}); + +CodeMirror.defineMIME("application/x-ejs", { name: "htmlembedded", scriptingModeSpec:"javascript"}); +CodeMirror.defineMIME("application/x-aspx", { name: "htmlembedded", scriptingModeSpec:"text/x-csharp"}); +CodeMirror.defineMIME("application/x-jsp", { name: "htmlembedded", scriptingModeSpec:"text/x-java"}); diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/htmlembedded/index.html b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/htmlembedded/index.html new file mode 100644 index 0000000..f895bea --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/htmlembedded/index.html @@ -0,0 +1,49 @@ + + + + CodeMirror 2: Html Embedded Scripts mode + + + + + + + + + + + +

    CodeMirror 2: Html Embedded Scripts mode

    + +
    + + + +

    Mode for html embedded scripts like JSP and ASP.NET. Depends on HtmlMixed which in turn depends on + JavaScript, CSS and XML.
    Other dependancies include those of the scriping language chosen.

    + +

    MIME types defined: application/x-aspx (ASP.NET), + application/x-ejs (Embedded Javascript), application/x-jsp (JavaServer Pages)

    + + diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/htmlmixed/htmlmixed.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/htmlmixed/htmlmixed.js new file mode 100644 index 0000000..fa30a13 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/htmlmixed/htmlmixed.js @@ -0,0 +1,79 @@ +CodeMirror.defineMode("htmlmixed", function(config, parserConfig) { + var htmlMode = CodeMirror.getMode(config, {name: "xml", htmlMode: true}); + var jsMode = CodeMirror.getMode(config, "javascript"); + var cssMode = CodeMirror.getMode(config, "css"); + + function html(stream, state) { + var style = htmlMode.token(stream, state.htmlState); + if (style == "tag" && stream.current() == ">" && state.htmlState.context) { + if (/^script$/i.test(state.htmlState.context.tagName)) { + state.token = javascript; + state.localState = jsMode.startState(htmlMode.indent(state.htmlState, "")); + state.mode = "javascript"; + } + else if (/^style$/i.test(state.htmlState.context.tagName)) { + state.token = css; + state.localState = cssMode.startState(htmlMode.indent(state.htmlState, "")); + state.mode = "css"; + } + } + return style; + } + function maybeBackup(stream, pat, style) { + var cur = stream.current(); + var close = cur.search(pat); + if (close > -1) stream.backUp(cur.length - close); + return style; + } + function javascript(stream, state) { + if (stream.match(/^<\/\s*script\s*>/i, false)) { + state.token = html; + state.curState = null; + state.mode = "html"; + return html(stream, state); + } + return maybeBackup(stream, /<\/\s*script\s*>/, + jsMode.token(stream, state.localState)); + } + function css(stream, state) { + if (stream.match(/^<\/\s*style\s*>/i, false)) { + state.token = html; + state.localState = null; + state.mode = "html"; + return html(stream, state); + } + return maybeBackup(stream, /<\/\s*style\s*>/, + cssMode.token(stream, state.localState)); + } + + return { + startState: function() { + var state = htmlMode.startState(); + return {token: html, localState: null, mode: "html", htmlState: state}; + }, + + copyState: function(state) { + if (state.localState) + var local = CodeMirror.copyState(state.token == css ? cssMode : jsMode, state.localState); + return {token: state.token, localState: local, mode: state.mode, + htmlState: CodeMirror.copyState(htmlMode, state.htmlState)}; + }, + + token: function(stream, state) { + return state.token(stream, state); + }, + + indent: function(state, textAfter) { + if (state.token == html || /^\s*<\//.test(textAfter)) + return htmlMode.indent(state.htmlState, textAfter); + else if (state.token == javascript) + return jsMode.indent(state.localState, textAfter); + else + return cssMode.indent(state.localState, textAfter); + }, + + electricChars: "/{}:" + } +}); + +CodeMirror.defineMIME("text/html", "htmlmixed"); diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/htmlmixed/index.html b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/htmlmixed/index.html new file mode 100644 index 0000000..6d62b35 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/htmlmixed/index.html @@ -0,0 +1,52 @@ + + + + CodeMirror 2: HTML mixed mode + + + + + + + + + + + +

    CodeMirror 2: HTML mixed mode

    +
    + + +

    The HTML mixed mode depends on the XML, JavaScript, and CSS modes.

    + +

    MIME types defined: text/html + (redefined, only takes effect if you load this parser after the + XML parser).

    + + + diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/javascript/index.html b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/javascript/index.html new file mode 100644 index 0000000..2454c81 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/javascript/index.html @@ -0,0 +1,78 @@ + + + + CodeMirror 2: JavaScript mode + + + + + + + + +

    CodeMirror 2: JavaScript mode

    + +
    + + + +

    JavaScript mode supports a single configuration + option, json, which will set the mode to expect JSON + data rather than a JavaScript program.

    + +

    MIME types defined: text/javascript, application/json.

    + + diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/javascript/javascript.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/javascript/javascript.js new file mode 100644 index 0000000..b411aef --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/javascript/javascript.js @@ -0,0 +1,350 @@ +CodeMirror.defineMode("javascript", function(config, parserConfig) { + var indentUnit = config.indentUnit; + var jsonMode = parserConfig.json; + + // Tokenizer + + var keywords = function(){ + function kw(type) {return {type: type, style: "keyword"};} + var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c"); + var operator = kw("operator"), atom = {type: "atom", style: "atom"}; + return { + "if": A, "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B, + "return": C, "break": C, "continue": C, "new": C, "delete": C, "throw": C, + "var": kw("var"), "function": kw("function"), "catch": kw("catch"), + "for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"), + "in": operator, "typeof": operator, "instanceof": operator, + "true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom + }; + }(); + + var isOperatorChar = /[+\-*&%=<>!?|]/; + + function chain(stream, state, f) { + state.tokenize = f; + return f(stream, state); + } + + function nextUntilUnescaped(stream, end) { + var escaped = false, next; + while ((next = stream.next()) != null) { + if (next == end && !escaped) + return false; + escaped = !escaped && next == "\\"; + } + return escaped; + } + + // Used as scratch variables to communicate multiple values without + // consing up tons of objects. + var type, content; + function ret(tp, style, cont) { + type = tp; content = cont; + return style; + } + + function jsTokenBase(stream, state) { + var ch = stream.next(); + if (ch == '"' || ch == "'") + return chain(stream, state, jsTokenString(ch)); + else if (/[\[\]{}\(\),;\:\.]/.test(ch)) + return ret(ch); + else if (ch == "0" && stream.eat(/x/i)) { + stream.eatWhile(/[\da-f]/i); + return ret("number", "number"); + } + else if (/\d/.test(ch)) { + stream.match(/^\d*(?:\.\d*)?(?:e[+\-]?\d+)?/); + return ret("number", "number"); + } + else if (ch == "/") { + if (stream.eat("*")) { + return chain(stream, state, jsTokenComment); + } + else if (stream.eat("/")) { + stream.skipToEnd(); + return ret("comment", "comment"); + } + else if (state.reAllowed) { + nextUntilUnescaped(stream, "/"); + stream.eatWhile(/[gimy]/); // 'y' is "sticky" option in Mozilla + return ret("regexp", "string"); + } + else { + stream.eatWhile(isOperatorChar); + return ret("operator", null, stream.current()); + } + } + else if (isOperatorChar.test(ch)) { + stream.eatWhile(isOperatorChar); + return ret("operator", null, stream.current()); + } else if (ch == '#') { + stream.skipToEnd(); + return ret("error", "error"); + } else { + stream.eatWhile(/[\w\$_]/); + var word = stream.current(), known = keywords.propertyIsEnumerable(word) && keywords[word]; + return known ? ret(known.type, known.style, word) : + ret("variable", "variable", word); + } + } + + function jsTokenString(quote) { + return function(stream, state) { + if (!nextUntilUnescaped(stream, quote)) + state.tokenize = jsTokenBase; + return ret("string", "string"); + }; + } + + function jsTokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == "/" && maybeEnd) { + state.tokenize = jsTokenBase; + break; + } + maybeEnd = (ch == "*"); + } + return ret("comment", "comment"); + } + + // Parser + + var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true, "regexp": true}; + + function JSLexical(indented, column, type, align, prev, info) { + this.indented = indented; + this.column = column; + this.type = type; + this.prev = prev; + this.info = info; + if (align != null) this.align = align; + } + + function inScope(state, varname) { + for (var v = state.localVars; v; v = v.next) + if (v.name == varname) return true; + } + + function parseJS(state, style, type, content, stream) { + var cc = state.cc; + // Communicate our context to the combinators. + // (Less wasteful than consing up a hundred closures on every call.) + cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; + + if (!state.lexical.hasOwnProperty("align")) + state.lexical.align = true; + + while(true) { + var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement; + if (combinator(type, content)) { + while(cc.length && cc[cc.length - 1].lex) + cc.pop()(); + if (cx.marked) return cx.marked; + if (type == "variable" && inScope(state, content)) return "variable-2"; + return style; + } + } + } + + // Combinator utils + + var cx = {state: null, column: null, marked: null, cc: null}; + function pass() { + for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]); + } + function cont() { + pass.apply(null, arguments); + return true; + } + function register(varname) { + var state = cx.state; + if (state.context) { + cx.marked = "def"; + for (var v = state.localVars; v; v = v.next) + if (v.name == varname) return; + state.localVars = {name: varname, next: state.localVars}; + } + } + + // Combinators + + var defaultVars = {name: "this", next: {name: "arguments"}}; + function pushcontext() { + if (!cx.state.context) cx.state.localVars = defaultVars; + cx.state.context = {prev: cx.state.context, vars: cx.state.localVars}; + } + function popcontext() { + cx.state.localVars = cx.state.context.vars; + cx.state.context = cx.state.context.prev; + } + function pushlex(type, info) { + var result = function() { + var state = cx.state; + state.lexical = new JSLexical(state.indented, cx.stream.column(), type, null, state.lexical, info) + }; + result.lex = true; + return result; + } + function poplex() { + var state = cx.state; + if (state.lexical.prev) { + if (state.lexical.type == ")") + state.indented = state.lexical.indented; + state.lexical = state.lexical.prev; + } + } + poplex.lex = true; + + function expect(wanted) { + return function expecting(type) { + if (type == wanted) return cont(); + else if (wanted == ";") return pass(); + else return cont(arguments.callee); + }; + } + + function statement(type) { + if (type == "var") return cont(pushlex("vardef"), vardef1, expect(";"), poplex); + if (type == "keyword a") return cont(pushlex("form"), expression, statement, poplex); + if (type == "keyword b") return cont(pushlex("form"), statement, poplex); + if (type == "{") return cont(pushlex("}"), block, poplex); + if (type == ";") return cont(); + if (type == "function") return cont(functiondef); + if (type == "for") return cont(pushlex("form"), expect("("), pushlex(")"), forspec1, expect(")"), + poplex, statement, poplex); + if (type == "variable") return cont(pushlex("stat"), maybelabel); + if (type == "switch") return cont(pushlex("form"), expression, pushlex("}", "switch"), expect("{"), + block, poplex, poplex); + if (type == "case") return cont(expression, expect(":")); + if (type == "default") return cont(expect(":")); + if (type == "catch") return cont(pushlex("form"), pushcontext, expect("("), funarg, expect(")"), + statement, poplex, popcontext); + return pass(pushlex("stat"), expression, expect(";"), poplex); + } + function expression(type) { + if (atomicTypes.hasOwnProperty(type)) return cont(maybeoperator); + if (type == "function") return cont(functiondef); + if (type == "keyword c") return cont(expression); + if (type == "(") return cont(pushlex(")"), expression, expect(")"), poplex, maybeoperator); + if (type == "operator") return cont(expression); + if (type == "[") return cont(pushlex("]"), commasep(expression, "]"), poplex, maybeoperator); + if (type == "{") return cont(pushlex("}"), commasep(objprop, "}"), poplex, maybeoperator); + return cont(); + } + function maybeoperator(type, value) { + if (type == "operator" && /\+\+|--/.test(value)) return cont(maybeoperator); + if (type == "operator") return cont(expression); + if (type == ";") return; + if (type == "(") return cont(pushlex(")"), commasep(expression, ")"), poplex, maybeoperator); + if (type == ".") return cont(property, maybeoperator); + if (type == "[") return cont(pushlex("]"), expression, expect("]"), poplex, maybeoperator); + } + function maybelabel(type) { + if (type == ":") return cont(poplex, statement); + return pass(maybeoperator, expect(";"), poplex); + } + function property(type) { + if (type == "variable") {cx.marked = "property"; return cont();} + } + function objprop(type) { + if (type == "variable") cx.marked = "property"; + if (atomicTypes.hasOwnProperty(type)) return cont(expect(":"), expression); + } + function commasep(what, end) { + function proceed(type) { + if (type == ",") return cont(what, proceed); + if (type == end) return cont(); + return cont(expect(end)); + } + return function commaSeparated(type) { + if (type == end) return cont(); + else return pass(what, proceed); + }; + } + function block(type) { + if (type == "}") return cont(); + return pass(statement, block); + } + function vardef1(type, value) { + if (type == "variable"){register(value); return cont(vardef2);} + return cont(); + } + function vardef2(type, value) { + if (value == "=") return cont(expression, vardef2); + if (type == ",") return cont(vardef1); + } + function forspec1(type) { + if (type == "var") return cont(vardef1, forspec2); + if (type == ";") return pass(forspec2); + if (type == "variable") return cont(formaybein); + return pass(forspec2); + } + function formaybein(type, value) { + if (value == "in") return cont(expression); + return cont(maybeoperator, forspec2); + } + function forspec2(type, value) { + if (type == ";") return cont(forspec3); + if (value == "in") return cont(expression); + return cont(expression, expect(";"), forspec3); + } + function forspec3(type) { + if (type != ")") cont(expression); + } + function functiondef(type, value) { + if (type == "variable") {register(value); return cont(functiondef);} + if (type == "(") return cont(pushlex(")"), pushcontext, commasep(funarg, ")"), poplex, statement, popcontext); + } + function funarg(type, value) { + if (type == "variable") {register(value); return cont();} + } + + // Interface + + return { + startState: function(basecolumn) { + return { + tokenize: jsTokenBase, + reAllowed: true, + cc: [], + lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false), + localVars: null, + context: null, + indented: 0 + }; + }, + + token: function(stream, state) { + if (stream.sol()) { + if (!state.lexical.hasOwnProperty("align")) + state.lexical.align = false; + state.indented = stream.indentation(); + } + if (stream.eatSpace()) return null; + var style = state.tokenize(stream, state); + if (type == "comment") return style; + state.reAllowed = type == "operator" || type == "keyword c" || type.match(/^[\[{}\(,;:]$/); + return parseJS(state, style, type, content, stream); + }, + + indent: function(state, textAfter) { + if (state.tokenize != jsTokenBase) return 0; + var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical, + type = lexical.type, closing = firstChar == type; + if (type == "vardef") return lexical.indented + 4; + else if (type == "form" && firstChar == "{") return lexical.indented; + else if (type == "stat" || type == "form") return lexical.indented + indentUnit; + else if (lexical.info == "switch" && !closing) + return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit); + else if (lexical.align) return lexical.column + (closing ? 0 : 1); + else return lexical.indented + (closing ? 0 : indentUnit); + }, + + electricChars: ":{}" + }; +}); + +CodeMirror.defineMIME("text/javascript", "javascript"); +CodeMirror.defineMIME("application/json", {name: "javascript", json: true}); diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/lua/index.html b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/lua/index.html new file mode 100644 index 0000000..532973a --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/lua/index.html @@ -0,0 +1,72 @@ + + + + CodeMirror 2: Lua mode + + + + + + + + +

    CodeMirror 2: Lua mode

    +
    + + +

    Loosely based on Franciszek + Wawrzak's CodeMirror + 1 mode. One configuration parameter is + supported, specials, to which you can provide an + array of strings to have those identifiers highlighted with + the lua-special style.

    +

    MIME types defined: text/x-lua.

    + + + diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/lua/lua.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/lua/lua.js new file mode 100644 index 0000000..491ad59 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/lua/lua.js @@ -0,0 +1,138 @@ +// LUA mode. Ported to CodeMirror 2 from Franciszek Wawrzak's +// CodeMirror 1 mode. +// highlights keywords, strings, comments (no leveling supported! ("[==[")), tokens, basic indenting + +CodeMirror.defineMode("lua", function(config, parserConfig) { + var indentUnit = config.indentUnit; + + function prefixRE(words) { + return new RegExp("^(?:" + words.join("|") + ")", "i"); + } + function wordRE(words) { + return new RegExp("^(?:" + words.join("|") + ")$", "i"); + } + var specials = wordRE(parserConfig.specials || []); + + // long list of standard functions from lua manual + var builtins = wordRE([ + "_G","_VERSION","assert","collectgarbage","dofile","error","getfenv","getmetatable","ipairs","load", + "loadfile","loadstring","module","next","pairs","pcall","print","rawequal","rawget","rawset","require", + "select","setfenv","setmetatable","tonumber","tostring","type","unpack","xpcall", + + "coroutine.create","coroutine.resume","coroutine.running","coroutine.status","coroutine.wrap","coroutine.yield", + + "debug.debug","debug.getfenv","debug.gethook","debug.getinfo","debug.getlocal","debug.getmetatable", + "debug.getregistry","debug.getupvalue","debug.setfenv","debug.sethook","debug.setlocal","debug.setmetatable", + "debug.setupvalue","debug.traceback", + + "close","flush","lines","read","seek","setvbuf","write", + + "io.close","io.flush","io.input","io.lines","io.open","io.output","io.popen","io.read","io.stderr","io.stdin", + "io.stdout","io.tmpfile","io.type","io.write", + + "math.abs","math.acos","math.asin","math.atan","math.atan2","math.ceil","math.cos","math.cosh","math.deg", + "math.exp","math.floor","math.fmod","math.frexp","math.huge","math.ldexp","math.log","math.log10","math.max", + "math.min","math.modf","math.pi","math.pow","math.rad","math.random","math.randomseed","math.sin","math.sinh", + "math.sqrt","math.tan","math.tanh", + + "os.clock","os.date","os.difftime","os.execute","os.exit","os.getenv","os.remove","os.rename","os.setlocale", + "os.time","os.tmpname", + + "package.cpath","package.loaded","package.loaders","package.loadlib","package.path","package.preload", + "package.seeall", + + "string.byte","string.char","string.dump","string.find","string.format","string.gmatch","string.gsub", + "string.len","string.lower","string.match","string.rep","string.reverse","string.sub","string.upper", + + "table.concat","table.insert","table.maxn","table.remove","table.sort" + ]); + var keywords = wordRE(["and","break","elseif","false","nil","not","or","return", + "true","function", "end", "if", "then", "else", "do", + "while", "repeat", "until", "for", "in", "local" ]); + + var indentTokens = wordRE(["function", "if","repeat","for","while", "\\(", "{"]); + var dedentTokens = wordRE(["end", "until", "\\)", "}"]); + var dedentPartial = prefixRE(["end", "until", "\\)", "}", "else", "elseif"]); + + function readBracket(stream) { + var level = 0; + while (stream.eat("=")) ++level; + stream.eat("["); + return level; + } + + function normal(stream, state) { + var ch = stream.next(); + if (ch == "-" && stream.eat("-")) { + if (stream.eat("[")) + return (state.cur = bracketed(readBracket(stream), "comment"))(stream, state); + stream.skipToEnd(); + return "comment"; + } + if (ch == "\"" || ch == "'") + return (state.cur = string(ch))(stream, state); + if (ch == "[" && /[\[=]/.test(stream.peek())) + return (state.cur = bracketed(readBracket(stream), "string"))(stream, state); + if (/\d/.test(ch)) { + stream.eatWhile(/[\w.%]/); + return "number"; + } + if (/[\w_]/.test(ch)) { + stream.eatWhile(/[\w\\\-_.]/); + return "variable"; + } + return null; + } + + function bracketed(level, style) { + return function(stream, state) { + var curlev = null, ch; + while ((ch = stream.next()) != null) { + if (curlev == null) {if (ch == "]") curlev = 0;} + else if (ch == "=") ++curlev; + else if (ch == "]" && curlev == level) { state.cur = normal; break; } + else curlev = null; + } + return style; + }; + } + + function string(quote) { + return function(stream, state) { + var escaped = false, ch; + while ((ch = stream.next()) != null) { + if (ch == quote && !escaped) break; + escaped = !escaped && ch == "\\"; + } + if (!escaped) state.cur = normal; + return "string"; + }; + } + + return { + startState: function(basecol) { + return {basecol: basecol || 0, indentDepth: 0, cur: normal}; + }, + + token: function(stream, state) { + if (stream.eatSpace()) return null; + var style = state.cur(stream, state); + var word = stream.current(); + if (style == "variable") { + if (keywords.test(word)) style = "keyword"; + else if (builtins.test(word)) style = "builtin"; + else if (specials.test(word)) style = "variable-2"; + } + if (indentTokens.test(word)) ++state.indentDepth; + else if (dedentTokens.test(word)) --state.indentDepth; + return style; + }, + + indent: function(state, textAfter) { + var closing = dedentPartial.test(textAfter); + return state.basecol + indentUnit * (state.indentDepth - (closing ? 1 : 0)); + } + }; +}); + +CodeMirror.defineMIME("text/x-lua", "lua"); diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/markdown/index.html b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/markdown/index.html new file mode 100644 index 0000000..cae8df4 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/markdown/index.html @@ -0,0 +1,338 @@ + + + + CodeMirror: Markdown mode + + + + + + + + +

    CodeMirror: Markdown mode

    + + +
    + + + +

    MIME types defined: text/x-markdown.

    + + + diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/markdown/markdown.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/markdown/markdown.js new file mode 100644 index 0000000..af95753 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/markdown/markdown.js @@ -0,0 +1,245 @@ +CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) { + + var htmlMode = CodeMirror.getMode(cmCfg, { name: 'xml', htmlMode: true }); + + var header = 'header' + , code = 'comment' + , quote = 'quote' + , list = 'string' + , hr = 'hr' + , linktext = 'link' + , linkhref = 'string' + , em = 'em' + , strong = 'strong' + , emstrong = 'emstrong'; + + var hrRE = /^([*\-=_])(?:\s*\1){2,}\s*$/ + , ulRE = /^[*\-+]\s+/ + , olRE = /^[0-9]+\.\s+/ + , headerRE = /^(?:\={3,}|-{3,})$/ + , textRE = /^[^\[*_\\<>`]+/; + + function switchInline(stream, state, f) { + state.f = state.inline = f; + return f(stream, state); + } + + function switchBlock(stream, state, f) { + state.f = state.block = f; + return f(stream, state); + } + + + // Blocks + + function blankLine(state) { + // Reset EM state + state.em = false; + // Reset STRONG state + state.strong = false; + return null; + } + + function blockNormal(stream, state) { + var match; + if (state.indentationDiff >= 4) { + state.indentation -= state.indentationDiff; + stream.skipToEnd(); + return code; + } else if (stream.eatSpace()) { + return null; + } else if (stream.peek() === '#' || stream.match(headerRE)) { + state.header = true; + } else if (stream.eat('>')) { + state.indentation++; + state.quote = true; + } else if (stream.peek() === '[') { + return switchInline(stream, state, footnoteLink); + } else if (stream.match(hrRE, true)) { + return hr; + } else if (match = stream.match(ulRE, true) || stream.match(olRE, true)) { + state.indentation += match[0].length; + return list; + } + + return switchInline(stream, state, state.inline); + } + + function htmlBlock(stream, state) { + var style = htmlMode.token(stream, state.htmlState); + if (style === 'tag' && state.htmlState.type !== 'openTag' && !state.htmlState.context) { + state.f = inlineNormal; + state.block = blockNormal; + } + return style; + } + + + // Inline + function getType(state) { + var styles = []; + + if (state.strong) { styles.push(state.em ? emstrong : strong); } + else if (state.em) { styles.push(em); } + + if (state.header) { styles.push(header); } + if (state.quote) { styles.push(quote); } + + return styles.length ? styles.join(' ') : null; + } + + function handleText(stream, state) { + if (stream.match(textRE, true)) { + return getType(state); + } + return undefined; + } + + function inlineNormal(stream, state) { + var style = state.text(stream, state) + if (typeof style !== 'undefined') + return style; + + var ch = stream.next(); + + if (ch === '\\') { + stream.next(); + return getType(state); + } + if (ch === '`') { + return switchInline(stream, state, inlineElement(code, '`')); + } + if (ch === '[') { + return switchInline(stream, state, linkText); + } + if (ch === '<' && stream.match(/^\w/, false)) { + stream.backUp(1); + return switchBlock(stream, state, htmlBlock); + } + + var t = getType(state); + if (ch === '*' || ch === '_') { + if (stream.eat(ch)) { + return (state.strong = !state.strong) ? getType(state) : t; + } + return (state.em = !state.em) ? getType(state) : t; + } + + return getType(state); + } + + function linkText(stream, state) { + while (!stream.eol()) { + var ch = stream.next(); + if (ch === '\\') stream.next(); + if (ch === ']') { + state.inline = state.f = linkHref; + return linktext; + } + } + return linktext; + } + + function linkHref(stream, state) { + stream.eatSpace(); + var ch = stream.next(); + if (ch === '(' || ch === '[') { + return switchInline(stream, state, inlineElement(linkhref, ch === '(' ? ')' : ']')); + } + return 'error'; + } + + function footnoteLink(stream, state) { + if (stream.match(/^[^\]]*\]:/, true)) { + state.f = footnoteUrl; + return linktext; + } + return switchInline(stream, state, inlineNormal); + } + + function footnoteUrl(stream, state) { + stream.eatSpace(); + stream.match(/^[^\s]+/, true); + state.f = state.inline = inlineNormal; + return linkhref; + } + + function inlineRE(endChar) { + if (!inlineRE[endChar]) { + // match any not-escaped-non-endChar and any escaped char + // then match endChar or eol + inlineRE[endChar] = new RegExp('^(?:[^\\\\\\' + endChar + ']|\\\\.)*(?:\\' + endChar + '|$)'); + } + return inlineRE[endChar]; + } + + function inlineElement(type, endChar, next) { + next = next || inlineNormal; + return function(stream, state) { + stream.match(inlineRE(endChar)); + state.inline = state.f = next; + return type; + }; + } + + return { + startState: function() { + return { + f: blockNormal, + + block: blockNormal, + htmlState: htmlMode.startState(), + indentation: 0, + + inline: inlineNormal, + text: handleText, + em: false, + strong: false, + header: false, + quote: false + }; + }, + + copyState: function(s) { + return { + f: s.f, + + block: s.block, + htmlState: CodeMirror.copyState(htmlMode, s.htmlState), + indentation: s.indentation, + + inline: s.inline, + text: s.text, + em: s.em, + strong: s.strong, + header: s.header, + quote: s.quote + }; + }, + + token: function(stream, state) { + if (stream.sol()) { + if (stream.match(/^\s*$/, true)) { return blankLine(state); } + + // Reset state.header + state.header = false; + // Reset state.quote + state.quote = false; + + state.f = state.block; + var indentation = stream.match(/^\s*/, true)[0].replace(/\t/g, ' ').length; + state.indentationDiff = indentation - state.indentation; + state.indentation = indentation; + if (indentation > 0) { return null; } + } + return state.f(stream, state); + }, + + blankLine: blankLine, + + getType: getType + }; + +}); + +CodeMirror.defineMIME("text/x-markdown", "markdown"); diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/php/index.html b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/php/index.html new file mode 100644 index 0000000..9e545c9 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/php/index.html @@ -0,0 +1,49 @@ + + + + CodeMirror 2: PHP mode + + + + + + + + + + + + +

    CodeMirror 2: PHP mode

    + +
    + + + +

    Simple HTML/PHP mode based on + the C-like mode. Depends on XML, + JavaScript, CSS, and C-like modes.

    + +

    MIME types defined: application/x-httpd-php (HTML with PHP code), text/x-php (plain, non-wrapped PHP code).

    + + diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/php/php.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/php/php.js new file mode 100644 index 0000000..bfa5229 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/php/php.js @@ -0,0 +1,115 @@ +(function() { + function keywords(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + function heredoc(delim) { + return function(stream, state) { + if (stream.match(delim)) state.tokenize = null; + else stream.skipToEnd(); + return "string"; + } + } + var phpConfig = { + name: "clike", + keywords: keywords("abstract and array as break case catch cfunction class clone const continue declare " + + "default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends " + + "final for foreach function global goto if implements interface instanceof namespace " + + "new or private protected public static switch throw try use var while xor return"), + blockKeywords: keywords("catch do else elseif for foreach if switch try while"), + atoms: keywords("true false null"), + multiLineStrings: true, + hooks: { + "$": function(stream, state) { + stream.eatWhile(/[\w\$_]/); + return "variable-2"; + }, + "<": function(stream, state) { + if (stream.match(/</; + state.mode = 'php'; + } + else if (style == "tag" && stream.current() == ">" && state.curState.context) { + if (/^script$/i.test(state.curState.context.tagName)) { + state.curMode = jsMode; + state.curState = jsMode.startState(htmlMode.indent(state.curState, "")); + state.curClose = /^<\/\s*script\s*>/i; + state.mode = 'javascript'; + } + else if (/^style$/i.test(state.curState.context.tagName)) { + state.curMode = cssMode; + state.curState = cssMode.startState(htmlMode.indent(state.curState, "")); + state.curClose = /^<\/\s*style\s*>/i; + state.mode = 'css'; + } + } + return style; + } + else if (stream.match(state.curClose, false)) { + state.curMode = htmlMode; + state.curState = state.html; + state.curClose = null; + state.mode = 'html'; + return dispatch(stream, state); + } + else return state.curMode.token(stream, state.curState); + } + + return { + startState: function() { + var html = htmlMode.startState(); + return {html: html, + php: phpMode.startState(), + curMode: parserConfig.startOpen ? phpMode : htmlMode, + curState: parserConfig.startOpen ? phpMode.startState() : html, + curClose: parserConfig.startOpen ? /^\?>/ : null, + mode: parserConfig.startOpen ? 'php' : 'html'} + }, + + copyState: function(state) { + var html = state.html, htmlNew = CodeMirror.copyState(htmlMode, html), + php = state.php, phpNew = CodeMirror.copyState(phpMode, php), cur; + if (state.curState == html) cur = htmlNew; + else if (state.curState == php) cur = phpNew; + else cur = CodeMirror.copyState(state.curMode, state.curState); + return {html: htmlNew, php: phpNew, curMode: state.curMode, curState: cur, curClose: state.curClose}; + }, + + token: dispatch, + + indent: function(state, textAfter) { + if ((state.curMode != phpMode && /^\s*<\//.test(textAfter)) || + (state.curMode == phpMode && /^\?>/.test(textAfter))) + return htmlMode.indent(state.html, textAfter); + return state.curMode.indent(state.curState, textAfter); + }, + + electricChars: "/{}:" + } + }); + CodeMirror.defineMIME("application/x-httpd-php", "php"); + CodeMirror.defineMIME("application/x-httpd-php-open", {name: "php", startOpen: true}); + CodeMirror.defineMIME("text/x-php", phpConfig); +})(); diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/plsql/index.html b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/plsql/index.html new file mode 100644 index 0000000..8c7bf7c --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/plsql/index.html @@ -0,0 +1,63 @@ + + + + CodeMirror 2: Oracle PL/SQL mode + + + + + + + + +

    CodeMirror 2: Oracle PL/SQL mode

    + +
    + + + +

    + Simple mode that handles Oracle PL/SQL language (and Oracle SQL, of course). +

    + +

    MIME type defined: text/x-plsql + (PLSQL code) + diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/plsql/plsql.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/plsql/plsql.js new file mode 100644 index 0000000..a2ac2e8 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/plsql/plsql.js @@ -0,0 +1,217 @@ +CodeMirror.defineMode("plsql", function(config, parserConfig) { + var indentUnit = config.indentUnit, + keywords = parserConfig.keywords, + functions = parserConfig.functions, + types = parserConfig.types, + sqlplus = parserConfig.sqlplus, + multiLineStrings = parserConfig.multiLineStrings; + var isOperatorChar = /[+\-*&%=<>!?:\/|]/; + function chain(stream, state, f) { + state.tokenize = f; + return f(stream, state); + } + + var type; + function ret(tp, style) { + type = tp; + return style; + } + + function tokenBase(stream, state) { + var ch = stream.next(); + // start of string? + if (ch == '"' || ch == "'") + return chain(stream, state, tokenString(ch)); + // is it one of the special signs []{}().,;? Seperator? + else if (/[\[\]{}\(\),;\.]/.test(ch)) + return ret(ch); + // start of a number value? + else if (/\d/.test(ch)) { + stream.eatWhile(/[\w\.]/); + return ret("number", "number"); + } + // multi line comment or simple operator? + else if (ch == "/") { + if (stream.eat("*")) { + return chain(stream, state, tokenComment); + } + else { + stream.eatWhile(isOperatorChar); + return ret("operator", "operator"); + } + } + // single line comment or simple operator? + else if (ch == "-") { + if (stream.eat("-")) { + stream.skipToEnd(); + return ret("comment", "comment"); + } + else { + stream.eatWhile(isOperatorChar); + return ret("operator", "operator"); + } + } + // pl/sql variable? + else if (ch == "@" || ch == "$") { + stream.eatWhile(/[\w\d\$_]/); + return ret("word", "variable"); + } + // is it a operator? + else if (isOperatorChar.test(ch)) { + stream.eatWhile(isOperatorChar); + return ret("operator", "operator"); + } + else { + // get the whole word + stream.eatWhile(/[\w\$_]/); + // is it one of the listed keywords? + if (keywords && keywords.propertyIsEnumerable(stream.current().toLowerCase())) return ret("keyword", "keyword"); + // is it one of the listed functions? + if (functions && functions.propertyIsEnumerable(stream.current().toLowerCase())) return ret("keyword", "builtin"); + // is it one of the listed types? + if (types && types.propertyIsEnumerable(stream.current().toLowerCase())) return ret("keyword", "variable-2"); + // is it one of the listed sqlplus keywords? + if (sqlplus && sqlplus.propertyIsEnumerable(stream.current().toLowerCase())) return ret("keyword", "variable-3"); + // default: just a "word" + return ret("word", "plsql-word"); + } + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, next, end = false; + while ((next = stream.next()) != null) { + if (next == quote && !escaped) {end = true; break;} + escaped = !escaped && next == "\\"; + } + if (end || !(escaped || multiLineStrings)) + state.tokenize = tokenBase; + return ret("string", "plsql-string"); + }; + } + + function tokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == "/" && maybeEnd) { + state.tokenize = tokenBase; + break; + } + maybeEnd = (ch == "*"); + } + return ret("comment", "plsql-comment"); + } + + // Interface + + return { + startState: function(basecolumn) { + return { + tokenize: tokenBase, + startOfLine: true + }; + }, + + token: function(stream, state) { + if (stream.eatSpace()) return null; + var style = state.tokenize(stream, state); + return style; + } + }; +}); + +(function() { + function keywords(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + var cKeywords = "abort accept access add all alter and any array arraylen as asc assert assign at attributes audit " + + "authorization avg " + + "base_table begin between binary_integer body boolean by " + + "case cast char char_base check close cluster clusters colauth column comment commit compress connect " + + "connected constant constraint crash create current currval cursor " + + "data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete " + + "desc digits dispose distinct do drop " + + "else elsif enable end entry escape exception exception_init exchange exclusive exists exit external " + + "fast fetch file for force form from function " + + "generic goto grant group " + + "having " + + "identified if immediate in increment index indexes indicator initial initrans insert interface intersect " + + "into is " + + "key " + + "level library like limited local lock log logging long loop " + + "master maxextents maxtrans member minextents minus mislabel mode modify multiset " + + "new next no noaudit nocompress nologging noparallel not nowait number_base " + + "object of off offline on online only open option or order out " + + "package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior " + + "private privileges procedure public " + + "raise range raw read rebuild record ref references refresh release rename replace resource restrict return " + + "returning reverse revoke rollback row rowid rowlabel rownum rows run " + + "savepoint schema segment select separate session set share snapshot some space split sql start statement " + + "storage subtype successful synonym " + + "tabauth table tables tablespace task terminate then to trigger truncate type " + + "union unique unlimited unrecoverable unusable update use using " + + "validate value values variable view views " + + "when whenever where while with work"; + + var cFunctions = "abs acos add_months ascii asin atan atan2 average " + + "bfilename " + + "ceil chartorowid chr concat convert cos cosh count " + + "decode deref dual dump dup_val_on_index " + + "empty error exp " + + "false floor found " + + "glb greatest " + + "hextoraw " + + "initcap instr instrb isopen " + + "last_day least lenght lenghtb ln lower lpad ltrim lub " + + "make_ref max min mod months_between " + + "new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower " + + "nls_sort nls_upper nlssort no_data_found notfound null nvl " + + "others " + + "power " + + "rawtohex reftohex round rowcount rowidtochar rpad rtrim " + + "sign sin sinh soundex sqlcode sqlerrm sqrt stddev substr substrb sum sysdate " + + "tan tanh to_char to_date to_label to_multi_byte to_number to_single_byte translate true trunc " + + "uid upper user userenv " + + "variance vsize"; + + var cTypes = "bfile blob " + + "character clob " + + "dec " + + "float " + + "int integer " + + "mlslabel " + + "natural naturaln nchar nclob number numeric nvarchar2 " + + "real rowtype " + + "signtype smallint string " + + "varchar varchar2"; + + var cSqlplus = "appinfo arraysize autocommit autoprint autorecovery autotrace " + + "blockterminator break btitle " + + "cmdsep colsep compatibility compute concat copycommit copytypecheck " + + "define describe " + + "echo editfile embedded escape exec execute " + + "feedback flagger flush " + + "heading headsep " + + "instance " + + "linesize lno loboffset logsource long longchunksize " + + "markup " + + "native newpage numformat numwidth " + + "pagesize pause pno " + + "recsep recsepchar release repfooter repheader " + + "serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber " + + "sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix " + + "tab term termout time timing trimout trimspool ttitle " + + "underline " + + "verify version " + + "wrap"; + + CodeMirror.defineMIME("text/x-plsql", { + name: "plsql", + keywords: keywords(cKeywords), + functions: keywords(cFunctions), + types: keywords(cTypes), + sqlplus: keywords(cSqlplus) + }); +}()); diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/python/LICENSE.txt b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/python/LICENSE.txt new file mode 100644 index 0000000..918866b --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/python/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2010 Timothy Farrell + +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. \ No newline at end of file diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/python/index.html b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/python/index.html new file mode 100644 index 0000000..1c36643 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/python/index.html @@ -0,0 +1,123 @@ + + + + CodeMirror 2: Python mode + + + + + + + + +

    CodeMirror 2: Python mode

    + +
    + +

    Configuration Options:

    +
      +
    • version - 2/3 - The version of Python to recognize. Default is 2.
    • +
    • singleLineStringErrors - true/false - If you have a single-line string that is not terminated at the end of the line, this will show subsequent lines as errors if true, otherwise it will consider the newline as the end of the string. Default is false.
    • +
    + +

    MIME types defined: text/x-python.

    + + diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/python/python.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/python/python.js new file mode 100644 index 0000000..a7df1f0 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/python/python.js @@ -0,0 +1,321 @@ +CodeMirror.defineMode("python", function(conf) { + var ERRORCLASS = 'error'; + + function wordRegexp(words) { + return new RegExp("^((" + words.join(")|(") + "))\\b"); + } + + var singleOperators = new RegExp("^[\\+\\-\\*/%&|\\^~<>!]"); + var singleDelimiters = new RegExp('^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]'); + var doubleOperators = new RegExp("^((==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))"); + var doubleDelimiters = new RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"); + var tripleDelimiters = new RegExp("^((//=)|(>>=)|(<<=)|(\\*\\*=))"); + var identifiers = new RegExp("^[_A-Za-z][_A-Za-z0-9]*"); + + var wordOperators = wordRegexp(['and', 'or', 'not', 'is', 'in']); + var commonkeywords = ['as', 'assert', 'break', 'class', 'continue', + 'def', 'del', 'elif', 'else', 'except', 'finally', + 'for', 'from', 'global', 'if', 'import', + 'lambda', 'pass', 'raise', 'return', + 'try', 'while', 'with', 'yield']; + var commontypes = ['bool', 'classmethod', 'complex', 'dict', 'enumerate', + 'float', 'frozenset', 'int', 'list', 'object', + 'property', 'reversed', 'set', 'slice', 'staticmethod', + 'str', 'super', 'tuple', 'type']; + var py2 = {'types': ['basestring', 'buffer', 'file', 'long', 'unicode', + 'xrange'], + 'keywords': ['exec', 'print']}; + var py3 = {'types': ['bytearray', 'bytes', 'filter', 'map', 'memoryview', + 'open', 'range', 'zip'], + 'keywords': ['nonlocal']}; + + if (!!conf.mode.version && parseInt(conf.mode.version, 10) === 3) { + commonkeywords = commonkeywords.concat(py3.keywords); + commontypes = commontypes.concat(py3.types); + var stringPrefixes = new RegExp("^(([rb]|(br))?('{3}|\"{3}|['\"]))", "i"); + } else { + commonkeywords = commonkeywords.concat(py2.keywords); + commontypes = commontypes.concat(py2.types); + var stringPrefixes = new RegExp("^(([rub]|(ur)|(br))?('{3}|\"{3}|['\"]))", "i"); + } + var keywords = wordRegexp(commonkeywords); + var types = wordRegexp(commontypes); + + var indentInfo = null; + + // tokenizers + function tokenBase(stream, state) { + // Handle scope changes + if (stream.sol()) { + var scopeOffset = state.scopes[0].offset; + if (stream.eatSpace()) { + var lineOffset = stream.indentation(); + if (lineOffset > scopeOffset) { + indentInfo = 'indent'; + } else if (lineOffset < scopeOffset) { + indentInfo = 'dedent'; + } + return null; + } else { + if (scopeOffset > 0) { + dedent(stream, state); + } + } + } + if (stream.eatSpace()) { + return null; + } + + var ch = stream.peek(); + + // Handle Comments + if (ch === '#') { + stream.skipToEnd(); + return 'comment'; + } + + // Handle Number Literals + if (stream.match(/^[0-9\.]/, false)) { + var floatLiteral = false; + // Floats + if (stream.match(/^\d*\.\d+(e[\+\-]?\d+)?/i)) { floatLiteral = true; } + if (stream.match(/^\d+\.\d*/)) { floatLiteral = true; } + if (stream.match(/^\.\d+/)) { floatLiteral = true; } + if (floatLiteral) { + // Float literals may be "imaginary" + stream.eat(/J/i); + return 'number'; + } + // Integers + var intLiteral = false; + // Hex + if (stream.match(/^0x[0-9a-f]+/i)) { intLiteral = true; } + // Binary + if (stream.match(/^0b[01]+/i)) { intLiteral = true; } + // Octal + if (stream.match(/^0o[0-7]+/i)) { intLiteral = true; } + // Decimal + if (stream.match(/^[1-9]\d*(e[\+\-]?\d+)?/)) { + // Decimal literals may be "imaginary" + stream.eat(/J/i); + // TODO - Can you have imaginary longs? + intLiteral = true; + } + // Zero by itself with no other piece of number. + if (stream.match(/^0(?![\dx])/i)) { intLiteral = true; } + if (intLiteral) { + // Integer literals may be "long" + stream.eat(/L/i); + return 'number'; + } + } + + // Handle Strings + if (stream.match(stringPrefixes)) { + state.tokenize = tokenStringFactory(stream.current()); + return state.tokenize(stream, state); + } + + // Handle operators and Delimiters + if (stream.match(tripleDelimiters) || stream.match(doubleDelimiters)) { + return null; + } + if (stream.match(doubleOperators) + || stream.match(singleOperators) + || stream.match(wordOperators)) { + return 'operator'; + } + if (stream.match(singleDelimiters)) { + return null; + } + + if (stream.match(types)) { + return 'builtin'; + } + + if (stream.match(keywords)) { + return 'keyword'; + } + + if (stream.match(identifiers)) { + return 'variable'; + } + + // Handle non-detected items + stream.next(); + return ERRORCLASS; + } + + function tokenStringFactory(delimiter) { + while ('rub'.indexOf(delimiter[0].toLowerCase()) >= 0) { + delimiter = delimiter.substr(1); + } + var delim_re = new RegExp(delimiter); + var singleline = delimiter.length == 1; + var OUTCLASS = 'string'; + + return function tokenString(stream, state) { + while (!stream.eol()) { + stream.eatWhile(/[^'"\\]/); + if (stream.eat('\\')) { + stream.next(); + if (singleline && stream.eol()) { + return OUTCLASS; + } + } else if (stream.match(delim_re)) { + state.tokenize = tokenBase; + return OUTCLASS; + } else { + stream.eat(/['"]/); + } + } + if (singleline) { + if (conf.mode.singleLineStringErrors) { + return ERRORCLASS; + } else { + state.tokenize = tokenBase; + } + } + return OUTCLASS; + }; + } + + function indent(stream, state, type) { + type = type || 'py'; + var indentUnit = 0; + if (type === 'py') { + for (var i = 0; i < state.scopes.length; ++i) { + if (state.scopes[i].type === 'py') { + indentUnit = state.scopes[i].offset + conf.indentUnit; + break; + } + } + } else { + indentUnit = stream.column() + stream.current().length; + } + state.scopes.unshift({ + offset: indentUnit, + type: type + }); + } + + function dedent(stream, state) { + if (state.scopes.length == 1) return; + if (state.scopes[0].type === 'py') { + var _indent = stream.indentation(); + var _indent_index = -1; + for (var i = 0; i < state.scopes.length; ++i) { + if (_indent === state.scopes[i].offset) { + _indent_index = i; + break; + } + } + if (_indent_index === -1) { + return true; + } + while (state.scopes[0].offset !== _indent) { + state.scopes.shift(); + } + return false + } else { + state.scopes.shift(); + return false; + } + } + + function tokenLexer(stream, state) { + indentInfo = null; + var style = state.tokenize(stream, state); + var current = stream.current(); + + // Handle '.' connected identifiers + if (current === '.') { + style = state.tokenize(stream, state); + current = stream.current(); + if (style === 'variable') { + return 'variable'; + } else { + return ERRORCLASS; + } + } + + // Handle decorators + if (current === '@') { + style = state.tokenize(stream, state); + current = stream.current(); + if (style === 'variable' + || current === '@staticmethod' + || current === '@classmethod') { + return 'meta'; + } else { + return ERRORCLASS; + } + } + + // Handle scope changes. + if (current === 'pass' || current === 'return') { + state.dedent += 1; + } + if ((current === ':' && !state.lambda && state.scopes[0].type == 'py') + || indentInfo === 'indent') { + indent(stream, state); + } + var delimiter_index = '[({'.indexOf(current); + if (delimiter_index !== -1) { + indent(stream, state, '])}'.slice(delimiter_index, delimiter_index+1)); + } + if (indentInfo === 'dedent') { + if (dedent(stream, state)) { + return ERRORCLASS; + } + } + delimiter_index = '])}'.indexOf(current); + if (delimiter_index !== -1) { + if (dedent(stream, state)) { + return ERRORCLASS; + } + } + if (state.dedent > 0 && stream.eol() && state.scopes[0].type == 'py') { + if (state.scopes.length > 1) state.scopes.shift(); + state.dedent -= 1; + } + + return style; + } + + var external = { + startState: function(basecolumn) { + return { + tokenize: tokenBase, + scopes: [{offset:basecolumn || 0, type:'py'}], + lastToken: null, + lambda: false, + dedent: 0 + }; + }, + + token: function(stream, state) { + var style = tokenLexer(stream, state); + + state.lastToken = {style:style, content: stream.current()}; + + if (stream.eol() && stream.lambda) { + state.lambda = false; + } + + return style; + }, + + indent: function(state, textAfter) { + if (state.tokenize != tokenBase) { + return 0; + } + + return state.scopes[0].offset; + } + + }; + return external; +}); + +CodeMirror.defineMIME("text/x-python", "python"); diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/r/LICENSE b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/r/LICENSE new file mode 100644 index 0000000..2510ae1 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/r/LICENSE @@ -0,0 +1,24 @@ +Copyright (c) 2011, Ubalo, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Ubalo, Inc nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL UBALO, INC BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/r/index.html b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/r/index.html new file mode 100644 index 0000000..e2ac998 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/r/index.html @@ -0,0 +1,73 @@ + + + + CodeMirror 2: R mode + + + + + + + + +

    CodeMirror 2: R mode

    +
    + + +

    MIME types defined: text/x-rsrc.

    + +

    Development of the CodeMirror R mode was kindly sponsored + by Ubalo, who hold + the license.

    + + + diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/r/r.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/r/r.js new file mode 100644 index 0000000..5dbb81d --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/r/r.js @@ -0,0 +1,134 @@ +CodeMirror.defineMode("r", function(config) { + function wordObj(str) { + var words = str.split(" "), res = {}; + for (var i = 0; i < words.length; ++i) res[words[i]] = true; + return res; + } + var atoms = wordObj("NULL NA Inf NaN NA_integer_ NA_real_ NA_complex_ NA_character_"); + var builtins = wordObj("list quote bquote eval return call parse deparse"); + var keywords = wordObj("if else repeat while function for in next break"); + var blockkeywords = wordObj("if else repeat while function for"); + var opChars = /[+\-*\/^<>=!&|~$:]/; + var curPunc; + + function tokenBase(stream, state) { + curPunc = null; + var ch = stream.next(); + if (ch == "#") { + stream.skipToEnd(); + return "comment"; + } else if (ch == "0" && stream.eat("x")) { + stream.eatWhile(/[\da-f]/i); + return "number"; + } else if (ch == "." && stream.eat(/\d/)) { + stream.match(/\d*(?:e[+\-]?\d+)?/); + return "number"; + } else if (/\d/.test(ch)) { + stream.match(/\d*(?:\.\d+)?(?:e[+\-]\d+)?L?/); + return "number"; + } else if (ch == "'" || ch == '"') { + state.tokenize = tokenString(ch); + return "string"; + } else if (ch == "." && stream.match(/.[.\d]+/)) { + return "keyword"; + } else if (/[\w\.]/.test(ch) && ch != "_") { + stream.eatWhile(/[\w\.]/); + var word = stream.current(); + if (atoms.propertyIsEnumerable(word)) return "atom"; + if (keywords.propertyIsEnumerable(word)) { + if (blockkeywords.propertyIsEnumerable(word)) curPunc = "block"; + return "keyword"; + } + if (builtins.propertyIsEnumerable(word)) return "builtin"; + return "variable"; + } else if (ch == "%") { + if (stream.skipTo("%")) stream.next(); + return "variable-2"; + } else if (ch == "<" && stream.eat("-")) { + return "arrow"; + } else if (opChars.test(ch)) { + if (ch == "$") return "dollar"; + stream.eatWhile(opChars); + return "operator"; + } else if (/[\(\){}\[\];]/.test(ch)) { + curPunc = ch; + if (ch == ";") return "semi"; + return null; + } else { + return null; + } + } + + function tokenString(quote) { + return function(stream, state) { + if (stream.eat("\\")) { + var ch = stream.next(); + if (ch == "x") stream.match(/^[a-f0-9]{2}/i); + else if ((ch == "u" || ch == "U") && stream.eat("{") && stream.skipTo("}")) stream.next(); + else if (ch == "u") stream.match(/^[a-f0-9]{4}/i); + else if (ch == "U") stream.match(/^[a-f0-9]{8}/i); + else if (/[0-7]/.test(ch)) stream.match(/^[0-7]{1,2}/); + return "string-2"; + } else { + var next; + while ((next = stream.next()) != null) { + if (next == quote) { state.tokenize = tokenBase; break; } + if (next == "\\") { stream.backUp(1); break; } + } + return "string"; + } + }; + } + + function push(state, type, stream) { + state.ctx = {type: type, + indent: state.indent, + align: null, + column: stream.column(), + prev: state.ctx}; + } + function pop(state) { + state.indent = state.ctx.indent; + state.ctx = state.ctx.prev; + } + + return { + startState: function(base) { + return {tokenize: tokenBase, + ctx: {type: "top", + indent: -config.indentUnit, + align: false}, + indent: 0}; + }, + + token: function(stream, state) { + if (stream.sol()) { + if (state.ctx.align == null) state.ctx.align = false; + state.indent = stream.indentation(); + } + if (stream.eatSpace()) return null; + var style = state.tokenize(stream, state); + if (style != "comment" && state.ctx.align == null) state.ctx.align = true; + + var ctype = state.ctx.type; + if ((curPunc == ";" || curPunc == "{" || curPunc == "}") && ctype == "block") pop(state); + if (curPunc == "{") push(state, "}", stream); + else if (curPunc == "(") push(state, ")", stream); + else if (curPunc == "[") push(state, "]", stream); + else if (curPunc == "block") push(state, "block", stream); + else if (curPunc == ctype) pop(state); + return style; + }, + + indent: function(state, textAfter) { + if (state.tokenize != tokenBase) return 0; + var firstChar = textAfter && textAfter.charAt(0), ctx = state.ctx, + closing = firstChar == ctx.type; + if (ctx.type == "block") return ctx.indent + (firstChar == "{" ? 0 : config.indentUnit); + else if (ctx.align) return ctx.column + (closing ? 0 : 1); + else return ctx.indent + (closing ? 0 : config.indentUnit); + } + }; +}); + +CodeMirror.defineMIME("text/x-rsrc", "r"); diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/rst/index.html b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/rst/index.html new file mode 100644 index 0000000..0831dff --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/rst/index.html @@ -0,0 +1,526 @@ + + + + CodeMirror 2: reStructuredText mode + + + + + + + + +

    CodeMirror 2: reStructuredText mode

    + +
    + + +

    The reStructuredText mode supports one configuration parameter:

    +
    +
    verbatim (string)
    +
    A name or MIME type of a mode that will be used for highlighting + verbatim blocks. By default, reStructuredText mode uses uniform color + for whole block of verbatim text if no mode is given.
    +
    +

    If python mode is available (not a part of CodeMirror 2 yet), + it will be used for highlighting blocks containing Python/IPython terminal + sessions (blocks starting with >>> (for Python) or + In [num]: (for IPython). + +

    MIME types defined: text/x-rst.

    + + + diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/rst/rst.css b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/rst/rst.css new file mode 100644 index 0000000..235a5d8 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/rst/rst.css @@ -0,0 +1,75 @@ +.cm-s-default span.cm-emphasis { + font-style: italic; +} + +.cm-s-default span.cm-strong { + font-weight: bold; +} + +.cm-s-default span.cm-interpreted { + color: #33cc66; +} + +.cm-s-default span.cm-inline { + color: #3399cc; +} + +.cm-s-default span.cm-role { + color: #666699; +} + +.cm-s-default span.cm-list { + color: #cc0099; + font-weight: bold; +} + +.cm-s-default span.cm-body { + color: #6699cc; +} + +.cm-s-default span.cm-verbatim { + color: #3366ff; +} + +.cm-s-default span.cm-comment { + color: #aa7700; +} + +.cm-s-default span.cm-directive { + font-weight: bold; + color: #3399ff; +} + +.cm-s-default span.cm-hyperlink { + font-weight: bold; + color: #3366ff; +} + +.cm-s-default span.cm-footnote { + font-weight: bold; + color: #3333ff; +} + +.cm-s-default span.cm-citation { + font-weight: bold; + color: #3300ff; +} + +.cm-s-default span.cm-replacement { + color: #9933cc; +} + +.cm-s-default span.cm-section { + font-weight: bold; + color: #cc0099; +} + +.cm-s-default span.cm-directive-marker { + font-weight: bold; + color: #3399ff; +} + +.cm-s-default span.cm-verbatim-marker { + font-weight: bold; + color: #9900ff; +} diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/rst/rst.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/rst/rst.js new file mode 100644 index 0000000..eecc5be --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/rst/rst.js @@ -0,0 +1,333 @@ +CodeMirror.defineMode('rst', function(config, options) { + function setState(state, fn, ctx) { + state.fn = fn; + setCtx(state, ctx); + } + + function setCtx(state, ctx) { + state.ctx = ctx || {}; + } + + function setNormal(state, ch) { + if (ch && (typeof ch !== 'string')) { + var str = ch.current(); + ch = str[str.length-1]; + } + + setState(state, normal, {back: ch}); + } + + function hasMode(mode) { + if (mode) { + var modes = CodeMirror.listModes(); + + for (var i in modes) { + if (modes[i] == mode) { + return true; + } + } + } + + return false; + } + + function getMode(mode) { + if (hasMode(mode)) { + return CodeMirror.getMode(config, mode); + } else { + return null; + } + } + + var verbatimMode = getMode(options.verbatim); + var pythonMode = getMode('python'); + + var reSection = /^[!"#$%&'()*+,-./:;<=>?@[\\\]^_`{|}~]/; + var reDirective = /^\s*\w([-:.\w]*\w)?::(\s|$)/; + var reHyperlink = /^\s*_[\w-]+:(\s|$)/; + var reFootnote = /^\s*\[(\d+|#)\](\s|$)/; + var reCitation = /^\s*\[[A-Za-z][\w-]*\](\s|$)/; + var reFootnoteRef = /^\[(\d+|#)\]_/; + var reCitationRef = /^\[[A-Za-z][\w-]*\]_/; + var reDirectiveMarker = /^\.\.(\s|$)/; + var reVerbatimMarker = /^::\s*$/; + var rePreInline = /^[-\s"([{/:.,;!?\\_]/; + var reEnumeratedList = /^\s*((\d+|[A-Za-z#])[.)]|\((\d+|[A-Z-a-z#])\))\s/; + var reBulletedList = /^\s*[-\+\*]\s/; + var reExamples = /^\s+(>>>|In \[\d+\]:)\s/; + + function normal(stream, state) { + var ch, sol, i; + + if (stream.eat(/\\/)) { + ch = stream.next(); + setNormal(state, ch); + return null; + } + + sol = stream.sol(); + + if (sol && (ch = stream.eat(reSection))) { + for (i = 0; stream.eat(ch); i++); + + if (i >= 3 && stream.match(/^\s*$/)) { + setNormal(state, null); + return 'section'; + } else { + stream.backUp(i + 1); + } + } + + if (sol && stream.match(reDirectiveMarker)) { + if (!stream.eol()) { + setState(state, directive); + } + + return 'directive-marker'; + } + + if (stream.match(reVerbatimMarker)) { + if (!verbatimMode) { + setState(state, verbatim); + } else { + var mode = verbatimMode; + + setState(state, verbatim, { + mode: mode, + local: mode.startState() + }); + } + + return 'verbatim-marker'; + } + + if (sol && stream.match(reExamples, false)) { + if (!pythonMode) { + setState(state, verbatim); + return 'verbatim-marker'; + } else { + var mode = pythonMode; + + setState(state, verbatim, { + mode: mode, + local: mode.startState() + }); + + return null; + } + } + + if (sol && (stream.match(reEnumeratedList) || + stream.match(reBulletedList))) { + setNormal(state, stream); + return 'list'; + } + + function testBackward(re) { + return sol || !state.ctx.back || re.test(state.ctx.back); + } + + function testForward(re) { + return stream.eol() || stream.match(re, false); + } + + function testInline(re) { + return stream.match(re) && testBackward(/\W/) && testForward(/\W/); + } + + if (testInline(reFootnoteRef)) { + setNormal(state, stream); + return 'footnote'; + } + + if (testInline(reCitationRef)) { + setNormal(state, stream); + return 'citation'; + } + + ch = stream.next(); + + if (testBackward(rePreInline)) { + if ((ch === ':' || ch === '|') && stream.eat(/\S/)) { + var token; + + if (ch === ':') { + token = 'role'; + } else { + token = 'replacement'; + } + + setState(state, inline, { + ch: ch, + wide: false, + prev: null, + token: token + }); + + return token; + } + + if (ch === '*' || ch === '`') { + var orig = ch, + wide = false; + + ch = stream.next(); + + if (ch == orig) { + wide = true; + ch = stream.next(); + } + + if (ch && !/\s/.test(ch)) { + var token; + + if (orig === '*') { + token = wide ? 'strong' : 'emphasis'; + } else { + token = wide ? 'inline' : 'interpreted'; + } + + setState(state, inline, { + ch: orig, // inline() has to know what to search for + wide: wide, // are we looking for `ch` or `chch` + prev: null, // terminator must not be preceeded with whitespace + token: token // I don't want to recompute this all the time + }); + + return token; + } + } + } + + setNormal(state, ch); + return null; + } + + function inline(stream, state) { + var ch = stream.next(), + token = state.ctx.token; + + function finish(ch) { + state.ctx.prev = ch; + return token; + } + + if (ch != state.ctx.ch) { + return finish(ch); + } + + if (/\s/.test(state.ctx.prev)) { + return finish(ch); + } + + if (state.ctx.wide) { + ch = stream.next(); + + if (ch != state.ctx.ch) { + return finish(ch); + } + } + + if (!stream.eol() && !rePostInline.test(stream.peek())) { + if (state.ctx.wide) { + stream.backUp(1); + } + + return finish(ch); + } + + setState(state, normal); + setNormal(state, ch); + + return token; + } + + function directive(stream, state) { + var token = null; + + if (stream.match(reDirective)) { + token = 'directive'; + } else if (stream.match(reHyperlink)) { + token = 'hyperlink'; + } else if (stream.match(reFootnote)) { + token = 'footnote'; + } else if (stream.match(reCitation)) { + token = 'citation'; + } else { + stream.eatSpace(); + + if (stream.eol()) { + setNormal(state, stream); + return null; + } else { + stream.skipToEnd(); + setState(state, comment); + return 'comment'; + } + } + + setState(state, body, {start: true}); + return token; + } + + function body(stream, state) { + var token = 'body'; + + if (!state.ctx.start || stream.sol()) { + return block(stream, state, token); + } + + stream.skipToEnd(); + setCtx(state); + + return token; + } + + function comment(stream, state) { + return block(stream, state, 'comment'); + } + + function verbatim(stream, state) { + if (!verbatimMode) { + return block(stream, state, 'verbatim'); + } else { + if (stream.sol()) { + if (!stream.eatSpace()) { + setNormal(state, stream); + } + + return null; + } + + return verbatimMode.token(stream, state.ctx.local); + } + } + + function block(stream, state, token) { + if (stream.eol() || stream.eatSpace()) { + stream.skipToEnd(); + return token; + } else { + setNormal(state, stream); + return null; + } + } + + return { + startState: function() { + return {fn: normal, ctx: {}}; + }, + + copyState: function(state) { + return {fn: state.fn, ctx: state.ctx}; + }, + + token: function(stream, state) { + var token = state.fn(stream, state); + return token; + } + }; +}); + +CodeMirror.defineMIME("text/x-rst", "rst"); diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/ruby/LICENSE b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/ruby/LICENSE new file mode 100644 index 0000000..ac09fc4 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/ruby/LICENSE @@ -0,0 +1,24 @@ +Copyright (c) 2011, Ubalo, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Ubalo, Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL UBALO, INC BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/ruby/index.html b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/ruby/index.html new file mode 100644 index 0000000..babc37e --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/ruby/index.html @@ -0,0 +1,172 @@ + + + + CodeMirror 2: Ruby mode + + + + + + + + +

    CodeMirror 2: Ruby mode

    +
    + + +

    MIME types defined: text/x-ruby.

    + +

    Development of the CodeMirror Ruby mode was kindly sponsored + by Ubalo, who hold + the license.

    + + + diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/ruby/ruby.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/ruby/ruby.js new file mode 100644 index 0000000..187a103 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/ruby/ruby.js @@ -0,0 +1,182 @@ +CodeMirror.defineMode("ruby", function(config, parserConfig) { + function wordObj(words) { + var o = {}; + for (var i = 0, e = words.length; i < e; ++i) o[words[i]] = true; + return o; + } + var keywords = wordObj([ + "alias", "and", "BEGIN", "begin", "break", "case", "class", "def", "defined?", "do", "else", + "elsif", "END", "end", "ensure", "false", "for", "if", "in", "module", "next", "not", "or", + "redo", "rescue", "retry", "return", "self", "super", "then", "true", "undef", "unless", + "until", "when", "while", "yield", "nil", "raise", "throw", "catch", "fail", "loop", "callcc", + "caller", "lambda", "proc", "public", "protected", "private", "require", "load", + "require_relative", "extend", "autoload" + ]); + var indentWords = wordObj(["def", "class", "case", "for", "while", "do", "module", "then", + "unless", "catch", "loop", "proc"]); + var dedentWords = wordObj(["end", "until"]); + var matching = {"[": "]", "{": "}", "(": ")"}; + var curPunc; + + function chain(newtok, stream, state) { + state.tokenize = newtok; + return newtok(stream, state); + } + + function tokenBase(stream, state) { + curPunc = null; + if (stream.sol() && stream.match("=begin") && stream.eol()) { + state.tokenize = readBlockComment; + return "comment"; + } + if (stream.eatSpace()) return null; + var ch = stream.next(); + if (ch == "`" || ch == "'" || ch == '"' || ch == "/") { + return chain(readQuoted(ch, "string"), stream, state); + } else if (ch == "%") { + var style; + if (stream.eat("s")) style = "atom"; + else if (stream.eat(/[wWxqQr]/)) style = "string"; + var delim = stream.eat(/[^\w\s]/); + if (!delim) return "operator"; + if (matching.propertyIsEnumerable(delim)) delim = matching[delim]; + return chain(readPercentQuoted(delim, style), stream, state); + } else if (ch == "#") { + stream.skipToEnd(); + return "comment"; + } else if (ch == "<" && stream.eat("<")) { + stream.eat("-"); + stream.eat(/[\'\"\`]/); + var match = stream.match(/^\w+/); + stream.eat(/[\'\"\`]/); + if (match) return chain(readHereDoc(match[0]), stream, state); + return null; + } else if (ch == "0") { + if (stream.eat("x")) stream.eatWhile(/[\da-fA-F]/); + else if (stream.eat("b")) stream.eatWhile(/[01]/); + else stream.eatWhile(/[0-7]/); + return "number"; + } else if (/\d/.test(ch)) { + stream.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+\-]?[\d_]+)?/); + return "number"; + } else if (ch == "?") { + while (stream.match(/^\\[CM]-/)) {} + if (stream.eat("\\")) stream.eatWhile(/\w/); + else stream.next(); + return "string"; + } else if (ch == ":") { + if (stream.eat("'")) return chain(readQuoted("'", "atom"), stream, state); + if (stream.eat('"')) return chain(readQuoted('"', "atom"), stream, state); + stream.eatWhile(/[\w\?]/); + return "atom"; + } else if (ch == "@") { + stream.eat("@"); + stream.eatWhile(/[\w\?]/); + return "variable-2"; + } else if (ch == "$") { + stream.next(); + stream.eatWhile(/[\w\?]/); + return "variable-3"; + } else if (/\w/.test(ch)) { + stream.eatWhile(/[\w\?]/); + if (stream.eat(":")) return "atom"; + return "ident"; + } else if (ch == "|" && (state.varList || state.lastTok == "{" || state.lastTok == "do")) { + curPunc = "|"; + return null; + } else if (/[\(\)\[\]{}\\;]/.test(ch)) { + curPunc = ch; + return null; + } else if (ch == "-" && stream.eat(">")) { + return "arrow"; + } else if (/[=+\-\/*:\.^%<>~|]/.test(ch)) { + stream.eatWhile(/[=+\-\/*:\.^%<>~|]/); + return "operator"; + } else { + return null; + } + } + + function readQuoted(quote, style) { + return function(stream, state) { + var escaped = false, ch; + while ((ch = stream.next()) != null) { + if (ch == quote && !escaped) { + state.tokenize = tokenBase; + break; + } + escaped = !escaped && ch == "\\"; + } + return style; + }; + } + function readPercentQuoted(quote, style) { + return function(stream, state) { + if (stream.skipTo(quote)) {stream.next(); state.tokenize = tokenBase;} + else stream.skipToEnd(); + return style; + }; + } + function readHereDoc(phrase) { + return function(stream, state) { + if (stream.match(phrase)) state.tokenize = tokenBase; + else stream.skipToEnd(); + return "string"; + }; + } + function readBlockComment(stream, state) { + if (stream.sol() && stream.match("=end") && stream.eol()) + state.tokenize = tokenBase; + stream.skipToEnd(); + return "comment"; + } + + return { + startState: function() { + return {tokenize: tokenBase, + indented: 0, + context: {type: "top", indented: -config.indentUnit}, + continuedLine: false, + lastTok: null, + varList: false}; + }, + + token: function(stream, state) { + if (stream.sol()) state.indented = stream.indentation(); + var style = state.tokenize(stream, state), kwtype; + if (style == "ident") { + var word = stream.current(); + style = keywords.propertyIsEnumerable(stream.current()) ? "keyword" + : /^[A-Z]/.test(word) ? "tag" + : (state.lastTok == "def" || state.lastTok == "class" || state.varList) ? "def" + : "variable"; + if (indentWords.propertyIsEnumerable(word)) kwtype = "indent"; + else if (dedentWords.propertyIsEnumerable(word)) kwtype = "dedent"; + else if (word == "if" && stream.column() == stream.indentation()) kwtype = "indent"; + } + if (curPunc || (style && style != "comment")) state.lastTok = word || curPunc || style; + if (curPunc == "|") state.varList = !state.varList; + + if (kwtype == "indent" || /[\(\[\{]/.test(curPunc)) + state.context = {prev: state.context, type: curPunc || style, indented: state.indented}; + else if ((kwtype == "dedent" || /[\)\]\}]/.test(curPunc)) && state.context.prev) + state.context = state.context.prev; + + if (stream.eol()) + state.continuedLine = (curPunc == "\\" || style == "operator"); + return style; + }, + + indent: function(state, textAfter) { + if (state.tokenize != tokenBase) return 0; + var firstChar = textAfter && textAfter.charAt(0); + var ct = state.context; + var closing = ct.type == matching[firstChar] || + ct.type == "keyword" && /^(?:end|until|else|elsif|when)\b/.test(textAfter); + return ct.indented + (closing ? 0 : config.indentUnit) + + (state.continuedLine ? config.indentUnit : 0); + } + }; +}); + +CodeMirror.defineMIME("text/x-ruby", "ruby"); diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/scheme/index.html b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/scheme/index.html new file mode 100644 index 0000000..3240232 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/scheme/index.html @@ -0,0 +1,65 @@ + + + + CodeMirror 2: Scheme mode + + + + + + + + +

    CodeMirror 2: Scheme mode

    +
    + + +

    MIME types defined: text/x-scheme.

    + + + diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/scheme/scheme.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/scheme/scheme.js new file mode 100644 index 0000000..51f276d --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/scheme/scheme.js @@ -0,0 +1,182 @@ +/** + * Author: Koh Zi Han, based on implementation by Koh Zi Chun + */ +CodeMirror.defineMode("scheme", function (config, mode) { + var numRegex = /[0-9]/; + var BUILTIN = "builtin", COMMENT = "comment", STRING = "string", + ATOM = "atom", NUMBER = "number", BRACKET = "bracket"; + var INDENT_WORD_SKIP = 2, KEYWORDS_SKIP = 1; + + function makeKeywords(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + var keywords = makeKeywords("λ case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt #f floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string=? string>? string? substring symbol->string symbol? #t tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?"); + var indentKeys = makeKeywords("define let letrec let* lambda begin"); + + function stateStack(indent, type, prev) { // represents a state stack object + this.indent = indent; + this.type = type; + this.prev = prev; + } + function pushStack(state, indent, type) { + state.indentStack = new stateStack(indent, type, state.indentStack); + } + function popStack(state) { + state.indentStack = state.indentStack.prev; + } + return { + startState: function () { + return { + indentStack: null, + indentation: 0, + mode: false, + sExprComment: false + }; + }, + token: function (stream, state) { + if (state.indentStack == null && stream.sol()) { + // update indentation, but only if indentStack is empty + state.indentation = stream.indentation(); + } + // skip spaces + if (stream.eatSpace()) { + return null; + } + var returnType = null; + + switch(state.mode){ + case "string": // multi-line string parsing mode + var next, escaped = false; + while ((next = stream.next()) != null) { + if (next == "\"" && !escaped) { + + state.mode = false; + break; + } + escaped = !escaped && next == "\\"; + } + returnType = STRING; // continue on in scheme-string mode + break; + case "comment": // comment parsing mode + var next, maybeEnd = false; + while ((next = stream.next()) != null) { + if (next == "#" && maybeEnd) { + + state.mode = false; + break; + } + maybeEnd = (next == "|"); + } + returnType = COMMENT; + break; + case "s-expr-comment": // s-expr commenting mode + state.mode = false; + if(stream.peek() == "(" || stream.peek() == "["){ + // actually start scheme s-expr commenting mode + state.sExprComment = 0; + }else{ + // if not we just comment the entire of the next token + stream.eatWhile(/[^/s]/); // eat non spaces + returnType = COMMENT; + break; + } + default: // default parsing mode + var ch = stream.next(); + + if (ch == "\"") { + state.mode = "string"; + returnType = STRING; + + } else if (ch == "'") { + returnType = ATOM; + } else if (ch == '#') { + if (stream.eat("|")) { // Multi-line comment + state.mode = "comment"; // toggle to comment mode + returnType = COMMENT; + } else if (stream.eat(/[tf]/)) { // #t/#f (atom) + returnType = ATOM; + } else if (stream.eat(';')) { // S-Expr comment + state.mode = "s-expr-comment"; + returnType = COMMENT; + } + + } else if (ch == ";") { // comment + stream.skipToEnd(); // rest of the line is a comment + returnType = COMMENT; + } else if (ch == "-"){ + + if(stream.eat(/\d/)) { + stream.eatWhile(/[\/0-9]/); + returnType = NUMBER; + }else{ + + returnType = null; + } + } else if (numRegex.exec(ch) != null) { // numbers + stream.eatWhile(/[\/0-9]/); + returnType = NUMBER; + + } else if (ch == "(" || ch == "[") { + var keyWord = ''; var indentTemp = stream.column(); + /** + Either + (indent-word .. + (non-indent-word .. + (;something else, bracket, etc. + */ + + while ((letter = stream.eat(/[^\s\(\[\;\)\]]/)) != null) { + keyWord += letter; + } + + if (keyWord.length > 0 && indentKeys.propertyIsEnumerable(keyWord)) { // indent-word + + pushStack(state, indentTemp + INDENT_WORD_SKIP, ch); + } else { // non-indent word + // we continue eating the spaces + stream.eatSpace(); + if (stream.eol() || stream.peek() == ";") { + // nothing significant after + // we restart indentation 1 space after + pushStack(state, indentTemp + 1, ch); + } else { + pushStack(state, indentTemp + stream.current().length, ch); // else we match + } + } + stream.backUp(stream.current().length - 1); // undo all the eating + + if(typeof state.sExprComment == "number") state.sExprComment++; + + returnType = BRACKET; + } else if (ch == ")" || ch == "]") { + returnType = BRACKET; + if (state.indentStack != null && state.indentStack.type == (ch == ")" ? "(" : "[")) { + popStack(state); + + if(typeof state.sExprComment == "number"){ + if(--state.sExprComment == 0){ + returnType = COMMENT; // final closing bracket + state.sExprComment = false; // turn off s-expr commenting mode + } + } + } + } else { + stream.eatWhile(/[\w\$_\-]/); + + if (keywords && keywords.propertyIsEnumerable(stream.current())) { + + returnType = BUILTIN; + } else returnType = null; + } + } + return (typeof state.sExprComment == "number") ? COMMENT : returnType; + }, + indent: function (state, textAfter) { + if (state.indentStack == null) return state.indentation; + return state.indentStack.indent; + } + }; +}); +CodeMirror.defineMIME("text/x-scheme", "scheme"); diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/smalltalk/index.html b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/smalltalk/index.html new file mode 100644 index 0000000..67cb22b --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/smalltalk/index.html @@ -0,0 +1,56 @@ + + + + CodeMirror 2: Smalltalk mode + + + + + + + + +

    CodeMirror 2: Smalltalk mode

    + +
    + + + +

    Simple Smalltalk mode.

    + +

    MIME types defined: text/x-stsrc.

    + + diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/smalltalk/smalltalk.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/smalltalk/smalltalk.js new file mode 100644 index 0000000..a5b14e1 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/smalltalk/smalltalk.js @@ -0,0 +1,122 @@ +CodeMirror.defineMode("smalltalk", function(config, parserConfig) { + var keywords = {"true": 1, "false": 1, nil: 1, self: 1, "super": 1, thisContext: 1}; + var indentUnit = config.indentUnit; + + function chain(stream, state, f) { + state.tokenize = f; + return f(stream, state); + } + + var type; + function ret(tp, style) { + type = tp; + return style; + } + + function tokenBase(stream, state) { + var ch = stream.next(); + if (ch == '"') + return chain(stream, state, tokenComment(ch)); + else if (ch == "'") + return chain(stream, state, tokenString(ch)); + else if (ch == "#") { + stream.eatWhile(/[\w\$_]/); + return ret("string", "string"); + } + else if (/\d/.test(ch)) { + stream.eatWhile(/[\w\.]/) + return ret("number", "number"); + } + else if (/[\[\]()]/.test(ch)) { + return ret(ch, null); + } + else { + stream.eatWhile(/[\w\$_]/); + if (keywords && keywords.propertyIsEnumerable(stream.current())) return ret("keyword", "keyword"); + return ret("word", "variable"); + } + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, next, end = false; + while ((next = stream.next()) != null) { + if (next == quote && !escaped) {end = true; break;} + escaped = !escaped && next == "\\"; + } + if (end || !(escaped)) + state.tokenize = tokenBase; + return ret("string", "string"); + }; + } + + function tokenComment(quote) { + return function(stream, state) { + var next, end = false; + while ((next = stream.next()) != null) { + if (next == quote) {end = true; break;} + } + if (end) + state.tokenize = tokenBase; + return ret("comment", "comment"); + }; + } + + function Context(indented, column, type, align, prev) { + this.indented = indented; + this.column = column; + this.type = type; + this.align = align; + this.prev = prev; + } + + function pushContext(state, col, type) { + return state.context = new Context(state.indented, col, type, null, state.context); + } + function popContext(state) { + return state.context = state.context.prev; + } + + // Interface + + return { + startState: function(basecolumn) { + return { + tokenize: tokenBase, + context: new Context((basecolumn || 0) - indentUnit, 0, "top", false), + indented: 0, + startOfLine: true + }; + }, + + token: function(stream, state) { + var ctx = state.context; + if (stream.sol()) { + if (ctx.align == null) ctx.align = false; + state.indented = stream.indentation(); + state.startOfLine = true; + } + if (stream.eatSpace()) return null; + var style = state.tokenize(stream, state); + if (type == "comment") return style; + if (ctx.align == null) ctx.align = true; + + if (type == "[") pushContext(state, stream.column(), "]"); + else if (type == "(") pushContext(state, stream.column(), ")"); + else if (type == ctx.type) popContext(state); + state.startOfLine = false; + return style; + }, + + indent: function(state, textAfter) { + if (state.tokenize != tokenBase) return 0; + var firstChar = textAfter && textAfter.charAt(0), ctx = state.context, closing = firstChar == ctx.type; + if (ctx.align) return ctx.column + (closing ? 0 : 1); + else return ctx.indented + (closing ? 0 : indentUnit); + }, + + electricChars: "]" + }; +}); + +CodeMirror.defineMIME("text/x-stsrc", {name: "smalltalk"}); diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/sparql/index.html b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/sparql/index.html new file mode 100644 index 0000000..a0e2f4e --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/sparql/index.html @@ -0,0 +1,41 @@ + + + + CodeMirror 2: SPARQL mode + + + + + + + + +

    CodeMirror 2: SPARQL mode

    +
    + + +

    MIME types defined: application/x-sparql-query.

    + + + diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/sparql/sparql.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/sparql/sparql.js new file mode 100644 index 0000000..ceb5294 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/sparql/sparql.js @@ -0,0 +1,143 @@ +CodeMirror.defineMode("sparql", function(config) { + var indentUnit = config.indentUnit; + var curPunc; + + function wordRegexp(words) { + return new RegExp("^(?:" + words.join("|") + ")$", "i"); + } + var ops = wordRegexp(["str", "lang", "langmatches", "datatype", "bound", "sameterm", "isiri", "isuri", + "isblank", "isliteral", "union", "a"]); + var keywords = wordRegexp(["base", "prefix", "select", "distinct", "reduced", "construct", "describe", + "ask", "from", "named", "where", "order", "limit", "offset", "filter", "optional", + "graph", "by", "asc", "desc"]); + var operatorChars = /[*+\-<>=&|]/; + + function tokenBase(stream, state) { + var ch = stream.next(); + curPunc = null; + if (ch == "$" || ch == "?") { + stream.match(/^[\w\d]*/); + return "variable-2"; + } + else if (ch == "<" && !stream.match(/^[\s\u00a0=]/, false)) { + stream.match(/^[^\s\u00a0>]*>?/); + return "atom"; + } + else if (ch == "\"" || ch == "'") { + state.tokenize = tokenLiteral(ch); + return state.tokenize(stream, state); + } + else if (/[{}\(\),\.;\[\]]/.test(ch)) { + curPunc = ch; + return null; + } + else if (ch == "#") { + stream.skipToEnd(); + return "comment"; + } + else if (operatorChars.test(ch)) { + stream.eatWhile(operatorChars); + return null; + } + else if (ch == ":") { + stream.eatWhile(/[\w\d\._\-]/); + return "atom"; + } + else { + stream.eatWhile(/[_\w\d]/); + if (stream.eat(":")) { + stream.eatWhile(/[\w\d_\-]/); + return "atom"; + } + var word = stream.current(), type; + if (ops.test(word)) + return null; + else if (keywords.test(word)) + return "keyword"; + else + return "variable"; + } + } + + function tokenLiteral(quote) { + return function(stream, state) { + var escaped = false, ch; + while ((ch = stream.next()) != null) { + if (ch == quote && !escaped) { + state.tokenize = tokenBase; + break; + } + escaped = !escaped && ch == "\\"; + } + return "string"; + }; + } + + function pushContext(state, type, col) { + state.context = {prev: state.context, indent: state.indent, col: col, type: type}; + } + function popContext(state) { + state.indent = state.context.indent; + state.context = state.context.prev; + } + + return { + startState: function(base) { + return {tokenize: tokenBase, + context: null, + indent: 0, + col: 0}; + }, + + token: function(stream, state) { + if (stream.sol()) { + if (state.context && state.context.align == null) state.context.align = false; + state.indent = stream.indentation(); + } + if (stream.eatSpace()) return null; + var style = state.tokenize(stream, state); + + if (style != "comment" && state.context && state.context.align == null && state.context.type != "pattern") { + state.context.align = true; + } + + if (curPunc == "(") pushContext(state, ")", stream.column()); + else if (curPunc == "[") pushContext(state, "]", stream.column()); + else if (curPunc == "{") pushContext(state, "}", stream.column()); + else if (/[\]\}\)]/.test(curPunc)) { + while (state.context && state.context.type == "pattern") popContext(state); + if (state.context && curPunc == state.context.type) popContext(state); + } + else if (curPunc == "." && state.context && state.context.type == "pattern") popContext(state); + else if (/atom|string|variable/.test(style) && state.context) { + if (/[\}\]]/.test(state.context.type)) + pushContext(state, "pattern", stream.column()); + else if (state.context.type == "pattern" && !state.context.align) { + state.context.align = true; + state.context.col = stream.column(); + } + } + + return style; + }, + + indent: function(state, textAfter) { + var firstChar = textAfter && textAfter.charAt(0); + var context = state.context; + if (/[\]\}]/.test(firstChar)) + while (context && context.type == "pattern") context = context.prev; + + var closing = context && firstChar == context.type; + if (!context) + return 0; + else if (context.type == "pattern") + return context.col; + else if (context.align) + return context.col + (closing ? 0 : 1); + else + return context.indent + (closing ? 0 : indentUnit); + } + }; +}); + +CodeMirror.defineMIME("application/x-sparql-query", "sparql"); diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/stex/index.html b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/stex/index.html new file mode 100644 index 0000000..7a27d11 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/stex/index.html @@ -0,0 +1,96 @@ + + + + CodeMirror 2: sTeX mode + + + + + + + + +

    CodeMirror 2: sTeX mode

    +
    + + +

    MIME types defined: text/stex.

    + + + diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/stex/stex.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/stex/stex.js new file mode 100644 index 0000000..bb47fb4 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/stex/stex.js @@ -0,0 +1,167 @@ +/* + * Author: Constantin Jucovschi (c.jucovschi@jacobs-university.de) + * Licence: MIT + */ + +CodeMirror.defineMode("stex", function(cmCfg, modeCfg) +{ + function pushCommand(state, command) { + state.cmdState.push(command); + } + + function peekCommand(state) { + if (state.cmdState.length>0) + return state.cmdState[state.cmdState.length-1]; + else + return null; + } + + function popCommand(state) { + if (state.cmdState.length>0) { + var plug = state.cmdState.pop(); + plug.closeBracket(); + } + } + + function applyMostPowerful(state) { + var context = state.cmdState; + for (var i = context.length - 1; i >= 0; i--) { + var plug = context[i]; + if (plug.name=="DEFAULT") + continue; + return plug.styleIdentifier(); + } + return null; + } + + function addPluginPattern(pluginName, cmdStyle, brackets, styles) { + return function () { + this.name=pluginName; + this.bracketNo = 0; + this.style=cmdStyle; + this.styles = styles; + this.brackets = brackets; + + this.styleIdentifier = function(content) { + if (this.bracketNo<=this.styles.length) + return this.styles[this.bracketNo-1]; + else + return null; + }; + this.openBracket = function(content) { + this.bracketNo++; + return "bracket"; + }; + this.closeBracket = function(content) { + }; + } + } + + var plugins = new Array(); + + plugins["importmodule"] = addPluginPattern("importmodule", "tag", "{[", ["string", "builtin"]); + plugins["documentclass"] = addPluginPattern("documentclass", "tag", "{[", ["", "atom"]); + plugins["usepackage"] = addPluginPattern("documentclass", "tag", "[", ["atom"]); + plugins["begin"] = addPluginPattern("documentclass", "tag", "[", ["atom"]); + plugins["end"] = addPluginPattern("documentclass", "tag", "[", ["atom"]); + + plugins["DEFAULT"] = function () { + this.name="DEFAULT"; + this.style="tag"; + + this.styleIdentifier = function(content) { + }; + this.openBracket = function(content) { + }; + this.closeBracket = function(content) { + }; + }; + + function setState(state, f) { + state.f = f; + } + + function normal(source, state) { + if (source.match(/^\\[a-z]+/)) { + var cmdName = source.current(); + cmdName = cmdName.substr(1, cmdName.length-1); + var plug = plugins[cmdName]; + if (typeof(plug) == 'undefined') { + plug = plugins["DEFAULT"]; + } + plug = new plug(); + pushCommand(state, plug); + setState(state, beginParams); + return plug.style; + } + + var ch = source.next(); + if (ch == "%") { + setState(state, inCComment); + return "comment"; + } + else if (ch=='}' || ch==']') { + plug = peekCommand(state); + if (plug) { + plug.closeBracket(ch); + setState(state, beginParams); + } else + return "error"; + return "bracket"; + } else if (ch=='{' || ch=='[') { + plug = plugins["DEFAULT"]; + plug = new plug(); + pushCommand(state, plug); + return "bracket"; + } + else if (/\d/.test(ch)) { + source.eatWhile(/[\w.%]/); + return "atom"; + } + else { + source.eatWhile(/[\w-_]/); + return applyMostPowerful(state); + } + } + + function inCComment(source, state) { + source.skipToEnd(); + setState(state, normal); + return "comment"; + } + + function beginParams(source, state) { + var ch = source.peek(); + if (ch == '{' || ch == '[') { + var lastPlug = peekCommand(state); + var style = lastPlug.openBracket(ch); + source.eat(ch); + setState(state, normal); + return "bracket"; + } + if (/[ \t\r]/.test(ch)) { + source.eat(ch); + return null; + } + setState(state, normal); + lastPlug = peekCommand(state); + if (lastPlug) { + popCommand(state); + } + return normal(source, state); + } + + return { + startState: function() { return { f:normal, cmdState:[] }; }, + copyState: function(s) { return { f: s.f, cmdState: s.cmdState.slice(0, s.cmdState.length) }; }, + + token: function(stream, state) { + var t = state.f(stream, state); + var w = stream.current(); + return t; + } + }; +}); + + +CodeMirror.defineMIME("text/x-stex", "stex"); diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/velocity/index.html b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/velocity/index.html new file mode 100644 index 0000000..7ab63ec --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/velocity/index.html @@ -0,0 +1,103 @@ + + + + CodeMirror 2: Velocity mode + + + + + + + + +

    CodeMirror 2: Velocity mode

    +
    + + +

    MIME types defined: text/velocity.

    + + + diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/velocity/velocity.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/velocity/velocity.js new file mode 100644 index 0000000..0b80c75 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/velocity/velocity.js @@ -0,0 +1,146 @@ +CodeMirror.defineMode("velocity", function(config) { + function parseWords(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + + var indentUnit = config.indentUnit + var keywords = parseWords("#end #else #break #stop #[[ #]] " + + "#{end} #{else} #{break} #{stop}"); + var functions = parseWords("#if #elseif #foreach #set #include #parse #macro #define #evaluate " + + "#{if} #{elseif} #{foreach} #{set} #{include} #{parse} #{macro} #{define} #{evaluate}"); + var specials = parseWords("$foreach.count $foreach.hasNext $foreach.first $foreach.last $foreach.topmost $foreach.parent $velocityCount"); + var isOperatorChar = /[+\-*&%=<>!?:\/|]/; + var multiLineStrings =true; + + function chain(stream, state, f) { + state.tokenize = f; + return f(stream, state); + } + function tokenBase(stream, state) { + var beforeParams = state.beforeParams; + state.beforeParams = false; + var ch = stream.next(); + // start of string? + if ((ch == '"' || ch == "'") && state.inParams) + return chain(stream, state, tokenString(ch)); + // is it one of the special signs []{}().,;? Seperator? + else if (/[\[\]{}\(\),;\.]/.test(ch)) { + if (ch == "(" && beforeParams) state.inParams = true; + else if (ch == ")") state.inParams = false; + return null; + } + // start of a number value? + else if (/\d/.test(ch)) { + stream.eatWhile(/[\w\.]/); + return "number"; + } + // multi line comment? + else if (ch == "#" && stream.eat("*")) { + return chain(stream, state, tokenComment); + } + // unparsed content? + else if (ch == "#" && stream.match(/ *\[ *\[/)) { + return chain(stream, state, tokenUnparsed); + } + // single line comment? + else if (ch == "#" && stream.eat("#")) { + stream.skipToEnd(); + return "comment"; + } + // variable? + else if (ch == "$") { + stream.eatWhile(/[\w\d\$_\.{}]/); + // is it one of the specials? + if (specials && specials.propertyIsEnumerable(stream.current().toLowerCase())) { + return "keyword"; + } + else { + state.beforeParams = true; + return "builtin"; + } + } + // is it a operator? + else if (isOperatorChar.test(ch)) { + stream.eatWhile(isOperatorChar); + return "operator"; + } + else { + // get the whole word + stream.eatWhile(/[\w\$_{}]/); + var word = stream.current().toLowerCase(); + // is it one of the listed keywords? + if (keywords && keywords.propertyIsEnumerable(word)) + return "keyword"; + // is it one of the listed functions? + if (functions && functions.propertyIsEnumerable(word) || + stream.current().match(/^#[a-z0-9_]+ *$/i) && stream.peek()=="(") { + state.beforeParams = true; + return "keyword"; + } + // default: just a "word" + return null; + } + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, next, end = false; + while ((next = stream.next()) != null) { + if (next == quote && !escaped) { + end = true; + break; + } + escaped = !escaped && next == "\\"; + } + if (end) state.tokenize = tokenBase; + return "string"; + }; + } + + function tokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == "#" && maybeEnd) { + state.tokenize = tokenBase; + break; + } + maybeEnd = (ch == "*"); + } + return "comment"; + } + + function tokenUnparsed(stream, state) { + var maybeEnd = 0, ch; + while (ch = stream.next()) { + if (ch == "#" && maybeEnd == 2) { + state.tokenize = tokenBase; + break; + } + if (ch == "]") + maybeEnd++; + else if (ch != " ") + maybeEnd = 0; + } + return "meta"; + } + // Interface + + return { + startState: function(basecolumn) { + return { + tokenize: tokenBase, + beforeParams: false, + inParams: false + }; + }, + + token: function(stream, state) { + if (stream.eatSpace()) return null; + return state.tokenize(stream, state); + } + }; +}); + +CodeMirror.defineMIME("text/velocity", "velocity"); diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/xml/index.html b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/xml/index.html new file mode 100644 index 0000000..122848a --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/xml/index.html @@ -0,0 +1,42 @@ + + + + CodeMirror 2: XML mode + + + + + + + + +

    CodeMirror 2: XML mode

    +
    + +

    The XML mode supports two configuration parameters:

    +
    +
    htmlMode (boolean)
    +
    This switches the mode to parse HTML instead of XML. This + means attributes do not have to be quoted, and some elements + (such as br) do not require a closing tag.
    +
    alignCDATA (boolean)
    +
    Setting this to true will force the opening tag of CDATA + blocks to not be indented.
    +
    + +

    MIME types defined: application/xml, text/html.

    + + diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/xml/xml.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/xml/xml.js new file mode 100644 index 0000000..b992964 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/xml/xml.js @@ -0,0 +1,231 @@ +CodeMirror.defineMode("xml", function(config, parserConfig) { + var indentUnit = config.indentUnit; + var Kludges = parserConfig.htmlMode ? { + autoSelfClosers: {"br": true, "img": true, "hr": true, "link": true, "input": true, + "meta": true, "col": true, "frame": true, "base": true, "area": true}, + doNotIndent: {"pre": true, "!cdata": true}, + allowUnquoted: true + } : {autoSelfClosers: {}, doNotIndent: {"!cdata": true}, allowUnquoted: false}; + var alignCDATA = parserConfig.alignCDATA; + + // Return variables for tokenizers + var tagName, type; + + function inText(stream, state) { + function chain(parser) { + state.tokenize = parser; + return parser(stream, state); + } + + var ch = stream.next(); + if (ch == "<") { + if (stream.eat("!")) { + if (stream.eat("[")) { + if (stream.match("CDATA[")) return chain(inBlock("atom", "]]>")); + else return null; + } + else if (stream.match("--")) return chain(inBlock("comment", "-->")); + else if (stream.match("DOCTYPE", true, true)) { + stream.eatWhile(/[\w\._\-]/); + return chain(inBlock("meta", ">")); + } + else return null; + } + else if (stream.eat("?")) { + stream.eatWhile(/[\w\._\-]/); + state.tokenize = inBlock("meta", "?>"); + return "meta"; + } + else { + type = stream.eat("/") ? "closeTag" : "openTag"; + stream.eatSpace(); + tagName = ""; + var c; + while ((c = stream.eat(/[^\s\u00a0=<>\"\'\/?]/))) tagName += c; + state.tokenize = inTag; + return "tag"; + } + } + else if (ch == "&") { + stream.eatWhile(/[^;]/); + stream.eat(";"); + return "atom"; + } + else { + stream.eatWhile(/[^&<]/); + return null; + } + } + + function inTag(stream, state) { + var ch = stream.next(); + if (ch == ">" || (ch == "/" && stream.eat(">"))) { + state.tokenize = inText; + type = ch == ">" ? "endTag" : "selfcloseTag"; + return "tag"; + } + else if (ch == "=") { + type = "equals"; + return null; + } + else if (/[\'\"]/.test(ch)) { + state.tokenize = inAttribute(ch); + return state.tokenize(stream, state); + } + else { + stream.eatWhile(/[^\s\u00a0=<>\"\'\/?]/); + return "word"; + } + } + + function inAttribute(quote) { + return function(stream, state) { + while (!stream.eol()) { + if (stream.next() == quote) { + state.tokenize = inTag; + break; + } + } + return "string"; + }; + } + + function inBlock(style, terminator) { + return function(stream, state) { + while (!stream.eol()) { + if (stream.match(terminator)) { + state.tokenize = inText; + break; + } + stream.next(); + } + return style; + }; + } + + var curState, setStyle; + function pass() { + for (var i = arguments.length - 1; i >= 0; i--) curState.cc.push(arguments[i]); + } + function cont() { + pass.apply(null, arguments); + return true; + } + + function pushContext(tagName, startOfLine) { + var noIndent = Kludges.doNotIndent.hasOwnProperty(tagName) || (curState.context && curState.context.noIndent); + curState.context = { + prev: curState.context, + tagName: tagName, + indent: curState.indented, + startOfLine: startOfLine, + noIndent: noIndent + }; + } + function popContext() { + if (curState.context) curState.context = curState.context.prev; + } + + function element(type) { + if (type == "openTag") {curState.tagName = tagName; return cont(attributes, endtag(curState.startOfLine));} + else if (type == "closeTag") { + var err = false; + if (curState.context) { + err = curState.context.tagName != tagName; + popContext(); + } else { + err = true; + } + if (err) setStyle = "error"; + return cont(endclosetag(err)); + } + else if (type == "string") { + if (!curState.context || curState.context.name != "!cdata") pushContext("!cdata"); + if (curState.tokenize == inText) popContext(); + return cont(); + } + else return cont(); + } + function endtag(startOfLine) { + return function(type) { + if (type == "selfcloseTag" || + (type == "endTag" && Kludges.autoSelfClosers.hasOwnProperty(curState.tagName.toLowerCase()))) + return cont(); + if (type == "endTag") {pushContext(curState.tagName, startOfLine); return cont();} + return cont(); + }; + } + function endclosetag(err) { + return function(type) { + if (err) setStyle = "error"; + if (type == "endTag") return cont(); + return pass(); + } + } + + function attributes(type) { + if (type == "word") {setStyle = "attribute"; return cont(attributes);} + if (type == "equals") return cont(attvalue, attributes); + return pass(); + } + function attvalue(type) { + if (type == "word" && Kludges.allowUnquoted) {setStyle = "string"; return cont();} + if (type == "string") return cont(attvaluemaybe); + return pass(); + } + function attvaluemaybe(type) { + if (type == "string") return cont(attvaluemaybe); + else return pass(); + } + + return { + startState: function() { + return {tokenize: inText, cc: [], indented: 0, startOfLine: true, tagName: null, context: null}; + }, + + token: function(stream, state) { + if (stream.sol()) { + state.startOfLine = true; + state.indented = stream.indentation(); + } + if (stream.eatSpace()) return null; + + setStyle = type = tagName = null; + var style = state.tokenize(stream, state); + if ((style || type) && style != "comment") { + curState = state; + while (true) { + var comb = state.cc.pop() || element; + if (comb(type || style)) break; + } + } + state.startOfLine = false; + return setStyle || style; + }, + + indent: function(state, textAfter) { + var context = state.context; + if (context && context.noIndent) return 0; + if (alignCDATA && / + + + CodeMirror 2: Pure XML mode + + + + + + + + +

    CodeMirror 2: XML mode

    +
    + + +

    This is my XML parser, based on the original:

    +
      +
    • No html mode - this is pure xml
    • +
    • Illegal attributes and element names are errors
    • +
    • Attributes must have a value
    • +
    • XML declaration supported (e.g.: <?xml version="1.0" encoding="utf-8" standalone="no" ?>)
    • +
    • CDATA and comment blocks are not indented (except for their start-tag)
    • +
    • Better handling of errors per line with the state object - provides good infrastructure for extending it
    • +
    + +

    What's missing:

    +
      +
    • Make sure only a single root element exists at the document level
    • +
    • Multi-line attributes should NOT indent
    • +
    • Start tags are not painted red when they have no matching end tags (is this really wrong?)
    • +
    + +

    MIME types defined: application/xml, text/xml.

    + +

    @author: Dror BG (deebug dot dev at gmail dot com)
    +

    @date: August, 2011
    +

    @github: https://github.com/deebugger/CodeMirror2

    + +

    MIME types defined: application/xml, text/xml.

    + + diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/xmlpure/xmlpure.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/xmlpure/xmlpure.js new file mode 100644 index 0000000..c55a717 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/xmlpure/xmlpure.js @@ -0,0 +1,481 @@ +/** + * xmlpure.js + * + * Building upon and improving the CodeMirror 2 XML parser + * @author: Dror BG (deebug.dev@gmail.com) + * @date: August, 2011 + */ + +CodeMirror.defineMode("xmlpure", function(config, parserConfig) { + // constants + var STYLE_ERROR = "error"; + var STYLE_INSTRUCTION = "comment"; + var STYLE_COMMENT = "comment"; + var STYLE_ELEMENT_NAME = "tag"; + var STYLE_ATTRIBUTE = "attribute"; + var STYLE_WORD = "string"; + var STYLE_TEXT = "atom"; + + var TAG_INSTRUCTION = "!instruction"; + var TAG_CDATA = "!cdata"; + var TAG_COMMENT = "!comment"; + var TAG_TEXT = "!text"; + + var doNotIndent = { + "!cdata": true, + "!comment": true, + "!text": true, + "!instruction": true + }; + + // options + var indentUnit = config.indentUnit; + + /////////////////////////////////////////////////////////////////////////// + // helper functions + + // chain a parser to another parser + function chain(stream, state, parser) { + state.tokenize = parser; + return parser(stream, state); + } + + // parse a block (comment, CDATA or text) + function inBlock(style, terminator, nextTokenize) { + return function(stream, state) { + while (!stream.eol()) { + if (stream.match(terminator)) { + popContext(state); + state.tokenize = nextTokenize; + break; + } + stream.next(); + } + return style; + }; + } + + // go down a level in the document + // (hint: look at who calls this function to know what the contexts are) + function pushContext(state, tagName) { + var noIndent = doNotIndent.hasOwnProperty(tagName) || (state.context && state.context.doIndent); + var newContext = { + tagName: tagName, + prev: state.context, + indent: state.context ? state.context.indent + indentUnit : 0, + lineNumber: state.lineNumber, + indented: state.indented, + noIndent: noIndent + }; + state.context = newContext; + } + + // go up a level in the document + function popContext(state) { + if (state.context) { + var oldContext = state.context; + state.context = oldContext.prev; + return oldContext; + } + + // we shouldn't be here - it means we didn't have a context to pop + return null; + } + + // return true if the current token is seperated from the tokens before it + // which means either this is the start of the line, or there is at least + // one space or tab character behind the token + // otherwise returns false + function isTokenSeparated(stream) { + return stream.sol() || + stream.string.charAt(stream.start - 1) == " " || + stream.string.charAt(stream.start - 1) == "\t"; + } + + /////////////////////////////////////////////////////////////////////////// + // context: document + // + // an XML document can contain: + // - a single declaration (if defined, it must be the very first line) + // - exactly one root element + // @todo try to actually limit the number of root elements to 1 + // - zero or more comments + function parseDocument(stream, state) { + if(stream.eat("<")) { + if(stream.eat("?")) { + // processing instruction + pushContext(state, TAG_INSTRUCTION); + state.tokenize = parseProcessingInstructionStartTag; + return STYLE_INSTRUCTION; + } else if(stream.match("!--")) { + // new context: comment + pushContext(state, TAG_COMMENT); + return chain(stream, state, inBlock(STYLE_COMMENT, "-->", parseDocument)); + } else if(stream.eatSpace() || stream.eol() ) { + stream.skipToEnd(); + return STYLE_ERROR; + } else { + // element + state.tokenize = parseElementTagName; + return STYLE_ELEMENT_NAME; + } + } + + // error on line + stream.skipToEnd(); + return STYLE_ERROR; + } + + /////////////////////////////////////////////////////////////////////////// + // context: XML element start-tag or end-tag + // + // - element start-tag can contain attributes + // - element start-tag may self-close (or start an element block if it doesn't) + // - element end-tag can contain only the tag name + function parseElementTagName(stream, state) { + // get the name of the tag + var startPos = stream.pos; + if(stream.match(/^[a-zA-Z_:][-a-zA-Z0-9_:.]*/)) { + // element start-tag + var tagName = stream.string.substring(startPos, stream.pos); + pushContext(state, tagName); + state.tokenize = parseElement; + return STYLE_ELEMENT_NAME; + } else if(stream.match(/^\/[a-zA-Z_:][-a-zA-Z0-9_:.]*( )*>/)) { + // element end-tag + var endTagName = stream.string.substring(startPos + 1, stream.pos - 1).trim(); + var oldContext = popContext(state); + state.tokenize = state.context == null ? parseDocument : parseElementBlock; + if(oldContext == null || endTagName != oldContext.tagName) { + // the start and end tag names should match - error + return STYLE_ERROR; + } + return STYLE_ELEMENT_NAME; + } else { + // no tag name - error + state.tokenize = state.context == null ? parseDocument : parseElementBlock; + stream.eatWhile(/[^>]/); + stream.eat(">"); + return STYLE_ERROR; + } + + stream.skipToEnd(); + return null; + } + + function parseElement(stream, state) { + if(stream.match(/^\/>/)) { + // self-closing tag + popContext(state); + state.tokenize = state.context == null ? parseDocument : parseElementBlock; + return STYLE_ELEMENT_NAME; + } else if(stream.eat(/^>/)) { + state.tokenize = parseElementBlock; + return STYLE_ELEMENT_NAME; + } else if(isTokenSeparated(stream) && stream.match(/^[a-zA-Z_:][-a-zA-Z0-9_:.]*( )*=/)) { + // attribute + state.tokenize = parseAttribute; + return STYLE_ATTRIBUTE; + } + + // no other options - this is an error + state.tokenize = state.context == null ? parseDocument : parseDocument; + stream.eatWhile(/[^>]/); + stream.eat(">"); + return STYLE_ERROR; + } + + /////////////////////////////////////////////////////////////////////////// + // context: attribute + // + // attribute values may contain everything, except: + // - the ending quote (with ' or ") - this marks the end of the value + // - the character "<" - should never appear + // - ampersand ("&") - unless it starts a reference: a string that ends with a semi-colon (";") + // ---> note: this parser is lax in what may be put into a reference string, + // ---> consult http://www.w3.org/TR/REC-xml/#NT-Reference if you want to make it tighter + function parseAttribute(stream, state) { + var quote = stream.next(); + if(quote != "\"" && quote != "'") { + // attribute must be quoted + stream.skipToEnd(); + state.tokenize = parseElement; + return STYLE_ERROR; + } + + state.tokParams.quote = quote; + state.tokenize = parseAttributeValue; + return STYLE_WORD; + } + + // @todo: find out whether this attribute value spans multiple lines, + // and if so, push a context for it in order not to indent it + // (or something of the sort..) + function parseAttributeValue(stream, state) { + var ch = ""; + while(!stream.eol()) { + ch = stream.next(); + if(ch == state.tokParams.quote) { + // end quote found + state.tokenize = parseElement; + return STYLE_WORD; + } else if(ch == "<") { + // can't have less-than signs in an attribute value, ever + stream.skipToEnd() + state.tokenize = parseElement; + return STYLE_ERROR; + } else if(ch == "&") { + // reference - look for a semi-colon, or return error if none found + ch = stream.next(); + + // make sure that semi-colon isn't right after the ampersand + if(ch == ';') { + stream.skipToEnd() + state.tokenize = parseElement; + return STYLE_ERROR; + } + + // make sure no less-than characters slipped in + while(!stream.eol() && ch != ";") { + if(ch == "<") { + // can't have less-than signs in an attribute value, ever + stream.skipToEnd() + state.tokenize = parseElement; + return STYLE_ERROR; + } + ch = stream.next(); + } + if(stream.eol() && ch != ";") { + // no ampersand found - error + stream.skipToEnd(); + state.tokenize = parseElement; + return STYLE_ERROR; + } + } + } + + // attribute value continues to next line + return STYLE_WORD; + } + + /////////////////////////////////////////////////////////////////////////// + // context: element block + // + // a block can contain: + // - elements + // - text + // - CDATA sections + // - comments + function parseElementBlock(stream, state) { + if(stream.eat("<")) { + if(stream.match("?")) { + pushContext(state, TAG_INSTRUCTION); + state.tokenize = parseProcessingInstructionStartTag; + return STYLE_INSTRUCTION; + } else if(stream.match("!--")) { + // new context: comment + pushContext(state, TAG_COMMENT); + return chain(stream, state, inBlock(STYLE_COMMENT, "-->", + state.context == null ? parseDocument : parseElementBlock)); + } else if(stream.match("![CDATA[")) { + // new context: CDATA section + pushContext(state, TAG_CDATA); + return chain(stream, state, inBlock(STYLE_TEXT, "]]>", + state.context == null ? parseDocument : parseElementBlock)); + } else if(stream.eatSpace() || stream.eol() ) { + stream.skipToEnd(); + return STYLE_ERROR; + } else { + // element + state.tokenize = parseElementTagName; + return STYLE_ELEMENT_NAME; + } + } else { + // new context: text + pushContext(state, TAG_TEXT); + state.tokenize = parseText; + return null; + } + + state.tokenize = state.context == null ? parseDocument : parseElementBlock; + stream.skipToEnd(); + return null; + } + + function parseText(stream, state) { + stream.eatWhile(/[^<]/); + if(!stream.eol()) { + // we cannot possibly be in the document context, + // just inside an element block + popContext(state); + state.tokenize = parseElementBlock; + } + return STYLE_TEXT; + } + + /////////////////////////////////////////////////////////////////////////// + // context: XML processing instructions + // + // XML processing instructions (PIs) allow documents to contain instructions for applications. + // PI format: + // - 'name' can be anything other than 'xml' (case-insensitive) + // - 'data' can be anything which doesn't contain '?>' + // XML declaration is a special PI (see XML declaration context below) + function parseProcessingInstructionStartTag(stream, state) { + if(stream.match("xml", true, true)) { + // xml declaration + if(state.lineNumber > 1 || stream.pos > 5) { + state.tokenize = parseDocument; + stream.skipToEnd(); + return STYLE_ERROR; + } else { + state.tokenize = parseDeclarationVersion; + return STYLE_INSTRUCTION; + } + } + + // regular processing instruction + if(isTokenSeparated(stream) || stream.match("?>")) { + // we have a space after the start-tag, or nothing but the end-tag + // either way - error! + state.tokenize = parseDocument; + stream.skipToEnd(); + return STYLE_ERROR; + } + + state.tokenize = parseProcessingInstructionBody; + return STYLE_INSTRUCTION; + } + + function parseProcessingInstructionBody(stream, state) { + stream.eatWhile(/[^?]/); + if(stream.eat("?")) { + if(stream.eat(">")) { + popContext(state); + state.tokenize = state.context == null ? parseDocument : parseElementBlock; + } + } + return STYLE_INSTRUCTION; + } + + + /////////////////////////////////////////////////////////////////////////// + // context: XML declaration + // + // XML declaration is of the following format: + // + // - must start at the first character of the first line + // - may span multiple lines + // - must include 'version' + // - may include 'encoding' and 'standalone' (in that order after 'version') + // - attribute names must be lowercase + // - cannot contain anything else on the line + function parseDeclarationVersion(stream, state) { + state.tokenize = parseDeclarationEncoding; + + if(isTokenSeparated(stream) && stream.match(/^version( )*=( )*"([a-zA-Z0-9_.:]|\-)+"/)) { + return STYLE_INSTRUCTION; + } + stream.skipToEnd(); + return STYLE_ERROR; + } + + function parseDeclarationEncoding(stream, state) { + state.tokenize = parseDeclarationStandalone; + + if(isTokenSeparated(stream) && stream.match(/^encoding( )*=( )*"[A-Za-z]([A-Za-z0-9._]|\-)*"/)) { + return STYLE_INSTRUCTION; + } + return null; + } + + function parseDeclarationStandalone(stream, state) { + state.tokenize = parseDeclarationEndTag; + + if(isTokenSeparated(stream) && stream.match(/^standalone( )*=( )*"(yes|no)"/)) { + return STYLE_INSTRUCTION; + } + return null; + } + + function parseDeclarationEndTag(stream, state) { + state.tokenize = parseDocument; + + if(stream.match("?>") && stream.eol()) { + popContext(state); + return STYLE_INSTRUCTION; + } + stream.skipToEnd(); + return STYLE_ERROR; + } + + /////////////////////////////////////////////////////////////////////////// + // returned object + return { + electricChars: "/", + + startState: function() { + return { + tokenize: parseDocument, + tokParams: {}, + lineNumber: 0, + lineError: false, + context: null, + indented: 0 + }; + }, + + token: function(stream, state) { + if(stream.sol()) { + // initialize a new line + state.lineNumber++; + state.lineError = false; + state.indented = stream.indentation(); + } + + // eat all (the spaces) you can + if(stream.eatSpace()) return null; + + // run the current tokenize function, according to the state + var style = state.tokenize(stream, state); + + // is there an error somewhere in the line? + state.lineError = (state.lineError || style == "error"); + + return style; + }, + + blankLine: function(state) { + // blank lines are lines too! + state.lineNumber++; + state.lineError = false; + }, + + indent: function(state, textAfter) { + if(state.context) { + if(state.context.noIndent == true) { + // do not indent - no return value at all + return; + } + if(textAfter.match(/^<\/.*/)) { + // eng-tag - indent back to last context + return state.context.indent; + } + // indent to last context + regular indent unit + return state.context.indent + indentUnit; + } + return 0; + }, + + compareStates: function(a, b) { + if (a.indented != b.indented) return false; + for (var ca = a.context, cb = b.context; ; ca = ca.prev, cb = cb.prev) { + if (!ca || !cb) return ca == cb; + if (ca.tagName != cb.tagName) return false; + } + } + }; +}); + +CodeMirror.defineMIME("application/xml", "purexml"); +CodeMirror.defineMIME("text/xml", "purexml"); diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/yaml/index.html b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/yaml/index.html new file mode 100644 index 0000000..e8d04d1 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/yaml/index.html @@ -0,0 +1,68 @@ + + + + CodeMirror 2: YAML mode + + + + + + + + +

    CodeMirror 2: YAML mode

    +
    + + +

    MIME types defined: text/x-yaml.

    + + + diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/yaml/yaml.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/yaml/yaml.js new file mode 100644 index 0000000..59e2641 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/mode/yaml/yaml.js @@ -0,0 +1,95 @@ +CodeMirror.defineMode("yaml", function() { + + var cons = ['true', 'false', 'on', 'off', 'yes', 'no']; + var keywordRegex = new RegExp("\\b(("+cons.join(")|(")+"))$", 'i'); + + return { + token: function(stream, state) { + var ch = stream.peek(); + var esc = state.escaped; + state.escaped = false; + /* comments */ + if (ch == "#") { stream.skipToEnd(); return "comment"; } + if (state.literal && stream.indentation() > state.keyCol) { + stream.skipToEnd(); return "string"; + } else if (state.literal) { state.literal = false; } + if (stream.sol()) { + state.keyCol = 0; + state.pair = false; + state.pairStart = false; + /* document start */ + if(stream.match(/---/)) { return "def"; } + /* document end */ + if (stream.match(/\.\.\./)) { return "def"; } + /* array list item */ + if (stream.match(/\s*-\s+/)) { return 'meta'; } + } + /* pairs (associative arrays) -> key */ + if (!state.pair && stream.match(/^\s*([a-z0-9\._-])+(?=\s*:)/i)) { + state.pair = true; + state.keyCol = stream.indentation(); + return "atom"; + } + if (state.pair && stream.match(/^:\s*/)) { state.pairStart = true; return 'meta'; } + + /* inline pairs/lists */ + if (stream.match(/^(\{|\}|\[|\])/)) { + if (ch == '{') + state.inlinePairs++; + else if (ch == '}') + state.inlinePairs--; + else if (ch == '[') + state.inlineList++; + else + state.inlineList--; + return 'meta'; + } + + /* list seperator */ + if (state.inlineList > 0 && !esc && ch == ',') { + stream.next(); + return 'meta'; + } + /* pairs seperator */ + if (state.inlinePairs > 0 && !esc && ch == ',') { + state.keyCol = 0; + state.pair = false; + state.pairStart = false; + stream.next(); + return 'meta'; + } + + /* start of value of a pair */ + if (state.pairStart) { + /* block literals */ + if (stream.match(/^\s*(\||\>)\s*/)) { state.literal = true; return 'meta'; }; + /* references */ + if (stream.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i)) { return 'variable-2'; } + /* numbers */ + if (state.inlinePairs == 0 && stream.match(/^\s*-?[0-9\.\,]+\s?$/)) { return 'number'; } + if (state.inlinePairs > 0 && stream.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/)) { return 'number'; } + /* keywords */ + if (stream.match(keywordRegex)) { return 'keyword'; } + } + + /* nothing found, continue */ + state.pairStart = false; + state.escaped = (ch == '\\'); + stream.next(); + return null; + }, + startState: function() { + return { + pair: false, + pairStart: false, + keyCol: 0, + inlinePairs: 0, + inlineList: 0, + literal: false, + escaped: false + }; + } + }; +}); + +CodeMirror.defineMIME("text/x-yaml", "yaml"); diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/modernizr-2.0.6.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/modernizr-2.0.6.js new file mode 100644 index 0000000..f9e57c8 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/modernizr-2.0.6.js @@ -0,0 +1,1116 @@ +/*! + * Modernizr v2.0.6 + * http://www.modernizr.com + * + * Copyright (c) 2009-2011 Faruk Ates, Paul Irish, Alex Sexton + * Dual-licensed under the BSD or MIT licenses: www.modernizr.com/license/ + */ + +/* + * Modernizr tests which native CSS3 and HTML5 features are available in + * the current UA and makes the results available to you in two ways: + * as properties on a global Modernizr object, and as classes on the + * element. This information allows you to progressively enhance + * your pages with a granular level of control over the experience. + * + * Modernizr has an optional (not included) conditional resource loader + * called Modernizr.load(), based on Yepnope.js (yepnopejs.com). + * To get a build that includes Modernizr.load(), as well as choosing + * which tests to include, go to www.modernizr.com/download/ + * + * Authors Faruk Ates, Paul Irish, Alex Sexton, + * Contributors Ryan Seddon, Ben Alman + */ + +window.Modernizr = (function( window, document, undefined ) { + + var version = '2.0.6', + + Modernizr = {}, + + // option for enabling the HTML classes to be added + enableClasses = true, + + docElement = document.documentElement, + docHead = document.head || document.getElementsByTagName('head')[0], + + /** + * Create our "modernizr" element that we do most feature tests on. + */ + mod = 'modernizr', + modElem = document.createElement(mod), + mStyle = modElem.style, + + /** + * Create the input element for various Web Forms feature tests. + */ + inputElem = document.createElement('input'), + + smile = ':)', + + toString = Object.prototype.toString, + + // List of property values to set for css tests. See ticket #21 + prefixes = ' -webkit- -moz- -o- -ms- -khtml- '.split(' '), + + // Following spec is to expose vendor-specific style properties as: + // elem.style.WebkitBorderRadius + // and the following would be incorrect: + // elem.style.webkitBorderRadius + + // Webkit ghosts their properties in lowercase but Opera & Moz do not. + // Microsoft foregoes prefixes entirely <= IE8, but appears to + // use a lowercase `ms` instead of the correct `Ms` in IE9 + + // More here: http://github.com/Modernizr/Modernizr/issues/issue/21 + domPrefixes = 'Webkit Moz O ms Khtml'.split(' '), + + ns = {'svg': 'http://www.w3.org/2000/svg'}, + + tests = {}, + inputs = {}, + attrs = {}, + + classes = [], + + featureName, // used in testing loop + + + // Inject element with style element and some CSS rules + injectElementWithStyles = function( rule, callback, nodes, testnames ) { + + var style, ret, node, + div = document.createElement('div'); + + if ( parseInt(nodes, 10) ) { + // In order not to give false positives we create a node for each test + // This also allows the method to scale for unspecified uses + while ( nodes-- ) { + node = document.createElement('div'); + node.id = testnames ? testnames[nodes] : mod + (nodes + 1); + div.appendChild(node); + } + } + + // '].join(''); + div.id = mod; + div.innerHTML += style; + docElement.appendChild(div); + + ret = callback(div, rule); + div.parentNode.removeChild(div); + + return !!ret; + + }, + + + // adapted from matchMedia polyfill + // by Scott Jehl and Paul Irish + // gist.github.com/786768 + testMediaQuery = function( mq ) { + + if ( window.matchMedia ) { + return matchMedia(mq).matches; + } + + var bool; + + injectElementWithStyles('@media ' + mq + ' { #' + mod + ' { position: absolute; } }', function( node ) { + bool = (window.getComputedStyle ? + getComputedStyle(node, null) : + node.currentStyle)['position'] == 'absolute'; + }); + + return bool; + + }, + + + /** + * isEventSupported determines if a given element supports the given event + * function from http://yura.thinkweb2.com/isEventSupported/ + */ + isEventSupported = (function() { + + var TAGNAMES = { + 'select': 'input', 'change': 'input', + 'submit': 'form', 'reset': 'form', + 'error': 'img', 'load': 'img', 'abort': 'img' + }; + + function isEventSupported( eventName, element ) { + + element = element || document.createElement(TAGNAMES[eventName] || 'div'); + eventName = 'on' + eventName; + + // When using `setAttribute`, IE skips "unload", WebKit skips "unload" and "resize", whereas `in` "catches" those + var isSupported = eventName in element; + + if ( !isSupported ) { + // If it has no `setAttribute` (i.e. doesn't implement Node interface), try generic element + if ( !element.setAttribute ) { + element = document.createElement('div'); + } + if ( element.setAttribute && element.removeAttribute ) { + element.setAttribute(eventName, ''); + isSupported = is(element[eventName], 'function'); + + // If property was created, "remove it" (by setting value to `undefined`) + if ( !is(element[eventName], undefined) ) { + element[eventName] = undefined; + } + element.removeAttribute(eventName); + } + } + + element = null; + return isSupported; + } + return isEventSupported; + })(); + + // hasOwnProperty shim by kangax needed for Safari 2.0 support + var _hasOwnProperty = ({}).hasOwnProperty, hasOwnProperty; + if ( !is(_hasOwnProperty, undefined) && !is(_hasOwnProperty.call, undefined) ) { + hasOwnProperty = function (object, property) { + return _hasOwnProperty.call(object, property); + }; + } + else { + hasOwnProperty = function (object, property) { /* yes, this can give false positives/negatives, but most of the time we don't care about those */ + return ((property in object) && is(object.constructor.prototype[property], undefined)); + }; + } + + /** + * setCss applies given styles to the Modernizr DOM node. + */ + function setCss( str ) { + mStyle.cssText = str; + } + + /** + * setCssAll extrapolates all vendor-specific css strings. + */ + function setCssAll( str1, str2 ) { + return setCss(prefixes.join(str1 + ';') + ( str2 || '' )); + } + + /** + * is returns a boolean for if typeof obj is exactly type. + */ + function is( obj, type ) { + return typeof obj === type; + } + + /** + * contains returns a boolean for if substr is found within str. + */ + function contains( str, substr ) { + return !!~('' + str).indexOf(substr); + } + + /** + * testProps is a generic CSS / DOM property test; if a browser supports + * a certain property, it won't return undefined for it. + * A supported CSS property returns empty string when its not yet set. + */ + function testProps( props, prefixed ) { + for ( var i in props ) { + if ( mStyle[ props[i] ] !== undefined ) { + return prefixed == 'pfx' ? props[i] : true; + } + } + return false; + } + + /** + * testPropsAll tests a list of DOM properties we want to check against. + * We specify literally ALL possible (known and/or likely) properties on + * the element including the non-vendor prefixed one, for forward- + * compatibility. + */ + function testPropsAll( prop, prefixed ) { + + var ucProp = prop.charAt(0).toUpperCase() + prop.substr(1), + props = (prop + ' ' + domPrefixes.join(ucProp + ' ') + ucProp).split(' '); + + return testProps(props, prefixed); + } + + /** + * testBundle tests a list of CSS features that require element and style injection. + * By bundling them together we can reduce the need to touch the DOM multiple times. + */ + /*>>testBundle*/ + var testBundle = (function( styles, tests ) { + var style = styles.join(''), + len = tests.length; + + injectElementWithStyles(style, function( node, rule ) { + var style = document.styleSheets[document.styleSheets.length - 1], + // IE8 will bork if you create a custom build that excludes both fontface and generatedcontent tests. + // So we check for cssRules and that there is a rule available + // More here: https://github.com/Modernizr/Modernizr/issues/288 & https://github.com/Modernizr/Modernizr/issues/293 + cssText = style.cssRules && style.cssRules[0] ? style.cssRules[0].cssText : style.cssText || "", + children = node.childNodes, hash = {}; + + while ( len-- ) { + hash[children[len].id] = children[len]; + } + + /*>>touch*/ Modernizr['touch'] = ('ontouchstart' in window) || hash['touch'].offsetTop === 9; /*>>touch*/ + /*>>csstransforms3d*/ Modernizr['csstransforms3d'] = hash['csstransforms3d'].offsetLeft === 9; /*>>csstransforms3d*/ + /*>>generatedcontent*/Modernizr['generatedcontent'] = hash['generatedcontent'].offsetHeight >= 1; /*>>generatedcontent*/ + /*>>fontface*/ Modernizr['fontface'] = /src/i.test(cssText) && + cssText.indexOf(rule.split(' ')[0]) === 0; /*>>fontface*/ + }, len, tests); + + })([ + // Pass in styles to be injected into document + /*>>fontface*/ '@font-face {font-family:"font";src:url("https://")}' /*>>fontface*/ + + /*>>touch*/ ,['@media (',prefixes.join('touch-enabled),('),mod,')', + '{#touch{top:9px;position:absolute}}'].join('') /*>>touch*/ + + /*>>csstransforms3d*/ ,['@media (',prefixes.join('transform-3d),('),mod,')', + '{#csstransforms3d{left:9px;position:absolute}}'].join('')/*>>csstransforms3d*/ + + /*>>generatedcontent*/,['#generatedcontent:after{content:"',smile,'";visibility:hidden}'].join('') /*>>generatedcontent*/ + ], + [ + /*>>fontface*/ 'fontface' /*>>fontface*/ + /*>>touch*/ ,'touch' /*>>touch*/ + /*>>csstransforms3d*/ ,'csstransforms3d' /*>>csstransforms3d*/ + /*>>generatedcontent*/,'generatedcontent' /*>>generatedcontent*/ + + ]);/*>>testBundle*/ + + + /** + * Tests + * ----- + */ + + tests['flexbox'] = function() { + /** + * setPrefixedValueCSS sets the property of a specified element + * adding vendor prefixes to the VALUE of the property. + * @param {Element} element + * @param {string} property The property name. This will not be prefixed. + * @param {string} value The value of the property. This WILL be prefixed. + * @param {string=} extra Additional CSS to append unmodified to the end of + * the CSS string. + */ + function setPrefixedValueCSS( element, property, value, extra ) { + property += ':'; + element.style.cssText = (property + prefixes.join(value + ';' + property)).slice(0, -property.length) + (extra || ''); + } + + /** + * setPrefixedPropertyCSS sets the property of a specified element + * adding vendor prefixes to the NAME of the property. + * @param {Element} element + * @param {string} property The property name. This WILL be prefixed. + * @param {string} value The value of the property. This will not be prefixed. + * @param {string=} extra Additional CSS to append unmodified to the end of + * the CSS string. + */ + function setPrefixedPropertyCSS( element, property, value, extra ) { + element.style.cssText = prefixes.join(property + ':' + value + ';') + (extra || ''); + } + + var c = document.createElement('div'), + elem = document.createElement('div'); + + setPrefixedValueCSS(c, 'display', 'box', 'width:42px;padding:0;'); + setPrefixedPropertyCSS(elem, 'box-flex', '1', 'width:10px;'); + + c.appendChild(elem); + docElement.appendChild(c); + + var ret = elem.offsetWidth === 42; + + c.removeChild(elem); + docElement.removeChild(c); + + return ret; + }; + + // On the S60 and BB Storm, getContext exists, but always returns undefined + // http://github.com/Modernizr/Modernizr/issues/issue/97/ + + tests['canvas'] = function() { + var elem = document.createElement('canvas'); + return !!(elem.getContext && elem.getContext('2d')); + }; + + tests['canvastext'] = function() { + return !!(Modernizr['canvas'] && is(document.createElement('canvas').getContext('2d').fillText, 'function')); + }; + + // This WebGL test may false positive. + // But really it's quite impossible to know whether webgl will succeed until after you create the context. + // You might have hardware that can support a 100x100 webgl canvas, but will not support a 1000x1000 webgl + // canvas. So this feature inference is weak, but intentionally so. + + // It is known to false positive in FF4 with certain hardware and the iPad 2. + + tests['webgl'] = function() { + return !!window.WebGLRenderingContext; + }; + + /* + * The Modernizr.touch test only indicates if the browser supports + * touch events, which does not necessarily reflect a touchscreen + * device, as evidenced by tablets running Windows 7 or, alas, + * the Palm Pre / WebOS (touch) phones. + * + * Additionally, Chrome (desktop) used to lie about its support on this, + * but that has since been rectified: http://crbug.com/36415 + * + * We also test for Firefox 4 Multitouch Support. + * + * For more info, see: http://modernizr.github.com/Modernizr/touch.html + */ + + tests['touch'] = function() { + return Modernizr['touch']; + }; + + /** + * geolocation tests for the new Geolocation API specification. + * This test is a standards compliant-only test; for more complete + * testing, including a Google Gears fallback, please see: + * http://code.google.com/p/geo-location-javascript/ + * or view a fallback solution using google's geo API: + * http://gist.github.com/366184 + */ + tests['geolocation'] = function() { + return !!navigator.geolocation; + }; + + // Per 1.6: + // This used to be Modernizr.crosswindowmessaging but the longer + // name has been deprecated in favor of a shorter and property-matching one. + // The old API is still available in 1.6, but as of 2.0 will throw a warning, + // and in the first release thereafter disappear entirely. + tests['postmessage'] = function() { + return !!window.postMessage; + }; + + // Web SQL database detection is tricky: + + // In chrome incognito mode, openDatabase is truthy, but using it will + // throw an exception: http://crbug.com/42380 + // We can create a dummy database, but there is no way to delete it afterwards. + + // Meanwhile, Safari users can get prompted on any database creation. + // If they do, any page with Modernizr will give them a prompt: + // http://github.com/Modernizr/Modernizr/issues/closed#issue/113 + + // We have chosen to allow the Chrome incognito false positive, so that Modernizr + // doesn't litter the web with these test databases. As a developer, you'll have + // to account for this gotcha yourself. + tests['websqldatabase'] = function() { + var result = !!window.openDatabase; + /* if (result){ + try { + result = !!openDatabase( mod + "testdb", "1.0", mod + "testdb", 2e4); + } catch(e) { + } + } */ + return result; + }; + + // Vendors had inconsistent prefixing with the experimental Indexed DB: + // - Webkit's implementation is accessible through webkitIndexedDB + // - Firefox shipped moz_indexedDB before FF4b9, but since then has been mozIndexedDB + // For speed, we don't test the legacy (and beta-only) indexedDB + tests['indexedDB'] = function() { + for ( var i = -1, len = domPrefixes.length; ++i < len; ){ + if ( window[domPrefixes[i].toLowerCase() + 'IndexedDB'] ){ + return true; + } + } + return !!window.indexedDB; + }; + + // documentMode logic from YUI to filter out IE8 Compat Mode + // which false positives. + tests['hashchange'] = function() { + return isEventSupported('hashchange', window) && (document.documentMode === undefined || document.documentMode > 7); + }; + + // Per 1.6: + // This used to be Modernizr.historymanagement but the longer + // name has been deprecated in favor of a shorter and property-matching one. + // The old API is still available in 1.6, but as of 2.0 will throw a warning, + // and in the first release thereafter disappear entirely. + tests['history'] = function() { + return !!(window.history && history.pushState); + }; + + tests['draganddrop'] = function() { + return isEventSupported('dragstart') && isEventSupported('drop'); + }; + + // Mozilla is targeting to land MozWebSocket for FF6 + // bugzil.la/659324 + tests['websockets'] = function() { + for ( var i = -1, len = domPrefixes.length; ++i < len; ){ + if ( window[domPrefixes[i] + 'WebSocket'] ){ + return true; + } + } + return 'WebSocket' in window; + }; + + + // http://css-tricks.com/rgba-browser-support/ + tests['rgba'] = function() { + // Set an rgba() color and check the returned value + + setCss('background-color:rgba(150,255,150,.5)'); + + return contains(mStyle.backgroundColor, 'rgba'); + }; + + tests['hsla'] = function() { + // Same as rgba(), in fact, browsers re-map hsla() to rgba() internally, + // except IE9 who retains it as hsla + + setCss('background-color:hsla(120,40%,100%,.5)'); + + return contains(mStyle.backgroundColor, 'rgba') || contains(mStyle.backgroundColor, 'hsla'); + }; + + tests['multiplebgs'] = function() { + // Setting multiple images AND a color on the background shorthand property + // and then querying the style.background property value for the number of + // occurrences of "url(" is a reliable method for detecting ACTUAL support for this! + + setCss('background:url(https://),url(https://),red url(https://)'); + + // If the UA supports multiple backgrounds, there should be three occurrences + // of the string "url(" in the return value for elemStyle.background + + return /(url\s*\(.*?){3}/.test(mStyle.background); + }; + + + // In testing support for a given CSS property, it's legit to test: + // `elem.style[styleName] !== undefined` + // If the property is supported it will return an empty string, + // if unsupported it will return undefined. + + // We'll take advantage of this quick test and skip setting a style + // on our modernizr element, but instead just testing undefined vs + // empty string. + + + tests['backgroundsize'] = function() { + return testPropsAll('backgroundSize'); + }; + + tests['borderimage'] = function() { + return testPropsAll('borderImage'); + }; + + + // Super comprehensive table about all the unique implementations of + // border-radius: http://muddledramblings.com/table-of-css3-border-radius-compliance + + tests['borderradius'] = function() { + return testPropsAll('borderRadius'); + }; + + // WebOS unfortunately false positives on this test. + tests['boxshadow'] = function() { + return testPropsAll('boxShadow'); + }; + + // FF3.0 will false positive on this test + tests['textshadow'] = function() { + return document.createElement('div').style.textShadow === ''; + }; + + + tests['opacity'] = function() { + // Browsers that actually have CSS Opacity implemented have done so + // according to spec, which means their return values are within the + // range of [0.0,1.0] - including the leading zero. + + setCssAll('opacity:.55'); + + // The non-literal . in this regex is intentional: + // German Chrome returns this value as 0,55 + // https://github.com/Modernizr/Modernizr/issues/#issue/59/comment/516632 + return /^0.55$/.test(mStyle.opacity); + }; + + + tests['cssanimations'] = function() { + return testPropsAll('animationName'); + }; + + + tests['csscolumns'] = function() { + return testPropsAll('columnCount'); + }; + + + tests['cssgradients'] = function() { + /** + * For CSS Gradients syntax, please see: + * http://webkit.org/blog/175/introducing-css-gradients/ + * https://developer.mozilla.org/en/CSS/-moz-linear-gradient + * https://developer.mozilla.org/en/CSS/-moz-radial-gradient + * http://dev.w3.org/csswg/css3-images/#gradients- + */ + + var str1 = 'background-image:', + str2 = 'gradient(linear,left top,right bottom,from(#9f9),to(white));', + str3 = 'linear-gradient(left top,#9f9, white);'; + + setCss( + (str1 + prefixes.join(str2 + str1) + prefixes.join(str3 + str1)).slice(0, -str1.length) + ); + + return contains(mStyle.backgroundImage, 'gradient'); + }; + + + tests['cssreflections'] = function() { + return testPropsAll('boxReflect'); + }; + + + tests['csstransforms'] = function() { + return !!testProps(['transformProperty', 'WebkitTransform', 'MozTransform', 'OTransform', 'msTransform']); + }; + + + tests['csstransforms3d'] = function() { + + var ret = !!testProps(['perspectiveProperty', 'WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective']); + + // Webkit’s 3D transforms are passed off to the browser's own graphics renderer. + // It works fine in Safari on Leopard and Snow Leopard, but not in Chrome in + // some conditions. As a result, Webkit typically recognizes the syntax but + // will sometimes throw a false positive, thus we must do a more thorough check: + if ( ret && 'webkitPerspective' in docElement.style ) { + + // Webkit allows this media query to succeed only if the feature is enabled. + // `@media (transform-3d),(-o-transform-3d),(-moz-transform-3d),(-ms-transform-3d),(-webkit-transform-3d),(modernizr){ ... }` + ret = Modernizr['csstransforms3d']; + } + return ret; + }; + + + tests['csstransitions'] = function() { + return testPropsAll('transitionProperty'); + }; + + + /*>>fontface*/ + // @font-face detection routine by Diego Perini + // http://javascript.nwbox.com/CSSSupport/ + tests['fontface'] = function() { + return Modernizr['fontface']; + }; + /*>>fontface*/ + + // CSS generated content detection + tests['generatedcontent'] = function() { + return Modernizr['generatedcontent']; + }; + + + + // These tests evaluate support of the video/audio elements, as well as + // testing what types of content they support. + // + // We're using the Boolean constructor here, so that we can extend the value + // e.g. Modernizr.video // true + // Modernizr.video.ogg // 'probably' + // + // Codec values from : http://github.com/NielsLeenheer/html5test/blob/9106a8/index.html#L845 + // thx to NielsLeenheer and zcorpan + + // Note: in FF 3.5.1 and 3.5.0, "no" was a return value instead of empty string. + // Modernizr does not normalize for that. + + tests['video'] = function() { + var elem = document.createElement('video'), + bool = false; + + // IE9 Running on Windows Server SKU can cause an exception to be thrown, bug #224 + try { + if ( bool = !!elem.canPlayType ) { + bool = new Boolean(bool); + bool.ogg = elem.canPlayType('video/ogg; codecs="theora"'); + + // Workaround required for IE9, which doesn't report video support without audio codec specified. + // bug 599718 @ msft connect + var h264 = 'video/mp4; codecs="avc1.42E01E'; + bool.h264 = elem.canPlayType(h264 + '"') || elem.canPlayType(h264 + ', mp4a.40.2"'); + + bool.webm = elem.canPlayType('video/webm; codecs="vp8, vorbis"'); + } + + } catch(e) { } + + return bool; + }; + + tests['audio'] = function() { + var elem = document.createElement('audio'), + bool = false; + + try { + if ( bool = !!elem.canPlayType ) { + bool = new Boolean(bool); + bool.ogg = elem.canPlayType('audio/ogg; codecs="vorbis"'); + bool.mp3 = elem.canPlayType('audio/mpeg;'); + + // Mimetypes accepted: + // https://developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements + // http://bit.ly/iphoneoscodecs + bool.wav = elem.canPlayType('audio/wav; codecs="1"'); + bool.m4a = elem.canPlayType('audio/x-m4a;') || elem.canPlayType('audio/aac;'); + } + } catch(e) { } + + return bool; + }; + + + // Firefox has made these tests rather unfun. + + // In FF4, if disabled, window.localStorage should === null. + + // Normally, we could not test that directly and need to do a + // `('localStorage' in window) && ` test first because otherwise Firefox will + // throw http://bugzil.la/365772 if cookies are disabled + + // However, in Firefox 4 betas, if dom.storage.enabled == false, just mentioning + // the property will throw an exception. http://bugzil.la/599479 + // This looks to be fixed for FF4 Final. + + // Because we are forced to try/catch this, we'll go aggressive. + + // FWIW: IE8 Compat mode supports these features completely: + // http://www.quirksmode.org/dom/html5.html + // But IE8 doesn't support either with local files + + tests['localstorage'] = function() { + try { + return !!localStorage.getItem; + } catch(e) { + return false; + } + }; + + tests['sessionstorage'] = function() { + try { + return !!sessionStorage.getItem; + } catch(e){ + return false; + } + }; + + + tests['webworkers'] = function() { + return !!window.Worker; + }; + + + tests['applicationcache'] = function() { + return !!window.applicationCache; + }; + + + // Thanks to Erik Dahlstrom + tests['svg'] = function() { + return !!document.createElementNS && !!document.createElementNS(ns.svg, 'svg').createSVGRect; + }; + + // specifically for SVG inline in HTML, not within XHTML + // test page: paulirish.com/demo/inline-svg + tests['inlinesvg'] = function() { + var div = document.createElement('div'); + div.innerHTML = ''; + return (div.firstChild && div.firstChild.namespaceURI) == ns.svg; + }; + + // Thanks to F1lt3r and lucideer, ticket #35 + tests['smil'] = function() { + return !!document.createElementNS && /SVG/.test(toString.call(document.createElementNS(ns.svg, 'animate'))); + }; + + tests['svgclippaths'] = function() { + // Possibly returns a false positive in Safari 3.2? + return !!document.createElementNS && /SVG/.test(toString.call(document.createElementNS(ns.svg, 'clipPath'))); + }; + + // input features and input types go directly onto the ret object, bypassing the tests loop. + // Hold this guy to execute in a moment. + function webforms() { + // Run through HTML5's new input attributes to see if the UA understands any. + // We're using f which is the element created early on + // Mike Taylr has created a comprehensive resource for testing these attributes + // when applied to all input types: + // http://miketaylr.com/code/input-type-attr.html + // spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary + + // Only input placeholder is tested while textarea's placeholder is not. + // Currently Safari 4 and Opera 11 have support only for the input placeholder + // Both tests are available in feature-detects/forms-placeholder.js + Modernizr['input'] = (function( props ) { + for ( var i = 0, len = props.length; i < len; i++ ) { + attrs[ props[i] ] = !!(props[i] in inputElem); + } + return attrs; + })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' ')); + + // Run through HTML5's new input types to see if the UA understands any. + // This is put behind the tests runloop because it doesn't return a + // true/false like all the other tests; instead, it returns an object + // containing each input type with its corresponding true/false value + + // Big thanks to @miketaylr for the html5 forms expertise. http://miketaylr.com/ + Modernizr['inputtypes'] = (function(props) { + + for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) { + + inputElem.setAttribute('type', inputElemType = props[i]); + bool = inputElem.type !== 'text'; + + // We first check to see if the type we give it sticks.. + // If the type does, we feed it a textual value, which shouldn't be valid. + // If the value doesn't stick, we know there's input sanitization which infers a custom UI + if ( bool ) { + + inputElem.value = smile; + inputElem.style.cssText = 'position:absolute;visibility:hidden;'; + + if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) { + + docElement.appendChild(inputElem); + defaultView = document.defaultView; + + // Safari 2-4 allows the smiley as a value, despite making a slider + bool = defaultView.getComputedStyle && + defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' && + // Mobile android web browser has false positive, so must + // check the height to see if the widget is actually there. + (inputElem.offsetHeight !== 0); + + docElement.removeChild(inputElem); + + } else if ( /^(search|tel)$/.test(inputElemType) ){ + // Spec doesnt define any special parsing or detectable UI + // behaviors so we pass these through as true + + // Interestingly, opera fails the earlier test, so it doesn't + // even make it here. + + } else if ( /^(url|email)$/.test(inputElemType) ) { + // Real url and email support comes with prebaked validation. + bool = inputElem.checkValidity && inputElem.checkValidity() === false; + + } else if ( /^color$/.test(inputElemType) ) { + // chuck into DOM and force reflow for Opera bug in 11.00 + // github.com/Modernizr/Modernizr/issues#issue/159 + docElement.appendChild(inputElem); + docElement.offsetWidth; + bool = inputElem.value != smile; + docElement.removeChild(inputElem); + + } else { + // If the upgraded input compontent rejects the :) text, we got a winner + bool = inputElem.value != smile; + } + } + + inputs[ props[i] ] = !!bool; + } + return inputs; + })('search tel url email datetime date month week time datetime-local number range color'.split(' ')); + } + + + // End of test definitions + // ----------------------- + + + + // Run through all tests and detect their support in the current UA. + // todo: hypothetically we could be doing an array of tests and use a basic loop here. + for ( var feature in tests ) { + if ( hasOwnProperty(tests, feature) ) { + // run the test, throw the return value into the Modernizr, + // then based on that boolean, define an appropriate className + // and push it into an array of classes we'll join later. + featureName = feature.toLowerCase(); + Modernizr[featureName] = tests[feature](); + + classes.push((Modernizr[featureName] ? '' : 'no-') + featureName); + } + } + + // input tests need to run. + Modernizr.input || webforms(); + + + /** + * addTest allows the user to define their own feature tests + * the result will be added onto the Modernizr object, + * as well as an appropriate className set on the html element + * + * @param feature - String naming the feature + * @param test - Function returning true if feature is supported, false if not + */ + Modernizr.addTest = function ( feature, test ) { + if ( typeof feature == "object" ) { + for ( var key in feature ) { + if ( hasOwnProperty( feature, key ) ) { + Modernizr.addTest( key, feature[ key ] ); + } + } + } else { + + feature = feature.toLowerCase(); + + if ( Modernizr[feature] !== undefined ) { + // we're going to quit if you're trying to overwrite an existing test + // if we were to allow it, we'd do this: + // var re = new RegExp("\\b(no-)?" + feature + "\\b"); + // docElement.className = docElement.className.replace( re, '' ); + // but, no rly, stuff 'em. + return; + } + + test = typeof test == "boolean" ? test : !!test(); + + docElement.className += ' ' + (test ? '' : 'no-') + feature; + Modernizr[feature] = test; + + } + + return Modernizr; // allow chaining. + }; + + + // Reset modElem.cssText to nothing to reduce memory footprint. + setCss(''); + modElem = inputElem = null; + + //>>BEGIN IEPP + // Enable HTML 5 elements for styling (and printing) in IE. + if ( window.attachEvent && (function(){ var elem = document.createElement('div'); + elem.innerHTML = ''; + return elem.childNodes.length !== 1; })() ) { + + // iepp v2 by @jon_neal & afarkas : github.com/aFarkas/iepp/ + (function(win, doc) { + win.iepp = win.iepp || {}; + var iepp = win.iepp, + elems = iepp.html5elements || 'abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video', + elemsArr = elems.split('|'), + elemsArrLen = elemsArr.length, + elemRegExp = new RegExp('(^|\\s)('+elems+')', 'gi'), + tagRegExp = new RegExp('<(\/*)('+elems+')', 'gi'), + filterReg = /^\s*[\{\}]\s*$/, + ruleRegExp = new RegExp('(^|[^\\n]*?\\s)('+elems+')([^\\n]*)({[\\n\\w\\W]*?})', 'gi'), + docFrag = doc.createDocumentFragment(), + html = doc.documentElement, + head = html.firstChild, + bodyElem = doc.createElement('body'), + styleElem = doc.createElement('style'), + printMedias = /print|all/, + body; + function shim(doc) { + var a = -1; + while (++a < elemsArrLen) + // Use createElement so IE allows HTML5-named elements in a document + doc.createElement(elemsArr[a]); + } + + iepp.getCSS = function(styleSheetList, mediaType) { + if(styleSheetList+'' === undefined){return '';} + var a = -1, + len = styleSheetList.length, + styleSheet, + cssTextArr = []; + while (++a < len) { + styleSheet = styleSheetList[a]; + //currently no test for disabled/alternate stylesheets + if(styleSheet.disabled){continue;} + mediaType = styleSheet.media || mediaType; + // Get css from all non-screen stylesheets and their imports + if (printMedias.test(mediaType)) cssTextArr.push(iepp.getCSS(styleSheet.imports, mediaType), styleSheet.cssText); + //reset mediaType to all with every new *not imported* stylesheet + mediaType = 'all'; + } + return cssTextArr.join(''); + }; + + iepp.parseCSS = function(cssText) { + var cssTextArr = [], + rule; + while ((rule = ruleRegExp.exec(cssText)) != null){ + // Replace all html5 element references with iepp substitute classnames + cssTextArr.push(( (filterReg.exec(rule[1]) ? '\n' : rule[1]) +rule[2]+rule[3]).replace(elemRegExp, '$1.iepp_$2')+rule[4]); + } + return cssTextArr.join('\n'); + }; + + iepp.writeHTML = function() { + var a = -1; + body = body || doc.body; + while (++a < elemsArrLen) { + var nodeList = doc.getElementsByTagName(elemsArr[a]), + nodeListLen = nodeList.length, + b = -1; + while (++b < nodeListLen) + if (nodeList[b].className.indexOf('iepp_') < 0) + // Append iepp substitute classnames to all html5 elements + nodeList[b].className += ' iepp_'+elemsArr[a]; + } + docFrag.appendChild(body); + html.appendChild(bodyElem); + // Write iepp substitute print-safe document + bodyElem.className = body.className; + bodyElem.id = body.id; + // Replace HTML5 elements with which is print-safe and shouldn't conflict since it isn't part of html5 + bodyElem.innerHTML = body.innerHTML.replace(tagRegExp, '<$1font'); + }; + + + iepp._beforePrint = function() { + // Write iepp custom print CSS + styleElem.styleSheet.cssText = iepp.parseCSS(iepp.getCSS(doc.styleSheets, 'all')); + iepp.writeHTML(); + }; + + iepp.restoreHTML = function(){ + // Undo everything done in onbeforeprint + bodyElem.innerHTML = ''; + html.removeChild(bodyElem); + html.appendChild(body); + }; + + iepp._afterPrint = function(){ + // Undo everything done in onbeforeprint + iepp.restoreHTML(); + styleElem.styleSheet.cssText = ''; + }; + + + + // Shim the document and iepp fragment + shim(doc); + shim(docFrag); + + // + if(iepp.disablePP){return;} + + // Add iepp custom print style element + head.insertBefore(styleElem, head.firstChild); + styleElem.media = 'print'; + styleElem.className = 'iepp-printshim'; + win.attachEvent( + 'onbeforeprint', + iepp._beforePrint + ); + win.attachEvent( + 'onafterprint', + iepp._afterPrint + ); + })(window, document); + } + //>>END IEPP + + // Assign private properties to the return object with prefix + Modernizr._version = version; + + // expose these for the plugin API. Look in the source for how to join() them against your input + Modernizr._prefixes = prefixes; + Modernizr._domPrefixes = domPrefixes; + + // Modernizr.mq tests a given media query, live against the current state of the window + // A few important notes: + // * If a browser does not support media queries at all (eg. oldIE) the mq() will always return false + // * A max-width or orientation query will be evaluated against the current state, which may change later. + // * You must specify values. Eg. If you are testing support for the min-width media query use: + // Modernizr.mq('(min-width:0)') + // usage: + // Modernizr.mq('only screen and (max-width:768)') + Modernizr.mq = testMediaQuery; + + // Modernizr.hasEvent() detects support for a given event, with an optional element to test on + // Modernizr.hasEvent('gesturestart', elem) + Modernizr.hasEvent = isEventSupported; + + // Modernizr.testProp() investigates whether a given style property is recognized + // Note that the property names must be provided in the camelCase variant. + // Modernizr.testProp('pointerEvents') + Modernizr.testProp = function(prop){ + return testProps([prop]); + }; + + // Modernizr.testAllProps() investigates whether a given style property, + // or any of its vendor-prefixed variants, is recognized + // Note that the property names must be provided in the camelCase variant. + // Modernizr.testAllProps('boxSizing') + Modernizr.testAllProps = testPropsAll; + + + + // Modernizr.testStyles() allows you to add custom styles to the document and test an element afterwards + // Modernizr.testStyles('#modernizr { position:absolute }', function(elem, rule){ ... }) + Modernizr.testStyles = injectElementWithStyles; + + + // Modernizr.prefixed() returns the prefixed or nonprefixed property name variant of your input + // Modernizr.prefixed('boxSizing') // 'MozBoxSizing' + + // Properties must be passed as dom-style camelcase, rather than `box-sizing` hypentated style. + // Return values will also be the camelCase variant, if you need to translate that to hypenated style use: + // + // str.replace(/([A-Z])/g, function(str,m1){ return '-' + m1.toLowerCase(); }).replace(/^ms-/,'-ms-'); + + // If you're trying to ascertain which transition end event to bind to, you might do something like... + // + // var transEndEventNames = { + // 'WebkitTransition' : 'webkitTransitionEnd', + // 'MozTransition' : 'transitionend', + // 'OTransition' : 'oTransitionEnd', + // 'msTransition' : 'msTransitionEnd', // maybe? + // 'transition' : 'transitionEnd' + // }, + // transEndEventName = transEndEventNames[ Modernizr.prefixed('transition') ]; + + Modernizr.prefixed = function(prop){ + return testPropsAll(prop, 'pfx'); + }; + + + + // Remove "no-js" class from element, if it exists: + docElement.className = docElement.className.replace(/\bno-js\b/, '') + + // Add the new classes to the element. + + (enableClasses ? ' js ' + classes.join(' ') : ''); + + return Modernizr; + +})(this, this.document); diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/transformjs.1.0.beta.2.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/transformjs.1.0.beta.2.js new file mode 100644 index 0000000..7390997 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/external/transformjs.1.0.beta.2.js @@ -0,0 +1,428 @@ +// Vector and Matrix mathematics modules for JavaScript +// Copyright (c) 2007 James Coglan +// +// 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. + +var Sylvester = { + version: '0.1.3', + precision: 1e-6 +}; + +function Matrix() {} +Matrix.prototype = { + + // Returns element (i,j) of the matrix + e: function(i,j) { + if (i < 1 || i > this.elements.length || j < 1 || j > this.elements[0].length) { return null; } + return this.elements[i-1][j-1]; + }, + + // Maps the matrix to another matrix (of the same dimensions) according to the given function + map: function(fn) { + var els = [], ni = this.elements.length, ki = ni, i, nj, kj = this.elements[0].length, j; + do { i = ki - ni; + nj = kj; + els[i] = []; + do { j = kj - nj; + els[i][j] = fn(this.elements[i][j], i + 1, j + 1); + } while (--nj); + } while (--ni); + return Matrix.create(els); + }, + + // Returns the result of multiplying the matrix from the right by the argument. + // If the argument is a scalar then just multiply all the elements. If the argument is + // a vector, a vector is returned, which saves you having to remember calling + // col(1) on the result. + multiply: function(matrix) { + if (!matrix.elements) { + return this.map(function(x) { return x * matrix; }); + } + var returnVector = matrix.modulus ? true : false; + var M = matrix.elements || matrix; + if (typeof(M[0][0]) == 'undefined') { M = Matrix.create(M).elements; } + if (!this.canMultiplyFromLeft(M)) { return null; } + var ni = this.elements.length, ki = ni, i, nj, kj = M[0].length, j; + var cols = this.elements[0].length, elements = [], sum, nc, c; + do { i = ki - ni; + elements[i] = []; + nj = kj; + do { j = kj - nj; + sum = 0; + nc = cols; + do { c = cols - nc; + sum += this.elements[i][c] * M[c][j]; + } while (--nc); + elements[i][j] = sum; + } while (--nj); + } while (--ni); + var M = Matrix.create(elements); + return returnVector ? M.col(1) : M; + }, + + x: function(matrix) { return this.multiply(matrix); }, + + // Returns true iff the matrix can multiply the argument from the left + canMultiplyFromLeft: function(matrix) { + var M = matrix.elements || matrix; + if (typeof(M[0][0]) == 'undefined') { M = Matrix.create(M).elements; } + // this.columns should equal matrix.rows + return (this.elements[0].length == M.length); + }, + + // Set the matrix's elements from an array. If the argument passed + // is a vector, the resulting matrix will be a single column. + setElements: function(els) { + var i, elements = els.elements || els; + if (typeof(elements[0][0]) != 'undefined') { + var ni = elements.length, ki = ni, nj, kj, j; + this.elements = []; + do { i = ki - ni; + nj = elements[i].length; kj = nj; + this.elements[i] = []; + do { j = kj - nj; + this.elements[i][j] = elements[i][j]; + } while (--nj); + } while(--ni); + return this; + } + var n = elements.length, k = n; + this.elements = []; + do { i = k - n; + this.elements.push([elements[i]]); + } while (--n); + return this; + } +}; + +// Constructor function +Matrix.create = function(elements) { + var M = new Matrix(); + return M.setElements(elements); +}; + +// Utility functions +$M = Matrix.create; +// ========================================================================== +// Project: TransformJS +// Copyright: ©2011 Strobe Inc. +// License: Licensed under MIT license (see license.js) +// ========================================================================== + +(function($) { + + if ( !$.cssHooks ) { + throw("jQuery 1.4.3+ is needed for this plugin to work"); + return; + } + + var translationUnit = 'px' + + var prop = "transform", + vendorProp, supportedProp, supports3d, supports2d, supportsFilter, + + // capitalize first character of the prop to test vendor prefix + capProp = prop.charAt(0).toUpperCase() + prop.slice(1), + prefixes = [ "Moz", "Webkit", "O", "ms" ], + div = document.createElement( "div" ); + + if ( prop in div.style ) { + + // browser supports standard CSS property name + supportedProp = prop; + supports3d = div.style.perspective !== undefined; + } + else { + + // otherwise test support for vendor-prefixed property names + for ( var i = 0; i < prefixes.length; i++ ) { + vendorProp = prefixes[i] + capProp; + + if ( vendorProp in div.style ) { + supportedProp = vendorProp; + if (prefixes[i] == 'ms') { + translationUnit = '' + } + if((prefixes[i] + 'Perspective') in div.style) { + supports3d = true; + } + else { + supports2d = true; + } + break; + } + } + } + + if (!supportedProp) { + supportsFilter = ('filter' in div.style); + supportedProp = 'filter'; + } + + // console.log('supportedProp: '+supportedProp+', 2d: '+supports2d+', 3d: '+supports3d+', filter: '+supportsFilter); + + // avoid memory leak in IE + div = null; + + // add property to $.support so it can be accessed elsewhere + $.support[ prop ] = supportedProp; + + var transformProperty = supportedProp; + + var properties = { + rotateX: { + defaultValue: 0, + matrix: function(a) { + if (supports3d) { + return $M([ + [1,0,0,0], + [0,Math.cos(a), Math.sin(-a), 0], + [0,Math.sin(a), Math.cos( a), 0], + [0,0,0,1] + ]); + } + else { + return $M([ + [1, 0,0], + [0, 1,0], + [0,0,1] + ]); + } + } + }, + rotateY: { + defaultValue: 0, + matrix: function(b) { + if (supports3d) { + return $M([ + [Math.cos( b), 0, Math.sin(b),0], + [0,1,0,0], + [Math.sin(-b), 0, Math.cos(b), 0], + [0,0,0,1] + ]); + } + else { + return $M([ + [1, 0,0], + [0, 1,0], + [0,0,1] + ]); + } + } + }, + rotateZ: { + defaultValue: 0, + matrix: function(c) { + if (supports3d) { + return $M([ + [Math.cos(c), Math.sin(-c), 0, 0], + [Math.sin(c), Math.cos( c), 0, 0], + [0,0,1,0], + [0,0,0,1] + ]); + } + else { + return $M([ + [Math.cos(c), Math.sin(-c),0], + [Math.sin(c), Math.cos( c),0], + [0,0,1] + ]); + } + } + }, + scale: { + defaultValue: 1, + matrix: function(s) { + if (supports3d) { + return $M([ + [s,0,0,0], + [0,s,0,0], + [0,0,s,0], + [0,0,0,1] + ]); + } + else { + return $M([ + [s, 0,0], + [0, s,0], + [0,0,1] + ]); + } + } + }, + translateX: { + defaultValue: 0, + matrix: function(tx) { + if (supports3d) { + return $M([ + [1,0,0,0], + [0,1,0,0], + [0,0,1,0], + [tx,0,0,1] + ]); + } + else { + return $M([ + [1, 0,0], + [0, 1,0], + [tx,0,1] + ]); + } + } + }, + translateY: { + defaultValue: 0, + matrix: function(ty) { + if (supports3d) { + return $M([ + [1,0,0,0], + [0,1,0,0], + [0,0,1,0], + [0,ty,0,1] + ]); + } + else { + return $M([ + [1, 0,0], + [0, 1,0], + [0,ty,1] + ]); + } + } + }, + translateZ: { + defaultValue: 0, + matrix: function(tz) { + if (supports3d) { + return $M([ + [1,0,0,0], + [0,1,0,0], + [0,0,1,0], + [0,0,tz,1] + ]); + } + else { + return $M([ + [1, 0,0], + [0, 1,0], + [0,0,1] + ]); + } + } + } + }; + + var applyMatrix = function(elem) { + var transforms = $(elem).data('transforms'); + var tM; + + if (supports3d) { + tM = $M([ + [1,0,0,0], + [0,1,0,0], + [0,0,1,0], + [0,0,0,1] + ]); + } + else { + tM = $M([ + [1,0,0], + [0,1,0], + [0,0,1] + ]); + } + + for (var name in properties) { + tM = tM.x(properties[name].matrix(transforms[name] || properties[name].defaultValue)) + } + + if (supports3d) { + s = "matrix3d("; + s += tM.e(1,1).toFixed(10) + "," + tM.e(1,2).toFixed(10) + "," + tM.e(1,3).toFixed(10) + "," + tM.e(1,4).toFixed(10) + ","; + s += tM.e(2,1).toFixed(10) + "," + tM.e(2,2).toFixed(10) + "," + tM.e(2,3).toFixed(10) + "," + tM.e(2,4).toFixed(10) + ","; + s += tM.e(3,1).toFixed(10) + "," + tM.e(3,2).toFixed(10) + "," + tM.e(3,3).toFixed(10) + "," + tM.e(3,4).toFixed(10) + ","; + s += tM.e(4,1).toFixed(10) + "," + tM.e(4,2).toFixed(10) + "," + tM.e(4,3).toFixed(10) + "," + tM.e(4,4).toFixed(10); + s += ")"; + } + else if (supports2d) { + s = "matrix("; + s += tM.e(1,1).toFixed(10) + "," + tM.e(1,2).toFixed(10) + ","; + s += tM.e(2,1).toFixed(10) + "," + tM.e(2,2).toFixed(10) + ","; + s += tM.e(3,1).toFixed(10) + translationUnit + "," + tM.e(3,2).toFixed(10) + translationUnit; + s += ")"; + } + else if (supportsFilter) { + s = "progid:DXImageTransform.Microsoft."; + s += "Matrix("; + s += "M11="+tM.e(1,1).toFixed(10) + ","; + s += "M12="+tM.e(1,2).toFixed(10) + ","; + s += "M21="+tM.e(2,1).toFixed(10) + ","; + s += "M22="+tM.e(2,2).toFixed(10) + ","; + s += "SizingMethod='auto expand'"; + s += ")"; + + elem.style.top = tM.e(3,1); + elem.style.left = tM.e(3,2); + } + + elem.style[transformProperty] = s; + } + + var hookFor = function(name) { + + $.fx.step[name] = function(fx){ + $.cssHooks[name].set( fx.elem, fx.now + fx.unit ); + }; + + return { + get: function( elem, computed, extra ) { + var transforms = $(elem).data('transforms'); + if (transforms === undefined) { + transforms = {}; + $(elem).data('transforms',transforms); + } + + return transforms[name] || properties[name].defaultValue; + }, + set: function( elem, value) { + var transforms = $(elem).data('transforms'); + if (transforms === undefined) transforms = {}; + var propInfo = properties[name]; + + if (typeof propInfo.apply === 'function') { + transforms[name] = propInfo.apply(transforms[name] || propInfo.defaultValue, value); + } else { + transforms[name] = value + } + + $(elem).data('transforms',transforms); + + applyMatrix(elem); + } + } + } + + if (transformProperty) { + for (var name in properties) { + $.cssHooks[name] = hookFor(name); + $.cssNumber[name] = true; + } + } + +})(jQuery); diff --git a/osx/build/Debug/Nide.app/Contents/Resources/client/js/nide.js b/osx/build/Debug/Nide.app/Contents/Resources/client/js/nide.js new file mode 100644 index 0000000..6a4d320 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/client/js/nide.js @@ -0,0 +1,9 @@ +var ui, connection; + +$(function() { + connection = new ServerConnection() + ui = new UserInterfaceController() +}) + +var cwd = '' +var nodeVersion = 'v0.4.11' \ No newline at end of file diff --git a/osx/build/Debug/Nide.app/Contents/Resources/en.lproj/Credits.rtf b/osx/build/Debug/Nide.app/Contents/Resources/en.lproj/Credits.rtf new file mode 100644 index 0000000..d2abf66 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/en.lproj/Credits.rtf @@ -0,0 +1,65 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf230 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset0 Zapfino;} +{\colortbl;\red255\green255\blue255;} +\paperw11900\paperh16840\vieww9600\viewh8400\viewkind0 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc + +\f0\b\fs24 \cf0 \ + +\f1\i\b0\fs36 Credits +\f0\i0\b\fs24 \ +Contributors:\ +\ +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\b0 \cf0 Marco Aur\'e9lio\ +({\field{\*\fldinst{HYPERLINK "https://github.com/coreh"}}{\fldrslt https://github.com/coreh}})\ +\ +Ryan Tse\ +({\field{\*\fldinst{HYPERLINK "https://github.com/iwizardpro"}}{\fldrslt https://github.com/iwizardpro}})\ +\ +Isaac Z. Schlueter\ +({\field{\*\fldinst{HYPERLINK "https://github.com/isaacs"}}{\fldrslt https://github.com/isaacs}})\ +\ +Trent Ogren\ +({\field{\*\fldinst{HYPERLINK "https://github.com/misfo"}}{\fldrslt https://github.com/misfo}})\ +\ +Jonah Wallerstein\ +({\field{\*\fldinst{HYPERLINK "https://github.com/whalefood"}}{\fldrslt https://github.com/whalefood}})\ +\ +Paul Vorbach\ +({\field{\*\fldinst{HYPERLINK "https://github.com/pvorb"}}{\fldrslt https://github.com/pvorb}})\ +\ + +\b Icons\ + +\b0 \ +Bogdan Mihaiciuc \ +({\field{\*\fldinst{HYPERLINK "http://bogo-d.deviantart.com/"}}{\fldrslt http://bogo-d.deviantart.com/}})\ +\ +Marco Aur\'e9lio\ +Ryan Tse\ +\ + +\b Libraries Used:\ +\ + +\b0 express\ +commander\ +dive\ +socket.io\ +node-uuid\ +jquery\ +codemirror\ +modernizr\ +transformjs\ +\ + +\b Thanks to everyone involved on the development of these libraries! Nide would not be possible without them. +\b0 \ +\ + +\b Thanks to everyone who supported nide with donations, bug reports, patches and suggestions.\ +\ +Thanks to everyone involved with Node.JS and NPM development.\ +} \ No newline at end of file diff --git a/osx/build/Debug/Nide.app/Contents/Resources/en.lproj/InfoPlist.strings b/osx/build/Debug/Nide.app/Contents/Resources/en.lproj/InfoPlist.strings new file mode 100644 index 0000000..dea12de Binary files /dev/null and b/osx/build/Debug/Nide.app/Contents/Resources/en.lproj/InfoPlist.strings differ diff --git a/osx/build/Debug/Nide.app/Contents/Resources/en.lproj/MainMenu.nib b/osx/build/Debug/Nide.app/Contents/Resources/en.lproj/MainMenu.nib new file mode 100644 index 0000000..f950adb Binary files /dev/null and b/osx/build/Debug/Nide.app/Contents/Resources/en.lproj/MainMenu.nib differ diff --git a/osx/build/Debug/Nide.app/Contents/Resources/main.js b/osx/build/Debug/Nide.app/Contents/Resources/main.js new file mode 100755 index 0000000..a2a4c58 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/main.js @@ -0,0 +1,66 @@ +#!/usr/bin/env node + +var program = require('commander'); +var server = require('./server/server'); +var project = require('./server/project'); +var exec = require('child_process').exec +var path = require('path') +var fs = require('fs') + +var packageJSON = JSON.parse(fs.readFileSync(__dirname + '/package.json', 'utf-8')) + +var checkForDependencies = function(callback) { + exec('which npm', function(err, stdout, stderr) { + if (err) { + console.error('Could not find `npm` command. Is npm installed?') + process.exit(-1) + } else { + callback() + } + }) +} + +program + .version(packageJSON.version) + .option('-H, --host ', 'only accept traffic directed to a specific ip') + .option('-p, --port ', 'use a custom http port') + .option('-u, --username ', 'require a username for authentication') + .option('-P, --password ', 'require a password for authentication') + .option('-d, --no-downgrade', 'do not downgrade, force run as root (must already be root)') + .option('-b, --no-browser', 'do not attempt to launch the default browser') +program + .command('init [directory]') + .description('Initialize a new project and listen for connections.') + .action(function(dir){checkForDependencies(function(){ + // Work around name collision caused by "password" function provided by commander + var password = program.password instanceof Function ? undefined : program.password + if (dir && !path.existsSync(dir)) { + console.log('Created `' + dir + '` directory.') + fs.mkdirSync(dir) + } + project.chdir(dir) + project.init() + project.start() + server.listen(program.port || process.env.PORT || 8123, program.host, program.username, password, program.downgrade, program.browser) + })}) + +program + .command('listen [directory]') + .description('Listen for connections.') + .action(function(dir){checkForDependencies(function(){ + // Work around name collision caused by "password" function provided by commander + var password = program.password instanceof Function ? undefined : program.password + project.chdir(dir) + project.start() + server.listen(program.port || process.env.PORT || 8123, program.host, program.username, password, program.downgrade, program.browser) + })}) + +if (process.argv.length > 2) { + if (process.argv[2].charAt(0) == '-') { + process.argv.splice(2, 0, 'listen') + } + program.parse(process.argv); +} else { + process.argv.push('listen'); + program.parse(process.argv); +} diff --git a/osx/build/Debug/Nide.app/Contents/Resources/nide-project.icns b/osx/build/Debug/Nide.app/Contents/Resources/nide-project.icns new file mode 100644 index 0000000..0f10ad8 Binary files /dev/null and b/osx/build/Debug/Nide.app/Contents/Resources/nide-project.icns differ diff --git a/osx/build/Debug/Nide.app/Contents/Resources/nide.icns b/osx/build/Debug/Nide.app/Contents/Resources/nide.icns new file mode 100644 index 0000000..832ea37 Binary files /dev/null and b/osx/build/Debug/Nide.app/Contents/Resources/nide.icns differ diff --git a/osx/build/Debug/Nide.app/Contents/Resources/package.json b/osx/build/Debug/Nide.app/Contents/Resources/package.json new file mode 100644 index 0000000..6060d53 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/package.json @@ -0,0 +1,23 @@ +{ + "author": "Marco Aurelio", + "name": "nide", + "keywords": ["ide", "integrated", "development", "environment", "editor", "coding", "tool"], + "description": "Beautiful IDE for Node.js", + "version": "0.2.0", + "repository": "http://github.com/Coreh/nide.git", + "homepage": "http://coreh.github.com/nide/", + "engines": { + "node": ">=0.4.9 < 0.7.0" + }, + "dependencies": { + "express": "~2.5.1", + "commander": "~0.4.2", + "dive": ">=0.1.2", + "socket.io": "~0.8.7", + "node-uuid": "~1.3.0" + }, + "bin": { + "nide": "./main.js" + }, + "devDependencies": {} +} diff --git a/osx/build/Debug/Nide.app/Contents/Resources/server/project.js b/osx/build/Debug/Nide.app/Contents/Resources/server/project.js new file mode 100644 index 0000000..0c94a59 --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/server/project.js @@ -0,0 +1,386 @@ +var fs = require('fs') +var EventEmitter = require('events').EventEmitter +var dive = require('dive') +var exec = require('child_process').exec +var uuid = require('node-uuid') + +var fileStates = {} +var versionHistory = {} + +var saveVersionHistory = function() { + var contents = JSON.stringify(versionHistory) + fs.writeFile(process.cwd() + '/.nide/versions.json', contents) +} + +var loadVersionHistory = function() { + try { + versionHistory = JSON.parse(fs.readFileSync(process.cwd() + '/.nide/versions.json')) + } catch (e) { + + } +} + +setInterval(function() { + for (var file in fileStates) { + if (fileStates[file] == 'modified') { + if (!versionHistory[file]) { + versionHistory[file] = [] + } + var generatedUuid = uuid() + versionHistory[file].push({ + date: (new Date()).valueOf(), + uuid: generatedUuid + }) + exec('cp -- "' + (process.cwd() + file).replace(/[\\"']/g, '\\$&').replace(/\u0000/g, '\\0') + '" "' + (process.cwd() + '/.nide/' + generatedUuid).replace(/[\\"']/g, '\\$&').replace(/\u0000/g, '\\0') + '"', function(err) { + if (!err) { + saveVersionHistory() + } + }) + delete fileStates[file] + } + } +}, 1000*5) + +exports.start = function() { + loadVersionHistory() + try { + var stat = fs.statSync('.nide') + if (!stat.isDirectory()) { + console.error('Error: `.nide` is not a directory.') + process.exit(-1) + } + } catch (e) { + console.error('Error: Not inside a project. Run `nide init` to create a new project on the current directory.') + process.exit(-1) + } +} + +exports.shouldDisplayWelcome = false + +exports.init = function() { + try { + fs.mkdirSync('.nide', '755') + } catch (e) { + console.error('Error: Cannot create new project. `.nide` already exists.') + process.exit(-1) + } + console.log('Created `.nide` directory') + var gitignore = '' + try { + gitignore = fs.readFileSync('.gitignore', 'utf8') + } catch (e) {} + var gitignoreLines = gitignore.split('\n') + if (gitignoreLines.indexOf('.nide') == -1) { + if (gitignoreLines[gitignoreLines.length-1] == '') { + gitignoreLines[gitignoreLines.length-1] = '.nide' + } else { + gitignoreLines.push('.nide') + } + fs.writeFileSync('.gitignore', gitignoreLines.join('\n') + '\n', 'utf8') + } + console.log('Added `.nide` directory to .gitignore') + var npmignore = '' + try { + npmignore = fs.readFileSync('.npmignore', 'utf8') + } catch (e) {} + var npmignoreLines = npmignore.split('\n') + if (npmignoreLines.indexOf('.nide') == -1) { + if (npmignoreLines[npmignoreLines.length-1] == '') { + npmignoreLines[npmignoreLines.length-1] = '.nide' + } else { + npmignoreLines.push('.nide') + } + fs.writeFileSync('.npmignore', npmignoreLines.join('\n') + '\n', 'utf8') + } + console.log('Added `.nide` directory to .npmignore') + try { + packageJson = fs.readFileSync('package.json', 'utf8') + } catch (e) { + exports.shouldDisplayWelcome = true; + } +} + +exports.chdir = function(dir) { + if (dir) { + try { + process.chdir(dir) + } catch (e) { + console.error('Could not enter directory `' + dir + '`.') + process.exit(-1) + } + } +} + +var listCache = undefined +var addToListCache = function(path) { + var cwd = process.cwd() + var cwd_length = cwd.length + 1; + var current = listCache + var composite_path = "" + var components = path.substr(cwd_length).split('/') + for (var i = 0; i < components.length - 1; i++) { + composite_path = composite_path + "/" + components[i] + if (!current.children[components[i]]) { + current.children[components[i]] = { + name: components[i], + type: "directory", + path: composite_path, + children: {} + } + } + current = current.children[components[i]] + } + if (components[i] != '.') { + composite_path = composite_path + "/" + components[i] + current.children[components[i]] = { + name: components[i], + type: "file", + path: composite_path, + children: {} + } + } +} +exports.list = function(noCache) { + var ee = new EventEmitter(); + if (noCache || !listCache) { + listCache = { + name: "", + type: "directory", + path: "", + children: {} + } + dive(process.cwd(), { recursive: true, all: true, directories: true }, + function(err, path) { + if (err) { + console.warn(err); + return + } + + fs.stat(path, function(err, stats) { + if (err) { + console.warn(err) + return + } + + if (stats.isFile()) { + addToListCache(path) + } else { + addToListCache(path + "/.") + } + }) + }, function() { + ee.emit('success', listCache) + }) + } else { + process.nextTick(function() { + ee.emit('success', listCache) + }) + } + return ee +} + +exports.add = function(path) { + var ee = new EventEmitter() + if (path.charAt(0) != '/' || path.indexOf('..') != -1) { + process.nextTick(function() { + ee.emit('error', 'Invalid Path') + }) + } else { + fs.stat(process.cwd() + path, function(err, result) { + if (!err) { + ee.emit('error', 'File already exists'); + } else { + fs.writeFile(process.cwd() + path, '', 'utf8', function(err) { + if (err) ee.emit('error', err); + else { + addToListCache(process.cwd() + path) + ee.emit('success'); + } + }) + } + }) + } + return ee; +} + +exports.addFolder = function(path) { + var ee = new EventEmitter() + if (path.charAt(0) != '/' || path.indexOf('..') != -1) { + process.nextTick(function() { + ee.emit('error', 'Invalid Path') + }) + } else { + fs.stat(process.cwd() + path, function(err, result) { + if (!err) { + ee.emit('error', 'Folder already exists'); + } else { + fs.mkdir(process.cwd() + path, '755', function(err) { + if (err) ee.emit('error', err); + else { + addToListCache(process.cwd() + path + '/.') + ee.emit('success'); + } + }) + } + }) + } + return ee; +} + +exports.remove = function(path) { + var ee = new EventEmitter() + if (path.charAt(0) != '/' || path.indexOf('..') != -1 || path == '/') { + process.nextTick(function() { + ee.emit('error', 'Invalid Path') + }) + } else { + exec('rm -rf -- ' + process.cwd() + path, function(err) { + if (!err) { + // Invalidate file list cache + listCache = undefined + ee.emit('success') + } else { + ee.emit('err', err) + } + }) + } + return ee; +} + + +exports.rename = function(oldpath, newpath) { + var ee = new EventEmitter() + if (oldpath.charAt(0) != '/' || oldpath.indexOf('..') != -1 || oldpath == '/' || + newpath.charAt(0) != '/' || newpath.indexOf('..') != -1 || newpath == '/') { + process.nextTick(function() { + ee.emit('error', 'Invalid Path') + }) + } else { + fs.rename(process.cwd() + oldpath, process.cwd() + newpath, function(err) { + if (!err) { + // Invalidate file list cache + listCache = undefined + ee.emit('success') + } else { + ee.emit('err', err) + } + }) + } + return ee; +} + +exports.save = function(path, contents) { + var ee = new EventEmitter() + if (path.charAt(0) != '/' || path.indexOf('..') != -1) { + process.nextTick(function() { + ee.emit('error', 'Invalid Path') + }) + } else { + fs.writeFile(process.cwd() + path, contents, 'utf8', function(err) { + if (err) ee.emit('error', err); + else { + fileStates[path] = 'modified' + ee.emit('success'); + } + }) + } + return ee; +} + +exports.load = function(path) { + var ee = new EventEmitter() + if (path.charAt(0) != '/' || path.indexOf('..') != -1) { + process.nextTick(function() { + ee.emit('error', 'Invalid Path') + }) + } else { + fs.stat(process.cwd() + path, function(err, stats) { + if (err) ee.emit('error', 'File not found.'); + else if (stats.size > 1024*1024) ee.emit('error', 'File larger than the maximum supported size.'); + else { + fs.readFile(process.cwd() + path, 'utf8', function(err, data) { + if (err) ee.emit('error', 'File could not be read.'); + else { + ee.emit('success', data); + } + }) + } + }) + } + return ee +} + +exports.versions = function(path) { + var ee = new EventEmitter() + var versions = versionHistory[path] + if (!versions) { + versions = [] + } + process.nextTick(function() { + ee.emit('success', versions) + }) + return ee; +} + +exports.version = function(versionUuid) { + var ee = new EventEmitter() + if (!versionUuid.match(/^[0-9a-f]{8}\-[0-9a-f]{4}\-[0-9a-f]{4}\-[0-9a-f]{4}-[0-9a-f]{12}$/)) { + process.nextTick(function() { + ee.emit('error', 'Invalid version uuid') + }) + } else { + fs.readFile(process.cwd() + '/.nide/' + versionUuid, 'utf8', function(err, data) { + if (err) ee.emit('error', err); + else { + ee.emit('success', data); + } + }) + } + return ee +} + +exports.packages = function() { + var ee = new EventEmitter() + exec('npm ls', function(err, stdout, stderr) { + if (err) { + ee.emit('error', err); + return; + } + var lines = stdout.split('\n') + var packages = [] + for (var i = 0; i < lines.length; i++) { + var packageName = lines[i].match(/^(├──|├─┬|└─┬|└──) (.+)$/) + if (packageName && packageName[2]) { + packages.push(packageName[2]) + } + } + ee.emit('success', packages) + }) + return ee; +} + +exports.install = function(package, save) { + var ee = new EventEmitter() + exec('npm install' + (save ? ' --save' : '')+ ' -- ' + package, function(err, stdout, stderr) { + if (err) { + ee.emit('error', stderr); + } else { + listCache = undefined + ee.emit('success') + } + }) + return ee; +} + +exports.uninstall = function(package, save) { + var ee = new EventEmitter() + exec('npm uninstall' + (save ? ' --save' : '') + ' -- ' + package, function(err, stdout, stderr) { + if (err) { + ee.emit('error', stderr); + } else { + listCache = undefined + ee.emit('success') + } + }) + return ee; +} diff --git a/osx/build/Debug/Nide.app/Contents/Resources/server/server.js b/osx/build/Debug/Nide.app/Contents/Resources/server/server.js new file mode 100644 index 0000000..614e43f --- /dev/null +++ b/osx/build/Debug/Nide.app/Contents/Resources/server/server.js @@ -0,0 +1,256 @@ +var express = require('express'); +var sockeio = require('socket.io') +var project = require('./project.js') +var child_process = require('child_process') + +var server = express.createServer(); +var staticServer = express.createServer(); + +exports.listen = function(port, host, username, password, downgrade, launchBrowser) { + var authenticate + + if (typeof(username) !== 'undefined') { + if (typeof(password) !== 'undefined') { + authenticate = function(providedUsername, providedPassword){ + return providedUsername == username && providedPassword == password + } + } else { + authenticate = function(providedUsername, providedPassword){ + return providedUsername == username + } + } + } else { + if (typeof(password) !== 'undefined') { + authenticate = function(providedUsername, providedPassword){ + return providedPassword == password + } + } else { + // no authentication + } + } + + server.configure(function(){ + server.use(express.bodyParser()); + server.use(express.methodOverride()); + if (authenticate) { + server.use(express.basicAuth(authenticate)) + } + server.use(server.router); + server.use(express.static(__dirname + '/../client')); + }); + + staticServer.configure(function(){ + staticServer.use(express.bodyParser()); + staticServer.use(express.methodOverride()); + if (authenticate) { + staticServer.use(express.basicAuth(authenticate)) + } + staticServer.use(server.router); + staticServer.use(express.static(process.cwd())); + }); + + var io = sockeio.listen(server, { 'log level': 1 }) + + io.configure(function () { + io.set('transports', ['flashsocket', 'htmlfile', 'xhr-polling', 'jsonp-polling']); + }); + + server.listen(port, host, function() { + staticServer.listen(port+1, host, function() { + // if run as root, downgrade to the owner of this file + if (process.getuid() === 0) { + if(downgrade == true){ + require('fs').stat(__filename, function(err, stats) { + if (err) return console.log(err) + process.setuid(stats.uid); + }); + } + } + }); + }); + + var serverErrorHandler = function(err) { + if (err.code == 'EADDRINUSE') { + console.error('Error: Address already in use. Try running nide under a different port.') + process.exit(-1) + } + } + + server.on('error', serverErrorHandler); + staticServer.on('error', serverErrorHandler); + + var nideUrl + + if (typeof(host) !== 'undefined') { + if (port == 80) { + nideUrl = "http://" + host; + } else { + nideUrl = "http://" + host + ":" + port; + } + } else { + if (port == 80) { + nideUrl = "http://localhost"; + } else { + nideUrl = "http://localhost:" + port; + } + } + + console.log("Nide running at " + nideUrl); + + if (launchBrowser) { + var browser; + switch (process.platform) { + case "win32": browser = "start"; break; + case "darwin": browser = "open"; break; + default: browser = "xdg-open"; break; + } + // if this fails, it'll just exit with a non-zero code. + child_process.spawn(browser, [nideUrl]); + } + + io.sockets.on('connection', function(socket) { + project.list() + .on('success', function(data) { + socket.emit('list', data) + }) + project.packages() + .on('success', function(packages) { + socket.emit('packages', packages) + }) + if (project.shouldDisplayWelcome) { + socket.emit('welcome') + } + socket.emit('cwd', process.cwd()) + socket.emit('node-version', process.version) + socket.on('skip-welcome', function() { + project.shouldDisplayWelcome = false; + }) + socket.on('load', function(path) { + project.load(path) + .on('success', function(file) { + socket.emit('file', { path: path, error: null, file: file }) + }) + .on('error', function(err) { + socket.emit('file', { path: path, error: err, file: null }) + }) + }) + socket.on('save', function(data) { + project.save(data.path, data.content) + .on('success', function(file) { + socket.emit('save-success', { path: data.path }) + }) + .on('error', function(err) { + socket.emit('save-error', { path: data.path, error: err }) + }) + }) + socket.on('add', function(path) { + project.add(path) + .on('success', function(file) { + project.list() + .on('success', function(data) { + socket.emit('list', data) + }) + }) + .on('error', function(err) { + socket.emit('add-error', { path: path, error: err }) + }) + }) + socket.on('add-folder', function(path) { + project.addFolder(path) + .on('success', function(file) { + project.list() + .on('success', function(data) { + socket.emit('list', data) + }) + }) + .on('error', function(err) { + socket.emit('add-folder-error', { path: path, error: err }) + }) + }) + socket.on('remove', function(path) { + project.remove(path) + .on('success', function(file) { + project.list() + .on('success', function(data) { + socket.emit('list', data) + }) + }) + .on('error', function(err) { + socket.emit('remove-error', { path: path, error: err }) + }) + }) + socket.on('rename', function(data) { + project.rename(data.oldpath, data.newpath) + .on('success', function(file) { + project.list() + .on('success', function(list) { + socket.emit('list', list) + socket.emit('rename-success', { path: data.newpath }) + }) + }) + .on('error', function(err) { + socket.emit('rename-error', { path: data.oldpath, error: err }) + }) + }) + socket.on('versions', function(path) { + project.versions(path) + .on('success', function(versions) { + socket.emit('versions', { path: path, versions: versions }) + }) + }) + socket.on('version', function(uuid) { + project.version(uuid) + .on('success', function(file) { + socket.emit('version-success', { uuid: uuid, error: null, content: file }) + }) + .on('error', function(err) { + socket.emit('version-error', { uuid: uuid, error: err, content: null }) + }) + }) + socket.on('install', function(data) { + project.install(data.package, data.save) + .on('success', function() { + project.packages() + .on('success', function(packages) { + socket.emit('packages', packages) + }) + project.list() + .on('success', function(list) { + socket.emit('list', list) + }) + }) + .on('error', function(err) { + socket.emit('install-error', err) + }) + }) + socket.on('uninstall', function(data) { + project.uninstall(data.package, data.save) + .on('success', function() { + project.packages() + .on('success', function(packages) { + socket.emit('packages', packages) + }) + project.list() + .on('success', function(list) { + socket.emit('list', list) + }) + }) + .on('error', function(err) { + socket.emit('uninstall-error', err) + }) + }) + socket.on('packages-refresh', function(data) { + project.packages() + .on('success', function(packages) { + socket.emit('packages', packages) + }) + }) + socket.on('list', function(data) { + project.list(true) + .on('success', function(list) { + socket.emit('list', list) + }) + }) + }) + +} diff --git a/osx/build/Nide.build/Debug/Nide.build/Nide-all-target-headers.hmap b/osx/build/Nide.build/Debug/Nide.build/Nide-all-target-headers.hmap new file mode 100644 index 0000000..5d74c43 Binary files /dev/null and b/osx/build/Nide.build/Debug/Nide.build/Nide-all-target-headers.hmap differ diff --git a/osx/build/Nide.build/Debug/Nide.build/Nide-generated-files.hmap b/osx/build/Nide.build/Debug/Nide.build/Nide-generated-files.hmap new file mode 100644 index 0000000..dd8b535 Binary files /dev/null and b/osx/build/Nide.build/Debug/Nide.build/Nide-generated-files.hmap differ diff --git a/osx/build/Nide.build/Debug/Nide.build/Nide-own-target-headers.hmap b/osx/build/Nide.build/Debug/Nide.build/Nide-own-target-headers.hmap new file mode 100644 index 0000000..5d74c43 Binary files /dev/null and b/osx/build/Nide.build/Debug/Nide.build/Nide-own-target-headers.hmap differ diff --git a/osx/build/Nide.build/Debug/Nide.build/Nide-project-headers.hmap b/osx/build/Nide.build/Debug/Nide.build/Nide-project-headers.hmap new file mode 100644 index 0000000..8bd750a Binary files /dev/null and b/osx/build/Nide.build/Debug/Nide.build/Nide-project-headers.hmap differ diff --git a/osx/build/Nide.build/Debug/Nide.build/Nide.dep b/osx/build/Nide.build/Debug/Nide.build/Nide.dep new file mode 100644 index 0000000..ed3edc2 --- /dev/null +++ b/osx/build/Nide.build/Debug/Nide.build/Nide.dep @@ -0,0 +1,14 @@ +d1e801a1099bd7b58118777b1c497c5a b2aee4b9daf23b221376c2483f2fc2e8 ffffffffffffffffffffffffffffffff 102 /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app +00000000000000000000000000000000 e037f6e849674bafbfed422e71c7670c ffffffffffffffffffffffffffffffff 154681 /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/nide-project.icns +00000000000000000000000000000000 431f1847ea34d135974329dd656691a7 ffffffffffffffffffffffffffffffff 230796 /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/nide.icns +000000005048731000000000000032e3 ff11d2c52f6eac06583f0730f04e8796 ffffffffffffffffffffffffffffffff 3928 /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/ProjectWindow.nib +000000005048731000000000000154a9 e52c0ed5eca67829f8f3f0693beb74d9 ffffffffffffffffffffffffffffffff 21186 /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/en.lproj/MainMenu.nib +00000000000000000000000000000000 2980af29ba4cc10664e2c65107de9b50 ffffffffffffffffffffffffffffffff 1786 /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/en.lproj/Credits.rtf +0000000050487310000000000000002d 211c63b004813260d56857510705ed7c ffffffffffffffffffffffffffffffff 92 /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/en.lproj/InfoPlist.strings +034d10cd91fd11ca84c9e38caa6202c0 632cef4a167808bc3c39995d69f56b35 ffffffffffffffffffffffffffffffff 29872 /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/MacOS/Nide +00000000000000000000000000000000 ee0854a98660b245f18a3d7a36640164 ffffffffffffffffffffffffffffffff 8 /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/PkgInfo +00000000000000000000000000000000 ee0854a98660b245f18a3d7a36640164 ffffffffffffffffffffffffffffffff 1413 /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Info.plist +1ceecf394822b8ba292526881ab779b5 98b30bcaafba3975883c01fff9c32fe9 ffffffffffffffffffffffffffffffff 34232 /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/NDProjectWindowController.o +1ceecf3958ae61c2292526881ab76e34 9120215503597cb5b93a9b6298c6045c ffffffffffffffffffffffffffffffff 29744 /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/NDAppDelegate.o +1ceecf3954aefac1292526881ab76373 1630f56b349401cf9cea5f99d1d8b651 ffffffffffffffffffffffffffffffff 2140 /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/main.o +00000000108cd978000000000000016e 1ceecf3954aefac1292526881ab762f4 ffffffffffffffffffffffffffffffff 11829736 /var/folders/QT/QTR3MlUDFFOxoo7RF4yHV++++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Nide-Prefix-fditlkrpeuzrxcdatwpjwayuigwk/Nide-Prefix.pch.pth diff --git a/osx/build/Nide.build/Debug/Nide.build/Nide.hmap b/osx/build/Nide.build/Debug/Nide.build/Nide.hmap new file mode 100644 index 0000000..05c8104 Binary files /dev/null and b/osx/build/Nide.build/Debug/Nide.build/Nide.hmap differ diff --git a/osx/build/Nide.build/Debug/Nide.build/Nide~.dep b/osx/build/Nide.build/Debug/Nide.build/Nide~.dep new file mode 100644 index 0000000..ed3edc2 --- /dev/null +++ b/osx/build/Nide.build/Debug/Nide.build/Nide~.dep @@ -0,0 +1,14 @@ +d1e801a1099bd7b58118777b1c497c5a b2aee4b9daf23b221376c2483f2fc2e8 ffffffffffffffffffffffffffffffff 102 /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app +00000000000000000000000000000000 e037f6e849674bafbfed422e71c7670c ffffffffffffffffffffffffffffffff 154681 /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/nide-project.icns +00000000000000000000000000000000 431f1847ea34d135974329dd656691a7 ffffffffffffffffffffffffffffffff 230796 /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/nide.icns +000000005048731000000000000032e3 ff11d2c52f6eac06583f0730f04e8796 ffffffffffffffffffffffffffffffff 3928 /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/ProjectWindow.nib +000000005048731000000000000154a9 e52c0ed5eca67829f8f3f0693beb74d9 ffffffffffffffffffffffffffffffff 21186 /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/en.lproj/MainMenu.nib +00000000000000000000000000000000 2980af29ba4cc10664e2c65107de9b50 ffffffffffffffffffffffffffffffff 1786 /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/en.lproj/Credits.rtf +0000000050487310000000000000002d 211c63b004813260d56857510705ed7c ffffffffffffffffffffffffffffffff 92 /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/en.lproj/InfoPlist.strings +034d10cd91fd11ca84c9e38caa6202c0 632cef4a167808bc3c39995d69f56b35 ffffffffffffffffffffffffffffffff 29872 /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/MacOS/Nide +00000000000000000000000000000000 ee0854a98660b245f18a3d7a36640164 ffffffffffffffffffffffffffffffff 8 /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/PkgInfo +00000000000000000000000000000000 ee0854a98660b245f18a3d7a36640164 ffffffffffffffffffffffffffffffff 1413 /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Info.plist +1ceecf394822b8ba292526881ab779b5 98b30bcaafba3975883c01fff9c32fe9 ffffffffffffffffffffffffffffffff 34232 /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/NDProjectWindowController.o +1ceecf3958ae61c2292526881ab76e34 9120215503597cb5b93a9b6298c6045c ffffffffffffffffffffffffffffffff 29744 /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/NDAppDelegate.o +1ceecf3954aefac1292526881ab76373 1630f56b349401cf9cea5f99d1d8b651 ffffffffffffffffffffffffffffffff 2140 /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/main.o +00000000108cd978000000000000016e 1ceecf3954aefac1292526881ab762f4 ffffffffffffffffffffffffffffffff 11829736 /var/folders/QT/QTR3MlUDFFOxoo7RF4yHV++++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Nide-Prefix-fditlkrpeuzrxcdatwpjwayuigwk/Nide-Prefix.pch.pth diff --git a/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/NDAppDelegate.o b/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/NDAppDelegate.o new file mode 100644 index 0000000..0ba1d6e Binary files /dev/null and b/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/NDAppDelegate.o differ diff --git a/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/NDProjectWindowController.o b/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/NDProjectWindowController.o new file mode 100644 index 0000000..95de3bf Binary files /dev/null and b/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/NDProjectWindowController.o differ diff --git a/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/Nide.LinkFileList b/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/Nide.LinkFileList new file mode 100644 index 0000000..759fe9b --- /dev/null +++ b/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/Nide.LinkFileList @@ -0,0 +1,3 @@ +/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/main.o +/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/NDAppDelegate.o +/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/NDProjectWindowController.o diff --git a/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/main.o b/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/main.o new file mode 100644 index 0000000..b4837a5 Binary files /dev/null and b/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/main.o differ diff --git a/osx/build/Nide.build/Debug/Nide.build/Script-F5B01A7814B5467000145F5E.sh b/osx/build/Nide.build/Debug/Nide.build/Script-F5B01A7814B5467000145F5E.sh new file mode 100755 index 0000000..3c22534 --- /dev/null +++ b/osx/build/Nide.build/Debug/Nide.build/Script-F5B01A7814B5467000145F5E.sh @@ -0,0 +1,7 @@ +#!/bin/bash +cp -R "$PROJECT_DIR/../client" "$TARGET_BUILD_DIR/$EXECUTABLE_NAME.app/Contents/Resources/" +cp -R "$PROJECT_DIR/../server" "$TARGET_BUILD_DIR/$EXECUTABLE_NAME.app/Contents/Resources/" +cp "$PROJECT_DIR/../main.js" "$TARGET_BUILD_DIR/$EXECUTABLE_NAME.app/Contents/Resources/" +cp "$PROJECT_DIR/../package.json" "$TARGET_BUILD_DIR/$EXECUTABLE_NAME.app/Contents/Resources/" +cd "$TARGET_BUILD_DIR/$EXECUTABLE_NAME.app/Contents/Resources/" +/usr/local/bin/node /usr/local/bin/npm install diff --git a/osx/build/Nide.build/Debug/Nide.build/build-state.dat b/osx/build/Nide.build/Debug/Nide.build/build-state.dat new file mode 100644 index 0000000..dc0190e --- /dev/null +++ b/osx/build/Nide.build/Debug/Nide.build/build-state.dat @@ -0,0 +1,385 @@ +TNide +v7 +r0 +t368618354.875271 +cCheck dependencies +cProcessInfoPlistFile /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Info.plist Nide/Nide-Info.plist +cProcessPCH /var/folders/QT/QTR3MlUDFFOxoo7RF4yHV++++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Nide-Prefix-fditlkrpeuzrxcdatwpjwayuigwk/Nide-Prefix.pch.pth Nide/Nide-Prefix.pch normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler +cCompileC build/Nide.build/Debug/Nide.build/Objects-normal/i386/main.o /Users/Pau/Proyectos/nide/osx/Nide/main.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler +cCompileC build/Nide.build/Debug/Nide.build/Objects-normal/i386/NDAppDelegate.o /Users/Pau/Proyectos/nide/osx/Nide/NDAppDelegate.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler +cCompileC build/Nide.build/Debug/Nide.build/Objects-normal/i386/NDProjectWindowController.o /Users/Pau/Proyectos/nide/osx/Nide/NDProjectWindowController.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler +cLd /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/MacOS/Nide normal i386 +cCopyStringsFile /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/en.lproj/InfoPlist.strings Nide/en.lproj/InfoPlist.strings +cCpResource build/Debug/Nide.app/Contents/Resources/en.lproj/Credits.rtf Nide/en.lproj/Credits.rtf +cCompileXIB /Users/Pau/Proyectos/nide/osx/Nide/en.lproj/MainMenu.xib +cCompileXIB /Users/Pau/Proyectos/nide/osx/Nide/ProjectWindow.xib +cCpResource build/Debug/Nide.app/Contents/Resources/nide.icns Nide/../nide.icns +cCpResource build/Debug/Nide.app/Contents/Resources/nide-project.icns nide-project.icns +cPhaseScriptExecution "Run Script" /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Script-F5B01A7814B5467000145F5E.sh +cTouch /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app + +N/Developer/SDKs/MacOSX10.6.sdk +c000000004DA8767D00000000000000EE +t1302886013 +s238 + +N/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Cocoa.framework/Cocoa +c000000004D5A27900000000000003430 +t1297754000 +s13360 + +N/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h +c0000000040C4AA6800000000000001E5 +t1086630504 +s485 + +N/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebKit.h +c000000004CC4316B0000000000000957 +t1287926123 +s2391 + +N/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/WebKit.framework/WebKit +c000000004D5A2791000000000008DF08 +t1297754001 +s581384 + +N/Users/Pau/Proyectos/nide/osx/Nide/../nide.icns +c0000000050487310000000000003858C +t1346925328 +s230796 + +N/Users/Pau/Proyectos/nide/osx/Nide/NDAppDelegate.h +c00000000504873100000000000000169 +t1346925328 +s361 +i + +N/Users/Pau/Proyectos/nide/osx/Nide/NDAppDelegate.m +c000000005048731000000000000007F9 +t1346925328 +s2041 +i"NDAppDelegate.h" +i"NDProjectWindowController.h" + +N/Users/Pau/Proyectos/nide/osx/Nide/NDProjectWindowController.h +c00000000504873100000000000000269 +t1346925328 +s617 +i +i + +N/Users/Pau/Proyectos/nide/osx/Nide/NDProjectWindowController.m +c000000005048731000000000000010F4 +t1346925328 +s4340 +i"NDProjectWindowController.h" + +N/Users/Pau/Proyectos/nide/osx/Nide/Nide-Prefix.pch +c0000000050487310000000000000008B +t1346925328 +s139 +i + +N/Users/Pau/Proyectos/nide/osx/Nide/ProjectWindow.xib +c000000005048731000000000000032E3 +t1346925328 +s13027 + +N/Users/Pau/Proyectos/nide/osx/Nide/en.lproj/Credits.rtf +c000000005048731000000000000006FA +t1346925328 +s1786 + +N/Users/Pau/Proyectos/nide/osx/Nide/en.lproj/InfoPlist.strings +c0000000050487310000000000000002D +t1346925328 +s45 + +N/Users/Pau/Proyectos/nide/osx/Nide/en.lproj/MainMenu.xib +c000000005048731000000000000154A9 +t1346925328 +s87209 + +N/Users/Pau/Proyectos/nide/osx/Nide/main.m +c0000000050487310000000000000010C +t1346925328 +s268 +i + +N/Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app +t1346925554 +s102 + +N/Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Info.plist +t1346925526 +s1413 + +N/Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/MacOS/Nide +t1346925538 +s29872 + +N/Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/PkgInfo +t1346925526 +s8 + +N/Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/ProjectWindow.nib +t1346925539 +s3928 + +N/Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/en.lproj/Credits.rtf +t1346925538 +s1786 + +N/Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/en.lproj/InfoPlist.strings +t1346925538 +s92 + +N/Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/en.lproj/MainMenu.nib +t1346925539 +s21186 + +N/Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/nide-project.icns +t1346925540 +s154681 + +N/Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/nide.icns +t1346925540 +s230796 + +N/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/NDAppDelegate.o +t1346925536 +s29744 + +N/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/NDProjectWindowController.o +t1346925536 +s34232 + +N/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/Nide.LinkFileList +c00000000504873D6000000000000012F +t1346925526 +s303 + +N/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/main.o +t1346925536 +s2140 + +N/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Script-F5B01A7814B5467000145F5E.sh +c00000000504873D600000000000001EC +t1346925526 +s492 + +N/Users/Pau/Proyectos/nide/osx/nide-project.icns +c00000000504873100000000000025C39 +t1346925328 +s154681 + +N/var/folders/QT/QTR3MlUDFFOxoo7RF4yHV++++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Nide-Prefix-fditlkrpeuzrxcdatwpjwayuigwk/Nide-Prefix.pch.pth +t1346925535 +s11829736 + +NNide/Nide-Info.plist +c0000000050487310000000000000045C +t1346925328 +s1116 + +CCheck dependencies +r0 +lSLF07#2@18"Check dependencies368618326#368618326#0(0"0(0#1#0"2527998448#0"0# + +CCompileC build/Nide.build/Debug/Nide.build/Objects-normal/i386/NDAppDelegate.o /Users/Pau/Proyectos/nide/osx/Nide/NDAppDelegate.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler +s368618336.447036 +e368618336.730755 +r1 +xCompileC +xbuild/Nide.build/Debug/Nide.build/Objects-normal/i386/NDAppDelegate.o +x/Users/Pau/Proyectos/nide/osx/Nide/NDAppDelegate.m +xnormal +xi386 +xobjective-c +xcom.apple.compilers.llvm.clang.1_0.compiler +lSLF07#2@58"Compile /Users/Pau/Proyectos/nide/osx/Nide/NDAppDelegate.m368618336#368618336#0(0"0(0#0#50"/Users/Pau/Proyectos/nide/osx/Nide/NDAppDelegate.m2527998448#1375" cd /Users/Pau/Proyectos/nide/osx setenv LANG en_US.US-ASCII /Developer/usr/bin/clang -x objective-c -arch i386 -fmessage-length=0 -pipe -fdiagnostics-print-source-range-info -std=gnu99 -Wno-trigraphs -fpascal-strings -O0 -Wmissing-prototypes -Wreturn-type -Wunused-variable -Wshorten-64-to-32 -DDEBUG=1 -isysroot /Developer/SDKs/MacOSX10.6.sdk -fasm-blocks -mmacosx-version-min=10.6 -gdwarf-2 -iquote /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-generated-files.hmap -I/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-own-target-headers.hmap -I/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-all-target-headers.hmap -iquote /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-project-headers.hmap -F/Users/Pau/Proyectos/nide/osx/build/Debug -I/Users/Pau/Proyectos/nide/osx/build/Debug/include -I/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/DerivedSources/i386 -I/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/DerivedSources -include /var/folders/QT/QTR3MlUDFFOxoo7RF4yHV++++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Nide-Prefix-fditlkrpeuzrxcdatwpjwayuigwk/Nide-Prefix.pch -c /Users/Pau/Proyectos/nide/osx/Nide/NDAppDelegate.m -o /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/NDAppDelegate.o 0# + +CCompileC build/Nide.build/Debug/Nide.build/Objects-normal/i386/NDProjectWindowController.o /Users/Pau/Proyectos/nide/osx/Nide/NDProjectWindowController.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler +s368618336.730907 +e368618336.906573 +r1 +xCompileC +xbuild/Nide.build/Debug/Nide.build/Objects-normal/i386/NDProjectWindowController.o +x/Users/Pau/Proyectos/nide/osx/Nide/NDProjectWindowController.m +xnormal +xi386 +xobjective-c +xcom.apple.compilers.llvm.clang.1_0.compiler +lSLF07#2@70"Compile /Users/Pau/Proyectos/nide/osx/Nide/NDProjectWindowController.m368618336#368618336#0(0"0(0#0#62"/Users/Pau/Proyectos/nide/osx/Nide/NDProjectWindowController.m2527998448#1399" cd /Users/Pau/Proyectos/nide/osx setenv LANG en_US.US-ASCII /Developer/usr/bin/clang -x objective-c -arch i386 -fmessage-length=0 -pipe -fdiagnostics-print-source-range-info -std=gnu99 -Wno-trigraphs -fpascal-strings -O0 -Wmissing-prototypes -Wreturn-type -Wunused-variable -Wshorten-64-to-32 -DDEBUG=1 -isysroot /Developer/SDKs/MacOSX10.6.sdk -fasm-blocks -mmacosx-version-min=10.6 -gdwarf-2 -iquote /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-generated-files.hmap -I/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-own-target-headers.hmap -I/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-all-target-headers.hmap -iquote /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-project-headers.hmap -F/Users/Pau/Proyectos/nide/osx/build/Debug -I/Users/Pau/Proyectos/nide/osx/build/Debug/include -I/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/DerivedSources/i386 -I/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/DerivedSources -include /var/folders/QT/QTR3MlUDFFOxoo7RF4yHV++++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Nide-Prefix-fditlkrpeuzrxcdatwpjwayuigwk/Nide-Prefix.pch -c /Users/Pau/Proyectos/nide/osx/Nide/NDProjectWindowController.m -o /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/NDProjectWindowController.o 0# + +CCompileC build/Nide.build/Debug/Nide.build/Objects-normal/i386/main.o /Users/Pau/Proyectos/nide/osx/Nide/main.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler +s368618335.728678 +e368618336.446875 +r1 +xCompileC +xbuild/Nide.build/Debug/Nide.build/Objects-normal/i386/main.o +x/Users/Pau/Proyectos/nide/osx/Nide/main.m +xnormal +xi386 +xobjective-c +xcom.apple.compilers.llvm.clang.1_0.compiler +lSLF07#2@49"Compile /Users/Pau/Proyectos/nide/osx/Nide/main.m368618335#368618336#0(0"0(0#0#41"/Users/Pau/Proyectos/nide/osx/Nide/main.m4261848#1357" cd /Users/Pau/Proyectos/nide/osx setenv LANG en_US.US-ASCII /Developer/usr/bin/clang -x objective-c -arch i386 -fmessage-length=0 -pipe -fdiagnostics-print-source-range-info -std=gnu99 -Wno-trigraphs -fpascal-strings -O0 -Wmissing-prototypes -Wreturn-type -Wunused-variable -Wshorten-64-to-32 -DDEBUG=1 -isysroot /Developer/SDKs/MacOSX10.6.sdk -fasm-blocks -mmacosx-version-min=10.6 -gdwarf-2 -iquote /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-generated-files.hmap -I/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-own-target-headers.hmap -I/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-all-target-headers.hmap -iquote /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-project-headers.hmap -F/Users/Pau/Proyectos/nide/osx/build/Debug -I/Users/Pau/Proyectos/nide/osx/build/Debug/include -I/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/DerivedSources/i386 -I/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/DerivedSources -include /var/folders/QT/QTR3MlUDFFOxoo7RF4yHV++++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Nide-Prefix-fditlkrpeuzrxcdatwpjwayuigwk/Nide-Prefix.pch -c /Users/Pau/Proyectos/nide/osx/Nide/main.m -o /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/main.o 0# + +CCompileXIB /Users/Pau/Proyectos/nide/osx/Nide/ProjectWindow.xib +s368618339.627830 +e368618340.088029 +r1 +xCompileXIB +x/Users/Pau/Proyectos/nide/osx/Nide/ProjectWindow.xib +lSLF07#2@33"CompileXIB Nide/ProjectWindow.xib368618339#368618340#0(0"0(0#0#52"/Users/Pau/Proyectos/nide/osx/Nide/ProjectWindow.xib2527998448#321" cd /Users/Pau/Proyectos/nide/osx /Developer/usr/bin/ibtool --errors --warnings --notices --output-format human-readable-text --compile /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/ProjectWindow.nib /Users/Pau/Proyectos/nide/osx/Nide/ProjectWindow.xib --sdk /Developer/SDKs/MacOSX10.6.sdk 0# + +CCompileXIB /Users/Pau/Proyectos/nide/osx/Nide/en.lproj/MainMenu.xib +s368618338.717623 +e368618339.627713 +r1 +xCompileXIB +x/Users/Pau/Proyectos/nide/osx/Nide/en.lproj/MainMenu.xib +o/* com.apple.ibtool.document.warnings */ +o/Users/Pau/Proyectos/nide/osx/Nide/en.lproj/MainMenu.xib:-1: warning: The action of 'Menu Item (Enter Full Screen)' is connected to the 'toggleFullScreen:' selector of 'First Responder' but 'toggleFullScreen:' is no longer defined. +lSLF07#2@37"CompileXIB Nide/en.lproj/MainMenu.xib368618338#368618339#0(273"/* com.apple.ibtool.document.warnings */ /Users/Pau/Proyectos/nide/osx/Nide/en.lproj/MainMenu.xib:-1: warning: The action of 'Menu Item (Enter Full Screen)' is connected to the 'toggleFullScreen:' selector of 'First Responder' but 'toggleFullScreen:' is no longer defined. 1(22@161"The action of 'Menu Item (Enter Full Screen)' is connected to the 'toggleFullScreen:' selector of 'First Responder' but 'toggleFullScreen:' is no longer defined.368618339#4294967295#0#0(6@56"/Users/Pau/Proyectos/nide/osx/Nide/en.lproj/MainMenu.xib368618128#4294967295#0#4294967295#0#0"0(0#0#56"/Users/Pau/Proyectos/nide/osx/Nide/en.lproj/MainMenu.xib2527998448#329" cd /Users/Pau/Proyectos/nide/osx /Developer/usr/bin/ibtool --errors --warnings --notices --output-format human-readable-text --compile /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/en.lproj/MainMenu.nib /Users/Pau/Proyectos/nide/osx/Nide/en.lproj/MainMenu.xib --sdk /Developer/SDKs/MacOSX10.6.sdk 0# + +CCopyStringsFile /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/en.lproj/InfoPlist.strings Nide/en.lproj/InfoPlist.strings +s368618338.214373 +e368618338.674059 +r1 +xCopyStringsFile +x/Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/en.lproj/InfoPlist.strings +xNide/en.lproj/InfoPlist.strings +o/Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copystrings:125: warning: Insecure world writable dir /usr/bin in PATH, mode 040777 +lSLF07#2@36"Copy Nide/en.lproj/InfoPlist.strings368618338#368618338#0(161"/Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copystrings:125: warning: Insecure world writable dir /usr/bin in PATH, mode 040777 0(0#0#61"/Users/Pau/Proyectos/nide/osx/Nide/en.lproj/InfoPlist.strings2527998448#339" cd /Users/Pau/Proyectos/nide/osx setenv ICONV /usr/bin/iconv /Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copystrings --validate --inputencoding utf-8 --outputencoding UTF-16 Nide/en.lproj/InfoPlist.strings --outdir /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/en.lproj 0# + +CCpResource build/Debug/Nide.app/Contents/Resources/en.lproj/Credits.rtf Nide/en.lproj/Credits.rtf +s368618338.674243 +e368618338.717226 +r1 +xCpResource +xbuild/Debug/Nide.app/Contents/Resources/en.lproj/Credits.rtf +xNide/en.lproj/Credits.rtf +lSLF07#2@30"Copy Nide/en.lproj/Credits.rtf368618338#368618338#0(0"0(0#0#55"/Users/Pau/Proyectos/nide/osx/Nide/en.lproj/Credits.rtf2527998448#334" cd /Users/Pau/Proyectos/nide/osx /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -resolve-src-symlinks /Users/Pau/Proyectos/nide/osx/Nide/en.lproj/Credits.rtf /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/en.lproj 0# + +CCpResource build/Debug/Nide.app/Contents/Resources/nide-project.icns nide-project.icns +s368618340.116723 +e368618340.126438 +r1 +xCpResource +xbuild/Debug/Nide.app/Contents/Resources/nide-project.icns +xnide-project.icns +lSLF07#2@22"Copy nide-project.icns368618340#368618340#0(0"0(0#0#47"/Users/Pau/Proyectos/nide/osx/nide-project.icns2527998448#317" cd /Users/Pau/Proyectos/nide/osx /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -resolve-src-symlinks /Users/Pau/Proyectos/nide/osx/nide-project.icns /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources 0# + +CCpResource build/Debug/Nide.app/Contents/Resources/nide.icns Nide/../nide.icns +s368618340.088268 +e368618340.116598 +r1 +xCpResource +xbuild/Debug/Nide.app/Contents/Resources/nide.icns +xNide/../nide.icns +lSLF07#2@22"Copy Nide/../nide.icns368618340#368618340#0(0"0(0#0#47"/Users/Pau/Proyectos/nide/osx/Nide/../nide.icns2527998448#317" cd /Users/Pau/Proyectos/nide/osx /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -resolve-src-symlinks /Users/Pau/Proyectos/nide/osx/Nide/../nide.icns /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources 0# + +CLd /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/MacOS/Nide normal i386 +s368618336.906703 +e368618338.214129 +r1 +xLd +x/Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/MacOS/Nide +xnormal +xi386 +lSLF07#2@75"Link /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/MacOS/Nide368618336#368618338#0(0"0(0#0#0"2527998448#503" cd /Users/Pau/Proyectos/nide/osx setenv MACOSX_DEPLOYMENT_TARGET 10.6 /Developer/usr/bin/clang -arch i386 -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/Pau/Proyectos/nide/osx/build/Debug -F/Users/Pau/Proyectos/nide/osx/build/Debug -filelist /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/Nide.LinkFileList -mmacosx-version-min=10.6 -framework WebKit -framework Cocoa -prebind -o /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/MacOS/Nide 0# + +CPhaseScriptExecution "Run Script" /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Script-F5B01A7814B5467000145F5E.sh +s368618340.126590 +e368618354.811138 +r1 +xPhaseScriptExecution +xRun Script +x/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Script-F5B01A7814B5467000145F5E.sh +onpm WARN package.json nide@0.2.0 No README.md file found! +onpm http GET https://registry.npmjs.org/dive +onpm http GET https://registry.npmjs.org/node-uuid +onpm http GET https://registry.npmjs.org/commander +onpm http GET https://registry.npmjs.org/socket.io +onpm http GET https://registry.npmjs.org/express +onpm http 304 https://registry.npmjs.org/socket.io +onpm http 304 https://registry.npmjs.org/dive +onpm http 304 https://registry.npmjs.org/commander +onpm http 304 https://registry.npmjs.org/node-uuid +onpm http 304 https://registry.npmjs.org/express +onpm WARN engine commander@0.4.3: wanted: {"node":">= 0.4.x < 0.7.0"} (current: {"node":"v0.8.8","npm":"1.1.59"}) +onpm http GET https://registry.npmjs.org/append +onpm http GET https://registry.npmjs.org/qs +onpm http GET https://registry.npmjs.org/mkdirp/0.3.0 +onpm http GET https://registry.npmjs.org/mime/1.2.4 +onpm http GET https://registry.npmjs.org/connect +onpm http GET https://registry.npmjs.org/socket.io-client/0.8.7 +onpm http GET https://registry.npmjs.org/policyfile/0.0.4 +onpm http GET https://registry.npmjs.org/redis/0.6.7 +onpm http 304 https://registry.npmjs.org/append +onpm http 304 https://registry.npmjs.org/socket.io-client/0.8.7 +onpm http 304 https://registry.npmjs.org/qs +onpm http 304 https://registry.npmjs.org/mime/1.2.4 +onpm http 304 https://registry.npmjs.org/policyfile/0.0.4 +onpm http 304 https://registry.npmjs.org/mkdirp/0.3.0 +onpm http 304 https://registry.npmjs.org/connect +onpm http 304 https://registry.npmjs.org/redis/0.6.7 +onpm WARN package.json connect@1.9.2 No README.md file found! +onpm http GET https://registry.npmjs.org/formidable +onpm http 304 https://registry.npmjs.org/formidable +onpm http GET https://registry.npmjs.org/uglify-js/1.0.6 +onpm http GET https://registry.npmjs.org/websocket-client/1.0.0 +onpm http GET https://registry.npmjs.org/xmlhttprequest/1.2.2 +onpm http 304 https://registry.npmjs.org/uglify-js/1.0.6 +onpm http 304 https://registry.npmjs.org/websocket-client/1.0.0 +onpm http 304 https://registry.npmjs.org/xmlhttprequest/1.2.2 +ocommander@0.4.3 node_modules/commander +o +onode-uuid@1.3.3 node_modules/node-uuid +o +odive@0.2.0 node_modules/dive +o└── append@0.1.1 +o +oexpress@2.5.11 node_modules/express +o├── qs@0.4.2 +o├── mime@1.2.4 +o├── mkdirp@0.3.0 +o└── connect@1.9.2 (formidable@1.0.11) +o +osocket.io@0.8.7 node_modules/socket.io +o├── policyfile@0.0.4 +o├── redis@0.6.7 +o└── socket.io-client@0.8.7 (xmlhttprequest@1.2.2, websocket-client@1.0.0, uglify-js@1.0.6) +lSLF07#2@36"Run custom shell script 'Run Script'368618340#368618354#0(2470"npm WARN package.json nide@0.2.0 No README.md file found! npm http GET https://registry.npmjs.org/dive npm http GET https://registry.npmjs.org/node-uuid npm http GET https://registry.npmjs.org/commander npm http GET https://registry.npmjs.org/socket.io npm http GET https://registry.npmjs.org/express npm http 304 https://registry.npmjs.org/socket.io npm http 304 https://registry.npmjs.org/dive npm http 304 https://registry.npmjs.org/commander npm http 304 https://registry.npmjs.org/node-uuid npm http 304 https://registry.npmjs.org/express npm WARN engine commander@0.4.3: wanted: {"node":">= 0.4.x < 0.7.0"} (current: {"node":"v0.8.8","npm":"1.1.59"}) npm http GET https://registry.npmjs.org/append npm http GET https://registry.npmjs.org/qs npm http GET https://registry.npmjs.org/mkdirp/0.3.0 npm http GET https://registry.npmjs.org/mime/1.2.4 npm http GET https://registry.npmjs.org/connect npm http GET https://registry.npmjs.org/socket.io-client/0.8.7 npm http GET https://registry.npmjs.org/policyfile/0.0.4 npm http GET https://registry.npmjs.org/redis/0.6.7 npm http 304 https://registry.npmjs.org/append npm http 304 https://registry.npmjs.org/socket.io-client/0.8.7 npm http 304 https://registry.npmjs.org/qs npm http 304 https://registry.npmjs.org/mime/1.2.4 npm http 304 https://registry.npmjs.org/policyfile/0.0.4 npm http 304 https://registry.npmjs.org/mkdirp/0.3.0 npm http 304 https://registry.npmjs.org/connect npm http 304 https://registry.npmjs.org/redis/0.6.7 npm WARN package.json connect@1.9.2 No README.md file found! npm http GET https://registry.npmjs.org/formidable npm http 304 https://registry.npmjs.org/formidable npm http GET https://registry.npmjs.org/uglify-js/1.0.6 npm http GET https://registry.npmjs.org/websocket-client/1.0.0 npm http GET https://registry.npmjs.org/xmlhttprequest/1.2.2 npm http 304 https://registry.npmjs.org/uglify-js/1.0.6 npm http 304 https://registry.npmjs.org/websocket-client/1.0.0 npm http 304 https://registry.npmjs.org/xmlhttprequest/1.2.2 commander@0.4.3 node_modules/commander node-uuid@1.3.3 node_modules/node-uuid dive@0.2.0 node_modules/dive └── append@0.1.1 express@2.5.11 node_modules/express ├── qs@0.4.2 ├── mime@1.2.4 ├── mkdirp@0.3.0 └── connect@1.9.2 (formidable@1.0.11) socket.io@0.8.7 node_modules/socket.io ├── policyfile@0.0.4 ├── redis@0.6.7 └── socket.io-client@0.8.7 (xmlhttprequest@1.2.2, websocket-client@1.0.0, uglify-js@1.0.6) 50(13@58"npm WARN package.json nide@0.2.0 No README.md file found! 368618342#0#58#0(1@0"0(13@45"npm http GET https://registry.npmjs.org/dive 368618343#58#45#0(1@0"0(13@50"npm http GET https://registry.npmjs.org/node-uuid 368618343#103#50#0(1@0"0(13@50"npm http GET https://registry.npmjs.org/commander 368618343#153#50#0(1@0"0(13@50"npm http GET https://registry.npmjs.org/socket.io 368618343#203#50#0(1@0"0(13@48"npm http GET https://registry.npmjs.org/express 368618343#253#48#0(1@0"0(13@50"npm http 304 https://registry.npmjs.org/socket.io 368618345#301#50#0(1@0"0(13@45"npm http 304 https://registry.npmjs.org/dive 368618345#351#45#0(1@0"0(13@50"npm http 304 https://registry.npmjs.org/commander 368618345#396#50#0(1@0"0(13@50"npm http 304 https://registry.npmjs.org/node-uuid 368618345#446#50#0(1@0"0(13@48"npm http 304 https://registry.npmjs.org/express 368618345#496#48#0(1@0"0(13@113"npm WARN engine commander@0.4.3: wanted: {"node":">= 0.4.x < 0.7.0"} (current: {"node":"v0.8.8","npm":"1.1.59"}) 368618345#544#113#0(1@0"0(13@47"npm http GET https://registry.npmjs.org/append 368618345#657#47#0(1@0"0(13@43"npm http GET https://registry.npmjs.org/qs 368618346#704#43#0(1@0"0(13@53"npm http GET https://registry.npmjs.org/mkdirp/0.3.0 368618346#747#53#0(1@0"0(13@51"npm http GET https://registry.npmjs.org/mime/1.2.4 368618346#800#51#0(1@0"0(13@48"npm http GET https://registry.npmjs.org/connect 368618346#851#48#0(1@0"0(13@63"npm http GET https://registry.npmjs.org/socket.io-client/0.8.7 368618346#899#63#0(1@0"0(13@57"npm http GET https://registry.npmjs.org/policyfile/0.0.4 368618346#962#57#0(1@0"0(13@52"npm http GET https://registry.npmjs.org/redis/0.6.7 368618346#1019#52#0(1@0"0(13@47"npm http 304 https://registry.npmjs.org/append 368618346#1071#47#0(1@0"0(13@63"npm http 304 https://registry.npmjs.org/socket.io-client/0.8.7 368618347#1118#63#0(1@0"0(13@43"npm http 304 https://registry.npmjs.org/qs 368618347#1181#43#0(1@0"0(13@51"npm http 304 https://registry.npmjs.org/mime/1.2.4 368618347#1224#51#0(1@0"0(13@57"npm http 304 https://registry.npmjs.org/policyfile/0.0.4 368618347#1275#57#0(1@0"0(13@53"npm http 304 https://registry.npmjs.org/mkdirp/0.3.0 368618347#1332#53#0(1@0"0(13@48"npm http 304 https://registry.npmjs.org/connect 368618347#1385#48#0(1@0"0(13@52"npm http 304 https://registry.npmjs.org/redis/0.6.7 368618347#1433#52#0(1@0"0(13@61"npm WARN package.json connect@1.9.2 No README.md file found! 368618347#1485#61#0(1@0"0(13@51"npm http GET https://registry.npmjs.org/formidable 368618348#1546#51#0(1@0"0(13@51"npm http 304 https://registry.npmjs.org/formidable 368618349#1597#51#0(1@0"0(13@56"npm http GET https://registry.npmjs.org/uglify-js/1.0.6 368618351#1648#56#0(1@0"0(13@63"npm http GET https://registry.npmjs.org/websocket-client/1.0.0 368618351#1704#63#0(1@0"0(13@61"npm http GET https://registry.npmjs.org/xmlhttprequest/1.2.2 368618351#1767#61#0(1@0"0(13@56"npm http 304 https://registry.npmjs.org/uglify-js/1.0.6 368618352#1828#56#0(1@0"0(13@63"npm http 304 https://registry.npmjs.org/websocket-client/1.0.0 368618353#1884#63#0(1@0"0(13@61"npm http 304 https://registry.npmjs.org/xmlhttprequest/1.2.2 368618353#1947#61#0(1@0"0(13@39"commander@0.4.3 node_modules/commander 368618354#2008#39#0(1@0"0(13@39"node-uuid@1.3.3 node_modules/node-uuid 368618354#2048#39#0(1@0"0(13@29"dive@0.2.0 node_modules/dive 368618354#2088#29#0(1@0"0(13@23"└── append@0.1.1 368618354#2117#17#0(1@0"0(13@36"express@2.5.11 node_modules/express 368618354#2135#36#0(1@0"0(13@19"├── qs@0.4.2 368618354#2171#13#0(1@0"0(13@21"├── mime@1.2.4 368618354#2184#15#0(1@0"0(13@23"├── mkdirp@0.3.0 368618354#2199#17#0(1@0"0(13@44"└── connect@1.9.2 (formidable@1.0.11) 368618354#2216#38#0(1@0"0(13@39"socket.io@0.8.7 node_modules/socket.io 368618354#2255#39#0(1@0"0(13@27"├── policyfile@0.0.4 368618354#2294#21#0(1@0"0(13@22"├── redis@0.6.7 368618354#2315#16#0(1@0"0(13@97"└── socket.io-client@0.8.7 (xmlhttprequest@1.2.2, websocket-client@1.0.0, uglify-js@1.0.6) 368618354#2331#91#0(1@0"0(0#0#0"2527998448#15730" cd /Users/Pau/Proyectos/nide/osx setenv ACTION build setenv ALTERNATE_GROUP staff setenv ALTERNATE_MODE u+w,go-w,a+rX setenv ALTERNATE_OWNER Pau setenv ALWAYS_SEARCH_USER_PATHS NO setenv APPLE_INTERNAL_DEVELOPER_DIR /AppleInternal/Developer setenv APPLE_INTERNAL_DIR /AppleInternal setenv APPLE_INTERNAL_DOCUMENTATION_DIR /AppleInternal/Documentation setenv APPLE_INTERNAL_LIBRARY_DIR /AppleInternal/Library setenv APPLE_INTERNAL_TOOLS /AppleInternal/Developer/Tools setenv APPLY_RULES_IN_COPY_FILES NO setenv ARCHS i386 setenv ARCHS_STANDARD_32_64_BIT "x86_64 i386" setenv ARCHS_STANDARD_32_BIT i386 setenv ARCHS_STANDARD_64_BIT x86_64 setenv BUILD_COMPONENTS "headers build" setenv BUILD_DIR /Users/Pau/Proyectos/nide/osx/build setenv BUILD_ROOT /Users/Pau/Proyectos/nide/osx/build setenv BUILD_STYLE Debug setenv BUILD_VARIANTS normal setenv BUILT_PRODUCTS_DIR /Users/Pau/Proyectos/nide/osx/build/Debug setenv CACHE_ROOT /var/folders/QT/QTR3MlUDFFOxoo7RF4yHV++++TI/-Caches-/com.apple.Xcode.501 setenv CCHROOT /var/folders/QT/QTR3MlUDFFOxoo7RF4yHV++++TI/-Caches-/com.apple.Xcode.501 setenv CHMOD /bin/chmod setenv CHOWN /usr/sbin/chown setenv CLANG_ENABLE_OBJC_ARC NO setenv CLASS_FILE_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/JavaClasses setenv CLEAN_PRECOMPS YES setenv CLONE_HEADERS NO setenv CODESIGNING_FOLDER_PATH /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app setenv CODE_SIGNING_ALLOWED YES setenv COMMAND_MODE legacy setenv COMPOSITE_SDK_DIRS /var/folders/QT/QTR3MlUDFFOxoo7RF4yHV++++TI/-Caches-/com.apple.Xcode.501/CompositeSDKs setenv CONFIGURATION Debug setenv CONFIGURATION_BUILD_DIR /Users/Pau/Proyectos/nide/osx/build/Debug setenv CONFIGURATION_TEMP_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug setenv CONTENTS_FOLDER_PATH Nide.app/Contents setenv COPYING_PRESERVES_HFS_DATA NO setenv COPY_PHASE_STRIP NO setenv COPY_RESOURCES_FROM_STATIC_FRAMEWORKS YES setenv CP /bin/cp setenv CURRENT_ARCH i386 setenv CURRENT_VARIANT normal setenv DEAD_CODE_STRIPPING NO setenv DEBUGGING_SYMBOLS YES setenv DEBUG_INFORMATION_FORMAT dwarf setenv DEPLOYMENT_LOCATION NO setenv DEPLOYMENT_POSTPROCESSING NO setenv DERIVED_FILES_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/DerivedSources setenv DERIVED_FILE_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/DerivedSources setenv DERIVED_SOURCES_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/DerivedSources setenv DEVELOPER_APPLICATIONS_DIR /Developer/Applications setenv DEVELOPER_BIN_DIR /Developer/usr/bin setenv DEVELOPER_DIR /Developer setenv DEVELOPER_FRAMEWORKS_DIR /Developer/Library/Frameworks setenv DEVELOPER_FRAMEWORKS_DIR_QUOTED "\"/Developer/Library/Frameworks\"" setenv DEVELOPER_LIBRARY_DIR /Developer/Library setenv DEVELOPER_SDK_DIR /Developer/SDKs setenv DEVELOPER_TOOLS_DIR /Developer/Tools setenv DEVELOPER_USR_DIR /Developer/usr setenv DEVELOPMENT_LANGUAGE English setenv DOCUMENTATION_FOLDER_PATH Nide.app/Contents/Resources/English.lproj/Documentation setenv DO_HEADER_SCANNING_IN_JAM NO setenv DSTROOT /tmp/Nide.dst setenv DWARF_DSYM_FILE_NAME Nide.app.dSYM setenv DWARF_DSYM_FOLDER_PATH /Users/Pau/Proyectos/nide/osx/build/Debug setenv ENABLE_HEADER_DEPENDENCIES YES setenv ENABLE_OPENMP_SUPPORT NO setenv EXCLUDED_INSTALLSRC_SUBDIRECTORY_PATTERNS ".svn .git CVS" setenv EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES "*.nib *.lproj *.framework *.gch (*) CVS .svn .git *.xcodeproj *.xcode *.pbproj *.pbxproj" setenv EXECUTABLES_FOLDER_PATH Nide.app/Contents/Executables setenv EXECUTABLE_FOLDER_PATH Nide.app/Contents/MacOS setenv EXECUTABLE_NAME Nide setenv EXECUTABLE_PATH Nide.app/Contents/MacOS/Nide setenv FILE_LIST /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Objects/LinkFileList setenv FIXED_FILES_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/FixedFiles setenv FRAMEWORKS_FOLDER_PATH Nide.app/Contents/Frameworks setenv FRAMEWORK_FLAG_PREFIX -framework setenv FRAMEWORK_SEARCH_PATHS "\"/Users/Pau/Proyectos/nide/osx/build/Debug\" " setenv FRAMEWORK_VERSION A setenv FULL_PRODUCT_NAME Nide.app setenv GCC3_VERSION 3.3 setenv GCC_C_LANGUAGE_STANDARD gnu99 setenv GCC_DYNAMIC_NO_PIC NO setenv GCC_ENABLE_OBJC_EXCEPTIONS YES setenv GCC_INLINES_ARE_PRIVATE_EXTERN YES setenv GCC_OPTIMIZATION_LEVEL 0 setenv GCC_PFE_FILE_C_DIALECTS "c objective-c c++ objective-c++" setenv GCC_PRECOMPILE_PREFIX_HEADER YES setenv GCC_PREFIX_HEADER Nide/Nide-Prefix.pch setenv GCC_PREPROCESSOR_DEFINITIONS "DEBUG=1 " setenv GCC_SYMBOLS_PRIVATE_EXTERN NO setenv GCC_TREAT_WARNINGS_AS_ERRORS NO setenv GCC_VERSION com.apple.compilers.llvm.clang.1_0 setenv GCC_VERSION_IDENTIFIER com_apple_compilers_llvm_clang_1_0 setenv GCC_WARN_64_TO_32_BIT_CONVERSION YES setenv GCC_WARN_ABOUT_MISSING_PROTOTYPES YES setenv GCC_WARN_ABOUT_RETURN_TYPE YES setenv GCC_WARN_UNUSED_VARIABLE YES setenv GENERATE_MASTER_OBJECT_FILE NO setenv GENERATE_PKGINFO_FILE YES setenv GENERATE_PROFILING_CODE NO setenv GID 20 setenv GROUP staff setenv HEADERMAP_INCLUDES_FLAT_ENTRIES_FOR_TARGET_BEING_BUILT YES setenv HEADERMAP_INCLUDES_FRAMEWORK_ENTRIES_FOR_ALL_PRODUCT_TYPES YES setenv HEADERMAP_INCLUDES_NONPUBLIC_NONPRIVATE_HEADERS YES setenv HEADERMAP_INCLUDES_PROJECT_HEADERS YES setenv HEADER_SEARCH_PATHS "\"/Users/Pau/Proyectos/nide/osx/build/Debug/include\" " setenv ICONV /usr/bin/iconv setenv INFOPLIST_EXPAND_BUILD_SETTINGS YES setenv INFOPLIST_FILE Nide/Nide-Info.plist setenv INFOPLIST_OUTPUT_FORMAT same-as-input setenv INFOPLIST_PATH Nide.app/Contents/Info.plist setenv INFOPLIST_PREPROCESS NO setenv INFOSTRINGS_PATH Nide.app/Contents/Resources/English.lproj/InfoPlist.strings setenv INSTALL_DIR /tmp/Nide.dst/Users/Pau/Applications setenv INSTALL_GROUP staff setenv INSTALL_MODE_FLAG u+w,go-w,a+rX setenv INSTALL_OWNER Pau setenv INSTALL_PATH /Users/Pau/Applications setenv INSTALL_ROOT /tmp/Nide.dst setenv JAVAC_DEFAULT_FLAGS "-J-Xms64m -J-XX:NewSize=4M -J-Dfile.encoding=UTF8" setenv JAVA_APP_STUB /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub setenv JAVA_ARCHIVE_CLASSES YES setenv JAVA_ARCHIVE_TYPE JAR setenv JAVA_COMPILER /usr/bin/javac setenv JAVA_FOLDER_PATH Nide.app/Contents/Resources/Java setenv JAVA_FRAMEWORK_RESOURCES_DIRS Resources setenv JAVA_JAR_FLAGS cv setenv JAVA_SOURCE_SUBDIR . setenv JAVA_USE_DEPENDENCIES YES setenv JAVA_ZIP_FLAGS -urg setenv JIKES_DEFAULT_FLAGS "+E +OLDCSO" setenv KEEP_PRIVATE_EXTERNS NO setenv LD_GENERATE_MAP_FILE NO setenv LD_MAP_FILE_PATH /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-LinkMap-normal-i386.txt setenv LD_OPENMP_FLAGS -fopenmp setenv LEX /Developer/usr/bin/lex setenv LIBRARY_FLAG_NOSPACE YES setenv LIBRARY_FLAG_PREFIX -l setenv LIBRARY_SEARCH_PATHS "\"/Users/Pau/Proyectos/nide/osx/build/Debug\" " setenv LINKER_DISPLAYS_MANGLED_NAMES NO setenv LINK_FILE_LIST_normal_i386 /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/Nide.LinkFileList setenv LINK_WITH_STANDARD_LIBRARIES YES setenv LOCALIZED_RESOURCES_FOLDER_PATH Nide.app/Contents/Resources/English.lproj setenv LOCAL_ADMIN_APPS_DIR /Applications/Utilities setenv LOCAL_APPS_DIR /Applications setenv LOCAL_DEVELOPER_DIR /Library/Developer setenv LOCAL_LIBRARY_DIR /Library setenv MACH_O_TYPE mh_execute setenv MACOSX_DEPLOYMENT_TARGET 10.6 setenv MAC_OS_X_PRODUCT_BUILD_VERSION 10K549 setenv MAC_OS_X_VERSION_ACTUAL 1068 setenv MAC_OS_X_VERSION_MAJOR 1060 setenv MAC_OS_X_VERSION_MINOR 0608 setenv NATIVE_ARCH i386 setenv NATIVE_ARCH_32_BIT i386 setenv NATIVE_ARCH_64_BIT x86_64 setenv NATIVE_ARCH_ACTUAL i386 setenv NO_COMMON YES setenv OBJECT_FILE_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Objects setenv OBJECT_FILE_DIR_normal /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Objects-normal setenv OBJROOT /Users/Pau/Proyectos/nide/osx/build setenv ONLY_ACTIVE_ARCH YES setenv OPTIMIZATION_LEVEL 0 setenv OS MACOS setenv OSAC /usr/bin/osacompile setenv PACKAGE_TYPE com.apple.package-type.wrapper.application setenv PASCAL_STRINGS YES setenv PATH_PREFIXES_EXCLUDED_FROM_HEADER_DEPENDENCIES "/usr/include /usr/local/include /System/Library/Frameworks /System/Library/PrivateFrameworks /Developer/Headers /Developer/SDKs /Developer/Platforms" setenv PBDEVELOPMENTPLIST_PATH Nide.app/Contents/pbdevelopment.plist setenv PFE_FILE_C_DIALECTS objective-c setenv PKGINFO_FILE_PATH /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/PkgInfo setenv PKGINFO_PATH Nide.app/Contents/PkgInfo setenv PLATFORM_DEVELOPER_APPLICATIONS_DIR /Developer/Applications setenv PLATFORM_DEVELOPER_BIN_DIR /Developer/usr/bin setenv PLATFORM_DEVELOPER_LIBRARY_DIR /Developer/Library setenv PLATFORM_DEVELOPER_SDK_DIR /Developer/SDKs setenv PLATFORM_DEVELOPER_TOOLS_DIR /Developer/Tools setenv PLATFORM_DEVELOPER_USR_DIR /Developer/usr setenv PLATFORM_NAME macosx setenv PLATFORM_PRODUCT_BUILD_VERSION 10M2518 setenv PLIST_FILE_OUTPUT_FORMAT same-as-input setenv PLUGINS_FOLDER_PATH Nide.app/Contents/PlugIns setenv PREBINDING YES setenv PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR YES setenv PRECOMP_DESTINATION_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/PrefixHeaders setenv PRESERVE_DEAD_CODE_INITS_AND_TERMS NO setenv PRIVATE_HEADERS_FOLDER_PATH Nide.app/Contents/PrivateHeaders setenv PRODUCT_NAME Nide setenv PRODUCT_SETTINGS_PATH /Users/Pau/Proyectos/nide/osx/Nide/Nide-Info.plist setenv PRODUCT_TYPE com.apple.product-type.application setenv PROFILING_CODE NO setenv PROJECT Nide setenv PROJECT_DERIVED_FILE_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build/DerivedSources setenv PROJECT_DIR /Users/Pau/Proyectos/nide/osx setenv PROJECT_FILE_PATH /Users/Pau/Proyectos/nide/osx/Nide.xcodeproj setenv PROJECT_NAME Nide setenv PROJECT_TEMP_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build setenv PUBLIC_HEADERS_FOLDER_PATH Nide.app/Contents/Headers setenv RECURSIVE_SEARCH_PATHS_FOLLOW_SYMLINKS YES setenv REMOVE_CVS_FROM_RESOURCES YES setenv REMOVE_GIT_FROM_RESOURCES YES setenv REMOVE_SVN_FROM_RESOURCES YES setenv REZ_COLLECTOR_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/ResourceManagerResources setenv REZ_OBJECTS_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/ResourceManagerResources/Objects setenv REZ_SEARCH_PATHS "\"/Users/Pau/Proyectos/nide/osx/build/Debug\" " setenv RUN_CLANG_STATIC_ANALYZER NO setenv SCAN_ALL_SOURCE_FILES_FOR_INCLUDES NO setenv SCRIPTS_FOLDER_PATH Nide.app/Contents/Resources/Scripts setenv SCRIPT_INPUT_FILE_COUNT 0 setenv SCRIPT_OUTPUT_FILE_COUNT 0 setenv SDKROOT /Developer/SDKs/MacOSX10.6.sdk setenv SDK_DIR /Developer/SDKs/MacOSX10.6.sdk setenv SDK_NAME macosx10.6 setenv SDK_PRODUCT_BUILD_VERSION 10M2518 setenv SED /usr/bin/sed setenv SEPARATE_STRIP NO setenv SEPARATE_SYMBOL_EDIT NO setenv SET_DIR_MODE_OWNER_GROUP YES setenv SET_FILE_MODE_OWNER_GROUP NO setenv SHARED_DERIVED_FILE_DIR /Users/Pau/Proyectos/nide/osx/build/Debug/DerivedSources setenv SHARED_FRAMEWORKS_FOLDER_PATH Nide.app/Contents/SharedFrameworks setenv SHARED_PRECOMPS_DIR /var/folders/QT/QTR3MlUDFFOxoo7RF4yHV++++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders setenv SHARED_SUPPORT_FOLDER_PATH Nide.app/Contents/SharedSupport setenv SKIP_INSTALL YES setenv SOURCE_ROOT /Users/Pau/Proyectos/nide/osx setenv SRCROOT /Users/Pau/Proyectos/nide/osx setenv STANDARD_C_PLUS_PLUS_LIBRARY_TYPE dynamic setenv STRINGS_FILE_OUTPUT_ENCODING UTF-16 setenv STRIP_INSTALLED_PRODUCT YES setenv STRIP_STYLE all setenv SYMBOL_REPOSITORY_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/SymbolRepositories setenv SYMROOT /Users/Pau/Proyectos/nide/osx/build setenv SYSTEM_ADMIN_APPS_DIR /Applications/Utilities setenv SYSTEM_APPS_DIR /Applications setenv SYSTEM_CORE_SERVICES_DIR /System/Library/CoreServices setenv SYSTEM_DEMOS_DIR /Applications/Extras setenv SYSTEM_DEVELOPER_APPS_DIR /Developer/Applications setenv SYSTEM_DEVELOPER_BIN_DIR /Developer/usr/bin setenv SYSTEM_DEVELOPER_DEMOS_DIR "/Developer/Applications/Utilities/Built Examples" setenv SYSTEM_DEVELOPER_DIR /Developer setenv SYSTEM_DEVELOPER_DOC_DIR "/Developer/ADC Reference Library" setenv SYSTEM_DEVELOPER_GRAPHICS_TOOLS_DIR "/Developer/Applications/Graphics Tools" setenv SYSTEM_DEVELOPER_JAVA_TOOLS_DIR "/Developer/Applications/Java Tools" setenv SYSTEM_DEVELOPER_PERFORMANCE_TOOLS_DIR "/Developer/Applications/Performance Tools" setenv SYSTEM_DEVELOPER_RELEASENOTES_DIR "/Developer/ADC Reference Library/releasenotes" setenv SYSTEM_DEVELOPER_TOOLS /Developer/Tools setenv SYSTEM_DEVELOPER_TOOLS_DOC_DIR "/Developer/ADC Reference Library/documentation/DeveloperTools" setenv SYSTEM_DEVELOPER_TOOLS_RELEASENOTES_DIR "/Developer/ADC Reference Library/releasenotes/DeveloperTools" setenv SYSTEM_DEVELOPER_USR_DIR /Developer/usr setenv SYSTEM_DEVELOPER_UTILITIES_DIR /Developer/Applications/Utilities setenv SYSTEM_DOCUMENTATION_DIR /Library/Documentation setenv SYSTEM_LIBRARY_DIR /System/Library setenv TARGETNAME Nide setenv TARGET_BUILD_DIR /Users/Pau/Proyectos/nide/osx/build/Debug setenv TARGET_NAME Nide setenv TARGET_TEMP_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build setenv TEMP_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build setenv TEMP_FILES_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build setenv TEMP_FILE_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build setenv TEMP_ROOT /Users/Pau/Proyectos/nide/osx/build setenv UID 501 setenv UNLOCALIZED_RESOURCES_FOLDER_PATH Nide.app/Contents/Resources setenv UNSTRIPPED_PRODUCT NO setenv USER Pau setenv USER_APPS_DIR /Users/Pau/Applications setenv USER_LIBRARY_DIR /Users/Pau/Library setenv USE_DYNAMIC_NO_PIC YES setenv USE_HEADERMAP YES setenv USE_HEADER_SYMLINKS NO setenv VALIDATE_PRODUCT NO setenv VALID_ARCHS "i386 ppc ppc64 ppc7400 ppc970 x86_64" setenv VERBOSE_PBXCP NO setenv VERSIONPLIST_PATH Nide.app/Contents/version.plist setenv VERSION_INFO_BUILDER Pau setenv VERSION_INFO_FILE Nide_vers.c setenv VERSION_INFO_STRING "\"@(#)PROGRAM:Nide PROJECT:Nide-\"" setenv WRAPPER_EXTENSION app setenv WRAPPER_NAME Nide.app setenv WRAPPER_SUFFIX .app setenv XCODE_APP_SUPPORT_DIR /Developer/Library/Xcode setenv XCODE_PRODUCT_BUILD_VERSION 10M2518 setenv XCODE_VERSION_ACTUAL 0400 setenv XCODE_VERSION_MAJOR 0400 setenv XCODE_VERSION_MINOR 0400 setenv YACC /Developer/usr/bin/yacc setenv _REAL_SDKROOT macosx10.6 /bin/sh -c /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Script-F5B01A7814B5467000145F5E.sh 0# + +CProcessInfoPlistFile /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Info.plist Nide/Nide-Info.plist +s368618326.721247 +e368618326.747179 +r1 +xProcessInfoPlistFile +x/Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Info.plist +xNide/Nide-Info.plist +lSLF07#2@28"Process Nide/Nide-Info.plist368618326#368618326#0(0"0(0#0#50"/Users/Pau/Proyectos/nide/osx/Nide/Nide-Info.plist2527998448#279" cd /Users/Pau/Proyectos/nide/osx builtin-infoPlistUtility Nide/Nide-Info.plist -genpkginfo /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/PkgInfo -expandbuildsettings -platform macosx -o /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Info.plist 0# + +CProcessPCH /var/folders/QT/QTR3MlUDFFOxoo7RF4yHV++++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Nide-Prefix-fditlkrpeuzrxcdatwpjwayuigwk/Nide-Prefix.pch.pth Nide/Nide-Prefix.pch normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler +s368618326.747372 +e368618335.728465 +r1 +xProcessPCH +x/var/folders/QT/QTR3MlUDFFOxoo7RF4yHV++++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Nide-Prefix-fditlkrpeuzrxcdatwpjwayuigwk/Nide-Prefix.pch.pth +xNide/Nide-Prefix.pch +xnormal +xi386 +xobjective-c +xcom.apple.compilers.llvm.clang.1_0.compiler +lSLF07#2@31"Precompile Nide/Nide-Prefix.pch368618326#368618335#0(0"0(0#0#50"/Users/Pau/Proyectos/nide/osx/Nide/Nide-Prefix.pch2527998448#1277" cd /Users/Pau/Proyectos/nide/osx setenv LANG en_US.US-ASCII /Developer/usr/bin/clang -x objective-c-header -arch i386 -fmessage-length=0 -pipe -fdiagnostics-print-source-range-info -std=gnu99 -Wno-trigraphs -fpascal-strings -O0 -Wmissing-prototypes -Wreturn-type -Wunused-variable -Wshorten-64-to-32 -DDEBUG=1 -isysroot /Developer/SDKs/MacOSX10.6.sdk -fasm-blocks -mmacosx-version-min=10.6 -gdwarf-2 -iquote /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-generated-files.hmap -I/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-own-target-headers.hmap -I/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-all-target-headers.hmap -iquote /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-project-headers.hmap -F/Users/Pau/Proyectos/nide/osx/build/Debug -I/Users/Pau/Proyectos/nide/osx/build/Debug/include -I/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/DerivedSources/i386 -I/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/DerivedSources -c /Users/Pau/Proyectos/nide/osx/Nide/Nide-Prefix.pch -o /var/folders/QT/QTR3MlUDFFOxoo7RF4yHV++++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Nide-Prefix-fditlkrpeuzrxcdatwpjwayuigwk/Nide-Prefix.pch.pth 0# + +CTouch /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app +s368618354.811391 +e368618354.875196 +r1 +xTouch +x/Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app +lSLF07#2@56"Touch /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app368618354#368618354#0(0"0(0#0#0"2527998448#110" cd /Users/Pau/Proyectos/nide/osx /usr/bin/touch -c /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app 0# + diff --git a/osx/build/Nide.build/Debug/Nide.build/build-state~.dat b/osx/build/Nide.build/Debug/Nide.build/build-state~.dat new file mode 100644 index 0000000..dc0190e --- /dev/null +++ b/osx/build/Nide.build/Debug/Nide.build/build-state~.dat @@ -0,0 +1,385 @@ +TNide +v7 +r0 +t368618354.875271 +cCheck dependencies +cProcessInfoPlistFile /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Info.plist Nide/Nide-Info.plist +cProcessPCH /var/folders/QT/QTR3MlUDFFOxoo7RF4yHV++++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Nide-Prefix-fditlkrpeuzrxcdatwpjwayuigwk/Nide-Prefix.pch.pth Nide/Nide-Prefix.pch normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler +cCompileC build/Nide.build/Debug/Nide.build/Objects-normal/i386/main.o /Users/Pau/Proyectos/nide/osx/Nide/main.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler +cCompileC build/Nide.build/Debug/Nide.build/Objects-normal/i386/NDAppDelegate.o /Users/Pau/Proyectos/nide/osx/Nide/NDAppDelegate.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler +cCompileC build/Nide.build/Debug/Nide.build/Objects-normal/i386/NDProjectWindowController.o /Users/Pau/Proyectos/nide/osx/Nide/NDProjectWindowController.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler +cLd /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/MacOS/Nide normal i386 +cCopyStringsFile /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/en.lproj/InfoPlist.strings Nide/en.lproj/InfoPlist.strings +cCpResource build/Debug/Nide.app/Contents/Resources/en.lproj/Credits.rtf Nide/en.lproj/Credits.rtf +cCompileXIB /Users/Pau/Proyectos/nide/osx/Nide/en.lproj/MainMenu.xib +cCompileXIB /Users/Pau/Proyectos/nide/osx/Nide/ProjectWindow.xib +cCpResource build/Debug/Nide.app/Contents/Resources/nide.icns Nide/../nide.icns +cCpResource build/Debug/Nide.app/Contents/Resources/nide-project.icns nide-project.icns +cPhaseScriptExecution "Run Script" /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Script-F5B01A7814B5467000145F5E.sh +cTouch /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app + +N/Developer/SDKs/MacOSX10.6.sdk +c000000004DA8767D00000000000000EE +t1302886013 +s238 + +N/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Cocoa.framework/Cocoa +c000000004D5A27900000000000003430 +t1297754000 +s13360 + +N/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h +c0000000040C4AA6800000000000001E5 +t1086630504 +s485 + +N/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebKit.h +c000000004CC4316B0000000000000957 +t1287926123 +s2391 + +N/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/WebKit.framework/WebKit +c000000004D5A2791000000000008DF08 +t1297754001 +s581384 + +N/Users/Pau/Proyectos/nide/osx/Nide/../nide.icns +c0000000050487310000000000003858C +t1346925328 +s230796 + +N/Users/Pau/Proyectos/nide/osx/Nide/NDAppDelegate.h +c00000000504873100000000000000169 +t1346925328 +s361 +i + +N/Users/Pau/Proyectos/nide/osx/Nide/NDAppDelegate.m +c000000005048731000000000000007F9 +t1346925328 +s2041 +i"NDAppDelegate.h" +i"NDProjectWindowController.h" + +N/Users/Pau/Proyectos/nide/osx/Nide/NDProjectWindowController.h +c00000000504873100000000000000269 +t1346925328 +s617 +i +i + +N/Users/Pau/Proyectos/nide/osx/Nide/NDProjectWindowController.m +c000000005048731000000000000010F4 +t1346925328 +s4340 +i"NDProjectWindowController.h" + +N/Users/Pau/Proyectos/nide/osx/Nide/Nide-Prefix.pch +c0000000050487310000000000000008B +t1346925328 +s139 +i + +N/Users/Pau/Proyectos/nide/osx/Nide/ProjectWindow.xib +c000000005048731000000000000032E3 +t1346925328 +s13027 + +N/Users/Pau/Proyectos/nide/osx/Nide/en.lproj/Credits.rtf +c000000005048731000000000000006FA +t1346925328 +s1786 + +N/Users/Pau/Proyectos/nide/osx/Nide/en.lproj/InfoPlist.strings +c0000000050487310000000000000002D +t1346925328 +s45 + +N/Users/Pau/Proyectos/nide/osx/Nide/en.lproj/MainMenu.xib +c000000005048731000000000000154A9 +t1346925328 +s87209 + +N/Users/Pau/Proyectos/nide/osx/Nide/main.m +c0000000050487310000000000000010C +t1346925328 +s268 +i + +N/Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app +t1346925554 +s102 + +N/Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Info.plist +t1346925526 +s1413 + +N/Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/MacOS/Nide +t1346925538 +s29872 + +N/Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/PkgInfo +t1346925526 +s8 + +N/Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/ProjectWindow.nib +t1346925539 +s3928 + +N/Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/en.lproj/Credits.rtf +t1346925538 +s1786 + +N/Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/en.lproj/InfoPlist.strings +t1346925538 +s92 + +N/Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/en.lproj/MainMenu.nib +t1346925539 +s21186 + +N/Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/nide-project.icns +t1346925540 +s154681 + +N/Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/nide.icns +t1346925540 +s230796 + +N/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/NDAppDelegate.o +t1346925536 +s29744 + +N/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/NDProjectWindowController.o +t1346925536 +s34232 + +N/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/Nide.LinkFileList +c00000000504873D6000000000000012F +t1346925526 +s303 + +N/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/main.o +t1346925536 +s2140 + +N/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Script-F5B01A7814B5467000145F5E.sh +c00000000504873D600000000000001EC +t1346925526 +s492 + +N/Users/Pau/Proyectos/nide/osx/nide-project.icns +c00000000504873100000000000025C39 +t1346925328 +s154681 + +N/var/folders/QT/QTR3MlUDFFOxoo7RF4yHV++++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Nide-Prefix-fditlkrpeuzrxcdatwpjwayuigwk/Nide-Prefix.pch.pth +t1346925535 +s11829736 + +NNide/Nide-Info.plist +c0000000050487310000000000000045C +t1346925328 +s1116 + +CCheck dependencies +r0 +lSLF07#2@18"Check dependencies368618326#368618326#0(0"0(0#1#0"2527998448#0"0# + +CCompileC build/Nide.build/Debug/Nide.build/Objects-normal/i386/NDAppDelegate.o /Users/Pau/Proyectos/nide/osx/Nide/NDAppDelegate.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler +s368618336.447036 +e368618336.730755 +r1 +xCompileC +xbuild/Nide.build/Debug/Nide.build/Objects-normal/i386/NDAppDelegate.o +x/Users/Pau/Proyectos/nide/osx/Nide/NDAppDelegate.m +xnormal +xi386 +xobjective-c +xcom.apple.compilers.llvm.clang.1_0.compiler +lSLF07#2@58"Compile /Users/Pau/Proyectos/nide/osx/Nide/NDAppDelegate.m368618336#368618336#0(0"0(0#0#50"/Users/Pau/Proyectos/nide/osx/Nide/NDAppDelegate.m2527998448#1375" cd /Users/Pau/Proyectos/nide/osx setenv LANG en_US.US-ASCII /Developer/usr/bin/clang -x objective-c -arch i386 -fmessage-length=0 -pipe -fdiagnostics-print-source-range-info -std=gnu99 -Wno-trigraphs -fpascal-strings -O0 -Wmissing-prototypes -Wreturn-type -Wunused-variable -Wshorten-64-to-32 -DDEBUG=1 -isysroot /Developer/SDKs/MacOSX10.6.sdk -fasm-blocks -mmacosx-version-min=10.6 -gdwarf-2 -iquote /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-generated-files.hmap -I/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-own-target-headers.hmap -I/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-all-target-headers.hmap -iquote /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-project-headers.hmap -F/Users/Pau/Proyectos/nide/osx/build/Debug -I/Users/Pau/Proyectos/nide/osx/build/Debug/include -I/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/DerivedSources/i386 -I/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/DerivedSources -include /var/folders/QT/QTR3MlUDFFOxoo7RF4yHV++++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Nide-Prefix-fditlkrpeuzrxcdatwpjwayuigwk/Nide-Prefix.pch -c /Users/Pau/Proyectos/nide/osx/Nide/NDAppDelegate.m -o /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/NDAppDelegate.o 0# + +CCompileC build/Nide.build/Debug/Nide.build/Objects-normal/i386/NDProjectWindowController.o /Users/Pau/Proyectos/nide/osx/Nide/NDProjectWindowController.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler +s368618336.730907 +e368618336.906573 +r1 +xCompileC +xbuild/Nide.build/Debug/Nide.build/Objects-normal/i386/NDProjectWindowController.o +x/Users/Pau/Proyectos/nide/osx/Nide/NDProjectWindowController.m +xnormal +xi386 +xobjective-c +xcom.apple.compilers.llvm.clang.1_0.compiler +lSLF07#2@70"Compile /Users/Pau/Proyectos/nide/osx/Nide/NDProjectWindowController.m368618336#368618336#0(0"0(0#0#62"/Users/Pau/Proyectos/nide/osx/Nide/NDProjectWindowController.m2527998448#1399" cd /Users/Pau/Proyectos/nide/osx setenv LANG en_US.US-ASCII /Developer/usr/bin/clang -x objective-c -arch i386 -fmessage-length=0 -pipe -fdiagnostics-print-source-range-info -std=gnu99 -Wno-trigraphs -fpascal-strings -O0 -Wmissing-prototypes -Wreturn-type -Wunused-variable -Wshorten-64-to-32 -DDEBUG=1 -isysroot /Developer/SDKs/MacOSX10.6.sdk -fasm-blocks -mmacosx-version-min=10.6 -gdwarf-2 -iquote /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-generated-files.hmap -I/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-own-target-headers.hmap -I/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-all-target-headers.hmap -iquote /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-project-headers.hmap -F/Users/Pau/Proyectos/nide/osx/build/Debug -I/Users/Pau/Proyectos/nide/osx/build/Debug/include -I/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/DerivedSources/i386 -I/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/DerivedSources -include /var/folders/QT/QTR3MlUDFFOxoo7RF4yHV++++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Nide-Prefix-fditlkrpeuzrxcdatwpjwayuigwk/Nide-Prefix.pch -c /Users/Pau/Proyectos/nide/osx/Nide/NDProjectWindowController.m -o /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/NDProjectWindowController.o 0# + +CCompileC build/Nide.build/Debug/Nide.build/Objects-normal/i386/main.o /Users/Pau/Proyectos/nide/osx/Nide/main.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler +s368618335.728678 +e368618336.446875 +r1 +xCompileC +xbuild/Nide.build/Debug/Nide.build/Objects-normal/i386/main.o +x/Users/Pau/Proyectos/nide/osx/Nide/main.m +xnormal +xi386 +xobjective-c +xcom.apple.compilers.llvm.clang.1_0.compiler +lSLF07#2@49"Compile /Users/Pau/Proyectos/nide/osx/Nide/main.m368618335#368618336#0(0"0(0#0#41"/Users/Pau/Proyectos/nide/osx/Nide/main.m4261848#1357" cd /Users/Pau/Proyectos/nide/osx setenv LANG en_US.US-ASCII /Developer/usr/bin/clang -x objective-c -arch i386 -fmessage-length=0 -pipe -fdiagnostics-print-source-range-info -std=gnu99 -Wno-trigraphs -fpascal-strings -O0 -Wmissing-prototypes -Wreturn-type -Wunused-variable -Wshorten-64-to-32 -DDEBUG=1 -isysroot /Developer/SDKs/MacOSX10.6.sdk -fasm-blocks -mmacosx-version-min=10.6 -gdwarf-2 -iquote /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-generated-files.hmap -I/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-own-target-headers.hmap -I/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-all-target-headers.hmap -iquote /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-project-headers.hmap -F/Users/Pau/Proyectos/nide/osx/build/Debug -I/Users/Pau/Proyectos/nide/osx/build/Debug/include -I/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/DerivedSources/i386 -I/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/DerivedSources -include /var/folders/QT/QTR3MlUDFFOxoo7RF4yHV++++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Nide-Prefix-fditlkrpeuzrxcdatwpjwayuigwk/Nide-Prefix.pch -c /Users/Pau/Proyectos/nide/osx/Nide/main.m -o /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/main.o 0# + +CCompileXIB /Users/Pau/Proyectos/nide/osx/Nide/ProjectWindow.xib +s368618339.627830 +e368618340.088029 +r1 +xCompileXIB +x/Users/Pau/Proyectos/nide/osx/Nide/ProjectWindow.xib +lSLF07#2@33"CompileXIB Nide/ProjectWindow.xib368618339#368618340#0(0"0(0#0#52"/Users/Pau/Proyectos/nide/osx/Nide/ProjectWindow.xib2527998448#321" cd /Users/Pau/Proyectos/nide/osx /Developer/usr/bin/ibtool --errors --warnings --notices --output-format human-readable-text --compile /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/ProjectWindow.nib /Users/Pau/Proyectos/nide/osx/Nide/ProjectWindow.xib --sdk /Developer/SDKs/MacOSX10.6.sdk 0# + +CCompileXIB /Users/Pau/Proyectos/nide/osx/Nide/en.lproj/MainMenu.xib +s368618338.717623 +e368618339.627713 +r1 +xCompileXIB +x/Users/Pau/Proyectos/nide/osx/Nide/en.lproj/MainMenu.xib +o/* com.apple.ibtool.document.warnings */ +o/Users/Pau/Proyectos/nide/osx/Nide/en.lproj/MainMenu.xib:-1: warning: The action of 'Menu Item (Enter Full Screen)' is connected to the 'toggleFullScreen:' selector of 'First Responder' but 'toggleFullScreen:' is no longer defined. +lSLF07#2@37"CompileXIB Nide/en.lproj/MainMenu.xib368618338#368618339#0(273"/* com.apple.ibtool.document.warnings */ /Users/Pau/Proyectos/nide/osx/Nide/en.lproj/MainMenu.xib:-1: warning: The action of 'Menu Item (Enter Full Screen)' is connected to the 'toggleFullScreen:' selector of 'First Responder' but 'toggleFullScreen:' is no longer defined. 1(22@161"The action of 'Menu Item (Enter Full Screen)' is connected to the 'toggleFullScreen:' selector of 'First Responder' but 'toggleFullScreen:' is no longer defined.368618339#4294967295#0#0(6@56"/Users/Pau/Proyectos/nide/osx/Nide/en.lproj/MainMenu.xib368618128#4294967295#0#4294967295#0#0"0(0#0#56"/Users/Pau/Proyectos/nide/osx/Nide/en.lproj/MainMenu.xib2527998448#329" cd /Users/Pau/Proyectos/nide/osx /Developer/usr/bin/ibtool --errors --warnings --notices --output-format human-readable-text --compile /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/en.lproj/MainMenu.nib /Users/Pau/Proyectos/nide/osx/Nide/en.lproj/MainMenu.xib --sdk /Developer/SDKs/MacOSX10.6.sdk 0# + +CCopyStringsFile /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/en.lproj/InfoPlist.strings Nide/en.lproj/InfoPlist.strings +s368618338.214373 +e368618338.674059 +r1 +xCopyStringsFile +x/Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/en.lproj/InfoPlist.strings +xNide/en.lproj/InfoPlist.strings +o/Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copystrings:125: warning: Insecure world writable dir /usr/bin in PATH, mode 040777 +lSLF07#2@36"Copy Nide/en.lproj/InfoPlist.strings368618338#368618338#0(161"/Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copystrings:125: warning: Insecure world writable dir /usr/bin in PATH, mode 040777 0(0#0#61"/Users/Pau/Proyectos/nide/osx/Nide/en.lproj/InfoPlist.strings2527998448#339" cd /Users/Pau/Proyectos/nide/osx setenv ICONV /usr/bin/iconv /Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copystrings --validate --inputencoding utf-8 --outputencoding UTF-16 Nide/en.lproj/InfoPlist.strings --outdir /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/en.lproj 0# + +CCpResource build/Debug/Nide.app/Contents/Resources/en.lproj/Credits.rtf Nide/en.lproj/Credits.rtf +s368618338.674243 +e368618338.717226 +r1 +xCpResource +xbuild/Debug/Nide.app/Contents/Resources/en.lproj/Credits.rtf +xNide/en.lproj/Credits.rtf +lSLF07#2@30"Copy Nide/en.lproj/Credits.rtf368618338#368618338#0(0"0(0#0#55"/Users/Pau/Proyectos/nide/osx/Nide/en.lproj/Credits.rtf2527998448#334" cd /Users/Pau/Proyectos/nide/osx /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -resolve-src-symlinks /Users/Pau/Proyectos/nide/osx/Nide/en.lproj/Credits.rtf /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources/en.lproj 0# + +CCpResource build/Debug/Nide.app/Contents/Resources/nide-project.icns nide-project.icns +s368618340.116723 +e368618340.126438 +r1 +xCpResource +xbuild/Debug/Nide.app/Contents/Resources/nide-project.icns +xnide-project.icns +lSLF07#2@22"Copy nide-project.icns368618340#368618340#0(0"0(0#0#47"/Users/Pau/Proyectos/nide/osx/nide-project.icns2527998448#317" cd /Users/Pau/Proyectos/nide/osx /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -resolve-src-symlinks /Users/Pau/Proyectos/nide/osx/nide-project.icns /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources 0# + +CCpResource build/Debug/Nide.app/Contents/Resources/nide.icns Nide/../nide.icns +s368618340.088268 +e368618340.116598 +r1 +xCpResource +xbuild/Debug/Nide.app/Contents/Resources/nide.icns +xNide/../nide.icns +lSLF07#2@22"Copy Nide/../nide.icns368618340#368618340#0(0"0(0#0#47"/Users/Pau/Proyectos/nide/osx/Nide/../nide.icns2527998448#317" cd /Users/Pau/Proyectos/nide/osx /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -resolve-src-symlinks /Users/Pau/Proyectos/nide/osx/Nide/../nide.icns /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Resources 0# + +CLd /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/MacOS/Nide normal i386 +s368618336.906703 +e368618338.214129 +r1 +xLd +x/Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/MacOS/Nide +xnormal +xi386 +lSLF07#2@75"Link /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/MacOS/Nide368618336#368618338#0(0"0(0#0#0"2527998448#503" cd /Users/Pau/Proyectos/nide/osx setenv MACOSX_DEPLOYMENT_TARGET 10.6 /Developer/usr/bin/clang -arch i386 -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/Pau/Proyectos/nide/osx/build/Debug -F/Users/Pau/Proyectos/nide/osx/build/Debug -filelist /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/Nide.LinkFileList -mmacosx-version-min=10.6 -framework WebKit -framework Cocoa -prebind -o /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/MacOS/Nide 0# + +CPhaseScriptExecution "Run Script" /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Script-F5B01A7814B5467000145F5E.sh +s368618340.126590 +e368618354.811138 +r1 +xPhaseScriptExecution +xRun Script +x/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Script-F5B01A7814B5467000145F5E.sh +onpm WARN package.json nide@0.2.0 No README.md file found! +onpm http GET https://registry.npmjs.org/dive +onpm http GET https://registry.npmjs.org/node-uuid +onpm http GET https://registry.npmjs.org/commander +onpm http GET https://registry.npmjs.org/socket.io +onpm http GET https://registry.npmjs.org/express +onpm http 304 https://registry.npmjs.org/socket.io +onpm http 304 https://registry.npmjs.org/dive +onpm http 304 https://registry.npmjs.org/commander +onpm http 304 https://registry.npmjs.org/node-uuid +onpm http 304 https://registry.npmjs.org/express +onpm WARN engine commander@0.4.3: wanted: {"node":">= 0.4.x < 0.7.0"} (current: {"node":"v0.8.8","npm":"1.1.59"}) +onpm http GET https://registry.npmjs.org/append +onpm http GET https://registry.npmjs.org/qs +onpm http GET https://registry.npmjs.org/mkdirp/0.3.0 +onpm http GET https://registry.npmjs.org/mime/1.2.4 +onpm http GET https://registry.npmjs.org/connect +onpm http GET https://registry.npmjs.org/socket.io-client/0.8.7 +onpm http GET https://registry.npmjs.org/policyfile/0.0.4 +onpm http GET https://registry.npmjs.org/redis/0.6.7 +onpm http 304 https://registry.npmjs.org/append +onpm http 304 https://registry.npmjs.org/socket.io-client/0.8.7 +onpm http 304 https://registry.npmjs.org/qs +onpm http 304 https://registry.npmjs.org/mime/1.2.4 +onpm http 304 https://registry.npmjs.org/policyfile/0.0.4 +onpm http 304 https://registry.npmjs.org/mkdirp/0.3.0 +onpm http 304 https://registry.npmjs.org/connect +onpm http 304 https://registry.npmjs.org/redis/0.6.7 +onpm WARN package.json connect@1.9.2 No README.md file found! +onpm http GET https://registry.npmjs.org/formidable +onpm http 304 https://registry.npmjs.org/formidable +onpm http GET https://registry.npmjs.org/uglify-js/1.0.6 +onpm http GET https://registry.npmjs.org/websocket-client/1.0.0 +onpm http GET https://registry.npmjs.org/xmlhttprequest/1.2.2 +onpm http 304 https://registry.npmjs.org/uglify-js/1.0.6 +onpm http 304 https://registry.npmjs.org/websocket-client/1.0.0 +onpm http 304 https://registry.npmjs.org/xmlhttprequest/1.2.2 +ocommander@0.4.3 node_modules/commander +o +onode-uuid@1.3.3 node_modules/node-uuid +o +odive@0.2.0 node_modules/dive +o└── append@0.1.1 +o +oexpress@2.5.11 node_modules/express +o├── qs@0.4.2 +o├── mime@1.2.4 +o├── mkdirp@0.3.0 +o└── connect@1.9.2 (formidable@1.0.11) +o +osocket.io@0.8.7 node_modules/socket.io +o├── policyfile@0.0.4 +o├── redis@0.6.7 +o└── socket.io-client@0.8.7 (xmlhttprequest@1.2.2, websocket-client@1.0.0, uglify-js@1.0.6) +lSLF07#2@36"Run custom shell script 'Run Script'368618340#368618354#0(2470"npm WARN package.json nide@0.2.0 No README.md file found! npm http GET https://registry.npmjs.org/dive npm http GET https://registry.npmjs.org/node-uuid npm http GET https://registry.npmjs.org/commander npm http GET https://registry.npmjs.org/socket.io npm http GET https://registry.npmjs.org/express npm http 304 https://registry.npmjs.org/socket.io npm http 304 https://registry.npmjs.org/dive npm http 304 https://registry.npmjs.org/commander npm http 304 https://registry.npmjs.org/node-uuid npm http 304 https://registry.npmjs.org/express npm WARN engine commander@0.4.3: wanted: {"node":">= 0.4.x < 0.7.0"} (current: {"node":"v0.8.8","npm":"1.1.59"}) npm http GET https://registry.npmjs.org/append npm http GET https://registry.npmjs.org/qs npm http GET https://registry.npmjs.org/mkdirp/0.3.0 npm http GET https://registry.npmjs.org/mime/1.2.4 npm http GET https://registry.npmjs.org/connect npm http GET https://registry.npmjs.org/socket.io-client/0.8.7 npm http GET https://registry.npmjs.org/policyfile/0.0.4 npm http GET https://registry.npmjs.org/redis/0.6.7 npm http 304 https://registry.npmjs.org/append npm http 304 https://registry.npmjs.org/socket.io-client/0.8.7 npm http 304 https://registry.npmjs.org/qs npm http 304 https://registry.npmjs.org/mime/1.2.4 npm http 304 https://registry.npmjs.org/policyfile/0.0.4 npm http 304 https://registry.npmjs.org/mkdirp/0.3.0 npm http 304 https://registry.npmjs.org/connect npm http 304 https://registry.npmjs.org/redis/0.6.7 npm WARN package.json connect@1.9.2 No README.md file found! npm http GET https://registry.npmjs.org/formidable npm http 304 https://registry.npmjs.org/formidable npm http GET https://registry.npmjs.org/uglify-js/1.0.6 npm http GET https://registry.npmjs.org/websocket-client/1.0.0 npm http GET https://registry.npmjs.org/xmlhttprequest/1.2.2 npm http 304 https://registry.npmjs.org/uglify-js/1.0.6 npm http 304 https://registry.npmjs.org/websocket-client/1.0.0 npm http 304 https://registry.npmjs.org/xmlhttprequest/1.2.2 commander@0.4.3 node_modules/commander node-uuid@1.3.3 node_modules/node-uuid dive@0.2.0 node_modules/dive └── append@0.1.1 express@2.5.11 node_modules/express ├── qs@0.4.2 ├── mime@1.2.4 ├── mkdirp@0.3.0 └── connect@1.9.2 (formidable@1.0.11) socket.io@0.8.7 node_modules/socket.io ├── policyfile@0.0.4 ├── redis@0.6.7 └── socket.io-client@0.8.7 (xmlhttprequest@1.2.2, websocket-client@1.0.0, uglify-js@1.0.6) 50(13@58"npm WARN package.json nide@0.2.0 No README.md file found! 368618342#0#58#0(1@0"0(13@45"npm http GET https://registry.npmjs.org/dive 368618343#58#45#0(1@0"0(13@50"npm http GET https://registry.npmjs.org/node-uuid 368618343#103#50#0(1@0"0(13@50"npm http GET https://registry.npmjs.org/commander 368618343#153#50#0(1@0"0(13@50"npm http GET https://registry.npmjs.org/socket.io 368618343#203#50#0(1@0"0(13@48"npm http GET https://registry.npmjs.org/express 368618343#253#48#0(1@0"0(13@50"npm http 304 https://registry.npmjs.org/socket.io 368618345#301#50#0(1@0"0(13@45"npm http 304 https://registry.npmjs.org/dive 368618345#351#45#0(1@0"0(13@50"npm http 304 https://registry.npmjs.org/commander 368618345#396#50#0(1@0"0(13@50"npm http 304 https://registry.npmjs.org/node-uuid 368618345#446#50#0(1@0"0(13@48"npm http 304 https://registry.npmjs.org/express 368618345#496#48#0(1@0"0(13@113"npm WARN engine commander@0.4.3: wanted: {"node":">= 0.4.x < 0.7.0"} (current: {"node":"v0.8.8","npm":"1.1.59"}) 368618345#544#113#0(1@0"0(13@47"npm http GET https://registry.npmjs.org/append 368618345#657#47#0(1@0"0(13@43"npm http GET https://registry.npmjs.org/qs 368618346#704#43#0(1@0"0(13@53"npm http GET https://registry.npmjs.org/mkdirp/0.3.0 368618346#747#53#0(1@0"0(13@51"npm http GET https://registry.npmjs.org/mime/1.2.4 368618346#800#51#0(1@0"0(13@48"npm http GET https://registry.npmjs.org/connect 368618346#851#48#0(1@0"0(13@63"npm http GET https://registry.npmjs.org/socket.io-client/0.8.7 368618346#899#63#0(1@0"0(13@57"npm http GET https://registry.npmjs.org/policyfile/0.0.4 368618346#962#57#0(1@0"0(13@52"npm http GET https://registry.npmjs.org/redis/0.6.7 368618346#1019#52#0(1@0"0(13@47"npm http 304 https://registry.npmjs.org/append 368618346#1071#47#0(1@0"0(13@63"npm http 304 https://registry.npmjs.org/socket.io-client/0.8.7 368618347#1118#63#0(1@0"0(13@43"npm http 304 https://registry.npmjs.org/qs 368618347#1181#43#0(1@0"0(13@51"npm http 304 https://registry.npmjs.org/mime/1.2.4 368618347#1224#51#0(1@0"0(13@57"npm http 304 https://registry.npmjs.org/policyfile/0.0.4 368618347#1275#57#0(1@0"0(13@53"npm http 304 https://registry.npmjs.org/mkdirp/0.3.0 368618347#1332#53#0(1@0"0(13@48"npm http 304 https://registry.npmjs.org/connect 368618347#1385#48#0(1@0"0(13@52"npm http 304 https://registry.npmjs.org/redis/0.6.7 368618347#1433#52#0(1@0"0(13@61"npm WARN package.json connect@1.9.2 No README.md file found! 368618347#1485#61#0(1@0"0(13@51"npm http GET https://registry.npmjs.org/formidable 368618348#1546#51#0(1@0"0(13@51"npm http 304 https://registry.npmjs.org/formidable 368618349#1597#51#0(1@0"0(13@56"npm http GET https://registry.npmjs.org/uglify-js/1.0.6 368618351#1648#56#0(1@0"0(13@63"npm http GET https://registry.npmjs.org/websocket-client/1.0.0 368618351#1704#63#0(1@0"0(13@61"npm http GET https://registry.npmjs.org/xmlhttprequest/1.2.2 368618351#1767#61#0(1@0"0(13@56"npm http 304 https://registry.npmjs.org/uglify-js/1.0.6 368618352#1828#56#0(1@0"0(13@63"npm http 304 https://registry.npmjs.org/websocket-client/1.0.0 368618353#1884#63#0(1@0"0(13@61"npm http 304 https://registry.npmjs.org/xmlhttprequest/1.2.2 368618353#1947#61#0(1@0"0(13@39"commander@0.4.3 node_modules/commander 368618354#2008#39#0(1@0"0(13@39"node-uuid@1.3.3 node_modules/node-uuid 368618354#2048#39#0(1@0"0(13@29"dive@0.2.0 node_modules/dive 368618354#2088#29#0(1@0"0(13@23"└── append@0.1.1 368618354#2117#17#0(1@0"0(13@36"express@2.5.11 node_modules/express 368618354#2135#36#0(1@0"0(13@19"├── qs@0.4.2 368618354#2171#13#0(1@0"0(13@21"├── mime@1.2.4 368618354#2184#15#0(1@0"0(13@23"├── mkdirp@0.3.0 368618354#2199#17#0(1@0"0(13@44"└── connect@1.9.2 (formidable@1.0.11) 368618354#2216#38#0(1@0"0(13@39"socket.io@0.8.7 node_modules/socket.io 368618354#2255#39#0(1@0"0(13@27"├── policyfile@0.0.4 368618354#2294#21#0(1@0"0(13@22"├── redis@0.6.7 368618354#2315#16#0(1@0"0(13@97"└── socket.io-client@0.8.7 (xmlhttprequest@1.2.2, websocket-client@1.0.0, uglify-js@1.0.6) 368618354#2331#91#0(1@0"0(0#0#0"2527998448#15730" cd /Users/Pau/Proyectos/nide/osx setenv ACTION build setenv ALTERNATE_GROUP staff setenv ALTERNATE_MODE u+w,go-w,a+rX setenv ALTERNATE_OWNER Pau setenv ALWAYS_SEARCH_USER_PATHS NO setenv APPLE_INTERNAL_DEVELOPER_DIR /AppleInternal/Developer setenv APPLE_INTERNAL_DIR /AppleInternal setenv APPLE_INTERNAL_DOCUMENTATION_DIR /AppleInternal/Documentation setenv APPLE_INTERNAL_LIBRARY_DIR /AppleInternal/Library setenv APPLE_INTERNAL_TOOLS /AppleInternal/Developer/Tools setenv APPLY_RULES_IN_COPY_FILES NO setenv ARCHS i386 setenv ARCHS_STANDARD_32_64_BIT "x86_64 i386" setenv ARCHS_STANDARD_32_BIT i386 setenv ARCHS_STANDARD_64_BIT x86_64 setenv BUILD_COMPONENTS "headers build" setenv BUILD_DIR /Users/Pau/Proyectos/nide/osx/build setenv BUILD_ROOT /Users/Pau/Proyectos/nide/osx/build setenv BUILD_STYLE Debug setenv BUILD_VARIANTS normal setenv BUILT_PRODUCTS_DIR /Users/Pau/Proyectos/nide/osx/build/Debug setenv CACHE_ROOT /var/folders/QT/QTR3MlUDFFOxoo7RF4yHV++++TI/-Caches-/com.apple.Xcode.501 setenv CCHROOT /var/folders/QT/QTR3MlUDFFOxoo7RF4yHV++++TI/-Caches-/com.apple.Xcode.501 setenv CHMOD /bin/chmod setenv CHOWN /usr/sbin/chown setenv CLANG_ENABLE_OBJC_ARC NO setenv CLASS_FILE_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/JavaClasses setenv CLEAN_PRECOMPS YES setenv CLONE_HEADERS NO setenv CODESIGNING_FOLDER_PATH /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app setenv CODE_SIGNING_ALLOWED YES setenv COMMAND_MODE legacy setenv COMPOSITE_SDK_DIRS /var/folders/QT/QTR3MlUDFFOxoo7RF4yHV++++TI/-Caches-/com.apple.Xcode.501/CompositeSDKs setenv CONFIGURATION Debug setenv CONFIGURATION_BUILD_DIR /Users/Pau/Proyectos/nide/osx/build/Debug setenv CONFIGURATION_TEMP_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug setenv CONTENTS_FOLDER_PATH Nide.app/Contents setenv COPYING_PRESERVES_HFS_DATA NO setenv COPY_PHASE_STRIP NO setenv COPY_RESOURCES_FROM_STATIC_FRAMEWORKS YES setenv CP /bin/cp setenv CURRENT_ARCH i386 setenv CURRENT_VARIANT normal setenv DEAD_CODE_STRIPPING NO setenv DEBUGGING_SYMBOLS YES setenv DEBUG_INFORMATION_FORMAT dwarf setenv DEPLOYMENT_LOCATION NO setenv DEPLOYMENT_POSTPROCESSING NO setenv DERIVED_FILES_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/DerivedSources setenv DERIVED_FILE_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/DerivedSources setenv DERIVED_SOURCES_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/DerivedSources setenv DEVELOPER_APPLICATIONS_DIR /Developer/Applications setenv DEVELOPER_BIN_DIR /Developer/usr/bin setenv DEVELOPER_DIR /Developer setenv DEVELOPER_FRAMEWORKS_DIR /Developer/Library/Frameworks setenv DEVELOPER_FRAMEWORKS_DIR_QUOTED "\"/Developer/Library/Frameworks\"" setenv DEVELOPER_LIBRARY_DIR /Developer/Library setenv DEVELOPER_SDK_DIR /Developer/SDKs setenv DEVELOPER_TOOLS_DIR /Developer/Tools setenv DEVELOPER_USR_DIR /Developer/usr setenv DEVELOPMENT_LANGUAGE English setenv DOCUMENTATION_FOLDER_PATH Nide.app/Contents/Resources/English.lproj/Documentation setenv DO_HEADER_SCANNING_IN_JAM NO setenv DSTROOT /tmp/Nide.dst setenv DWARF_DSYM_FILE_NAME Nide.app.dSYM setenv DWARF_DSYM_FOLDER_PATH /Users/Pau/Proyectos/nide/osx/build/Debug setenv ENABLE_HEADER_DEPENDENCIES YES setenv ENABLE_OPENMP_SUPPORT NO setenv EXCLUDED_INSTALLSRC_SUBDIRECTORY_PATTERNS ".svn .git CVS" setenv EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES "*.nib *.lproj *.framework *.gch (*) CVS .svn .git *.xcodeproj *.xcode *.pbproj *.pbxproj" setenv EXECUTABLES_FOLDER_PATH Nide.app/Contents/Executables setenv EXECUTABLE_FOLDER_PATH Nide.app/Contents/MacOS setenv EXECUTABLE_NAME Nide setenv EXECUTABLE_PATH Nide.app/Contents/MacOS/Nide setenv FILE_LIST /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Objects/LinkFileList setenv FIXED_FILES_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/FixedFiles setenv FRAMEWORKS_FOLDER_PATH Nide.app/Contents/Frameworks setenv FRAMEWORK_FLAG_PREFIX -framework setenv FRAMEWORK_SEARCH_PATHS "\"/Users/Pau/Proyectos/nide/osx/build/Debug\" " setenv FRAMEWORK_VERSION A setenv FULL_PRODUCT_NAME Nide.app setenv GCC3_VERSION 3.3 setenv GCC_C_LANGUAGE_STANDARD gnu99 setenv GCC_DYNAMIC_NO_PIC NO setenv GCC_ENABLE_OBJC_EXCEPTIONS YES setenv GCC_INLINES_ARE_PRIVATE_EXTERN YES setenv GCC_OPTIMIZATION_LEVEL 0 setenv GCC_PFE_FILE_C_DIALECTS "c objective-c c++ objective-c++" setenv GCC_PRECOMPILE_PREFIX_HEADER YES setenv GCC_PREFIX_HEADER Nide/Nide-Prefix.pch setenv GCC_PREPROCESSOR_DEFINITIONS "DEBUG=1 " setenv GCC_SYMBOLS_PRIVATE_EXTERN NO setenv GCC_TREAT_WARNINGS_AS_ERRORS NO setenv GCC_VERSION com.apple.compilers.llvm.clang.1_0 setenv GCC_VERSION_IDENTIFIER com_apple_compilers_llvm_clang_1_0 setenv GCC_WARN_64_TO_32_BIT_CONVERSION YES setenv GCC_WARN_ABOUT_MISSING_PROTOTYPES YES setenv GCC_WARN_ABOUT_RETURN_TYPE YES setenv GCC_WARN_UNUSED_VARIABLE YES setenv GENERATE_MASTER_OBJECT_FILE NO setenv GENERATE_PKGINFO_FILE YES setenv GENERATE_PROFILING_CODE NO setenv GID 20 setenv GROUP staff setenv HEADERMAP_INCLUDES_FLAT_ENTRIES_FOR_TARGET_BEING_BUILT YES setenv HEADERMAP_INCLUDES_FRAMEWORK_ENTRIES_FOR_ALL_PRODUCT_TYPES YES setenv HEADERMAP_INCLUDES_NONPUBLIC_NONPRIVATE_HEADERS YES setenv HEADERMAP_INCLUDES_PROJECT_HEADERS YES setenv HEADER_SEARCH_PATHS "\"/Users/Pau/Proyectos/nide/osx/build/Debug/include\" " setenv ICONV /usr/bin/iconv setenv INFOPLIST_EXPAND_BUILD_SETTINGS YES setenv INFOPLIST_FILE Nide/Nide-Info.plist setenv INFOPLIST_OUTPUT_FORMAT same-as-input setenv INFOPLIST_PATH Nide.app/Contents/Info.plist setenv INFOPLIST_PREPROCESS NO setenv INFOSTRINGS_PATH Nide.app/Contents/Resources/English.lproj/InfoPlist.strings setenv INSTALL_DIR /tmp/Nide.dst/Users/Pau/Applications setenv INSTALL_GROUP staff setenv INSTALL_MODE_FLAG u+w,go-w,a+rX setenv INSTALL_OWNER Pau setenv INSTALL_PATH /Users/Pau/Applications setenv INSTALL_ROOT /tmp/Nide.dst setenv JAVAC_DEFAULT_FLAGS "-J-Xms64m -J-XX:NewSize=4M -J-Dfile.encoding=UTF8" setenv JAVA_APP_STUB /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub setenv JAVA_ARCHIVE_CLASSES YES setenv JAVA_ARCHIVE_TYPE JAR setenv JAVA_COMPILER /usr/bin/javac setenv JAVA_FOLDER_PATH Nide.app/Contents/Resources/Java setenv JAVA_FRAMEWORK_RESOURCES_DIRS Resources setenv JAVA_JAR_FLAGS cv setenv JAVA_SOURCE_SUBDIR . setenv JAVA_USE_DEPENDENCIES YES setenv JAVA_ZIP_FLAGS -urg setenv JIKES_DEFAULT_FLAGS "+E +OLDCSO" setenv KEEP_PRIVATE_EXTERNS NO setenv LD_GENERATE_MAP_FILE NO setenv LD_MAP_FILE_PATH /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-LinkMap-normal-i386.txt setenv LD_OPENMP_FLAGS -fopenmp setenv LEX /Developer/usr/bin/lex setenv LIBRARY_FLAG_NOSPACE YES setenv LIBRARY_FLAG_PREFIX -l setenv LIBRARY_SEARCH_PATHS "\"/Users/Pau/Proyectos/nide/osx/build/Debug\" " setenv LINKER_DISPLAYS_MANGLED_NAMES NO setenv LINK_FILE_LIST_normal_i386 /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Objects-normal/i386/Nide.LinkFileList setenv LINK_WITH_STANDARD_LIBRARIES YES setenv LOCALIZED_RESOURCES_FOLDER_PATH Nide.app/Contents/Resources/English.lproj setenv LOCAL_ADMIN_APPS_DIR /Applications/Utilities setenv LOCAL_APPS_DIR /Applications setenv LOCAL_DEVELOPER_DIR /Library/Developer setenv LOCAL_LIBRARY_DIR /Library setenv MACH_O_TYPE mh_execute setenv MACOSX_DEPLOYMENT_TARGET 10.6 setenv MAC_OS_X_PRODUCT_BUILD_VERSION 10K549 setenv MAC_OS_X_VERSION_ACTUAL 1068 setenv MAC_OS_X_VERSION_MAJOR 1060 setenv MAC_OS_X_VERSION_MINOR 0608 setenv NATIVE_ARCH i386 setenv NATIVE_ARCH_32_BIT i386 setenv NATIVE_ARCH_64_BIT x86_64 setenv NATIVE_ARCH_ACTUAL i386 setenv NO_COMMON YES setenv OBJECT_FILE_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Objects setenv OBJECT_FILE_DIR_normal /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Objects-normal setenv OBJROOT /Users/Pau/Proyectos/nide/osx/build setenv ONLY_ACTIVE_ARCH YES setenv OPTIMIZATION_LEVEL 0 setenv OS MACOS setenv OSAC /usr/bin/osacompile setenv PACKAGE_TYPE com.apple.package-type.wrapper.application setenv PASCAL_STRINGS YES setenv PATH_PREFIXES_EXCLUDED_FROM_HEADER_DEPENDENCIES "/usr/include /usr/local/include /System/Library/Frameworks /System/Library/PrivateFrameworks /Developer/Headers /Developer/SDKs /Developer/Platforms" setenv PBDEVELOPMENTPLIST_PATH Nide.app/Contents/pbdevelopment.plist setenv PFE_FILE_C_DIALECTS objective-c setenv PKGINFO_FILE_PATH /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/PkgInfo setenv PKGINFO_PATH Nide.app/Contents/PkgInfo setenv PLATFORM_DEVELOPER_APPLICATIONS_DIR /Developer/Applications setenv PLATFORM_DEVELOPER_BIN_DIR /Developer/usr/bin setenv PLATFORM_DEVELOPER_LIBRARY_DIR /Developer/Library setenv PLATFORM_DEVELOPER_SDK_DIR /Developer/SDKs setenv PLATFORM_DEVELOPER_TOOLS_DIR /Developer/Tools setenv PLATFORM_DEVELOPER_USR_DIR /Developer/usr setenv PLATFORM_NAME macosx setenv PLATFORM_PRODUCT_BUILD_VERSION 10M2518 setenv PLIST_FILE_OUTPUT_FORMAT same-as-input setenv PLUGINS_FOLDER_PATH Nide.app/Contents/PlugIns setenv PREBINDING YES setenv PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR YES setenv PRECOMP_DESTINATION_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/PrefixHeaders setenv PRESERVE_DEAD_CODE_INITS_AND_TERMS NO setenv PRIVATE_HEADERS_FOLDER_PATH Nide.app/Contents/PrivateHeaders setenv PRODUCT_NAME Nide setenv PRODUCT_SETTINGS_PATH /Users/Pau/Proyectos/nide/osx/Nide/Nide-Info.plist setenv PRODUCT_TYPE com.apple.product-type.application setenv PROFILING_CODE NO setenv PROJECT Nide setenv PROJECT_DERIVED_FILE_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build/DerivedSources setenv PROJECT_DIR /Users/Pau/Proyectos/nide/osx setenv PROJECT_FILE_PATH /Users/Pau/Proyectos/nide/osx/Nide.xcodeproj setenv PROJECT_NAME Nide setenv PROJECT_TEMP_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build setenv PUBLIC_HEADERS_FOLDER_PATH Nide.app/Contents/Headers setenv RECURSIVE_SEARCH_PATHS_FOLLOW_SYMLINKS YES setenv REMOVE_CVS_FROM_RESOURCES YES setenv REMOVE_GIT_FROM_RESOURCES YES setenv REMOVE_SVN_FROM_RESOURCES YES setenv REZ_COLLECTOR_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/ResourceManagerResources setenv REZ_OBJECTS_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/ResourceManagerResources/Objects setenv REZ_SEARCH_PATHS "\"/Users/Pau/Proyectos/nide/osx/build/Debug\" " setenv RUN_CLANG_STATIC_ANALYZER NO setenv SCAN_ALL_SOURCE_FILES_FOR_INCLUDES NO setenv SCRIPTS_FOLDER_PATH Nide.app/Contents/Resources/Scripts setenv SCRIPT_INPUT_FILE_COUNT 0 setenv SCRIPT_OUTPUT_FILE_COUNT 0 setenv SDKROOT /Developer/SDKs/MacOSX10.6.sdk setenv SDK_DIR /Developer/SDKs/MacOSX10.6.sdk setenv SDK_NAME macosx10.6 setenv SDK_PRODUCT_BUILD_VERSION 10M2518 setenv SED /usr/bin/sed setenv SEPARATE_STRIP NO setenv SEPARATE_SYMBOL_EDIT NO setenv SET_DIR_MODE_OWNER_GROUP YES setenv SET_FILE_MODE_OWNER_GROUP NO setenv SHARED_DERIVED_FILE_DIR /Users/Pau/Proyectos/nide/osx/build/Debug/DerivedSources setenv SHARED_FRAMEWORKS_FOLDER_PATH Nide.app/Contents/SharedFrameworks setenv SHARED_PRECOMPS_DIR /var/folders/QT/QTR3MlUDFFOxoo7RF4yHV++++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders setenv SHARED_SUPPORT_FOLDER_PATH Nide.app/Contents/SharedSupport setenv SKIP_INSTALL YES setenv SOURCE_ROOT /Users/Pau/Proyectos/nide/osx setenv SRCROOT /Users/Pau/Proyectos/nide/osx setenv STANDARD_C_PLUS_PLUS_LIBRARY_TYPE dynamic setenv STRINGS_FILE_OUTPUT_ENCODING UTF-16 setenv STRIP_INSTALLED_PRODUCT YES setenv STRIP_STYLE all setenv SYMBOL_REPOSITORY_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/SymbolRepositories setenv SYMROOT /Users/Pau/Proyectos/nide/osx/build setenv SYSTEM_ADMIN_APPS_DIR /Applications/Utilities setenv SYSTEM_APPS_DIR /Applications setenv SYSTEM_CORE_SERVICES_DIR /System/Library/CoreServices setenv SYSTEM_DEMOS_DIR /Applications/Extras setenv SYSTEM_DEVELOPER_APPS_DIR /Developer/Applications setenv SYSTEM_DEVELOPER_BIN_DIR /Developer/usr/bin setenv SYSTEM_DEVELOPER_DEMOS_DIR "/Developer/Applications/Utilities/Built Examples" setenv SYSTEM_DEVELOPER_DIR /Developer setenv SYSTEM_DEVELOPER_DOC_DIR "/Developer/ADC Reference Library" setenv SYSTEM_DEVELOPER_GRAPHICS_TOOLS_DIR "/Developer/Applications/Graphics Tools" setenv SYSTEM_DEVELOPER_JAVA_TOOLS_DIR "/Developer/Applications/Java Tools" setenv SYSTEM_DEVELOPER_PERFORMANCE_TOOLS_DIR "/Developer/Applications/Performance Tools" setenv SYSTEM_DEVELOPER_RELEASENOTES_DIR "/Developer/ADC Reference Library/releasenotes" setenv SYSTEM_DEVELOPER_TOOLS /Developer/Tools setenv SYSTEM_DEVELOPER_TOOLS_DOC_DIR "/Developer/ADC Reference Library/documentation/DeveloperTools" setenv SYSTEM_DEVELOPER_TOOLS_RELEASENOTES_DIR "/Developer/ADC Reference Library/releasenotes/DeveloperTools" setenv SYSTEM_DEVELOPER_USR_DIR /Developer/usr setenv SYSTEM_DEVELOPER_UTILITIES_DIR /Developer/Applications/Utilities setenv SYSTEM_DOCUMENTATION_DIR /Library/Documentation setenv SYSTEM_LIBRARY_DIR /System/Library setenv TARGETNAME Nide setenv TARGET_BUILD_DIR /Users/Pau/Proyectos/nide/osx/build/Debug setenv TARGET_NAME Nide setenv TARGET_TEMP_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build setenv TEMP_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build setenv TEMP_FILES_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build setenv TEMP_FILE_DIR /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build setenv TEMP_ROOT /Users/Pau/Proyectos/nide/osx/build setenv UID 501 setenv UNLOCALIZED_RESOURCES_FOLDER_PATH Nide.app/Contents/Resources setenv UNSTRIPPED_PRODUCT NO setenv USER Pau setenv USER_APPS_DIR /Users/Pau/Applications setenv USER_LIBRARY_DIR /Users/Pau/Library setenv USE_DYNAMIC_NO_PIC YES setenv USE_HEADERMAP YES setenv USE_HEADER_SYMLINKS NO setenv VALIDATE_PRODUCT NO setenv VALID_ARCHS "i386 ppc ppc64 ppc7400 ppc970 x86_64" setenv VERBOSE_PBXCP NO setenv VERSIONPLIST_PATH Nide.app/Contents/version.plist setenv VERSION_INFO_BUILDER Pau setenv VERSION_INFO_FILE Nide_vers.c setenv VERSION_INFO_STRING "\"@(#)PROGRAM:Nide PROJECT:Nide-\"" setenv WRAPPER_EXTENSION app setenv WRAPPER_NAME Nide.app setenv WRAPPER_SUFFIX .app setenv XCODE_APP_SUPPORT_DIR /Developer/Library/Xcode setenv XCODE_PRODUCT_BUILD_VERSION 10M2518 setenv XCODE_VERSION_ACTUAL 0400 setenv XCODE_VERSION_MAJOR 0400 setenv XCODE_VERSION_MINOR 0400 setenv YACC /Developer/usr/bin/yacc setenv _REAL_SDKROOT macosx10.6 /bin/sh -c /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Script-F5B01A7814B5467000145F5E.sh 0# + +CProcessInfoPlistFile /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Info.plist Nide/Nide-Info.plist +s368618326.721247 +e368618326.747179 +r1 +xProcessInfoPlistFile +x/Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Info.plist +xNide/Nide-Info.plist +lSLF07#2@28"Process Nide/Nide-Info.plist368618326#368618326#0(0"0(0#0#50"/Users/Pau/Proyectos/nide/osx/Nide/Nide-Info.plist2527998448#279" cd /Users/Pau/Proyectos/nide/osx builtin-infoPlistUtility Nide/Nide-Info.plist -genpkginfo /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/PkgInfo -expandbuildsettings -platform macosx -o /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app/Contents/Info.plist 0# + +CProcessPCH /var/folders/QT/QTR3MlUDFFOxoo7RF4yHV++++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Nide-Prefix-fditlkrpeuzrxcdatwpjwayuigwk/Nide-Prefix.pch.pth Nide/Nide-Prefix.pch normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler +s368618326.747372 +e368618335.728465 +r1 +xProcessPCH +x/var/folders/QT/QTR3MlUDFFOxoo7RF4yHV++++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Nide-Prefix-fditlkrpeuzrxcdatwpjwayuigwk/Nide-Prefix.pch.pth +xNide/Nide-Prefix.pch +xnormal +xi386 +xobjective-c +xcom.apple.compilers.llvm.clang.1_0.compiler +lSLF07#2@31"Precompile Nide/Nide-Prefix.pch368618326#368618335#0(0"0(0#0#50"/Users/Pau/Proyectos/nide/osx/Nide/Nide-Prefix.pch2527998448#1277" cd /Users/Pau/Proyectos/nide/osx setenv LANG en_US.US-ASCII /Developer/usr/bin/clang -x objective-c-header -arch i386 -fmessage-length=0 -pipe -fdiagnostics-print-source-range-info -std=gnu99 -Wno-trigraphs -fpascal-strings -O0 -Wmissing-prototypes -Wreturn-type -Wunused-variable -Wshorten-64-to-32 -DDEBUG=1 -isysroot /Developer/SDKs/MacOSX10.6.sdk -fasm-blocks -mmacosx-version-min=10.6 -gdwarf-2 -iquote /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-generated-files.hmap -I/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-own-target-headers.hmap -I/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-all-target-headers.hmap -iquote /Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/Nide-project-headers.hmap -F/Users/Pau/Proyectos/nide/osx/build/Debug -I/Users/Pau/Proyectos/nide/osx/build/Debug/include -I/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/DerivedSources/i386 -I/Users/Pau/Proyectos/nide/osx/build/Nide.build/Debug/Nide.build/DerivedSources -c /Users/Pau/Proyectos/nide/osx/Nide/Nide-Prefix.pch -o /var/folders/QT/QTR3MlUDFFOxoo7RF4yHV++++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Nide-Prefix-fditlkrpeuzrxcdatwpjwayuigwk/Nide-Prefix.pch.pth 0# + +CTouch /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app +s368618354.811391 +e368618354.875196 +r1 +xTouch +x/Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app +lSLF07#2@56"Touch /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app368618354#368618354#0(0"0(0#0#0"2527998448#110" cd /Users/Pau/Proyectos/nide/osx /usr/bin/touch -c /Users/Pau/Proyectos/nide/osx/build/Debug/Nide.app 0# + diff --git a/osx/build/Nide.build/Nide.pbxindex/categories.pbxbtree b/osx/build/Nide.build/Nide.pbxindex/categories.pbxbtree new file mode 100644 index 0000000..dd38d53 Binary files /dev/null and b/osx/build/Nide.build/Nide.pbxindex/categories.pbxbtree differ diff --git a/osx/build/Nide.build/Nide.pbxindex/cdecls.pbxbtree b/osx/build/Nide.build/Nide.pbxindex/cdecls.pbxbtree new file mode 100644 index 0000000..45a230e Binary files /dev/null and b/osx/build/Nide.build/Nide.pbxindex/cdecls.pbxbtree differ diff --git a/osx/build/Nide.build/Nide.pbxindex/decls.pbxbtree b/osx/build/Nide.build/Nide.pbxindex/decls.pbxbtree new file mode 100644 index 0000000..2bffb99 Binary files /dev/null and b/osx/build/Nide.build/Nide.pbxindex/decls.pbxbtree differ diff --git a/osx/build/Nide.build/Nide.pbxindex/files.pbxbtree b/osx/build/Nide.build/Nide.pbxindex/files.pbxbtree new file mode 100644 index 0000000..fba7094 Binary files /dev/null and b/osx/build/Nide.build/Nide.pbxindex/files.pbxbtree differ diff --git a/osx/build/Nide.build/Nide.pbxindex/imports.pbxbtree b/osx/build/Nide.build/Nide.pbxindex/imports.pbxbtree new file mode 100644 index 0000000..488c85a Binary files /dev/null and b/osx/build/Nide.build/Nide.pbxindex/imports.pbxbtree differ diff --git a/osx/build/Nide.build/Nide.pbxindex/pbxindex.header b/osx/build/Nide.build/Nide.pbxindex/pbxindex.header new file mode 100644 index 0000000..42784dd Binary files /dev/null and b/osx/build/Nide.build/Nide.pbxindex/pbxindex.header differ diff --git a/osx/build/Nide.build/Nide.pbxindex/protocols.pbxbtree b/osx/build/Nide.build/Nide.pbxindex/protocols.pbxbtree new file mode 100644 index 0000000..cad5fc1 Binary files /dev/null and b/osx/build/Nide.build/Nide.pbxindex/protocols.pbxbtree differ diff --git a/osx/build/Nide.build/Nide.pbxindex/refs.pbxbtree b/osx/build/Nide.build/Nide.pbxindex/refs.pbxbtree new file mode 100644 index 0000000..0043191 Binary files /dev/null and b/osx/build/Nide.build/Nide.pbxindex/refs.pbxbtree differ diff --git a/osx/build/Nide.build/Nide.pbxindex/strings.pbxstrings/control b/osx/build/Nide.build/Nide.pbxindex/strings.pbxstrings/control new file mode 100644 index 0000000..c817a5c Binary files /dev/null and b/osx/build/Nide.build/Nide.pbxindex/strings.pbxstrings/control differ diff --git a/osx/build/Nide.build/Nide.pbxindex/strings.pbxstrings/strings b/osx/build/Nide.build/Nide.pbxindex/strings.pbxstrings/strings new file mode 100644 index 0000000..1794936 Binary files /dev/null and b/osx/build/Nide.build/Nide.pbxindex/strings.pbxstrings/strings differ diff --git a/osx/build/Nide.build/Nide.pbxindex/subclasses.pbxbtree b/osx/build/Nide.build/Nide.pbxindex/subclasses.pbxbtree new file mode 100644 index 0000000..3bb881f Binary files /dev/null and b/osx/build/Nide.build/Nide.pbxindex/subclasses.pbxbtree differ diff --git a/osx/build/Nide.build/Nide.pbxindex/symbols0.pbxsymbols b/osx/build/Nide.build/Nide.pbxindex/symbols0.pbxsymbols new file mode 100644 index 0000000..4599cde Binary files /dev/null and b/osx/build/Nide.build/Nide.pbxindex/symbols0.pbxsymbols differ