├── .gitignore ├── .gitmodules ├── Compositions └── Example.qtz ├── Readme.mkdn ├── WebPages ├── example-01-jquery-ui-controls │ ├── css │ │ └── ui-darkness │ │ │ ├── images │ │ │ ├── ui-bg_flat_30_cccccc_40x100.png │ │ │ ├── ui-bg_flat_50_5c5c5c_40x100.png │ │ │ ├── ui-bg_glass_20_555555_1x400.png │ │ │ ├── ui-bg_glass_40_0078a3_1x400.png │ │ │ ├── ui-bg_glass_40_ffc73d_1x400.png │ │ │ ├── ui-bg_gloss-wave_25_333333_500x100.png │ │ │ ├── ui-bg_highlight-soft_80_eeeeee_1x100.png │ │ │ ├── ui-bg_inset-soft_25_000000_1x100.png │ │ │ ├── ui-bg_inset-soft_30_f58400_1x100.png │ │ │ ├── ui-icons_222222_256x240.png │ │ │ ├── ui-icons_4b8e0b_256x240.png │ │ │ ├── ui-icons_a83300_256x240.png │ │ │ ├── ui-icons_cccccc_256x240.png │ │ │ └── ui-icons_ffffff_256x240.png │ │ │ └── jquery-ui-1.8.12.custom.css │ ├── index.html │ └── js │ │ ├── jquery-1.5.1.min.js │ │ └── jquery-ui-1.8.12.custom.min.js └── example.html ├── quartzcomposer-websocket.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata └── quartzcomposer-websocket ├── Info.plist ├── Prefix.pch ├── WebSocketPlugIn.h ├── WebSocketPlugIn.m ├── WebSocketSettings.h ├── WebSocketSettings.m ├── WebSocketSettings.xib └── en.lproj └── InfoPlist.strings /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | build 3 | *.xcodeproj/project.xcworkspace/xcuserdata 4 | *.xcodeproj/xcuserdata 5 | *.xcodeproj/*.mode1v3 6 | *.xcodeproj/*.pbxuser 7 | DerivedData -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "CoreWebSocket"] 2 | path = CoreWebSocket 3 | url = git://github.com/mirek/CoreWebSocket.git 4 | [submodule "CoreJSON"] 5 | path = CoreJSON 6 | url = git://github.com/mirek/CoreJSON.git 7 | -------------------------------------------------------------------------------- /Compositions/Example.qtz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirek/quartzcomposer-websocket/2c3384119c00bb274a59e0d05c0e5a0e5b5f27aa/Compositions/Example.qtz -------------------------------------------------------------------------------- /Readme.mkdn: -------------------------------------------------------------------------------- 1 | # Quartz Composer WebSocket Plug-In 2 | 3 | WebSocket Patch enables low-latency, bi-directional, full-duplex communication with web browsers - Firefox 4, Google Chrome 4, Opera 11 and Apple Safari 5 (including iOS Safari) as well as Adobe Flash/Flex/AIR applications. 4 | 5 | The patch acts as a server listening on specified TCP port (default 60001). 6 | 7 | To make connection to the patch you could use the following JavaScript code: 8 | 9 | 10 | 11 | 12 | 13 | 61 | 62 | 63 | 64 | Messages are JSON encoded into tuples `[name, value]`. Example messages: 65 | 66 | // Number input port 67 | ['/foo/bar', 3.14] 68 | 69 | // Boolean 70 | ['/my/toggle', true] 71 | 72 | // Array 73 | ['/foo/numbers', [1, 3, 5, 7, 11]] 74 | 75 | // Structure 76 | ['/structure', { 'foo': 'bar' }] 77 | 78 | // Image 79 | ['/foo/bar', 'R0lGODlhDwAPALMAAAAAAL+/v///AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAEALAAAAAAPAA8AAAQ0MEgJap04VMH5xUAnelM4jgAlmOtqpqzlxewpbjZa565nvxrfjRScyYjFXwbX+WQ0lhQmAgA7'] 80 | 81 | In order to send values from web page to Quartz Composer, in JavaScript JSON encode the tuple, ie: 82 | 83 | var value = 3.14; 84 | ws.send( JSON.stringify(['/foo/bar', value]) ); 85 | 86 | If the WebSocket Patch has `foo/bar` output port defined with Number format, the value will arrive to Quartz Composer for further processing. 87 | 88 | ## Installation 89 | 90 | # Clone the repository including all submodules 91 | git clone --recursive git://github.com/mirek/quartzcomposer-websocket.git 92 | 93 | # Build the plugin and install in ~/Library/Graphics/Quartz Composer Plug-Ins/WebSocket.plugin 94 | cd quartzcomposer-websocket 95 | xcodebuild clean install 96 | 97 | # Open example composition and run it 98 | open Compositions/Example.qtz 99 | 100 | # Open example web page 101 | open WebPages/example.html 102 | -------------------------------------------------------------------------------- /WebPages/example-01-jquery-ui-controls/css/ui-darkness/images/ui-bg_flat_30_cccccc_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirek/quartzcomposer-websocket/2c3384119c00bb274a59e0d05c0e5a0e5b5f27aa/WebPages/example-01-jquery-ui-controls/css/ui-darkness/images/ui-bg_flat_30_cccccc_40x100.png -------------------------------------------------------------------------------- /WebPages/example-01-jquery-ui-controls/css/ui-darkness/images/ui-bg_flat_50_5c5c5c_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirek/quartzcomposer-websocket/2c3384119c00bb274a59e0d05c0e5a0e5b5f27aa/WebPages/example-01-jquery-ui-controls/css/ui-darkness/images/ui-bg_flat_50_5c5c5c_40x100.png -------------------------------------------------------------------------------- /WebPages/example-01-jquery-ui-controls/css/ui-darkness/images/ui-bg_glass_20_555555_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirek/quartzcomposer-websocket/2c3384119c00bb274a59e0d05c0e5a0e5b5f27aa/WebPages/example-01-jquery-ui-controls/css/ui-darkness/images/ui-bg_glass_20_555555_1x400.png -------------------------------------------------------------------------------- /WebPages/example-01-jquery-ui-controls/css/ui-darkness/images/ui-bg_glass_40_0078a3_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirek/quartzcomposer-websocket/2c3384119c00bb274a59e0d05c0e5a0e5b5f27aa/WebPages/example-01-jquery-ui-controls/css/ui-darkness/images/ui-bg_glass_40_0078a3_1x400.png -------------------------------------------------------------------------------- /WebPages/example-01-jquery-ui-controls/css/ui-darkness/images/ui-bg_glass_40_ffc73d_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirek/quartzcomposer-websocket/2c3384119c00bb274a59e0d05c0e5a0e5b5f27aa/WebPages/example-01-jquery-ui-controls/css/ui-darkness/images/ui-bg_glass_40_ffc73d_1x400.png -------------------------------------------------------------------------------- /WebPages/example-01-jquery-ui-controls/css/ui-darkness/images/ui-bg_gloss-wave_25_333333_500x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirek/quartzcomposer-websocket/2c3384119c00bb274a59e0d05c0e5a0e5b5f27aa/WebPages/example-01-jquery-ui-controls/css/ui-darkness/images/ui-bg_gloss-wave_25_333333_500x100.png -------------------------------------------------------------------------------- /WebPages/example-01-jquery-ui-controls/css/ui-darkness/images/ui-bg_highlight-soft_80_eeeeee_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirek/quartzcomposer-websocket/2c3384119c00bb274a59e0d05c0e5a0e5b5f27aa/WebPages/example-01-jquery-ui-controls/css/ui-darkness/images/ui-bg_highlight-soft_80_eeeeee_1x100.png -------------------------------------------------------------------------------- /WebPages/example-01-jquery-ui-controls/css/ui-darkness/images/ui-bg_inset-soft_25_000000_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirek/quartzcomposer-websocket/2c3384119c00bb274a59e0d05c0e5a0e5b5f27aa/WebPages/example-01-jquery-ui-controls/css/ui-darkness/images/ui-bg_inset-soft_25_000000_1x100.png -------------------------------------------------------------------------------- /WebPages/example-01-jquery-ui-controls/css/ui-darkness/images/ui-bg_inset-soft_30_f58400_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirek/quartzcomposer-websocket/2c3384119c00bb274a59e0d05c0e5a0e5b5f27aa/WebPages/example-01-jquery-ui-controls/css/ui-darkness/images/ui-bg_inset-soft_30_f58400_1x100.png -------------------------------------------------------------------------------- /WebPages/example-01-jquery-ui-controls/css/ui-darkness/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirek/quartzcomposer-websocket/2c3384119c00bb274a59e0d05c0e5a0e5b5f27aa/WebPages/example-01-jquery-ui-controls/css/ui-darkness/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /WebPages/example-01-jquery-ui-controls/css/ui-darkness/images/ui-icons_4b8e0b_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirek/quartzcomposer-websocket/2c3384119c00bb274a59e0d05c0e5a0e5b5f27aa/WebPages/example-01-jquery-ui-controls/css/ui-darkness/images/ui-icons_4b8e0b_256x240.png -------------------------------------------------------------------------------- /WebPages/example-01-jquery-ui-controls/css/ui-darkness/images/ui-icons_a83300_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirek/quartzcomposer-websocket/2c3384119c00bb274a59e0d05c0e5a0e5b5f27aa/WebPages/example-01-jquery-ui-controls/css/ui-darkness/images/ui-icons_a83300_256x240.png -------------------------------------------------------------------------------- /WebPages/example-01-jquery-ui-controls/css/ui-darkness/images/ui-icons_cccccc_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirek/quartzcomposer-websocket/2c3384119c00bb274a59e0d05c0e5a0e5b5f27aa/WebPages/example-01-jquery-ui-controls/css/ui-darkness/images/ui-icons_cccccc_256x240.png -------------------------------------------------------------------------------- /WebPages/example-01-jquery-ui-controls/css/ui-darkness/images/ui-icons_ffffff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirek/quartzcomposer-websocket/2c3384119c00bb274a59e0d05c0e5a0e5b5f27aa/WebPages/example-01-jquery-ui-controls/css/ui-darkness/images/ui-icons_ffffff_256x240.png -------------------------------------------------------------------------------- /WebPages/example-01-jquery-ui-controls/css/ui-darkness/jquery-ui-1.8.12.custom.css: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI CSS Framework 1.8.12 3 | * 4 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Theming/API 9 | */ 10 | 11 | /* Layout helpers 12 | ----------------------------------*/ 13 | .ui-helper-hidden { display: none; } 14 | .ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } 15 | .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } 16 | .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } 17 | .ui-helper-clearfix { display: inline-block; } 18 | /* required comment for clearfix to work in Opera \*/ 19 | * html .ui-helper-clearfix { height:1%; } 20 | .ui-helper-clearfix { display:block; } 21 | /* end clearfix */ 22 | .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } 23 | 24 | 25 | /* Interaction Cues 26 | ----------------------------------*/ 27 | .ui-state-disabled { cursor: default !important; } 28 | 29 | 30 | /* Icons 31 | ----------------------------------*/ 32 | 33 | /* states and images */ 34 | .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } 35 | 36 | 37 | /* Misc visuals 38 | ----------------------------------*/ 39 | 40 | /* Overlays */ 41 | .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } 42 | 43 | 44 | /* 45 | * jQuery UI CSS Framework 1.8.12 46 | * 47 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 48 | * Dual licensed under the MIT or GPL Version 2 licenses. 49 | * http://jquery.org/license 50 | * 51 | * http://docs.jquery.com/UI/Theming/API 52 | * 53 | * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Segoe%20UI,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=333333&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=25&borderColorHeader=333333&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=000000&bgTextureContent=05_inset_soft.png&bgImgOpacityContent=25&borderColorContent=666666&fcContent=ffffff&iconColorContent=cccccc&bgColorDefault=555555&bgTextureDefault=02_glass.png&bgImgOpacityDefault=20&borderColorDefault=666666&fcDefault=eeeeee&iconColorDefault=cccccc&bgColorHover=0078a3&bgTextureHover=02_glass.png&bgImgOpacityHover=40&borderColorHover=59b4d4&fcHover=ffffff&iconColorHover=ffffff&bgColorActive=f58400&bgTextureActive=05_inset_soft.png&bgImgOpacityActive=30&borderColorActive=ffaf0f&fcActive=ffffff&iconColorActive=222222&bgColorHighlight=eeeeee&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=80&borderColorHighlight=cccccc&fcHighlight=2e7db2&iconColorHighlight=4b8e0b&bgColorError=ffc73d&bgTextureError=02_glass.png&bgImgOpacityError=40&borderColorError=ffb73d&fcError=111111&iconColorError=a83300&bgColorOverlay=5c5c5c&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=50&opacityOverlay=80&bgColorShadow=cccccc&bgTextureShadow=01_flat.png&bgImgOpacityShadow=30&opacityShadow=60&thicknessShadow=7px&offsetTopShadow=-7px&offsetLeftShadow=-7px&cornerRadiusShadow=8px 54 | */ 55 | 56 | 57 | /* Component containers 58 | ----------------------------------*/ 59 | .ui-widget { font-family: Segoe UI, Arial, sans-serif; font-size: 1.1em; } 60 | .ui-widget .ui-widget { font-size: 1em; } 61 | .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Segoe UI, Arial, sans-serif; font-size: 1em; } 62 | .ui-widget-content { border: 1px solid #666666; background: #000000 url(images/ui-bg_inset-soft_25_000000_1x100.png) 50% bottom repeat-x; color: #ffffff; } 63 | .ui-widget-content a { color: #ffffff; } 64 | .ui-widget-header { border: 1px solid #333333; background: #333333 url(images/ui-bg_gloss-wave_25_333333_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; } 65 | .ui-widget-header a { color: #ffffff; } 66 | 67 | /* Interaction states 68 | ----------------------------------*/ 69 | .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #666666; background: #555555 url(images/ui-bg_glass_20_555555_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eeeeee; } 70 | .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #eeeeee; text-decoration: none; } 71 | .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #59b4d4; background: #0078a3 url(images/ui-bg_glass_40_0078a3_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #ffffff; } 72 | .ui-state-hover a, .ui-state-hover a:hover { color: #ffffff; text-decoration: none; } 73 | .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #ffaf0f; background: #f58400 url(images/ui-bg_inset-soft_30_f58400_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #ffffff; } 74 | .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #ffffff; text-decoration: none; } 75 | .ui-widget :active { outline: none; } 76 | 77 | /* Interaction Cues 78 | ----------------------------------*/ 79 | .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #cccccc; background: #eeeeee url(images/ui-bg_highlight-soft_80_eeeeee_1x100.png) 50% top repeat-x; color: #2e7db2; } 80 | .ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #2e7db2; } 81 | .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #ffb73d; background: #ffc73d url(images/ui-bg_glass_40_ffc73d_1x400.png) 50% 50% repeat-x; color: #111111; } 82 | .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #111111; } 83 | .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #111111; } 84 | .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } 85 | .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } 86 | .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } 87 | 88 | /* Icons 89 | ----------------------------------*/ 90 | 91 | /* states and images */ 92 | .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_cccccc_256x240.png); } 93 | .ui-widget-content .ui-icon {background-image: url(images/ui-icons_cccccc_256x240.png); } 94 | .ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } 95 | .ui-state-default .ui-icon { background-image: url(images/ui-icons_cccccc_256x240.png); } 96 | .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } 97 | .ui-state-active .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } 98 | .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_4b8e0b_256x240.png); } 99 | .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_a83300_256x240.png); } 100 | 101 | /* positioning */ 102 | .ui-icon-carat-1-n { background-position: 0 0; } 103 | .ui-icon-carat-1-ne { background-position: -16px 0; } 104 | .ui-icon-carat-1-e { background-position: -32px 0; } 105 | .ui-icon-carat-1-se { background-position: -48px 0; } 106 | .ui-icon-carat-1-s { background-position: -64px 0; } 107 | .ui-icon-carat-1-sw { background-position: -80px 0; } 108 | .ui-icon-carat-1-w { background-position: -96px 0; } 109 | .ui-icon-carat-1-nw { background-position: -112px 0; } 110 | .ui-icon-carat-2-n-s { background-position: -128px 0; } 111 | .ui-icon-carat-2-e-w { background-position: -144px 0; } 112 | .ui-icon-triangle-1-n { background-position: 0 -16px; } 113 | .ui-icon-triangle-1-ne { background-position: -16px -16px; } 114 | .ui-icon-triangle-1-e { background-position: -32px -16px; } 115 | .ui-icon-triangle-1-se { background-position: -48px -16px; } 116 | .ui-icon-triangle-1-s { background-position: -64px -16px; } 117 | .ui-icon-triangle-1-sw { background-position: -80px -16px; } 118 | .ui-icon-triangle-1-w { background-position: -96px -16px; } 119 | .ui-icon-triangle-1-nw { background-position: -112px -16px; } 120 | .ui-icon-triangle-2-n-s { background-position: -128px -16px; } 121 | .ui-icon-triangle-2-e-w { background-position: -144px -16px; } 122 | .ui-icon-arrow-1-n { background-position: 0 -32px; } 123 | .ui-icon-arrow-1-ne { background-position: -16px -32px; } 124 | .ui-icon-arrow-1-e { background-position: -32px -32px; } 125 | .ui-icon-arrow-1-se { background-position: -48px -32px; } 126 | .ui-icon-arrow-1-s { background-position: -64px -32px; } 127 | .ui-icon-arrow-1-sw { background-position: -80px -32px; } 128 | .ui-icon-arrow-1-w { background-position: -96px -32px; } 129 | .ui-icon-arrow-1-nw { background-position: -112px -32px; } 130 | .ui-icon-arrow-2-n-s { background-position: -128px -32px; } 131 | .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } 132 | .ui-icon-arrow-2-e-w { background-position: -160px -32px; } 133 | .ui-icon-arrow-2-se-nw { background-position: -176px -32px; } 134 | .ui-icon-arrowstop-1-n { background-position: -192px -32px; } 135 | .ui-icon-arrowstop-1-e { background-position: -208px -32px; } 136 | .ui-icon-arrowstop-1-s { background-position: -224px -32px; } 137 | .ui-icon-arrowstop-1-w { background-position: -240px -32px; } 138 | .ui-icon-arrowthick-1-n { background-position: 0 -48px; } 139 | .ui-icon-arrowthick-1-ne { background-position: -16px -48px; } 140 | .ui-icon-arrowthick-1-e { background-position: -32px -48px; } 141 | .ui-icon-arrowthick-1-se { background-position: -48px -48px; } 142 | .ui-icon-arrowthick-1-s { background-position: -64px -48px; } 143 | .ui-icon-arrowthick-1-sw { background-position: -80px -48px; } 144 | .ui-icon-arrowthick-1-w { background-position: -96px -48px; } 145 | .ui-icon-arrowthick-1-nw { background-position: -112px -48px; } 146 | .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } 147 | .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } 148 | .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } 149 | .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } 150 | .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } 151 | .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } 152 | .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } 153 | .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } 154 | .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } 155 | .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } 156 | .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } 157 | .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } 158 | .ui-icon-arrowreturn-1-w { background-position: -64px -64px; } 159 | .ui-icon-arrowreturn-1-n { background-position: -80px -64px; } 160 | .ui-icon-arrowreturn-1-e { background-position: -96px -64px; } 161 | .ui-icon-arrowreturn-1-s { background-position: -112px -64px; } 162 | .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } 163 | .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } 164 | .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } 165 | .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } 166 | .ui-icon-arrow-4 { background-position: 0 -80px; } 167 | .ui-icon-arrow-4-diag { background-position: -16px -80px; } 168 | .ui-icon-extlink { background-position: -32px -80px; } 169 | .ui-icon-newwin { background-position: -48px -80px; } 170 | .ui-icon-refresh { background-position: -64px -80px; } 171 | .ui-icon-shuffle { background-position: -80px -80px; } 172 | .ui-icon-transfer-e-w { background-position: -96px -80px; } 173 | .ui-icon-transferthick-e-w { background-position: -112px -80px; } 174 | .ui-icon-folder-collapsed { background-position: 0 -96px; } 175 | .ui-icon-folder-open { background-position: -16px -96px; } 176 | .ui-icon-document { background-position: -32px -96px; } 177 | .ui-icon-document-b { background-position: -48px -96px; } 178 | .ui-icon-note { background-position: -64px -96px; } 179 | .ui-icon-mail-closed { background-position: -80px -96px; } 180 | .ui-icon-mail-open { background-position: -96px -96px; } 181 | .ui-icon-suitcase { background-position: -112px -96px; } 182 | .ui-icon-comment { background-position: -128px -96px; } 183 | .ui-icon-person { background-position: -144px -96px; } 184 | .ui-icon-print { background-position: -160px -96px; } 185 | .ui-icon-trash { background-position: -176px -96px; } 186 | .ui-icon-locked { background-position: -192px -96px; } 187 | .ui-icon-unlocked { background-position: -208px -96px; } 188 | .ui-icon-bookmark { background-position: -224px -96px; } 189 | .ui-icon-tag { background-position: -240px -96px; } 190 | .ui-icon-home { background-position: 0 -112px; } 191 | .ui-icon-flag { background-position: -16px -112px; } 192 | .ui-icon-calendar { background-position: -32px -112px; } 193 | .ui-icon-cart { background-position: -48px -112px; } 194 | .ui-icon-pencil { background-position: -64px -112px; } 195 | .ui-icon-clock { background-position: -80px -112px; } 196 | .ui-icon-disk { background-position: -96px -112px; } 197 | .ui-icon-calculator { background-position: -112px -112px; } 198 | .ui-icon-zoomin { background-position: -128px -112px; } 199 | .ui-icon-zoomout { background-position: -144px -112px; } 200 | .ui-icon-search { background-position: -160px -112px; } 201 | .ui-icon-wrench { background-position: -176px -112px; } 202 | .ui-icon-gear { background-position: -192px -112px; } 203 | .ui-icon-heart { background-position: -208px -112px; } 204 | .ui-icon-star { background-position: -224px -112px; } 205 | .ui-icon-link { background-position: -240px -112px; } 206 | .ui-icon-cancel { background-position: 0 -128px; } 207 | .ui-icon-plus { background-position: -16px -128px; } 208 | .ui-icon-plusthick { background-position: -32px -128px; } 209 | .ui-icon-minus { background-position: -48px -128px; } 210 | .ui-icon-minusthick { background-position: -64px -128px; } 211 | .ui-icon-close { background-position: -80px -128px; } 212 | .ui-icon-closethick { background-position: -96px -128px; } 213 | .ui-icon-key { background-position: -112px -128px; } 214 | .ui-icon-lightbulb { background-position: -128px -128px; } 215 | .ui-icon-scissors { background-position: -144px -128px; } 216 | .ui-icon-clipboard { background-position: -160px -128px; } 217 | .ui-icon-copy { background-position: -176px -128px; } 218 | .ui-icon-contact { background-position: -192px -128px; } 219 | .ui-icon-image { background-position: -208px -128px; } 220 | .ui-icon-video { background-position: -224px -128px; } 221 | .ui-icon-script { background-position: -240px -128px; } 222 | .ui-icon-alert { background-position: 0 -144px; } 223 | .ui-icon-info { background-position: -16px -144px; } 224 | .ui-icon-notice { background-position: -32px -144px; } 225 | .ui-icon-help { background-position: -48px -144px; } 226 | .ui-icon-check { background-position: -64px -144px; } 227 | .ui-icon-bullet { background-position: -80px -144px; } 228 | .ui-icon-radio-off { background-position: -96px -144px; } 229 | .ui-icon-radio-on { background-position: -112px -144px; } 230 | .ui-icon-pin-w { background-position: -128px -144px; } 231 | .ui-icon-pin-s { background-position: -144px -144px; } 232 | .ui-icon-play { background-position: 0 -160px; } 233 | .ui-icon-pause { background-position: -16px -160px; } 234 | .ui-icon-seek-next { background-position: -32px -160px; } 235 | .ui-icon-seek-prev { background-position: -48px -160px; } 236 | .ui-icon-seek-end { background-position: -64px -160px; } 237 | .ui-icon-seek-start { background-position: -80px -160px; } 238 | /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ 239 | .ui-icon-seek-first { background-position: -80px -160px; } 240 | .ui-icon-stop { background-position: -96px -160px; } 241 | .ui-icon-eject { background-position: -112px -160px; } 242 | .ui-icon-volume-off { background-position: -128px -160px; } 243 | .ui-icon-volume-on { background-position: -144px -160px; } 244 | .ui-icon-power { background-position: 0 -176px; } 245 | .ui-icon-signal-diag { background-position: -16px -176px; } 246 | .ui-icon-signal { background-position: -32px -176px; } 247 | .ui-icon-battery-0 { background-position: -48px -176px; } 248 | .ui-icon-battery-1 { background-position: -64px -176px; } 249 | .ui-icon-battery-2 { background-position: -80px -176px; } 250 | .ui-icon-battery-3 { background-position: -96px -176px; } 251 | .ui-icon-circle-plus { background-position: 0 -192px; } 252 | .ui-icon-circle-minus { background-position: -16px -192px; } 253 | .ui-icon-circle-close { background-position: -32px -192px; } 254 | .ui-icon-circle-triangle-e { background-position: -48px -192px; } 255 | .ui-icon-circle-triangle-s { background-position: -64px -192px; } 256 | .ui-icon-circle-triangle-w { background-position: -80px -192px; } 257 | .ui-icon-circle-triangle-n { background-position: -96px -192px; } 258 | .ui-icon-circle-arrow-e { background-position: -112px -192px; } 259 | .ui-icon-circle-arrow-s { background-position: -128px -192px; } 260 | .ui-icon-circle-arrow-w { background-position: -144px -192px; } 261 | .ui-icon-circle-arrow-n { background-position: -160px -192px; } 262 | .ui-icon-circle-zoomin { background-position: -176px -192px; } 263 | .ui-icon-circle-zoomout { background-position: -192px -192px; } 264 | .ui-icon-circle-check { background-position: -208px -192px; } 265 | .ui-icon-circlesmall-plus { background-position: 0 -208px; } 266 | .ui-icon-circlesmall-minus { background-position: -16px -208px; } 267 | .ui-icon-circlesmall-close { background-position: -32px -208px; } 268 | .ui-icon-squaresmall-plus { background-position: -48px -208px; } 269 | .ui-icon-squaresmall-minus { background-position: -64px -208px; } 270 | .ui-icon-squaresmall-close { background-position: -80px -208px; } 271 | .ui-icon-grip-dotted-vertical { background-position: 0 -224px; } 272 | .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } 273 | .ui-icon-grip-solid-vertical { background-position: -32px -224px; } 274 | .ui-icon-grip-solid-horizontal { background-position: -48px -224px; } 275 | .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } 276 | .ui-icon-grip-diagonal-se { background-position: -80px -224px; } 277 | 278 | 279 | /* Misc visuals 280 | ----------------------------------*/ 281 | 282 | /* Corner radius */ 283 | .ui-corner-tl { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; } 284 | .ui-corner-tr { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; } 285 | .ui-corner-bl { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; } 286 | .ui-corner-br { -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; } 287 | .ui-corner-top { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; } 288 | .ui-corner-bottom { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; } 289 | .ui-corner-right { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; } 290 | .ui-corner-left { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; } 291 | .ui-corner-all { -moz-border-radius: 6px; -webkit-border-radius: 6px; border-radius: 6px; } 292 | 293 | /* Overlays */ 294 | .ui-widget-overlay { background: #5c5c5c url(images/ui-bg_flat_50_5c5c5c_40x100.png) 50% 50% repeat-x; opacity: .80;filter:Alpha(Opacity=80); } 295 | .ui-widget-shadow { margin: -7px 0 0 -7px; padding: 7px; background: #cccccc url(images/ui-bg_flat_30_cccccc_40x100.png) 50% 50% repeat-x; opacity: .60;filter:Alpha(Opacity=60); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/* 296 | * jQuery UI Resizable 1.8.12 297 | * 298 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 299 | * Dual licensed under the MIT or GPL Version 2 licenses. 300 | * http://jquery.org/license 301 | * 302 | * http://docs.jquery.com/UI/Resizable#theming 303 | */ 304 | .ui-resizable { position: relative;} 305 | .ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; 306 | /* http://bugs.jqueryui.com/ticket/7233 307 | - Resizable: resizable handles fail to work in IE if transparent and content overlaps 308 | */ 309 | background-image:url(data:); 310 | } 311 | .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } 312 | .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } 313 | .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } 314 | .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } 315 | .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } 316 | .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } 317 | .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } 318 | .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } 319 | .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* 320 | * jQuery UI Selectable 1.8.12 321 | * 322 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 323 | * Dual licensed under the MIT or GPL Version 2 licenses. 324 | * http://jquery.org/license 325 | * 326 | * http://docs.jquery.com/UI/Selectable#theming 327 | */ 328 | .ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } 329 | /* 330 | * jQuery UI Accordion 1.8.12 331 | * 332 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 333 | * Dual licensed under the MIT or GPL Version 2 licenses. 334 | * http://jquery.org/license 335 | * 336 | * http://docs.jquery.com/UI/Accordion#theming 337 | */ 338 | /* IE/Win - Fix animation bug - #4615 */ 339 | .ui-accordion { width: 100%; } 340 | .ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } 341 | .ui-accordion .ui-accordion-li-fix { display: inline; } 342 | .ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } 343 | .ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } 344 | .ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } 345 | .ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } 346 | .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } 347 | .ui-accordion .ui-accordion-content-active { display: block; } 348 | /* 349 | * jQuery UI Autocomplete 1.8.12 350 | * 351 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 352 | * Dual licensed under the MIT or GPL Version 2 licenses. 353 | * http://jquery.org/license 354 | * 355 | * http://docs.jquery.com/UI/Autocomplete#theming 356 | */ 357 | .ui-autocomplete { position: absolute; cursor: default; } 358 | 359 | /* workarounds */ 360 | * html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ 361 | 362 | /* 363 | * jQuery UI Menu 1.8.12 364 | * 365 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 366 | * Dual licensed under the MIT or GPL Version 2 licenses. 367 | * http://jquery.org/license 368 | * 369 | * http://docs.jquery.com/UI/Menu#theming 370 | */ 371 | .ui-menu { 372 | list-style:none; 373 | padding: 2px; 374 | margin: 0; 375 | display:block; 376 | float: left; 377 | } 378 | .ui-menu .ui-menu { 379 | margin-top: -3px; 380 | } 381 | .ui-menu .ui-menu-item { 382 | margin:0; 383 | padding: 0; 384 | zoom: 1; 385 | float: left; 386 | clear: left; 387 | width: 100%; 388 | } 389 | .ui-menu .ui-menu-item a { 390 | text-decoration:none; 391 | display:block; 392 | padding:.2em .4em; 393 | line-height:1.5; 394 | zoom:1; 395 | } 396 | .ui-menu .ui-menu-item a.ui-state-hover, 397 | .ui-menu .ui-menu-item a.ui-state-active { 398 | font-weight: normal; 399 | margin: -1px; 400 | } 401 | /* 402 | * jQuery UI Button 1.8.12 403 | * 404 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 405 | * Dual licensed under the MIT or GPL Version 2 licenses. 406 | * http://jquery.org/license 407 | * 408 | * http://docs.jquery.com/UI/Button#theming 409 | */ 410 | .ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ 411 | .ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ 412 | button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ 413 | .ui-button-icons-only { width: 3.4em; } 414 | button.ui-button-icons-only { width: 3.7em; } 415 | 416 | /*button text element */ 417 | .ui-button .ui-button-text { display: block; line-height: 1.4; } 418 | .ui-button-text-only .ui-button-text { padding: .4em 1em; } 419 | .ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } 420 | .ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } 421 | .ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } 422 | .ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } 423 | /* no icon support for input elements, provide padding by default */ 424 | input.ui-button { padding: .4em 1em; } 425 | 426 | /*button icon element(s) */ 427 | .ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } 428 | .ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } 429 | .ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } 430 | .ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } 431 | .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } 432 | 433 | /*button sets*/ 434 | .ui-buttonset { margin-right: 7px; } 435 | .ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } 436 | 437 | /* workarounds */ 438 | button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ 439 | /* 440 | * jQuery UI Dialog 1.8.12 441 | * 442 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 443 | * Dual licensed under the MIT or GPL Version 2 licenses. 444 | * http://jquery.org/license 445 | * 446 | * http://docs.jquery.com/UI/Dialog#theming 447 | */ 448 | .ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } 449 | .ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } 450 | .ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } 451 | .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } 452 | .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } 453 | .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } 454 | .ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } 455 | .ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } 456 | .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } 457 | .ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } 458 | .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } 459 | .ui-draggable .ui-dialog-titlebar { cursor: move; } 460 | /* 461 | * jQuery UI Slider 1.8.12 462 | * 463 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 464 | * Dual licensed under the MIT or GPL Version 2 licenses. 465 | * http://jquery.org/license 466 | * 467 | * http://docs.jquery.com/UI/Slider#theming 468 | */ 469 | .ui-slider { position: relative; text-align: left; } 470 | .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } 471 | .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } 472 | 473 | .ui-slider-horizontal { height: .8em; } 474 | .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } 475 | .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } 476 | .ui-slider-horizontal .ui-slider-range-min { left: 0; } 477 | .ui-slider-horizontal .ui-slider-range-max { right: 0; } 478 | 479 | .ui-slider-vertical { width: .8em; height: 100px; } 480 | .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } 481 | .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } 482 | .ui-slider-vertical .ui-slider-range-min { bottom: 0; } 483 | .ui-slider-vertical .ui-slider-range-max { top: 0; }/* 484 | * jQuery UI Tabs 1.8.12 485 | * 486 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 487 | * Dual licensed under the MIT or GPL Version 2 licenses. 488 | * http://jquery.org/license 489 | * 490 | * http://docs.jquery.com/UI/Tabs#theming 491 | */ 492 | .ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ 493 | .ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } 494 | .ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } 495 | .ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } 496 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } 497 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } 498 | .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ 499 | .ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } 500 | .ui-tabs .ui-tabs-hide { display: none !important; } 501 | /* 502 | * jQuery UI Datepicker 1.8.12 503 | * 504 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 505 | * Dual licensed under the MIT or GPL Version 2 licenses. 506 | * http://jquery.org/license 507 | * 508 | * http://docs.jquery.com/UI/Datepicker#theming 509 | */ 510 | .ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } 511 | .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } 512 | .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } 513 | .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } 514 | .ui-datepicker .ui-datepicker-prev { left:2px; } 515 | .ui-datepicker .ui-datepicker-next { right:2px; } 516 | .ui-datepicker .ui-datepicker-prev-hover { left:1px; } 517 | .ui-datepicker .ui-datepicker-next-hover { right:1px; } 518 | .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } 519 | .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } 520 | .ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } 521 | .ui-datepicker select.ui-datepicker-month-year {width: 100%;} 522 | .ui-datepicker select.ui-datepicker-month, 523 | .ui-datepicker select.ui-datepicker-year { width: 49%;} 524 | .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } 525 | .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } 526 | .ui-datepicker td { border: 0; padding: 1px; } 527 | .ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } 528 | .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } 529 | .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } 530 | .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } 531 | 532 | /* with multiple calendars */ 533 | .ui-datepicker.ui-datepicker-multi { width:auto; } 534 | .ui-datepicker-multi .ui-datepicker-group { float:left; } 535 | .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } 536 | .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } 537 | .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } 538 | .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } 539 | .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } 540 | .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } 541 | .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } 542 | .ui-datepicker-row-break { clear:both; width:100%; } 543 | 544 | /* RTL support */ 545 | .ui-datepicker-rtl { direction: rtl; } 546 | .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } 547 | .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } 548 | .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } 549 | .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } 550 | .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } 551 | .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } 552 | .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } 553 | .ui-datepicker-rtl .ui-datepicker-group { float:right; } 554 | .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } 555 | .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } 556 | 557 | /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ 558 | .ui-datepicker-cover { 559 | display: none; /*sorry for IE5*/ 560 | display/**/: block; /*sorry for IE5*/ 561 | position: absolute; /*must have*/ 562 | z-index: -1; /*must have*/ 563 | filter: mask(); /*must have*/ 564 | top: -4px; /*must have*/ 565 | left: -4px; /*must have*/ 566 | width: 200px; /*must have*/ 567 | height: 200px; /*must have*/ 568 | }/* 569 | * jQuery UI Progressbar 1.8.12 570 | * 571 | * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 572 | * Dual licensed under the MIT or GPL Version 2 licenses. 573 | * http://jquery.org/license 574 | * 575 | * http://docs.jquery.com/UI/Progressbar#theming 576 | */ 577 | .ui-progressbar { height:2em; text-align: left; } 578 | .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } -------------------------------------------------------------------------------- /WebPages/example-01-jquery-ui-controls/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | jQuery UI Example Page 6 | 7 | 8 | 9 | 93 | 104 | 105 | 106 | 107 |

Quartz Composer WebSocket Plug-In - Example 01 jQuery UI Controls

108 |
109 |
http://github.com/mirek/quartzcomposer-websocket - source code, follow code updates.
110 |
@quartzcomposer on twitter - quartz composer related info
111 |
quartzcomposer.com
112 |
113 | 114 | 115 | 126 | 127 | 128 | 129 | 130 | 135 | 136 | 137 | 138 | 141 | 142 | 143 |

Sliders (/slider/1-5)

144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 |
153 | 154 | 155 | 156 | 157 | 158 | -------------------------------------------------------------------------------- /WebPages/example-01-jquery-ui-controls/js/jquery-1.5.1.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery JavaScript Library v1.5.1 3 | * http://jquery.com/ 4 | * 5 | * Copyright 2011, John Resig 6 | * Dual licensed under the MIT or GPL Version 2 licenses. 7 | * http://jquery.org/license 8 | * 9 | * Includes Sizzle.js 10 | * http://sizzlejs.com/ 11 | * Copyright 2011, The Dojo Foundation 12 | * Released under the MIT, BSD, and GPL Licenses. 13 | * 14 | * Date: Wed Feb 23 13:55:29 2011 -0500 15 | */ 16 | (function(a,b){function cg(a){return d.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cd(a){if(!bZ[a]){var b=d("<"+a+">").appendTo("body"),c=b.css("display");b.remove();if(c==="none"||c==="")c="block";bZ[a]=c}return bZ[a]}function cc(a,b){var c={};d.each(cb.concat.apply([],cb.slice(0,b)),function(){c[this]=a});return c}function bY(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function bX(){try{return new a.XMLHttpRequest}catch(b){}}function bW(){d(a).unload(function(){for(var a in bU)bU[a](0,1)})}function bQ(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var e=a.dataTypes,f={},g,h,i=e.length,j,k=e[0],l,m,n,o,p;for(g=1;g=0===c})}function N(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function F(a,b){return(a&&a!=="*"?a+".":"")+b.replace(r,"`").replace(s,"&")}function E(a){var b,c,e,f,g,h,i,j,k,l,m,n,o,q=[],r=[],s=d._data(this,"events");if(a.liveFired!==this&&s&&s.live&&!a.target.disabled&&(!a.button||a.type!=="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var t=s.live.slice(0);for(i=0;ic)break;a.currentTarget=f.elem,a.data=f.handleObj.data,a.handleObj=f.handleObj,o=f.handleObj.origHandler.apply(f.elem,arguments);if(o===!1||a.isPropagationStopped()){c=f.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function C(a,c,e){var f=d.extend({},e[0]);f.type=a,f.originalEvent={},f.liveFired=b,d.event.handle.call(c,f),f.isDefaultPrevented()&&e[0].preventDefault()}function w(){return!0}function v(){return!1}function g(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function f(a,c,f){if(f===b&&a.nodeType===1){f=a.getAttribute("data-"+c);if(typeof f==="string"){try{f=f==="true"?!0:f==="false"?!1:f==="null"?null:d.isNaN(f)?e.test(f)?d.parseJSON(f):f:parseFloat(f)}catch(g){}d.data(a,c,f)}else f=b}return f}var c=a.document,d=function(){function I(){if(!d.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(I,1);return}d.ready()}}var d=function(a,b){return new d.fn.init(a,b,g)},e=a.jQuery,f=a.$,g,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,i=/\S/,j=/^\s+/,k=/\s+$/,l=/\d/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=navigator.userAgent,w,x=!1,y,z="then done fail isResolved isRejected promise".split(" "),A,B=Object.prototype.toString,C=Object.prototype.hasOwnProperty,D=Array.prototype.push,E=Array.prototype.slice,F=String.prototype.trim,G=Array.prototype.indexOf,H={};d.fn=d.prototype={constructor:d,init:function(a,e,f){var g,i,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!e&&c.body){this.context=c,this[0]=c.body,this.selector="body",this.length=1;return this}if(typeof a==="string"){g=h.exec(a);if(!g||!g[1]&&e)return!e||e.jquery?(e||f).find(a):this.constructor(e).find(a);if(g[1]){e=e instanceof d?e[0]:e,k=e?e.ownerDocument||e:c,j=m.exec(a),j?d.isPlainObject(e)?(a=[c.createElement(j[1])],d.fn.attr.call(a,e,!0)):a=[k.createElement(j[1])]:(j=d.buildFragment([g[1]],[k]),a=(j.cacheable?d.clone(j.fragment):j.fragment).childNodes);return d.merge(this,a)}i=c.getElementById(g[2]);if(i&&i.parentNode){if(i.id!==g[2])return f.find(a);this.length=1,this[0]=i}this.context=c,this.selector=a;return this}if(d.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return d.makeArray(a,this)},selector:"",jquery:"1.5.1",length:0,size:function(){return this.length},toArray:function(){return E.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 e=this.constructor();d.isArray(a)?D.apply(e,a):d.merge(e,a),e.prevObject=this,e.context=this.context,b==="find"?e.selector=this.selector+(this.selector?" ":"")+c:b&&(e.selector=this.selector+"."+b+"("+c+")");return e},each:function(a,b){return d.each(this,a,b)},ready:function(a){d.bindReady(),y.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(E.apply(this,arguments),"slice",E.call(arguments).join(","))},map:function(a){return this.pushStack(d.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:D,sort:[].sort,splice:[].splice},d.fn.init.prototype=d.fn,d.extend=d.fn.extend=function(){var a,c,e,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"&&!d.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;y.resolveWith(c,[d]),d.fn.trigger&&d(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!x){x=!0;if(c.readyState==="complete")return setTimeout(d.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",A,!1),a.addEventListener("load",d.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",A),a.attachEvent("onload",d.ready);var b=!1;try{b=a.frameElement==null}catch(e){}c.documentElement.doScroll&&b&&I()}}},isFunction:function(a){return d.type(a)==="function"},isArray:Array.isArray||function(a){return d.type(a)==="array"},isWindow:function(a){return a&&typeof a==="object"&&"setInterval"in a},isNaN:function(a){return a==null||!l.test(a)||isNaN(a)},type:function(a){return a==null?String(a):H[B.call(a)]||"object"},isPlainObject:function(a){if(!a||d.type(a)!=="object"||a.nodeType||d.isWindow(a))return!1;if(a.constructor&&!C.call(a,"constructor")&&!C.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a){}return c===b||C.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=d.trim(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return a.JSON&&a.JSON.parse?a.JSON.parse(b):(new Function("return "+b))();d.error("Invalid JSON: "+b)},parseXML:function(b,c,e){a.DOMParser?(e=new DOMParser,c=e.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),e=c.documentElement,(!e||!e.nodeName||e.nodeName==="parsererror")&&d.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(a){if(a&&i.test(a)){var b=c.head||c.getElementsByTagName("head")[0]||c.documentElement,e=c.createElement("script");d.support.scriptEval()?e.appendChild(c.createTextNode(a)):e.text=a,b.insertBefore(e,b.firstChild),b.removeChild(e)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,e){var f,g=0,h=a.length,i=h===b||d.isFunction(a);if(e){if(i){for(f in a)if(c.apply(a[f],e)===!1)break}else for(;g1){var f=E.call(arguments,0),g=b,h=function(a){return function(b){f[a]=arguments.length>1?E.call(arguments,0):b,--g||c.resolveWith(e,f)}};while(b--)a=f[b],a&&d.isFunction(a.promise)?a.promise().then(h(b),c.reject):--g;g||c.resolveWith(e,f)}else c!==a&&c.resolve(a);return e},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}d.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.subclass=this.subclass,a.fn.init=function b(b,c){c&&c instanceof d&&!(c instanceof a)&&(c=a(c));return d.fn.init.call(this,b,c,e)},a.fn.init.prototype=a.fn;var e=a(c);return a},browser:{}}),y=d._Deferred(),d.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){H["[object "+b+"]"]=b.toLowerCase()}),w=d.uaMatch(v),w.browser&&(d.browser[w.browser]=!0,d.browser.version=w.version),d.browser.webkit&&(d.browser.safari=!0),G&&(d.inArray=function(a,b){return G.call(b,a)}),i.test(" ")&&(j=/^[\s\xA0]+/,k=/[\s\xA0]+$/),g=d(c),c.addEventListener?A=function(){c.removeEventListener("DOMContentLoaded",A,!1),d.ready()}:c.attachEvent&&(A=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",A),d.ready())});return d}();(function(){d.support={};var b=c.createElement("div");b.style.display="none",b.innerHTML="
a";var e=b.getElementsByTagName("*"),f=b.getElementsByTagName("a")[0],g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=b.getElementsByTagName("input")[0];if(e&&e.length&&f){d.support={leadingWhitespace:b.firstChild.nodeType===3,tbody:!b.getElementsByTagName("tbody").length,htmlSerialize:!!b.getElementsByTagName("link").length,style:/red/.test(f.getAttribute("style")),hrefNormalized:f.getAttribute("href")==="/a",opacity:/^0.55$/.test(f.style.opacity),cssFloat:!!f.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,deleteExpando:!0,optDisabled:!1,checkClone:!1,noCloneEvent:!0,noCloneChecked:!0,boxModel:null,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableHiddenOffsets:!0},i.checked=!0,d.support.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,d.support.optDisabled=!h.disabled;var j=null;d.support.scriptEval=function(){if(j===null){var b=c.documentElement,e=c.createElement("script"),f="script"+d.now();try{e.appendChild(c.createTextNode("window."+f+"=1;"))}catch(g){}b.insertBefore(e,b.firstChild),a[f]?(j=!0,delete a[f]):j=!1,b.removeChild(e),b=e=f=null}return j};try{delete b.test}catch(k){d.support.deleteExpando=!1}!b.addEventListener&&b.attachEvent&&b.fireEvent&&(b.attachEvent("onclick",function l(){d.support.noCloneEvent=!1,b.detachEvent("onclick",l)}),b.cloneNode(!0).fireEvent("onclick")),b=c.createElement("div"),b.innerHTML="";var m=c.createDocumentFragment();m.appendChild(b.firstChild),d.support.checkClone=m.cloneNode(!0).cloneNode(!0).lastChild.checked,d(function(){var a=c.createElement("div"),b=c.getElementsByTagName("body")[0];if(b){a.style.width=a.style.paddingLeft="1px",b.appendChild(a),d.boxModel=d.support.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,d.support.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
",d.support.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="
t
";var e=a.getElementsByTagName("td");d.support.reliableHiddenOffsets=e[0].offsetHeight===0,e[0].style.display="",e[1].style.display="none",d.support.reliableHiddenOffsets=d.support.reliableHiddenOffsets&&e[0].offsetHeight===0,a.innerHTML="",b.removeChild(a).style.display="none",a=e=null}});var n=function(a){var b=c.createElement("div");a="on"+a;if(!b.attachEvent)return!0;var d=a in b;d||(b.setAttribute(a,"return;"),d=typeof b[a]==="function"),b=null;return d};d.support.submitBubbles=n("submit"),d.support.changeBubbles=n("change"),b=e=f=null}})();var e=/^(?:\{.*\}|\[.*\])$/;d.extend({cache:{},uuid:0,expando:"jQuery"+(d.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?d.cache[a[d.expando]]:a[d.expando];return!!a&&!g(a)},data:function(a,c,e,f){if(d.acceptData(a)){var g=d.expando,h=typeof c==="string",i,j=a.nodeType,k=j?d.cache:a,l=j?a[d.expando]:a[d.expando]&&d.expando;if((!l||f&&l&&!k[l][g])&&h&&e===b)return;l||(j?a[d.expando]=l=++d.uuid:l=d.expando),k[l]||(k[l]={},j||(k[l].toJSON=d.noop));if(typeof c==="object"||typeof c==="function")f?k[l][g]=d.extend(k[l][g],c):k[l]=d.extend(k[l],c);i=k[l],f&&(i[g]||(i[g]={}),i=i[g]),e!==b&&(i[c]=e);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[c]:i}},removeData:function(b,c,e){if(d.acceptData(b)){var f=d.expando,h=b.nodeType,i=h?d.cache:b,j=h?b[d.expando]:d.expando;if(!i[j])return;if(c){var k=e?i[j][f]:i[j];if(k){delete k[c];if(!g(k))return}}if(e){delete i[j][f];if(!g(i[j]))return}var l=i[j][f];d.support.deleteExpando||i!=a?delete i[j]:i[j]=null,l?(i[j]={},h||(i[j].toJSON=d.noop),i[j][f]=l):h&&(d.support.deleteExpando?delete b[d.expando]:b.removeAttribute?b.removeAttribute(d.expando):b[d.expando]=null)}},_data:function(a,b,c){return d.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=d.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),d.fn.extend({data:function(a,c){var e=null;if(typeof a==="undefined"){if(this.length){e=d.data(this[0]);if(this[0].nodeType===1){var g=this[0].attributes,h;for(var i=0,j=g.length;i-1)return!0;return!1},val:function(a){if(!arguments.length){var c=this[0];if(c){if(d.nodeName(c,"option")){var e=c.attributes.value;return!e||e.specified?c.value:c.text}if(d.nodeName(c,"select")){var f=c.selectedIndex,g=[],h=c.options,i=c.type==="select-one";if(f<0)return null;for(var k=i?f:0,l=i?f+1:h.length;k=0;else if(d.nodeName(this,"select")){var f=d.makeArray(e);d("option",this).each(function(){this.selected=d.inArray(d(this).val(),f)>=0}),f.length||(this.selectedIndex=-1)}else this.value=e}})}}),d.extend({attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,e,f){if(!a||a.nodeType===3||a.nodeType===8||a.nodeType===2)return b;if(f&&c in d.attrFn)return d(a)[c](e);var g=a.nodeType!==1||!d.isXMLDoc(a),h=e!==b;c=g&&d.props[c]||c;if(a.nodeType===1){var i=k.test(c);if(c==="selected"&&!d.support.optSelected){var j=a.parentNode;j&&(j.selectedIndex,j.parentNode&&j.parentNode.selectedIndex)}if((c in a||a[c]!==b)&&g&&!i){h&&(c==="type"&&l.test(a.nodeName)&&a.parentNode&&d.error("type property can't be changed"),e===null?a.nodeType===1&&a.removeAttribute(c):a[c]=e);if(d.nodeName(a,"form")&&a.getAttributeNode(c))return a.getAttributeNode(c).nodeValue;if(c==="tabIndex"){var o=a.getAttributeNode("tabIndex");return o&&o.specified?o.value:m.test(a.nodeName)||n.test(a.nodeName)&&a.href?0:b}return a[c]}if(!d.support.style&&g&&c==="style"){h&&(a.style.cssText=""+e);return a.style.cssText}h&&a.setAttribute(c,""+e);if(!a.attributes[c]&&(a.hasAttribute&&!a.hasAttribute(c)))return b;var p=!d.support.hrefNormalized&&g&&i?a.getAttribute(c,2):a.getAttribute(c);return p===null?b:p}h&&(a[c]=e);return a[c]}});var p=/\.(.*)$/,q=/^(?:textarea|input|select)$/i,r=/\./g,s=/ /g,t=/[^\w\s.|`]/g,u=function(a){return a.replace(t,"\\$&")};d.event={add:function(c,e,f,g){if(c.nodeType!==3&&c.nodeType!==8){try{d.isWindow(c)&&(c!==a&&!c.frameElement)&&(c=a)}catch(h){}if(f===!1)f=v;else if(!f)return;var i,j;f.handler&&(i=f,f=i.handler),f.guid||(f.guid=d.guid++);var k=d._data(c);if(!k)return;var l=k.events,m=k.handle;l||(k.events=l={}),m||(k.handle=m=function(){return typeof d!=="undefined"&&!d.event.triggered?d.event.handle.apply(m.elem,arguments):b}),m.elem=c,e=e.split(" ");var n,o=0,p;while(n=e[o++]){j=i?d.extend({},i):{handler:f,data:g},n.indexOf(".")>-1?(p=n.split("."),n=p.shift(),j.namespace=p.slice(0).sort().join(".")):(p=[],j.namespace=""),j.type=n,j.guid||(j.guid=f.guid);var q=l[n],r=d.event.special[n]||{};if(!q){q=l[n]=[];if(!r.setup||r.setup.call(c,g,p,m)===!1)c.addEventListener?c.addEventListener(n,m,!1):c.attachEvent&&c.attachEvent("on"+n,m)}r.add&&(r.add.call(c,j),j.handler.guid||(j.handler.guid=f.guid)),q.push(j),d.event.global[n]=!0}c=null}},global:{},remove:function(a,c,e,f){if(a.nodeType!==3&&a.nodeType!==8){e===!1&&(e=v);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=d.hasData(a)&&d._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(e=c.handler,c=c.type);if(!c||typeof c==="string"&&c.charAt(0)==="."){c=c||"";for(h in t)d.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("(^|\\.)"+d.map(m.slice(0).sort(),u).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!e){for(j=0;j=0&&(a.type=f=f.slice(0,-1),a.exclusive=!0),e||(a.stopPropagation(),d.event.global[f]&&d.each(d.cache,function(){var b=d.expando,e=this[b];e&&e.events&&e.events[f]&&d.event.trigger(a,c,e.handle.elem)}));if(!e||e.nodeType===3||e.nodeType===8)return b;a.result=b,a.target=e,c=d.makeArray(c),c.unshift(a)}a.currentTarget=e;var h=d._data(e,"handle");h&&h.apply(e,c);var i=e.parentNode||e.ownerDocument;try{e&&e.nodeName&&d.noData[e.nodeName.toLowerCase()]||e["on"+f]&&e["on"+f].apply(e,c)===!1&&(a.result=!1,a.preventDefault())}catch(j){}if(!a.isPropagationStopped()&&i)d.event.trigger(a,c,i,!0);else if(!a.isDefaultPrevented()){var k,l=a.target,m=f.replace(p,""),n=d.nodeName(l,"a")&&m==="click",o=d.event.special[m]||{};if((!o._default||o._default.call(e,a)===!1)&&!n&&!(l&&l.nodeName&&d.noData[l.nodeName.toLowerCase()])){try{l[m]&&(k=l["on"+m],k&&(l["on"+m]=null),d.event.triggered=!0,l[m]())}catch(q){}k&&(l["on"+m]=k),d.event.triggered=!1}}},handle:function(c){var e,f,g,h,i,j=[],k=d.makeArray(arguments);c=k[0]=d.event.fix(c||a.event),c.currentTarget=this,e=c.type.indexOf(".")<0&&!c.exclusive,e||(g=c.type.split("."),c.type=g.shift(),j=g.slice(0).sort(),h=new RegExp("(^|\\.)"+j.join("\\.(?:.*\\.)?")+"(\\.|$)")),c.namespace=c.namespace||j.join("."),i=d._data(this,"events"),f=(i||{})[c.type];if(i&&f){f=f.slice(0);for(var l=0,m=f.length;l-1?d.map(a.options,function(a){return a.selected}).join("-"):"":a.nodeName.toLowerCase()==="select"&&(c=a.selectedIndex);return c},B=function B(a){var c=a.target,e,f;if(q.test(c.nodeName)&&!c.readOnly){e=d._data(c,"_change_data"),f=A(c),(a.type!=="focusout"||c.type!=="radio")&&d._data(c,"_change_data",f);if(e===b||f===e)return;if(e!=null||f)a.type="change",a.liveFired=b,d.event.trigger(a,arguments[1],c)}};d.event.special.change={filters:{focusout:B,beforedeactivate:B,click:function(a){var b=a.target,c=b.type;(c==="radio"||c==="checkbox"||b.nodeName.toLowerCase()==="select")&&B.call(this,a)},keydown:function(a){var b=a.target,c=b.type;(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&B.call(this,a)},beforeactivate:function(a){var b=a.target;d._data(b,"_change_data",A(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in z)d.event.add(this,c+".specialChange",z[c]);return q.test(this.nodeName)},teardown:function(a){d.event.remove(this,".specialChange");return q.test(this.nodeName)}},z=d.event.special.change.filters,z.focus=z.beforeactivate}c.addEventListener&&d.each({focus:"focusin",blur:"focusout"},function(a,b){function c(a){a=d.event.fix(a),a.type=b;return d.event.handle.call(this,a)}d.event.special[b]={setup:function(){this.addEventListener(a,c,!0)},teardown:function(){this.removeEventListener(a,c,!0)}}}),d.each(["bind","one"],function(a,c){d.fn[c]=function(a,e,f){if(typeof a==="object"){for(var g in a)this[c](g,e,a[g],f);return this}if(d.isFunction(e)||e===!1)f=e,e=b;var h=c==="one"?d.proxy(f,function(a){d(this).unbind(a,h);return f.apply(this,arguments)}):f;if(a==="unload"&&c!=="one")this.one(a,e,f);else for(var i=0,j=this.length;i0?this.bind(b,a,c):this.trigger(b)},d.attrFn&&(d.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,e=0,f=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,e,g){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!=="string")return e;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(f.call(n)==="[object Array]")if(u)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]))&&e.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&e.push(j[t]);else e.push.apply(e,n);else p(n,e);o&&(k(o,h,e,g),k.uniqueSort(e));return e};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]=e++;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){return"text"===a.getAttribute("type")},radio:function(a){return"radio"===a.type},checkbox:function(a){return"checkbox"===a.type},file:function(a){return"file"===a.type},password:function(a){return"password"===a.type},submit:function(a){return"submit"===a.type},image:function(a){return"image"===a.type},reset:function(a){return"reset"===a.type},button:function(a){return"button"===a.type||a.nodeName.toLowerCase()==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)}},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(f.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length==="number")for(var e=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,d=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(e){d=!0}b&&(k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(d||!l.match.PSEUDO.test(c)&&!/!=/.test(c))return b.call(a,c)}catch(e){}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(var g=c;g0},closest:function(a,b){var c=[],e,f,g=this[0];if(d.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(e=0,f=a.length;e-1:d(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=L.test(a)?d(a,b||this.context):null;for(e=0,f=this.length;e-1:d.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b)break}}c=c.length>1?d.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a==="string")return d.inArray(this[0],a?d(a):this.parent().children());return d.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a==="string"?d(a,b):d.makeArray(a),e=d.merge(this.get(),c);return this.pushStack(N(c[0])||N(e[0])?e:d.unique(e))},andSelf:function(){return this.add(this.prevObject)}}),d.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return d.dir(a,"parentNode")},parentsUntil:function(a,b,c){return d.dir(a,"parentNode",c)},next:function(a){return d.nth(a,2,"nextSibling")},prev:function(a){return d.nth(a,2,"previousSibling")},nextAll:function(a){return d.dir(a,"nextSibling")},prevAll:function(a){return d.dir(a,"previousSibling")},nextUntil:function(a,b,c){return d.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return d.dir(a,"previousSibling",c)},siblings:function(a){return d.sibling(a.parentNode.firstChild,a)},children:function(a){return d.sibling(a.firstChild)},contents:function(a){return d.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:d.makeArray(a.childNodes)}},function(a,b){d.fn[a]=function(c,e){var f=d.map(this,b,c),g=K.call(arguments);G.test(a)||(e=c),e&&typeof e==="string"&&(f=d.filter(e,f)),f=this.length>1&&!M[a]?d.unique(f):f,(this.length>1||I.test(e))&&H.test(a)&&(f=f.reverse());return this.pushStack(f,a,g.join(","))}}),d.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?d.find.matchesSelector(b[0],a)?[b[0]]:[]:d.find.matches(a,b)},dir:function(a,c,e){var f=[],g=a[c];while(g&&g.nodeType!==9&&(e===b||g.nodeType!==1||!d(g).is(e)))g.nodeType===1&&f.push(g),g=g[c];return f},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 P=/ jQuery\d+="(?:\d+|null)"/g,Q=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,S=/<([\w:]+)/,T=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};X.optgroup=X.option,X.tbody=X.tfoot=X.colgroup=X.caption=X.thead,X.th=X.td,d.support.htmlSerialize||(X._default=[1,"div
","
"]),d.fn.extend({text:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(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 d.text(this)},wrapAll:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapAll(a.call(this,b))});if(this[0]){var b=d(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(d.isFunction(a))return this.each(function(b){d(this).wrapInner(a.call(this,b))});return this.each(function(){var b=d(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){d(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){d.nodeName(this,"body")||d(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=d(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,d(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,e;(e=this[c])!=null;c++)if(!a||d.filter(a,[e]).length)!b&&e.nodeType===1&&(d.cleanData(e.getElementsByTagName("*")),d.cleanData([e])),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&d.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 d.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(P,""):null;if(typeof a!=="string"||V.test(a)||!d.support.leadingWhitespace&&Q.test(a)||X[(S.exec(a)||["",""])[1].toLowerCase()])d.isFunction(a)?this.each(function(b){var c=d(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);else{a=a.replace(R,"<$1>");try{for(var c=0,e=this.length;c1&&l0?this.clone(!0):this).get();d(f[h])[b](j),e=e.concat(j)}return this.pushStack(e,a,f.selector)}}),d.extend({clone:function(a,b,c){var e=a.cloneNode(!0),f,g,h;if((!d.support.noCloneEvent||!d.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!d.isXMLDoc(a)){$(a,e),f=_(a),g=_(e);for(h=0;f[h];++h)$(f[h],g[h])}if(b){Z(a,e);if(c){f=_(a),g=_(e);for(h=0;f[h];++h)Z(f[h],g[h])}}return e},clean:function(a,b,e,f){b=b||c,typeof b.createElement==="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var g=[];for(var h=0,i;(i=a[h])!=null;h++){typeof i==="number"&&(i+="");if(!i)continue;if(typeof i!=="string"||U.test(i)){if(typeof i==="string"){i=i.replace(R,"<$1>");var j=(S.exec(i)||["",""])[1].toLowerCase(),k=X[j]||X._default,l=k[0],m=b.createElement("div");m.innerHTML=k[1]+i+k[2];while(l--)m=m.lastChild;if(!d.support.tbody){var n=T.test(i),o=j==="table"&&!n?m.firstChild&&m.firstChild.childNodes:k[1]===""&&!n?m.childNodes:[];for(var p=o.length-1;p>=0;--p)d.nodeName(o[p],"tbody")&&!o[p].childNodes.length&&o[p].parentNode.removeChild(o[p])}!d.support.leadingWhitespace&&Q.test(i)&&m.insertBefore(b.createTextNode(Q.exec(i)[0]),m.firstChild),i=m.childNodes}}else i=b.createTextNode(i);i.nodeType?g.push(i):g=d.merge(g,i)}if(e)for(h=0;g[h];h++)!f||!d.nodeName(g[h],"script")||g[h].type&&g[h].type.toLowerCase()!=="text/javascript"?(g[h].nodeType===1&&g.splice.apply(g,[h+1,0].concat(d.makeArray(g[h].getElementsByTagName("script")))),e.appendChild(g[h])):f.push(g[h].parentNode?g[h].parentNode.removeChild(g[h]):g[h]);return g},cleanData:function(a){var b,c,e=d.cache,f=d.expando,g=d.event.special,h=d.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&d.noData[j.nodeName.toLowerCase()])continue;c=j[d.expando];if(c){b=e[c]&&e[c][f];if(b&&b.events){for(var k in b.events)g[k]?d.event.remove(j,k):d.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[d.expando]:j.removeAttribute&&j.removeAttribute(d.expando),delete e[c]}}}});var bb=/alpha\([^)]*\)/i,bc=/opacity=([^)]*)/,bd=/-([a-z])/ig,be=/([A-Z])/g,bf=/^-?\d+(?:px)?$/i,bg=/^-?\d/,bh={position:"absolute",visibility:"hidden",display:"block"},bi=["Left","Right"],bj=["Top","Bottom"],bk,bl,bm,bn=function(a,b){return b.toUpperCase()};d.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return d.access(this,a,c,!0,function(a,c,e){return e!==b?d.style(a,c,e):d.css(a,c)})},d.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bk(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0},cssProps:{"float":d.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,e,f){if(a&&a.nodeType!==3&&a.nodeType!==8&&a.style){var g,h=d.camelCase(c),i=a.style,j=d.cssHooks[h];c=d.cssProps[h]||h;if(e===b){if(j&&"get"in j&&(g=j.get(a,!1,f))!==b)return g;return i[c]}if(typeof e==="number"&&isNaN(e)||e==null)return;typeof e==="number"&&!d.cssNumber[h]&&(e+="px");if(!j||!("set"in j)||(e=j.set(a,e))!==b)try{i[c]=e}catch(k){}}},css:function(a,c,e){var f,g=d.camelCase(c),h=d.cssHooks[g];c=d.cssProps[g]||g;if(h&&"get"in h&&(f=h.get(a,!0,e))!==b)return f;if(bk)return bk(a,c,g)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]},camelCase:function(a){return a.replace(bd,bn)}}),d.curCSS=d.css,d.each(["height","width"],function(a,b){d.cssHooks[b]={get:function(a,c,e){var f;if(c){a.offsetWidth!==0?f=bo(a,b,e):d.swap(a,bh,function(){f=bo(a,b,e)});if(f<=0){f=bk(a,b,b),f==="0px"&&bm&&(f=bm(a,b,b));if(f!=null)return f===""||f==="auto"?"0px":f}if(f<0||f==null){f=a.style[b];return f===""||f==="auto"?"0px":f}return typeof f==="string"?f:f+"px"}},set:function(a,b){if(!bf.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),d.support.opacity||(d.cssHooks.opacity={get:function(a,b){return bc.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style;c.zoom=1;var e=d.isNaN(b)?"":"alpha(opacity="+b*100+")",f=c.filter||"";c.filter=bb.test(f)?f.replace(bb,e):c.filter+" "+e}}),c.defaultView&&c.defaultView.getComputedStyle&&(bl=function(a,c,e){var f,g,h;e=e.replace(be,"-$1").toLowerCase();if(!(g=a.ownerDocument.defaultView))return b;if(h=g.getComputedStyle(a,null))f=h.getPropertyValue(e),f===""&&!d.contains(a.ownerDocument.documentElement,a)&&(f=d.style(a,e));return f}),c.documentElement.currentStyle&&(bm=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bf.test(d)&&bg.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}),bk=bl||bm,d.expr&&d.expr.filters&&(d.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!d.support.reliableHiddenOffsets&&(a.style.display||d.css(a,"display"))==="none"},d.expr.filters.visible=function(a){return!d.expr.filters.hidden(a)});var bp=/%20/g,bq=/\[\]$/,br=/\r?\n/g,bs=/#.*$/,bt=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bu=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bv=/(?:^file|^widget|\-extension):$/,bw=/^(?:GET|HEAD)$/,bx=/^\/\//,by=/\?/,bz=/)<[^<]*)*<\/script>/gi,bA=/^(?:select|textarea)/i,bB=/\s+/,bC=/([?&])_=[^&]*/,bD=/(^|\-)([a-z])/g,bE=function(a,b,c){return b+c.toUpperCase()},bF=/^([\w\+\.\-]+:)\/\/([^\/?#:]*)(?::(\d+))?/,bG=d.fn.load,bH={},bI={},bJ,bK;try{bJ=c.location.href}catch(bL){bJ=c.createElement("a"),bJ.href="",bJ=bJ.href}bK=bF.exec(bJ.toLowerCase()),d.fn.extend({load:function(a,c,e){if(typeof a!=="string"&&bG)return bG.apply(this,arguments);if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var g=a.slice(f,a.length);a=a.slice(0,f)}var h="GET";c&&(d.isFunction(c)?(e=c,c=b):typeof c==="object"&&(c=d.param(c,d.ajaxSettings.traditional),h="POST"));var i=this;d.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?d("
").append(c.replace(bz,"")).find(g):c)),e&&i.each(e,[c,b,a])}});return this},serialize:function(){return d.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?d.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bA.test(this.nodeName)||bu.test(this.type))}).map(function(a,b){var c=d(this).val();return c==null?null:d.isArray(c)?d.map(c,function(a,c){return{name:b.name,value:a.replace(br,"\r\n")}}):{name:b.name,value:c.replace(br,"\r\n")}}).get()}}),d.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){d.fn[b]=function(a){return this.bind(b,a)}}),d.each(["get","post"],function(a,c){d[c]=function(a,e,f,g){d.isFunction(e)&&(g=g||f,f=e,e=b);return d.ajax({type:c,url:a,data:e,success:f,dataType:g})}}),d.extend({getScript:function(a,c){return d.get(a,b,c,"script")},getJSON:function(a,b,c){return d.get(a,b,c,"json")},ajaxSetup:function(a,b){b?d.extend(!0,a,d.ajaxSettings,b):(b=a,a=d.extend(!0,d.ajaxSettings,b));for(var c in {context:1,url:1})c in b?a[c]=b[c]:c in d.ajaxSettings&&(a[c]=d.ajaxSettings[c]);return a},ajaxSettings:{url:bJ,isLocal:bv.test(bK[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":d.parseJSON,"text xml":d.parseXML}},ajaxPrefilter:bM(bH),ajaxTransport:bM(bI),ajax:function(a,c){function v(a,c,l,n){if(r!==2){r=2,p&&clearTimeout(p),o=b,m=n||"",u.readyState=a?4:0;var q,t,v,w=l?bP(e,u,l):b,x,y;if(a>=200&&a<300||a===304){if(e.ifModified){if(x=u.getResponseHeader("Last-Modified"))d.lastModified[k]=x;if(y=u.getResponseHeader("Etag"))d.etag[k]=y}if(a===304)c="notmodified",q=!0;else try{t=bQ(e,w),c="success",q=!0}catch(z){c="parsererror",v=z}}else{v=c;if(!c||a)c="error",a<0&&(a=0)}u.status=a,u.statusText=c,q?h.resolveWith(f,[t,c,u]):h.rejectWith(f,[u,c,v]),u.statusCode(j),j=b,s&&g.trigger("ajax"+(q?"Success":"Error"),[u,e,q?t:v]),i.resolveWith(f,[u,c]),s&&(g.trigger("ajaxComplete",[u,e]),--d.active||d.event.trigger("ajaxStop"))}}typeof a==="object"&&(c=a,a=b),c=c||{};var e=d.ajaxSetup({},c),f=e.context||e,g=f!==e&&(f.nodeType||f instanceof d)?d(f):d.event,h=d.Deferred(),i=d._Deferred(),j=e.statusCode||{},k,l={},m,n,o,p,q,r=0,s,t,u={readyState:0,setRequestHeader:function(a,b){r||(l[a.toLowerCase().replace(bD,bE)]=b);return this},getAllResponseHeaders:function(){return r===2?m:null},getResponseHeader:function(a){var c;if(r===2){if(!n){n={};while(c=bt.exec(m))n[c[1].toLowerCase()]=c[2]}c=n[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){r||(e.mimeType=a);return this},abort:function(a){a=a||"abort",o&&o.abort(a),v(0,a);return this}};h.promise(u),u.success=u.done,u.error=u.fail,u.complete=i.done,u.statusCode=function(a){if(a){var b;if(r<2)for(b in a)j[b]=[j[b],a[b]];else b=a[u.status],u.then(b,b)}return this},e.url=((a||e.url)+"").replace(bs,"").replace(bx,bK[1]+"//"),e.dataTypes=d.trim(e.dataType||"*").toLowerCase().split(bB),e.crossDomain||(q=bF.exec(e.url.toLowerCase()),e.crossDomain=q&&(q[1]!=bK[1]||q[2]!=bK[2]||(q[3]||(q[1]==="http:"?80:443))!=(bK[3]||(bK[1]==="http:"?80:443)))),e.data&&e.processData&&typeof e.data!=="string"&&(e.data=d.param(e.data,e.traditional)),bN(bH,e,c,u);if(r===2)return!1;s=e.global,e.type=e.type.toUpperCase(),e.hasContent=!bw.test(e.type),s&&d.active++===0&&d.event.trigger("ajaxStart");if(!e.hasContent){e.data&&(e.url+=(by.test(e.url)?"&":"?")+e.data),k=e.url;if(e.cache===!1){var w=d.now(),x=e.url.replace(bC,"$1_="+w);e.url=x+(x===e.url?(by.test(e.url)?"&":"?")+"_="+w:"")}}if(e.data&&e.hasContent&&e.contentType!==!1||c.contentType)l["Content-Type"]=e.contentType;e.ifModified&&(k=k||e.url,d.lastModified[k]&&(l["If-Modified-Since"]=d.lastModified[k]),d.etag[k]&&(l["If-None-Match"]=d.etag[k])),l.Accept=e.dataTypes[0]&&e.accepts[e.dataTypes[0]]?e.accepts[e.dataTypes[0]]+(e.dataTypes[0]!=="*"?", */*; q=0.01":""):e.accepts["*"];for(t in e.headers)u.setRequestHeader(t,e.headers[t]);if(e.beforeSend&&(e.beforeSend.call(f,u,e)===!1||r===2)){u.abort();return!1}for(t in {success:1,error:1,complete:1})u[t](e[t]);o=bN(bI,e,c,u);if(o){u.readyState=1,s&&g.trigger("ajaxSend",[u,e]),e.async&&e.timeout>0&&(p=setTimeout(function(){u.abort("timeout")},e.timeout));try{r=1,o.send(l,v)}catch(y){status<2?v(-1,y):d.error(y)}}else v(-1,"No Transport");return u},param:function(a,c){var e=[],f=function(a,b){b=d.isFunction(b)?b():b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=d.ajaxSettings.traditional);if(d.isArray(a)||a.jquery&&!d.isPlainObject(a))d.each(a,function(){f(this.name,this.value)});else for(var g in a)bO(g,a[g],c,f);return e.join("&").replace(bp,"+")}}),d.extend({active:0,lastModified:{},etag:{}});var bR=d.now(),bS=/(\=)\?(&|$)|()\?\?()/i;d.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return d.expando+"_"+bR++}}),d.ajaxPrefilter("json jsonp",function(b,c,e){var f=typeof b.data==="string";if(b.dataTypes[0]==="jsonp"||c.jsonpCallback||c.jsonp!=null||b.jsonp!==!1&&(bS.test(b.url)||f&&bS.test(b.data))){var g,h=b.jsonpCallback=d.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2",m=function(){a[h]=i,g&&d.isFunction(i)&&a[h](g[0])};b.jsonp!==!1&&(j=j.replace(bS,l),b.url===j&&(f&&(k=k.replace(bS,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},e.then(m,m),b.converters["script json"]=function(){g||d.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),d.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){d.globalEval(a);return a}}}),d.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),d.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(!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 bT=d.now(),bU,bV;d.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&bX()||bY()}:bX,bV=d.ajaxSettings.xhr(),d.support.ajax=!!bV,d.support.cors=bV&&"withCredentials"in bV,bV=b,d.support.ajax&&d.ajaxTransport(function(a){if(!a.crossDomain||d.support.cors){var c;return{send:function(e,f){var g=a.xhr(),h,i;a.username?g.open(a.type,a.url,a.async,a.username,a.password):g.open(a.type,a.url,a.async);if(a.xhrFields)for(i in a.xhrFields)g[i]=a.xhrFields[i];a.mimeType&&g.overrideMimeType&&g.overrideMimeType(a.mimeType),(!a.crossDomain||a.hasContent)&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(i in e)g.setRequestHeader(i,e[i])}catch(j){}g.send(a.hasContent&&a.data||null),c=function(e,i){var j,k,l,m,n;try{if(c&&(i||g.readyState===4)){c=b,h&&(g.onreadystatechange=d.noop,delete bU[h]);if(i)g.readyState!==4&&g.abort();else{j=g.status,l=g.getAllResponseHeaders(),m={},n=g.responseXML,n&&n.documentElement&&(m.xml=n),m.text=g.responseText;try{k=g.statusText}catch(o){k=""}j||!a.isLocal||a.crossDomain?j===1223&&(j=204):j=m.text?200:404}}}catch(p){i||f(-1,p)}m&&f(j,k,m,l)},a.async&&g.readyState!==4?(bU||(bU={},bW()),h=bT++,g.onreadystatechange=bU[h]=c):c()},abort:function(){c&&c(0,1)}}}});var bZ={},b$=/^(?:toggle|show|hide)$/,b_=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,ca,cb=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];d.fn.extend({show:function(a,b,c){var e,f;if(a||a===0)return this.animate(cc("show",3),a,b,c);for(var g=0,h=this.length;g=0;a--)c[a].elem===this&&(b&&c[a](!0),c.splice(a,1))}),b||this.dequeue();return this}}),d.each({slideDown:cc("show",1),slideUp:cc("hide",1),slideToggle:cc("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){d.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),d.extend({speed:function(a,b,c){var e=a&&typeof a==="object"?d.extend({},a):{complete:c||!c&&b||d.isFunction(a)&&a,duration:a,easing:c&&b||b&&!d.isFunction(b)&&b};e.duration=d.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in d.fx.speeds?d.fx.speeds[e.duration]:d.fx.speeds._default,e.old=e.complete,e.complete=function(){e.queue!==!1&&d(this).dequeue(),d.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig||(b.orig={})}}),d.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(d.fx.step[this.prop]||d.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=d.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,c){function g(a){return e.step(a)}var e=this,f=d.fx;this.startTime=d.now(),this.start=a,this.end=b,this.unit=c||this.unit||(d.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,g.elem=this.elem,g()&&d.timers.push(g)&&!ca&&(ca=setInterval(f.tick,f.interval))},show:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),d(this.elem).show()},hide:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=d.now(),c=!0;if(a||b>=this.options.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),this.options.curAnim[this.prop]=!0;for(var e in this.options.curAnim)this.options.curAnim[e]!==!0&&(c=!1);if(c){if(this.options.overflow!=null&&!d.support.shrinkWrapBlocks){var f=this.elem,g=this.options;d.each(["","X","Y"],function(a,b){f.style["overflow"+b]=g.overflow[a]})}this.options.hide&&d(this.elem).hide();if(this.options.hide||this.options.show)for(var h in this.options.curAnim)d.style(this.elem,h,this.options.orig[h]);this.options.complete.call(this.elem)}return!1}var i=b-this.startTime;this.state=i/this.options.duration;var j=this.options.specialEasing&&this.options.specialEasing[this.prop],k=this.options.easing||(d.easing.swing?"swing":"linear");this.pos=d.easing[j||k](this.state,i,0,1,this.options.duration),this.now=this.start+(this.end-this.start)*this.pos,this.update();return!0}},d.extend(d.fx,{tick:function(){var a=d.timers;for(var b=0;b
";d.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),e=b.firstChild,f=e.firstChild,h=e.nextSibling.firstChild.firstChild,this.doesNotAddBorder=f.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,f.style.position="fixed",f.style.top="20px",this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15,f.style.position=f.style.top="",e.style.overflow="hidden",e.style.position="relative",this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),a=b=e=f=g=h=null,d.offset.initialize=d.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;d.offset.initialize(),d.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(d.css(a,"marginTop"))||0,c+=parseFloat(d.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var e=d.css(a,"position");e==="static"&&(a.style.position="relative");var f=d(a),g=f.offset(),h=d.css(a,"top"),i=d.css(a,"left"),j=e==="absolute"&&d.inArray("auto",[h,i])>-1,k={},l={},m,n;j&&(l=f.position()),m=j?l.top:parseInt(h,10)||0,n=j?l.left:parseInt(i,10)||0,d.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):f.css(k)}},d.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),e=cf.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(d.css(a,"marginTop"))||0,c.left-=parseFloat(d.css(a,"marginLeft"))||0,e.top+=parseFloat(d.css(b[0],"borderTopWidth"))||0,e.left+=parseFloat(d.css(b[0],"borderLeftWidth"))||0;return{top:c.top-e.top,left:c.left-e.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&(!cf.test(a.nodeName)&&d.css(a,"position")==="static"))a=a.offsetParent;return a})}}),d.each(["Left","Top"],function(a,c){var e="scroll"+c;d.fn[e]=function(c){var f=this[0],g;if(!f)return null;if(c!==b)return this.each(function(){g=cg(this),g?g.scrollTo(a?d(g).scrollLeft():c,a?c:d(g).scrollTop()):this[e]=c});g=cg(f);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:d.support.boxModel&&g.document.documentElement[e]||g.document.body[e]:f[e]}}),d.each(["Height","Width"],function(a,c){var e=c.toLowerCase();d.fn["inner"+c]=function(){return this[0]?parseFloat(d.css(this[0],e,"padding")):null},d.fn["outer"+c]=function(a){return this[0]?parseFloat(d.css(this[0],e,a?"margin":"border")):null},d.fn[e]=function(a){var f=this[0];if(!f)return a==null?null:this;if(d.isFunction(a))return this.each(function(b){var c=d(this);c[e](a.call(this,b,c[e]()))});if(d.isWindow(f)){var g=f.document.documentElement["client"+c];return f.document.compatMode==="CSS1Compat"&&g||f.document.body["client"+c]||g}if(f.nodeType===9)return Math.max(f.documentElement["client"+c],f.body["scroll"+c],f.documentElement["scroll"+c],f.body["offset"+c],f.documentElement["offset"+c]);if(a===b){var h=d.css(f,e),i=parseFloat(h);return d.isNaN(i)?h:i}return this.css(e,typeof a==="string"?a:a+"px")}}),a.jQuery=a.$=d})(window); -------------------------------------------------------------------------------- /WebPages/example.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 54 | 55 | 56 | 57 |
ws://localhost:60001 58 | 59 |
60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 |
/foo/range
/foo/text
/foo/check
75 | 76 | 77 | -------------------------------------------------------------------------------- /quartzcomposer-websocket.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | EB39691F1369F22F0006E49B /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EB39691E1369F22F0006E49B /* Cocoa.framework */; }; 11 | EB3969211369F22F0006E49B /* Quartz.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EB3969201369F22F0006E49B /* Quartz.framework */; }; 12 | EB39692D1369F22F0006E49B /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = EB39692B1369F22F0006E49B /* InfoPlist.strings */; }; 13 | EB3969311369F22F0006E49B /* WebSocketPlugIn.m in Sources */ = {isa = PBXBuildFile; fileRef = EB3969301369F22F0006E49B /* WebSocketPlugIn.m */; }; 14 | EB39693C1369F8660006E49B /* WebSocketSettings.xib in Resources */ = {isa = PBXBuildFile; fileRef = EB39693B1369F8660006E49B /* WebSocketSettings.xib */; }; 15 | EB3969531369FE370006E49B /* CoreJSON.c in Sources */ = {isa = PBXBuildFile; fileRef = EB3969521369FE370006E49B /* CoreJSON.c */; }; 16 | EB3969631369FE730006E49B /* yajl.c in Sources */ = {isa = PBXBuildFile; fileRef = EB3969551369FE730006E49B /* yajl.c */; }; 17 | EB3969641369FE730006E49B /* yajl_version.c in Sources */ = {isa = PBXBuildFile; fileRef = EB3969561369FE730006E49B /* yajl_version.c */; }; 18 | EB3969651369FE730006E49B /* yajl_parser.c in Sources */ = {isa = PBXBuildFile; fileRef = EB3969581369FE730006E49B /* yajl_parser.c */; }; 19 | EB3969661369FE730006E49B /* yajl_lex.c in Sources */ = {isa = PBXBuildFile; fileRef = EB39695A1369FE730006E49B /* yajl_lex.c */; }; 20 | EB3969671369FE730006E49B /* yajl_gen.c in Sources */ = {isa = PBXBuildFile; fileRef = EB39695B1369FE730006E49B /* yajl_gen.c */; }; 21 | EB3969681369FE730006E49B /* yajl_encode.c in Sources */ = {isa = PBXBuildFile; fileRef = EB39695D1369FE730006E49B /* yajl_encode.c */; }; 22 | EB3969691369FE730006E49B /* yajl_buf.c in Sources */ = {isa = PBXBuildFile; fileRef = EB3969601369FE730006E49B /* yajl_buf.c */; }; 23 | EB39696A1369FE730006E49B /* yajl_alloc.c in Sources */ = {isa = PBXBuildFile; fileRef = EB3969621369FE730006E49B /* yajl_alloc.c */; }; 24 | EB396976136A03EB0006E49B /* libcrypto.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = EB396975136A03EB0006E49B /* libcrypto.dylib */; }; 25 | EB39697C136C571F0006E49B /* WebSocketSettings.m in Sources */ = {isa = PBXBuildFile; fileRef = EB39697B136C571F0006E49B /* WebSocketSettings.m */; }; 26 | EB59CC231376F6EB00C02960 /* cuEnc64.c in Sources */ = {isa = PBXBuildFile; fileRef = EB59CC1C1376F6EB00C02960 /* cuEnc64.c */; }; 27 | EB59CC241376F6EB00C02960 /* WebSocket.c in Sources */ = {isa = PBXBuildFile; fileRef = EB59CC1E1376F6EB00C02960 /* WebSocket.c */; }; 28 | EB59CC251376F6EB00C02960 /* WebSocketClient.c in Sources */ = {isa = PBXBuildFile; fileRef = EB59CC201376F6EB00C02960 /* WebSocketClient.c */; }; 29 | EB59CC6E1377E43900C02960 /* yajl_tree.c in Sources */ = {isa = PBXBuildFile; fileRef = EB59CC6D1377E43900C02960 /* yajl_tree.c */; }; 30 | EB93B6EA16C578D40004C53A /* WebSocketFrame.c in Sources */ = {isa = PBXBuildFile; fileRef = EB93B6E816C578D40004C53A /* WebSocketFrame.c */; }; 31 | /* End PBXBuildFile section */ 32 | 33 | /* Begin PBXFileReference section */ 34 | EB39691B1369F22F0006E49B /* WebSocket.plugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WebSocket.plugin; sourceTree = BUILT_PRODUCTS_DIR; }; 35 | EB39691E1369F22F0006E49B /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 36 | EB3969201369F22F0006E49B /* Quartz.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Quartz.framework; path = System/Library/Frameworks/Quartz.framework; sourceTree = SDKROOT; }; 37 | EB3969231369F22F0006E49B /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; 38 | EB3969251369F22F0006E49B /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 39 | EB39692A1369F22F0006E49B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 40 | EB39692C1369F22F0006E49B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 41 | EB39692E1369F22F0006E49B /* Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Prefix.pch; sourceTree = ""; }; 42 | EB39692F1369F22F0006E49B /* WebSocketPlugIn.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebSocketPlugIn.h; sourceTree = ""; }; 43 | EB3969301369F22F0006E49B /* WebSocketPlugIn.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WebSocketPlugIn.m; sourceTree = ""; }; 44 | EB39693B1369F8660006E49B /* WebSocketSettings.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = WebSocketSettings.xib; sourceTree = ""; }; 45 | EB3969511369FE370006E49B /* CoreJSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CoreJSON.h; path = CoreJSON/CoreJSON/CoreJSON.h; sourceTree = ""; }; 46 | EB3969521369FE370006E49B /* CoreJSON.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = CoreJSON.c; path = CoreJSON/CoreJSON/CoreJSON.c; sourceTree = ""; }; 47 | EB3969551369FE730006E49B /* yajl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = yajl.c; path = CoreJSON/YAJL/yajl/src/yajl.c; sourceTree = ""; }; 48 | EB3969561369FE730006E49B /* yajl_version.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = yajl_version.c; path = CoreJSON/YAJL/yajl/src/yajl_version.c; sourceTree = ""; }; 49 | EB3969571369FE730006E49B /* yajl_parser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = yajl_parser.h; path = CoreJSON/YAJL/yajl/src/yajl_parser.h; sourceTree = ""; }; 50 | EB3969581369FE730006E49B /* yajl_parser.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = yajl_parser.c; path = CoreJSON/YAJL/yajl/src/yajl_parser.c; sourceTree = ""; }; 51 | EB3969591369FE730006E49B /* yajl_lex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = yajl_lex.h; path = CoreJSON/YAJL/yajl/src/yajl_lex.h; sourceTree = ""; }; 52 | EB39695A1369FE730006E49B /* yajl_lex.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = yajl_lex.c; path = CoreJSON/YAJL/yajl/src/yajl_lex.c; sourceTree = ""; }; 53 | EB39695B1369FE730006E49B /* yajl_gen.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = yajl_gen.c; path = CoreJSON/YAJL/yajl/src/yajl_gen.c; sourceTree = ""; }; 54 | EB39695C1369FE730006E49B /* yajl_encode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = yajl_encode.h; path = CoreJSON/YAJL/yajl/src/yajl_encode.h; sourceTree = ""; }; 55 | EB39695D1369FE730006E49B /* yajl_encode.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = yajl_encode.c; path = CoreJSON/YAJL/yajl/src/yajl_encode.c; sourceTree = ""; }; 56 | EB39695E1369FE730006E49B /* yajl_bytestack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = yajl_bytestack.h; path = CoreJSON/YAJL/yajl/src/yajl_bytestack.h; sourceTree = ""; }; 57 | EB39695F1369FE730006E49B /* yajl_buf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = yajl_buf.h; path = CoreJSON/YAJL/yajl/src/yajl_buf.h; sourceTree = ""; }; 58 | EB3969601369FE730006E49B /* yajl_buf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = yajl_buf.c; path = CoreJSON/YAJL/yajl/src/yajl_buf.c; sourceTree = ""; }; 59 | EB3969611369FE730006E49B /* yajl_alloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = yajl_alloc.h; path = CoreJSON/YAJL/yajl/src/yajl_alloc.h; sourceTree = ""; }; 60 | EB3969621369FE730006E49B /* yajl_alloc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = yajl_alloc.c; path = CoreJSON/YAJL/yajl/src/yajl_alloc.c; sourceTree = ""; }; 61 | EB396975136A03EB0006E49B /* libcrypto.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcrypto.dylib; path = usr/lib/libcrypto.dylib; sourceTree = SDKROOT; }; 62 | EB39697A136C571F0006E49B /* WebSocketSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebSocketSettings.h; sourceTree = ""; }; 63 | EB39697B136C571F0006E49B /* WebSocketSettings.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WebSocketSettings.m; sourceTree = ""; }; 64 | EB59CC1B1376F6EB00C02960 /* CoreWebSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CoreWebSocket.h; path = CoreWebSocket/CoreWebSocket/CoreWebSocket.h; sourceTree = ""; }; 65 | EB59CC1C1376F6EB00C02960 /* cuEnc64.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cuEnc64.c; path = CoreWebSocket/CoreWebSocket/cuEnc64.c; sourceTree = ""; }; 66 | EB59CC1D1376F6EB00C02960 /* cuEnc64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cuEnc64.h; path = CoreWebSocket/CoreWebSocket/cuEnc64.h; sourceTree = ""; }; 67 | EB59CC1E1376F6EB00C02960 /* WebSocket.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = WebSocket.c; path = CoreWebSocket/CoreWebSocket/WebSocket.c; sourceTree = ""; }; 68 | EB59CC1F1376F6EB00C02960 /* WebSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebSocket.h; path = CoreWebSocket/CoreWebSocket/WebSocket.h; sourceTree = ""; }; 69 | EB59CC201376F6EB00C02960 /* WebSocketClient.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = WebSocketClient.c; path = CoreWebSocket/CoreWebSocket/WebSocketClient.c; sourceTree = ""; }; 70 | EB59CC211376F6EB00C02960 /* WebSocketClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebSocketClient.h; path = CoreWebSocket/CoreWebSocket/WebSocketClient.h; sourceTree = ""; }; 71 | EB59CC221376F6EB00C02960 /* WebSocketTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebSocketTypes.h; path = CoreWebSocket/CoreWebSocket/WebSocketTypes.h; sourceTree = ""; }; 72 | EB59CC6D1377E43900C02960 /* yajl_tree.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = yajl_tree.c; path = CoreJSON/YAJL/yajl/src/yajl_tree.c; sourceTree = ""; }; 73 | EB93B6E816C578D40004C53A /* WebSocketFrame.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = WebSocketFrame.c; path = CoreWebSocket/CoreWebSocket/WebSocketFrame.c; sourceTree = ""; }; 74 | EB93B6E916C578D40004C53A /* WebSocketFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebSocketFrame.h; path = CoreWebSocket/CoreWebSocket/WebSocketFrame.h; sourceTree = ""; }; 75 | /* End PBXFileReference section */ 76 | 77 | /* Begin PBXFrameworksBuildPhase section */ 78 | EB3969171369F22F0006E49B /* Frameworks */ = { 79 | isa = PBXFrameworksBuildPhase; 80 | buildActionMask = 2147483647; 81 | files = ( 82 | EB396976136A03EB0006E49B /* libcrypto.dylib in Frameworks */, 83 | EB39691F1369F22F0006E49B /* Cocoa.framework in Frameworks */, 84 | EB3969211369F22F0006E49B /* Quartz.framework in Frameworks */, 85 | ); 86 | runOnlyForDeploymentPostprocessing = 0; 87 | }; 88 | /* End PBXFrameworksBuildPhase section */ 89 | 90 | /* Begin PBXGroup section */ 91 | EB39690F1369F22F0006E49B = { 92 | isa = PBXGroup; 93 | children = ( 94 | EB3969381369F7620006E49B /* CoreWebSocket */, 95 | EB3969371369F75C0006E49B /* CoreJSON */, 96 | EB3969281369F22F0006E49B /* WebSocket */, 97 | EB39691D1369F22F0006E49B /* Frameworks */, 98 | EB39691C1369F22F0006E49B /* Products */, 99 | ); 100 | sourceTree = ""; 101 | }; 102 | EB39691C1369F22F0006E49B /* Products */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | EB39691B1369F22F0006E49B /* WebSocket.plugin */, 106 | ); 107 | name = Products; 108 | sourceTree = ""; 109 | }; 110 | EB39691D1369F22F0006E49B /* Frameworks */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | EB396975136A03EB0006E49B /* libcrypto.dylib */, 114 | EB3969231369F22F0006E49B /* AppKit.framework */, 115 | EB3969251369F22F0006E49B /* Foundation.framework */, 116 | EB39691E1369F22F0006E49B /* Cocoa.framework */, 117 | EB3969201369F22F0006E49B /* Quartz.framework */, 118 | ); 119 | name = Frameworks; 120 | sourceTree = ""; 121 | }; 122 | EB3969281369F22F0006E49B /* WebSocket */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | EB39692F1369F22F0006E49B /* WebSocketPlugIn.h */, 126 | EB3969301369F22F0006E49B /* WebSocketPlugIn.m */, 127 | EB39697A136C571F0006E49B /* WebSocketSettings.h */, 128 | EB39697B136C571F0006E49B /* WebSocketSettings.m */, 129 | EB39693B1369F8660006E49B /* WebSocketSettings.xib */, 130 | EB3969291369F22F0006E49B /* Supporting Files */, 131 | ); 132 | name = WebSocket; 133 | path = "quartzcomposer-websocket"; 134 | sourceTree = ""; 135 | }; 136 | EB3969291369F22F0006E49B /* Supporting Files */ = { 137 | isa = PBXGroup; 138 | children = ( 139 | EB39692A1369F22F0006E49B /* Info.plist */, 140 | EB39692B1369F22F0006E49B /* InfoPlist.strings */, 141 | EB39692E1369F22F0006E49B /* Prefix.pch */, 142 | ); 143 | name = "Supporting Files"; 144 | sourceTree = ""; 145 | }; 146 | EB3969371369F75C0006E49B /* CoreJSON */ = { 147 | isa = PBXGroup; 148 | children = ( 149 | EB3969541369FE3B0006E49B /* YAJL */, 150 | EB3969511369FE370006E49B /* CoreJSON.h */, 151 | EB3969521369FE370006E49B /* CoreJSON.c */, 152 | ); 153 | name = CoreJSON; 154 | sourceTree = ""; 155 | }; 156 | EB3969381369F7620006E49B /* CoreWebSocket */ = { 157 | isa = PBXGroup; 158 | children = ( 159 | EB59CC1B1376F6EB00C02960 /* CoreWebSocket.h */, 160 | EB59CC221376F6EB00C02960 /* WebSocketTypes.h */, 161 | EB59CC1F1376F6EB00C02960 /* WebSocket.h */, 162 | EB59CC1E1376F6EB00C02960 /* WebSocket.c */, 163 | EB59CC211376F6EB00C02960 /* WebSocketClient.h */, 164 | EB59CC201376F6EB00C02960 /* WebSocketClient.c */, 165 | EB59CC1D1376F6EB00C02960 /* cuEnc64.h */, 166 | EB59CC1C1376F6EB00C02960 /* cuEnc64.c */, 167 | EB93B6E816C578D40004C53A /* WebSocketFrame.c */, 168 | EB93B6E916C578D40004C53A /* WebSocketFrame.h */, 169 | ); 170 | name = CoreWebSocket; 171 | sourceTree = ""; 172 | }; 173 | EB3969541369FE3B0006E49B /* YAJL */ = { 174 | isa = PBXGroup; 175 | children = ( 176 | EB3969551369FE730006E49B /* yajl.c */, 177 | EB3969561369FE730006E49B /* yajl_version.c */, 178 | EB3969571369FE730006E49B /* yajl_parser.h */, 179 | EB3969581369FE730006E49B /* yajl_parser.c */, 180 | EB3969591369FE730006E49B /* yajl_lex.h */, 181 | EB39695A1369FE730006E49B /* yajl_lex.c */, 182 | EB39695B1369FE730006E49B /* yajl_gen.c */, 183 | EB39695C1369FE730006E49B /* yajl_encode.h */, 184 | EB39695D1369FE730006E49B /* yajl_encode.c */, 185 | EB39695E1369FE730006E49B /* yajl_bytestack.h */, 186 | EB39695F1369FE730006E49B /* yajl_buf.h */, 187 | EB3969601369FE730006E49B /* yajl_buf.c */, 188 | EB3969611369FE730006E49B /* yajl_alloc.h */, 189 | EB3969621369FE730006E49B /* yajl_alloc.c */, 190 | EB59CC6D1377E43900C02960 /* yajl_tree.c */, 191 | ); 192 | name = YAJL; 193 | sourceTree = ""; 194 | }; 195 | /* End PBXGroup section */ 196 | 197 | /* Begin PBXNativeTarget section */ 198 | EB39691A1369F22F0006E49B /* WebSocket */ = { 199 | isa = PBXNativeTarget; 200 | buildConfigurationList = EB3969341369F22F0006E49B /* Build configuration list for PBXNativeTarget "WebSocket" */; 201 | buildPhases = ( 202 | EB3969161369F22F0006E49B /* Sources */, 203 | EB3969171369F22F0006E49B /* Frameworks */, 204 | EB3969181369F22F0006E49B /* Resources */, 205 | EB3969191369F22F0006E49B /* ShellScript */, 206 | ); 207 | buildRules = ( 208 | ); 209 | dependencies = ( 210 | ); 211 | name = WebSocket; 212 | productName = "quartzcomposer-websocket"; 213 | productReference = EB39691B1369F22F0006E49B /* WebSocket.plugin */; 214 | productType = "com.apple.product-type.bundle"; 215 | }; 216 | /* End PBXNativeTarget section */ 217 | 218 | /* Begin PBXProject section */ 219 | EB3969111369F22F0006E49B /* Project object */ = { 220 | isa = PBXProject; 221 | attributes = { 222 | LastUpgradeCheck = 0460; 223 | ORGANIZATIONNAME = "Inteliv Ltd"; 224 | }; 225 | buildConfigurationList = EB3969141369F22F0006E49B /* Build configuration list for PBXProject "quartzcomposer-websocket" */; 226 | compatibilityVersion = "Xcode 3.2"; 227 | developmentRegion = English; 228 | hasScannedForEncodings = 0; 229 | knownRegions = ( 230 | en, 231 | ); 232 | mainGroup = EB39690F1369F22F0006E49B; 233 | productRefGroup = EB39691C1369F22F0006E49B /* Products */; 234 | projectDirPath = ""; 235 | projectRoot = ""; 236 | targets = ( 237 | EB39691A1369F22F0006E49B /* WebSocket */, 238 | ); 239 | }; 240 | /* End PBXProject section */ 241 | 242 | /* Begin PBXResourcesBuildPhase section */ 243 | EB3969181369F22F0006E49B /* Resources */ = { 244 | isa = PBXResourcesBuildPhase; 245 | buildActionMask = 2147483647; 246 | files = ( 247 | EB39692D1369F22F0006E49B /* InfoPlist.strings in Resources */, 248 | EB39693C1369F8660006E49B /* WebSocketSettings.xib in Resources */, 249 | ); 250 | runOnlyForDeploymentPostprocessing = 0; 251 | }; 252 | /* End PBXResourcesBuildPhase section */ 253 | 254 | /* Begin PBXShellScriptBuildPhase section */ 255 | EB3969191369F22F0006E49B /* ShellScript */ = { 256 | isa = PBXShellScriptBuildPhase; 257 | buildActionMask = 2147483647; 258 | files = ( 259 | ); 260 | inputPaths = ( 261 | ); 262 | outputPaths = ( 263 | ); 264 | runOnlyForDeploymentPostprocessing = 0; 265 | shellPath = /bin/sh; 266 | shellScript = "# This shell script simply copies the built plug-in to \"~/Library/Graphics/Quartz Composer Plug-Ins\" and overrides any previous version at that location\n\nmkdir -p \"$USER_LIBRARY_DIR/Graphics/Quartz Composer Plug-Ins\"\nrm -rf \"$USER_LIBRARY_DIR/Graphics/Quartz Composer Plug-Ins/WebSocket.plugin\"\ncp -rf \"$BUILT_PRODUCTS_DIR/WebSocket.plugin\" \"$USER_LIBRARY_DIR/Graphics/Quartz Composer Plug-Ins/\"\n"; 267 | }; 268 | /* End PBXShellScriptBuildPhase section */ 269 | 270 | /* Begin PBXSourcesBuildPhase section */ 271 | EB3969161369F22F0006E49B /* Sources */ = { 272 | isa = PBXSourcesBuildPhase; 273 | buildActionMask = 2147483647; 274 | files = ( 275 | EB3969311369F22F0006E49B /* WebSocketPlugIn.m in Sources */, 276 | EB3969531369FE370006E49B /* CoreJSON.c in Sources */, 277 | EB3969631369FE730006E49B /* yajl.c in Sources */, 278 | EB3969641369FE730006E49B /* yajl_version.c in Sources */, 279 | EB3969651369FE730006E49B /* yajl_parser.c in Sources */, 280 | EB3969661369FE730006E49B /* yajl_lex.c in Sources */, 281 | EB3969671369FE730006E49B /* yajl_gen.c in Sources */, 282 | EB3969681369FE730006E49B /* yajl_encode.c in Sources */, 283 | EB3969691369FE730006E49B /* yajl_buf.c in Sources */, 284 | EB39696A1369FE730006E49B /* yajl_alloc.c in Sources */, 285 | EB39697C136C571F0006E49B /* WebSocketSettings.m in Sources */, 286 | EB59CC231376F6EB00C02960 /* cuEnc64.c in Sources */, 287 | EB59CC241376F6EB00C02960 /* WebSocket.c in Sources */, 288 | EB59CC251376F6EB00C02960 /* WebSocketClient.c in Sources */, 289 | EB59CC6E1377E43900C02960 /* yajl_tree.c in Sources */, 290 | EB93B6EA16C578D40004C53A /* WebSocketFrame.c in Sources */, 291 | ); 292 | runOnlyForDeploymentPostprocessing = 0; 293 | }; 294 | /* End PBXSourcesBuildPhase section */ 295 | 296 | /* Begin PBXVariantGroup section */ 297 | EB39692B1369F22F0006E49B /* InfoPlist.strings */ = { 298 | isa = PBXVariantGroup; 299 | children = ( 300 | EB39692C1369F22F0006E49B /* en */, 301 | ); 302 | name = InfoPlist.strings; 303 | sourceTree = ""; 304 | }; 305 | /* End PBXVariantGroup section */ 306 | 307 | /* Begin XCBuildConfiguration section */ 308 | EB3969321369F22F0006E49B /* Debug */ = { 309 | isa = XCBuildConfiguration; 310 | buildSettings = { 311 | ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; 312 | CLANG_WARN_CONSTANT_CONVERSION = YES; 313 | CLANG_WARN_ENUM_CONVERSION = YES; 314 | CLANG_WARN_INT_CONVERSION = YES; 315 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 316 | GCC_C_LANGUAGE_STANDARD = gnu99; 317 | GCC_OPTIMIZATION_LEVEL = 0; 318 | GCC_PREPROCESSOR_DEFINITIONS = DEBUG; 319 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 320 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 321 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 322 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 323 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 324 | GCC_WARN_UNUSED_VARIABLE = YES; 325 | MACOSX_DEPLOYMENT_TARGET = 10.6; 326 | ONLY_ACTIVE_ARCH = NO; 327 | SDKROOT = macosx; 328 | USER_HEADER_SEARCH_PATHS = "\"$(SRCROOT)/CoreWebSocket\""; 329 | }; 330 | name = Debug; 331 | }; 332 | EB3969331369F22F0006E49B /* Release */ = { 333 | isa = XCBuildConfiguration; 334 | buildSettings = { 335 | ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; 336 | CLANG_WARN_CONSTANT_CONVERSION = YES; 337 | CLANG_WARN_ENUM_CONVERSION = YES; 338 | CLANG_WARN_INT_CONVERSION = YES; 339 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 340 | GCC_C_LANGUAGE_STANDARD = gnu99; 341 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 342 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 343 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 344 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 345 | GCC_WARN_UNUSED_VARIABLE = YES; 346 | MACOSX_DEPLOYMENT_TARGET = 10.6; 347 | SDKROOT = macosx; 348 | USER_HEADER_SEARCH_PATHS = "\"$(SRCROOT)/CoreWebSocket\""; 349 | }; 350 | name = Release; 351 | }; 352 | EB3969351369F22F0006E49B /* Debug */ = { 353 | isa = XCBuildConfiguration; 354 | buildSettings = { 355 | ALWAYS_SEARCH_USER_PATHS = NO; 356 | COMBINE_HIDPI_IMAGES = YES; 357 | COPY_PHASE_STRIP = NO; 358 | GCC_DYNAMIC_NO_PIC = NO; 359 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 360 | GCC_ENABLE_OBJC_GC = supported; 361 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 362 | GCC_PREFIX_HEADER = "quartzcomposer-websocket/Prefix.pch"; 363 | HEADER_SEARCH_PATHS = "\"$(SRCROOT)/CoreJSON/YAJL/include\""; 364 | INFOPLIST_FILE = "quartzcomposer-websocket/Info.plist"; 365 | INSTALL_PATH = "$(HOME)/Library/Graphics/Quartz Composer Plug-Ins"; 366 | PRODUCT_NAME = "$(TARGET_NAME)"; 367 | SDKROOT = ""; 368 | WRAPPER_EXTENSION = plugin; 369 | }; 370 | name = Debug; 371 | }; 372 | EB3969361369F22F0006E49B /* Release */ = { 373 | isa = XCBuildConfiguration; 374 | buildSettings = { 375 | ALWAYS_SEARCH_USER_PATHS = NO; 376 | COMBINE_HIDPI_IMAGES = YES; 377 | COPY_PHASE_STRIP = YES; 378 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 379 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 380 | GCC_ENABLE_OBJC_GC = supported; 381 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 382 | GCC_PREFIX_HEADER = "quartzcomposer-websocket/Prefix.pch"; 383 | HEADER_SEARCH_PATHS = "\"$(SRCROOT)/CoreJSON/YAJL/include\""; 384 | INFOPLIST_FILE = "quartzcomposer-websocket/Info.plist"; 385 | INSTALL_PATH = "$(HOME)/Library/Graphics/Quartz Composer Plug-Ins"; 386 | PRODUCT_NAME = "$(TARGET_NAME)"; 387 | SDKROOT = ""; 388 | WRAPPER_EXTENSION = plugin; 389 | }; 390 | name = Release; 391 | }; 392 | /* End XCBuildConfiguration section */ 393 | 394 | /* Begin XCConfigurationList section */ 395 | EB3969141369F22F0006E49B /* Build configuration list for PBXProject "quartzcomposer-websocket" */ = { 396 | isa = XCConfigurationList; 397 | buildConfigurations = ( 398 | EB3969321369F22F0006E49B /* Debug */, 399 | EB3969331369F22F0006E49B /* Release */, 400 | ); 401 | defaultConfigurationIsVisible = 0; 402 | defaultConfigurationName = Release; 403 | }; 404 | EB3969341369F22F0006E49B /* Build configuration list for PBXNativeTarget "WebSocket" */ = { 405 | isa = XCConfigurationList; 406 | buildConfigurations = ( 407 | EB3969351369F22F0006E49B /* Debug */, 408 | EB3969361369F22F0006E49B /* Release */, 409 | ); 410 | defaultConfigurationIsVisible = 0; 411 | defaultConfigurationName = Release; 412 | }; 413 | /* End XCConfigurationList section */ 414 | }; 415 | rootObject = EB3969111369F22F0006E49B /* Project object */; 416 | } 417 | -------------------------------------------------------------------------------- /quartzcomposer-websocket.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /quartzcomposer-websocket/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.github.mirek.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.1 19 | CFBundleVersion 20 | 1.0 21 | NSHumanReadableCopyright 22 | Copyright © 2011 Mirek Rusin <mirek [at] me [dot] com> 23 | QCPlugInClasses 24 | 25 | WebSocketPlugIn 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /quartzcomposer-websocket/Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'quartzcomposer-websocket' target in the 'quartzcomposer-websocket' project 3 | // 4 | 5 | -------------------------------------------------------------------------------- /quartzcomposer-websocket/WebSocketPlugIn.h: -------------------------------------------------------------------------------- 1 | // 2 | // WebSocketPlugIn.h 3 | // http://github.com/mirek/quartzcomposer-websocket 4 | // 5 | // Created by Mirek Rusin on 28/04/2011. 6 | // Copyright 2011 Inteliv Ltd. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "CoreJSON.h" 11 | #import "WebSocket.h" 12 | #import "WebSocketSettings.h" 13 | 14 | @interface WebSocketPlugIn : QCPlugIn { 15 | CFAllocatorRef allocator; 16 | WebSocketRef webSocket; 17 | 18 | NSMutableDictionary *inputPorts; 19 | NSMutableDictionary *outputPorts; 20 | 21 | CFMutableDictionaryRef outputValues; 22 | } 23 | 24 | @property (nonatomic, retain) NSMutableDictionary *inputPorts; 25 | @property (nonatomic, retain) NSMutableDictionary *outputPorts; 26 | 27 | - (QCPlugInViewController *) createViewController NS_RETURNS_RETAINED; 28 | 29 | // Not like setValue..., updateValue can be set from outside execute. 30 | // Duplicate values will be added to the queue or replaced, depending on the settings. 31 | - (BOOL) updateValue: (id) value forOutputKey: (NSString *) key; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /quartzcomposer-websocket/WebSocketPlugIn.m: -------------------------------------------------------------------------------- 1 | // 2 | // quartzcomposer_websocketPlugIn.m 3 | // quartzcomposer-websocket 4 | // 5 | // Created by Mirek Rusin on 28/04/2011. 6 | // Copyright 2011 Inteliv Ltd. All rights reserved. 7 | // 8 | 9 | /* It's highly recommended to use CGL macros instead of changing the current context for plug-ins that perform OpenGL rendering */ 10 | #import 11 | 12 | #import "WebSocketPlugIn.h" 13 | 14 | #define kQCPlugIn_Name @"WebSocket" 15 | #define kQCPlugIn_Description @"http://github.com/mirek/quartzcomposer-websocket" 16 | 17 | #pragma name WebSocket read callback 18 | 19 | void WebSocketPlugInReadCallback(WebSocketRef webSocket, WebSocketClientRef client, CFStringRef value) { 20 | WebSocketPlugIn *plugIn = webSocket->userInfo; 21 | if (plugIn) { 22 | CFErrorRef *error = NULL; 23 | CFTypeRef json = JSONCreateWithString(webSocket->allocator, value, kJSONReadOptionsDefault, error); 24 | if (json) { 25 | if (CFArrayGetTypeID() == CFGetTypeID(json)) { 26 | if (CFArrayGetCount(json) == 2) { 27 | CFTypeRef tuple1 = CFArrayGetValueAtIndex(json, 0); 28 | CFTypeRef tuple2 = CFArrayGetValueAtIndex(json, 1); 29 | if (CFGetTypeID(tuple1) == CFStringGetTypeID()) { 30 | if ([plugIn updateValue: tuple2 forOutputKey: tuple1]) { 31 | NSLog(@"all ok %@, %@", tuple1, tuple2); 32 | // pass, all ok. 33 | } else { 34 | // TODO: probably specified key doesn't exist 35 | } 36 | } else { 37 | // TODO: first value should be string (key) 38 | } 39 | } else { 40 | // TODO: got array but not 2 slots 41 | } 42 | } else { 43 | // TODO: got json, but not an array 44 | } 45 | CFRelease(json); 46 | } else { 47 | // TODO: got something that can't be parsed as json 48 | } 49 | if (error) { 50 | CFShow(error); 51 | CFRelease(error); 52 | } 53 | } 54 | } 55 | 56 | @implementation WebSocketPlugIn 57 | 58 | @synthesize inputPorts; 59 | @synthesize outputPorts; 60 | 61 | - (BOOL) updateValue: (id) value forOutputKey: (NSString *) key { 62 | if ([outputPorts objectForKey: key]) { 63 | 64 | // Process the output value only for output ports that actually exist 65 | CFDictionarySetValue(outputValues, key, value); 66 | 67 | return YES; 68 | } else { 69 | return NO; 70 | } 71 | } 72 | 73 | + (NSDictionary *) attributes { 74 | return [NSDictionary dictionaryWithObjectsAndKeys: 75 | kQCPlugIn_Name, QCPlugInAttributeNameKey, 76 | kQCPlugIn_Description, QCPlugInAttributeDescriptionKey, 77 | nil]; 78 | } 79 | 80 | + (NSArray *) plugInKeys { 81 | return [NSArray arrayWithObjects: @"inputPorts", @"outputPorts", nil]; 82 | } 83 | 84 | // Specify the optional attributes for property based ports 85 | // (QCPortAttributeNameKey, QCPortAttributeDefaultValueKey...). 86 | //+ (NSDictionary *) attributesForPropertyPortWithKey: (NSString *) key { 87 | // return nil; 88 | //} 89 | 90 | // Return the execution mode of the plug-in: kQCPlugInExecutionModeProvider, kQCPlugInExecutionModeProcessor, or kQCPlugInExecutionModeConsumer. 91 | + (QCPlugInExecutionMode) executionMode { 92 | return kQCPlugInExecutionModeProcessor; 93 | } 94 | 95 | // Return the time dependency mode of the plug-in: kQCPlugInTimeModeNone, kQCPlugInTimeModeIdle or kQCPlugInTimeModeTimeBase. 96 | + (QCPlugInTimeMode) timeMode { 97 | return kQCPlugInTimeModeIdle; 98 | } 99 | 100 | - (void) setValue: (id) value forKey: (NSString *) key { 101 | if ([key isEqualToString: @"inputPorts"]) { 102 | if (value) { 103 | for (NSString *key in [value allKeys]) { 104 | [self addInputPortWithType: [[value objectForKey: key] objectForKey: QCPortAttributeTypeKey] forKey: key withAttributes: [value objectForKey: key]]; 105 | } 106 | } else { 107 | // TODO: Remove all dynamic input ports 108 | } 109 | } else if ([key isEqualToString: @"outputPorts"]) { 110 | if (value) { 111 | for (NSString *key in [value allKeys]) { 112 | [self addOutputPortWithType: [[value objectForKey: key] objectForKey: QCPortAttributeTypeKey] forKey: key withAttributes: [value objectForKey: key]]; 113 | } 114 | } else { 115 | // TODO: Remove all dynamic output ports 116 | } 117 | } else { 118 | [super setValue: value forKey: key]; 119 | } 120 | } 121 | 122 | - (id) init { 123 | if ((self = [super init])) { 124 | allocator = NULL; 125 | outputValues = CFDictionaryCreateMutable(allocator, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); 126 | webSocket = WebSocketCreateWithHostAndPort(allocator, kWebSocketHostAny, 60001, self); 127 | WebSocketSetClientReadCallback(webSocket, WebSocketPlugInReadCallback); 128 | } 129 | return self; 130 | } 131 | 132 | - (void) addInputPortWithType:(NSString *)type forKey:(NSString *)key withAttributes:(NSDictionary *)attributes { 133 | 134 | // If this is the first time we're adding port, create the dictionary. 135 | if (!self.inputPorts) { 136 | NSMutableDictionary *inputPorts_ = [[NSMutableDictionary alloc] init]; 137 | self.inputPorts = inputPorts_; 138 | [inputPorts_ release]; 139 | } 140 | 141 | // Make sure the attribtues include port type 142 | NSMutableDictionary *attributesWithType = attributes ? [attributes mutableCopy] : [[NSMutableDictionary alloc] init]; 143 | if (![attributesWithType objectForKey: QCPortAttributeTypeKey]) { 144 | [attributesWithType setObject: type forKey: QCPortAttributeTypeKey]; 145 | } 146 | 147 | // If the key already exists, we want to replace it. We need to remove it first from plugin. 148 | if ([inputPorts objectForKey: key]) { 149 | [inputPorts removeObjectForKey: key]; 150 | [super removeInputPortForKey: key]; 151 | } 152 | 153 | [super addInputPortWithType: type forKey: key withAttributes: attributesWithType]; 154 | [inputPorts setObject: attributesWithType forKey: key]; 155 | 156 | [attributesWithType release]; 157 | } 158 | 159 | - (void) removeInputPortForKey:(NSString *)key { 160 | if (inputPorts) { 161 | if ([inputPorts objectForKey: key]) { 162 | [inputPorts removeObjectForKey: key]; 163 | [super removeInputPortForKey: key]; 164 | } 165 | } 166 | } 167 | 168 | - (void) addOutputPortWithType:(NSString *)type forKey:(NSString *)key withAttributes:(NSDictionary *)attributes { 169 | 170 | // If this is the first time we're adding port, create the dictionary. 171 | if (!self.outputPorts) { 172 | NSMutableDictionary *outputPorts_ = [[NSMutableDictionary alloc] init]; 173 | self.outputPorts = outputPorts_; 174 | [outputPorts_ release]; 175 | } 176 | 177 | // Make sure the attribtues include port type 178 | NSMutableDictionary *attributesWithType = attributes ? [attributes mutableCopy] : [[NSMutableDictionary alloc] init]; 179 | if (![attributesWithType objectForKey: QCPortAttributeTypeKey]) { 180 | [attributesWithType setObject: type forKey: QCPortAttributeTypeKey]; 181 | } 182 | 183 | // If the key already exists, we want to replace it. We need to remove it first from plugin. 184 | if ([outputPorts objectForKey: key]) { 185 | [outputPorts removeObjectForKey: key]; 186 | [super removeOutputPortForKey: key]; 187 | } 188 | 189 | [super addOutputPortWithType: type forKey: key withAttributes: attributesWithType]; 190 | [outputPorts setObject: attributesWithType forKey: key]; 191 | 192 | [attributesWithType release]; 193 | } 194 | 195 | - (void) removeOutputPortForKey:(NSString *)key { 196 | if (outputPorts) { 197 | if ([outputPorts objectForKey: key]) { 198 | [outputPorts removeObjectForKey: key]; 199 | [super removeOutputPortForKey: key]; 200 | } 201 | } 202 | } 203 | 204 | // Return a new QCPlugInViewController to edit the internal settings of this plug-in instance. 205 | // You can return a subclass of QCPlugInViewController if necessary. 206 | - (QCPlugInViewController *) createViewController { 207 | return [[WebSocketSettings alloc] initWithPlugIn: self viewNibName: @"WebSocketSettings"]; 208 | } 209 | 210 | // Release any non garbage collected resources created in -init. 211 | - (void) finalize { 212 | [super finalize]; 213 | } 214 | 215 | // Release any resources created in -init. 216 | - (void) dealloc { 217 | WebSocketRelease(webSocket); 218 | CFRelease(outputValues); 219 | [super dealloc]; 220 | } 221 | 222 | @end 223 | 224 | @implementation WebSocketPlugIn (Execution) 225 | 226 | // Called by Quartz Composer when rendering of the composition starts: perform any required setup for the plug-in. 227 | // Return NO in case of fatal failure (this will prevent rendering of the composition to start). 228 | - (BOOL) startExecution: (id ) context { 229 | return YES; 230 | } 231 | 232 | // Called by Quartz Composer when the plug-in instance starts being used by Quartz Composer. 233 | - (void) enableExecution: (id ) context { 234 | } 235 | 236 | // Called by Quartz Composer whenever the plug-in instance needs to execute. 237 | // Only read from the plug-in inputs and produce a result (by writing to the plug-in 238 | // outputs or rendering to the destination OpenGL context) within that method and nowhere else. 239 | // 240 | // Return NO in case of failure during the execution (this will prevent rendering of the current 241 | // frame to complete). 242 | // 243 | // The OpenGL context for rendering can be accessed and defined for CGL macros using: 244 | // CGLContextObj cgl_ctx = [context CGLContextObj]; 245 | - (BOOL) execute: (id ) context atTime: (NSTimeInterval) time withArguments: (NSDictionary *) arguments { 246 | 247 | for (NSString *key in [[self inputPorts] keyEnumerator]) { 248 | if ([self didValueForInputKeyChange: key]) { 249 | id value = [self valueForInputKey: key]; 250 | 251 | CFMutableArrayRef array = CFArrayCreateMutable(allocator, 0, &kCFTypeArrayCallBacks); 252 | if (array) { 253 | CFArrayAppendValue(array, key); 254 | CFArrayAppendValue(array, value); 255 | 256 | CFErrorRef *error = NULL; 257 | CFStringRef json = JSONCreateString(allocator, array, kJSONWriteOptionsDefault, error); 258 | if (json) { 259 | NSLog(@"json %@", json); 260 | WebSocketWriteWithString(webSocket, json); 261 | CFRelease(json); 262 | } else { 263 | // TODO: Couldn't create json string 264 | } 265 | 266 | if (error) { 267 | CFStringRef string = CFErrorCopyDescription(*error); 268 | if (string) { 269 | [context logMessage: @"WebSocket Error: %@", string]; 270 | CFRelease(string); 271 | } 272 | CFRelease(error); 273 | } 274 | 275 | CFRelease(array); 276 | } else { 277 | // TODO: Couldn't create an array 278 | } 279 | } 280 | } 281 | 282 | CFIndex count = CFDictionaryGetCount(outputValues); 283 | if (count > 0) { 284 | CFTypeRef *keys = CFAllocatorAllocate(allocator, count * sizeof(CFTypeRef), 0); 285 | CFTypeRef *values = CFAllocatorAllocate(allocator, count * sizeof(CFTypeRef), 0); 286 | CFDictionaryGetKeysAndValues(outputValues, keys, values); 287 | for (CFIndex i = 0; i < count; i++) { 288 | [self setValue: values[i] forOutputKey: keys[i]]; 289 | } 290 | CFAllocatorDeallocate(allocator, values); 291 | CFAllocatorDeallocate(allocator, keys); 292 | CFDictionaryRemoveAllValues(outputValues); 293 | } 294 | 295 | return YES; 296 | } 297 | 298 | // Called by Quartz Composer when the plug-in instance stops being used by Quartz Composer. 299 | - (void) disableExecution: (id ) context { 300 | } 301 | 302 | // Called by Quartz Composer when rendering of the composition stops: perform any required cleanup for the plug-in. 303 | - (void)stopExecution: (id ) context { 304 | } 305 | 306 | @end 307 | -------------------------------------------------------------------------------- /quartzcomposer-websocket/WebSocketSettings.h: -------------------------------------------------------------------------------- 1 | // 2 | // WebSocketSettings.h 3 | // quartzcomposer-websocket 4 | // 5 | // Created by Mirek Rusin on 30/04/2011. 6 | // Copyright 2011 Inteliv Ltd. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import "WebSocketPlugIn.h" 12 | 13 | @class WebSocketPlugIn; 14 | 15 | @interface WebSocketSettings : QCPlugInViewController { 16 | @private 17 | 18 | IBOutlet NSTableView *inputPortsTableView; 19 | IBOutlet NSTextField *inputPortNameTextField; 20 | IBOutlet NSComboBox *inputPortTypeComboBox; 21 | 22 | IBOutlet NSTableView *outputPortsTableView; 23 | IBOutlet NSTextField *outputPortNameTextField; 24 | IBOutlet NSComboBox *outputPortTypeComboBox; 25 | } 26 | 27 | - (WebSocketPlugIn *) plugIn; 28 | 29 | - (IBAction) addInputPort: (id) sender; 30 | - (IBAction) removeInputPort: (id) sender; 31 | 32 | - (IBAction) addOutputPort: (id) sender; 33 | - (IBAction) removeOutputPort: (id) sender; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /quartzcomposer-websocket/WebSocketSettings.m: -------------------------------------------------------------------------------- 1 | // 2 | // WebSocketSettings.m 3 | // quartzcomposer-websocket 4 | // 5 | // Created by Mirek Rusin on 30/04/2011. 6 | // Copyright 2011 Inteliv Ltd. All rights reserved. 7 | // 8 | 9 | #import "WebSocketSettings.h" 10 | 11 | 12 | @implementation WebSocketSettings 13 | 14 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 15 | { 16 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 17 | if (self) { 18 | // Initialization code here. 19 | } 20 | 21 | return self; 22 | } 23 | 24 | - (void)dealloc 25 | { 26 | [super dealloc]; 27 | } 28 | 29 | #pragma mark Custom plugIn 30 | 31 | - (WebSocketPlugIn *) plugIn { 32 | return (WebSocketPlugIn *)[super plugIn]; 33 | } 34 | 35 | #pragma mark Actions 36 | 37 | - (IBAction) addInputPort: (id) sender { 38 | NSString *portTypeName = [inputPortTypeComboBox objectValue]; 39 | NSString *key = [inputPortNameTextField stringValue]; 40 | if (![portTypeName isEqualToString: @""] && ![key isEqualToString: @""]) { 41 | [self.plugIn addInputPortWithType: [@"QCPortType" stringByAppendingString: portTypeName] 42 | forKey: key 43 | withAttributes: nil]; 44 | [inputPortsTableView reloadData]; 45 | } 46 | } 47 | 48 | - (IBAction) removeInputPort: (id) sender { 49 | NSInteger selectedRow = [inputPortsTableView selectedRow]; 50 | if (selectedRow >= 0) { 51 | NSString *key = [self.plugIn.inputPorts.allKeys objectAtIndex: selectedRow]; 52 | if (key) { 53 | [self.plugIn removeInputPortForKey: key]; 54 | [inputPortsTableView reloadData]; 55 | } 56 | } 57 | } 58 | 59 | - (IBAction) addOutputPort: (id) sender { 60 | NSString *portTypeName = [outputPortTypeComboBox objectValue]; 61 | NSString *key = [outputPortNameTextField stringValue]; 62 | if (![portTypeName isEqualToString: @""] && ![key isEqualToString: @""]) { 63 | [self.plugIn addOutputPortWithType: [@"QCPortType" stringByAppendingString: portTypeName] 64 | forKey: key 65 | withAttributes: nil]; 66 | [outputPortsTableView reloadData]; 67 | } 68 | } 69 | 70 | - (IBAction) removeOutputPort: (id) sender { 71 | NSInteger selectedRow = [outputPortsTableView selectedRow]; 72 | if (selectedRow >= 0) { 73 | NSString *key = [self.plugIn.outputPorts.allKeys objectAtIndex: selectedRow]; 74 | if (key) { 75 | [self.plugIn removeOutputPortForKey: key]; 76 | [outputPortsTableView reloadData]; 77 | } 78 | } 79 | } 80 | 81 | #pragma mark NSTableViewDataSource delegate methods 82 | 83 | - (NSInteger) numberOfRowsInTableView: (NSTableView *) tableView { 84 | NSInteger rows = 0; 85 | if (tableView == inputPortsTableView) { 86 | rows = [self.plugIn.inputPorts count]; 87 | } else if (tableView == outputPortsTableView) { 88 | rows = [self.plugIn.outputPorts count]; 89 | } 90 | return rows; 91 | } 92 | 93 | - (id) tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row { 94 | id objectValue = nil; 95 | 96 | NSMutableDictionary *ports = nil; 97 | if (tableView == inputPortsTableView) { 98 | ports = self.plugIn.inputPorts; 99 | } else if (tableView == outputPortsTableView) { 100 | ports = self.plugIn.outputPorts; 101 | } 102 | 103 | if (ports) { 104 | NSString *key = [[ports allKeys] objectAtIndex: row]; 105 | if (key) { 106 | NSDictionary *port = [ports objectForKey: key]; 107 | if (port) { 108 | NSString *headerCellStringValue = [[tableColumn headerCell] stringValue]; 109 | if ([headerCellStringValue isEqualToString: @"Name"]) { 110 | NSString *name = [port objectForKey: QCPortAttributeNameKey]; 111 | objectValue = name ? name : key; 112 | } else if ([headerCellStringValue isEqualToString: @"Type"]) { 113 | objectValue = [port objectForKey: QCPortAttributeTypeKey]; 114 | } 115 | } 116 | } 117 | } 118 | 119 | return objectValue; 120 | } 121 | 122 | #pragma mark NSTextFieldDelegate methods 123 | 124 | - (BOOL) control: (NSControl *) control textShouldEndEditing: (NSText *) fieldEditor { 125 | NSLog(@"str: %@", fieldEditor.string); 126 | return YES; 127 | } 128 | 129 | @end 130 | -------------------------------------------------------------------------------- /quartzcomposer-websocket/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | --------------------------------------------------------------------------------