├── .editorconfig ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── README.md ├── babel.config.js ├── jsconfig.json ├── package.json ├── postcss.config.js ├── public ├── .gitkeep ├── favicon.ico ├── images │ ├── cow.png │ ├── playon_fill.png │ ├── rotate.png │ ├── sticker1.png │ ├── sticker2.png │ ├── sticker3.png │ ├── sticker4.png │ ├── sticker5.png │ └── sticker6.png ├── index.html ├── js │ ├── cc.extension.js │ ├── customiseControls.min.js │ ├── fabric.js │ ├── fabric.min.js │ ├── fabricex.js │ ├── moments-zh.js │ ├── moments.js │ └── momentstz.js └── vue-fabric.png ├── src ├── App.vue ├── assets │ ├── dot-circle.png │ └── rotate-mdr.png ├── demos │ ├── editor.vue │ └── image-model.vue ├── fabric │ ├── VueFabric.vue │ └── index.js ├── libs │ └── customiseControls.js ├── main.js └── utils │ └── index.js └── vue.config.js /.editorconfig: -------------------------------------------------------------------------------- 1 | [*.{js,jsx,ts,tsx,vue}] 2 | indent_style = space 3 | indent_size = 2 4 | end_of_line = lf 5 | trim_trailing_whitespace = true 6 | insert_final_newline = true 7 | max_line_length = 100 8 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | dist 2 | dist/ 3 | src/libs/ 4 | src/libs 5 | public 6 | public/ 7 | node_modules 8 | node_modules/ -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true 5 | }, 6 | extends: [ 7 | 'plugin:vue/essential', 8 | '@vue/airbnb' 9 | ], 10 | parserOptions: { 11 | parser: 'babel-eslint' 12 | }, 13 | globals: { 14 | window: true, 15 | L: true, 16 | THREE: true, 17 | Utils: true, 18 | Stripe: true, 19 | routeMan: true, 20 | fabric: true, 21 | service: true 22 | }, 23 | plugins: [ 24 | 'prettier' 25 | ], 26 | rules: { 27 | 'comma-dangle': [ 28 | 'error', 29 | { 30 | arrays: 'never', 31 | objects: 'never', 32 | imports: 'never', 33 | exports: 'never', 34 | functions: 'ignore' 35 | } 36 | ], 37 | 'prefer-destructuring': [ 38 | 'error', 39 | { 40 | array: true, 41 | object: false 42 | }, 43 | { 44 | enforceForRenamedProperties: false 45 | } 46 | ], 47 | 'arrow-parens': 'off', 48 | 'function-paren-newline': 'off', 49 | 'import/no-unresolved': 'off', 50 | 'import/extensions': 'off', 51 | 'vue/no-unused-components': { 52 | ignoreWhenBindingPresent: false 53 | }, 54 | 'no-console': 'off', 55 | 'no-param-reassign': 'off', 56 | 'vue/no-parsing-error': [2, { 57 | 'x-invalid-end-tag': false, 58 | 'control-character-in-input-stream': false 59 | }], 60 | 'vue/no-use-v-if-with-v-for': ['error', { 61 | allowUsingIterationVar: true // default: false 62 | }], 63 | 'max-len': ['error', { 64 | code: 100, 65 | ignoreUrls: true, 66 | ignoreStrings: true 67 | }], 68 | "vue/html-indent": ["error", 2, { 69 | "attribute": 1, 70 | "baseIndent": 1, 71 | "closeBracket": 0, 72 | "alignAttributesVertically": false, 73 | "ignores": [] 74 | }] 75 | } 76 | }; 77 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw* 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |

17 |

18 | 19 | # VueFabric 20 | 21 | Forked from purestart's ![vue-fabric](https://github.com/purestart/vue-fabric). 22 | 23 | 24 | 25 | ## Installation 26 | 27 | ``` 28 | npm install vuejs-fabric --save 29 | ``` 30 | 31 | ## Import 32 | 33 | ``` 34 | import VueFabric from 'vuejs-fabric'; 35 | ``` 36 | 37 | ``` 38 | Vue.component('VueFabric',VueFabric); 39 | ``` 40 | 41 | usa 42 | 43 | ``` 44 | 45 | ``` 46 | 47 | ## Usage 48 | 49 | #### Props 50 | 51 | | Name | Type | Default | Description | 52 | | ------ | ------ | ------- | ------------- | 53 | | width | Number | 0 | canvas width | 54 | | height | Number | 0 | canvas height | 55 | 56 | ## Function 57 | 58 | > Method call 59 | > this.\$refs.canvas.method(params) 60 | 61 | #### createImage(url,options) 绘制图片 62 | 63 | | params | Type | Description | 64 | | ------- | ------ | ------------------------------------------------------------------------------------------------------------------------ | 65 | | url | String | image url | 66 | | options | Object | id(DOM element ID),width,height,left,top,registeObjectEvent | 67 | 68 | #### createTextbox(text,options) 绘制文本 69 | 70 | | params | Type | Description | 71 | | ------- | ------ | ------------------------------------------ | 72 | | text | String | text content | 73 | | options | Object | width,left,top,fillColor(shape),fontSize,id | 74 | 75 | #### createRect(options) 绘制矩形 76 | 77 | | options | Type | Description | 78 | | --------- | ------ | -------------- | 79 | | left | Number | left | 80 | | top | Number | top | 81 | | width | Number | Rect width | 82 | | height | Number | Rect height | 83 | | fillColor | String | Rect fillColor | 84 | | id | String | unique id | 85 | 86 | #### freeDrawConfig(options) 开启/关闭自由绘制(画笔) 87 | 88 | | options | Type | Description | 89 | | ------------- | ------- | --------------------------- | 90 | | isDrawingMode | Boolean | Drawing true/false | 91 | | color | String | Draw line color | 92 | | drawWidth | Number | line width | 93 | 94 | #### createLine(options) 绘制直线 95 | 96 | | options | Type | Description | 97 | | ----------- | ------ | ------------------------ | 98 | | x,y,x1,y1 | Number | line points,直线两点坐标 | 99 | | fillColor | String | fillColor 填充颜色 | 100 | | strokeColor | String | strokeColor 绘制颜色 | 101 | 102 | #### drawDottedline(options) 绘制虚线 103 | 104 | | options | Type | Description | 105 | | --------- | ------ | ----------------------------------------- | 106 | | x,y,x1,y1 | Number | line points,直线两点坐标 | 107 | | color | String | 绘制线颜色 | 108 | | drawWidth | Number | 绘制线宽 | 109 | | offset | Number | 默认 6,每隔 offset 个像素空 empty 个像素 | 110 | | empty | Number | 默认 3,每隔 offset 个像素空 empty 个像素 | 111 | 112 | #### drawArrowLine(options) 绘制箭头直线 113 | 114 | | options | Type | Description | 115 | | --------- | ------ | ------------------------ | 116 | | x,y,x1,y1 | Number | line points,直线两点坐标 | 117 | | color | String | 绘制线颜色 | 118 | | drawWidth | Number | 绘制线宽 | 119 | | fillColor | Number | 默认透明,填充颜色 | 120 | | theta | Number | 默认 35,箭头角度大小 | 121 | | headlen | Number | 默认 35,箭头角度大小 | 122 | 123 | #### createTriangle(options) 绘制三角形 124 | 125 | | options | Type | Description | 126 | | --------------- | ------ | ------------------- | 127 | | x,y,x1,y1,x2,y2 | Number | 三角形 3 点坐标位置 | 128 | | left,top | Number | position 位置 | 129 | | color | String | 绘制线颜色 | 130 | | fillColor | String | fillColor 填充颜色 | 131 | | drawWidth | Number | 绘制线宽 | 132 | 133 | #### createEqualTriangle(options) 绘制等边三角形 134 | 135 | | options | Type | Description | 136 | | -------- | ------ | ------------------ | 137 | | left,top | Number | position 位置 | 138 | | fill | String | fillColor 填充颜色 | 139 | | width | Number | 三角形底边宽度 | 140 | | height | Number | 三角形高 | 141 | 142 | #### createCircle(options) 绘制圆 143 | 144 | | options | Type | Description | 145 | | -------- | ------ | ------------------ | 146 | | left,top | Number | position 位置 | 147 | | fill | String | fillColor 填充颜色 | 148 | | radius | Number | 圆形半径 | 149 | 150 | #### createEllipse(options) 绘制椭圆 151 | 152 | | options | Type | Description | 153 | | ----------- | ------ | ---------------------------------- | 154 | | rx,ry | Number | rx , ry 椭圆两个长轴尺寸和短轴尺寸 | 155 | | left,top | Number | position 位置 | 156 | | fillColor | String | fillColor 填充颜色 | 157 | | strokeColor | String | strokeColor 绘制线颜色 | 158 | | angle | Number | angle 倾斜角度 | 159 | 160 | #### setRotate(angle) 旋转选中元素 161 | 162 | | params | Type | Description | 163 | | ------ | ------ | ----------- | 164 | | angle | Number | 旋转角度 | 165 | 166 | #### setBackgroundImage(url) 设置画布背景图片 167 | 168 | | params | Type | Description | 169 | | ------ | ------ | ------------ | 170 | | url | String | 背景图片 Url | 171 | 172 | #### renderAll() 重新渲染画布 173 | 174 | #### setBackgroundColor(color) 设置画布背景颜色 175 | 176 | | params | Type | Description | 177 | | ------ | ------ | ----------- | 178 | | color | String | 背景颜色 | 179 | 180 | #### toggleMirror(options) 设置图片元素镜像翻转 181 | 182 | | options | Type | Description | 183 | | ------- | ------ | ----------------------------------- | 184 | | flip | String | 可选值 X,Y 默认值 X , 镜像翻转 X,Y | 185 | 186 | #### setCornerIcons(options) 自定义旋转操作元素图片 187 | 188 | | options | Type | Description | 189 | | --------------------- | ------ | ------------------------------------------------------------- | 190 | | size | Npmber | 图片大小 px | 191 | | borderColor | String | 图片边框颜色 | 192 | | cornerBackgroundColor | String | 设置背景颜色 | 193 | | cornerShape | String | 形状,默认'rect' ,可选'rect', 'circle' | 194 | | tl | String | top left 左上角元素图片地址(本地只能 static 下的图片) | 195 | | tr | String | top right 右上角元素图片地址(本地只能 static 下的图片) | 196 | | bl | String | bottom left 左下角元素图片地址(本地只能 static 下的图片) | 197 | | br | String | bottom right 右下角元素图片地址(本地只能 static 下的图片) | 198 | | ml | String | middle left 中间左边元素图片地址(本地只能 static 下的图片) | 199 | | mr | String | middle right 中间右边元素图片地址(本地只能 static 下的图片) | 200 | | mtr | String | middle top 顶部元素图片地址(本地只能 static 下的图片) | 201 | 202 | #### toNextLayer() 设置当前选中画布到下一层 203 | 204 | #### toLastLayer() 设置当前选中画布到上一层 205 | 206 | #### toBottomLayer() 设置当前选中画布到底层 207 | 208 | #### toTopLayer() 设置当前选中画布到顶层 209 | 210 | #### discardActive() 取消选中 211 | 212 | #### getObjects() 获取当前画布上的所有元素对象 213 | 214 | #### clear() 清除当前画布上的所有元素对象 215 | 216 | #### toDataUrl() 返回当前画布的 base64 图片 217 | 218 | #### toJson() 返回当前画布的 json 对象 219 | 220 | #### loadFromJSON(json,cb) 从 json 对象中加载画布数据 221 | 222 | | params | Type | Description | 223 | | ------ | -------- | ---------------- | 224 | | json | Object | json 对象 | 225 | | cb | Function | 加载完成回调函数 | 226 | 227 | #### toSvg() 返回当前画布的 svg 图片 228 | 229 | #### removeCurrentObj() 删除当前选中对象 230 | 231 | #### getEditObj() 返回当前选中对象,并不在画布上显示,用于编辑当前元素 232 | 233 | #### setEditObj(obj) 设置添加对象到画布 234 | 235 | ## 事件 236 | 237 | ``` 238 | 239 | ``` 240 | 241 | Mouse event 242 | 243 | | name | Type | Description | 244 | | -------------- | ----- | -------------- | 245 | | mouse:down | event | mouse down | 246 | | mouse:up | event | mouse up | 247 | | mouse:move | event | mouse move | 248 | | mouse:dblclick | event | mouse dblclick | 249 | | mouse:over | event | mouse over | 250 | | mouse:out | event | mouse out | 251 | 252 | Other events 253 | 254 | | name | Type | Description | 255 | | ------------------------ | ----- | ---------------------------------------------- | 256 | | selection:created | event | 选中 canvas 元素对象,单选和多选都会触发此事件 | 257 | | selection:updated | event | selection updated | 258 | | selection:cleared | event | selection cleared | 259 | | before:selection:cleared | event | before selection cleared | 260 | | object:added | event | 当有元素被添加进来时候触发 | 261 | | object:removed | event | object removed | 262 | | object:modified | event | object modified | 263 | | object:rotating | event | object rotating | 264 | | object:scaling | event | object scaling | 265 | | object:moving | event | object moving | 266 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | const removeConsolePlugin = []; 2 | if (process.env.NODE_ENV === 'production') { 3 | removeConsolePlugin.push('transform-remove-console'); 4 | } 5 | 6 | module.exports = { 7 | presets: [[ 8 | '@vue/app', { 9 | useBuiltIns: 'entry' 10 | } 11 | ]], 12 | plugins: removeConsolePlugin 13 | }; 14 | -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", 4 | "module": "es6", 5 | "allowSyntheticDefaultImports": true, 6 | "baseUrl": ".", 7 | "paths": { 8 | "@/*": ["src/*"] 9 | } 10 | }, 11 | "exclude": ["dist"] 12 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vuejs-fabric", 3 | "version": "0.2.7", 4 | "scripts": { 5 | "serve": "vue-cli-service serve", 6 | "build": "vue-cli-service build --target lib --name vue-fabric src/fabric/index.js", 7 | "lint": "vue-cli-service lint" 8 | }, 9 | "homepage": "https://github.com/mudin/vue-fabric", 10 | "bugs": { 11 | "url": "https://github.com/mudin/vue-fabric/issues" 12 | }, 13 | "license": "MIT", 14 | "repository": { 15 | "type": "git", 16 | "url": "https://github.com/mudin/vue-fabric.git" 17 | }, 18 | "private": false, 19 | "main": "src/fabric/VueFabric.vue", 20 | "dependencies": { 21 | "fabric": "^2.7.0", 22 | "vue": "^2.6.10" 23 | }, 24 | "devDependencies": { 25 | "@vue/cli-plugin-babel": "^3.5.0", 26 | "@vue/cli-plugin-eslint": "^3.5.0", 27 | "@vue/cli-service": "^3.5.0", 28 | "@vue/eslint-config-airbnb": "^4.0.0", 29 | "babel-eslint": "^10.0.1", 30 | "babel-plugin-transform-remove-console": "^6.9.4", 31 | "eslint": "^5.8.0", 32 | "eslint-plugin-prettier": "^3.0.1", 33 | "eslint-plugin-vue": "^5.0.0", 34 | "less": "^3.0.4", 35 | "less-loader": "^4.1.0", 36 | "postcss-import": "^12.0.1", 37 | "postcss-url": "^8.0.0", 38 | "stylelint": "^9.10.1", 39 | "stylelint-webpack-plugin": "^0.10.5", 40 | "vue-template-compiler": "^2.5.21", 41 | "webpack-node-externals": "^1.7.2" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | autoprefixer: {} 4 | } 5 | }; 6 | -------------------------------------------------------------------------------- /public/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mudin/vue-fabric/6503af8513f30b9f2bb4ef278b5cd1f0e5dc05d9/public/.gitkeep -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mudin/vue-fabric/6503af8513f30b9f2bb4ef278b5cd1f0e5dc05d9/public/favicon.ico -------------------------------------------------------------------------------- /public/images/cow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mudin/vue-fabric/6503af8513f30b9f2bb4ef278b5cd1f0e5dc05d9/public/images/cow.png -------------------------------------------------------------------------------- /public/images/playon_fill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mudin/vue-fabric/6503af8513f30b9f2bb4ef278b5cd1f0e5dc05d9/public/images/playon_fill.png -------------------------------------------------------------------------------- /public/images/rotate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mudin/vue-fabric/6503af8513f30b9f2bb4ef278b5cd1f0e5dc05d9/public/images/rotate.png -------------------------------------------------------------------------------- /public/images/sticker1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mudin/vue-fabric/6503af8513f30b9f2bb4ef278b5cd1f0e5dc05d9/public/images/sticker1.png -------------------------------------------------------------------------------- /public/images/sticker2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mudin/vue-fabric/6503af8513f30b9f2bb4ef278b5cd1f0e5dc05d9/public/images/sticker2.png -------------------------------------------------------------------------------- /public/images/sticker3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mudin/vue-fabric/6503af8513f30b9f2bb4ef278b5cd1f0e5dc05d9/public/images/sticker3.png -------------------------------------------------------------------------------- /public/images/sticker4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mudin/vue-fabric/6503af8513f30b9f2bb4ef278b5cd1f0e5dc05d9/public/images/sticker4.png -------------------------------------------------------------------------------- /public/images/sticker5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mudin/vue-fabric/6503af8513f30b9f2bb4ef278b5cd1f0e5dc05d9/public/images/sticker5.png -------------------------------------------------------------------------------- /public/images/sticker6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mudin/vue-fabric/6503af8513f30b9f2bb4ef278b5cd1f0e5dc05d9/public/images/sticker6.png -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | vue-fabric 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /public/js/cc.extension.js: -------------------------------------------------------------------------------- 1 | fabric.Object.prototype.interaction = ''; 2 | fabric.Object.prototype.toObject = (function (toObject) { 3 | return function () { 4 | return fabric.util.object.extend(toObject.call(this), { 5 | interaction: this.interaction 6 | }); 7 | }; 8 | })(fabric.Object.prototype.toObject); 9 | //Video Class 10 | fabric.Video = fabric.util.createClass(fabric.Image, { 11 | type: 'video', 12 | initialize: function(element, options) { 13 | options || (options = {}); 14 | this.callSuper('initialize', element, options); 15 | }, 16 | toObject: function () { 17 | return fabric.util.object.extend(this.callSuper('toObject'), { 18 | interaction: this.interaction, 19 | media: this.media 20 | }); 21 | }, 22 | _render: function (ctx) { 23 | this.callSuper('_render', ctx); 24 | } 25 | }); 26 | fabric.Video.async = true; 27 | fabric.Video.fromURL = function(url, callback, imgOptions) { 28 | fabric.util.loadImage(url, function(img) { 29 | callback(new fabric.Video(img, imgOptions)); 30 | }, null, imgOptions && imgOptions.crossOrigin); 31 | }; 32 | fabric.Video.fromObject = function (object, callback) { 33 | fabric.util.loadImage(object.src, function (img) { 34 | fabric.Image.prototype._initFilters.call(object, object, function (filters) { 35 | object.filters = filters || []; 36 | var instance = new fabric.Video(img, object); 37 | callback && callback(instance); 38 | }); 39 | }, null, object.crossOrigin); 40 | }; 41 | //Create Fabric Slider Class 42 | fabric.Slider = fabric.util.createClass(fabric.Rect, { 43 | type: 'slider', 44 | initialize: function (options) { 45 | options || (options = {}); 46 | this.callSuper('initialize', options); 47 | console.log('inittt'); 48 | }, 49 | toObject: function () { 50 | return fabric.util.object.extend(this.callSuper('toObject'), { 51 | id: this.id, 52 | fill: this.fill, 53 | slides: this.slides, 54 | interaction: this.interaction, 55 | pattern: this.pattern, 56 | patternSourceCanvas: this.patternSourceCanvas, 57 | filename: this.filename 58 | }); 59 | }, 60 | _render: function (ctx) { 61 | this.callSuper('_render', ctx); 62 | } 63 | }); 64 | //Slider 65 | fabric.Slider.fromArray = function(elements, callback, options) { 66 | //Define if the first Object is Video 67 | var firstObj; 68 | if (elements[0].thumbnail) { 69 | firstObj = elements[0].thumbnail; 70 | } else { 71 | firstObj = elements[0].src; 72 | } 73 | var extension = firstObj.split('.').pop(); 74 | if (extension.match(/^(gif|png|jpg|jpeg|tiff|svg)$/)) { 75 | new fabric.Image.fromURL(firstObj, function(img) { 76 | var patternSourceCanvas = new fabric.StaticCanvas(); 77 | console.log(img); 78 | img.setHeight(patternSourceCanvas.height); 79 | img.setWidth(patternSourceCanvas.width); 80 | patternSourceCanvas.setBackgroundImage(img); 81 | patternSourceCanvas.renderAll(); 82 | console.log(patternSourceCanvas.getElement()); 83 | var pattern = new fabric.Pattern({ 84 | source: patternSourceCanvas.getElement(), 85 | repeat: 'no-repeat' 86 | }); 87 | callback && callback(new fabric.Slider({ 88 | fill: pattern, 89 | width: img.width, 90 | height: img.height, 91 | left: options.left, 92 | top: options.top, 93 | slides: elements, 94 | interaction: options.interaction, 95 | id: generator.generate(), 96 | pattern: pattern, 97 | patternSourceCanvas: patternSourceCanvas, 98 | filename: elements[0].filename 99 | })); 100 | }, null, options && options.crossOrigin); 101 | } else if (extension.match(/^(mp4|avi|ogg|ogv|webm|wmv)$/)) { 102 | //Add Single Video 103 | var patternSourceCanvas = new fabric.StaticCanvas(); 104 | var vw, vh; 105 | var video = new fabric.Video(elements[0].src, { 106 | media: { 107 | video: elements[0].src 108 | } 109 | }); 110 | var videoEl = video.getElement(); 111 | var pattern = new fabric.Pattern({ 112 | source: patternSourceCanvas.getElement(), 113 | repeat: 'no-repeat' 114 | }); 115 | patternSourceCanvas.add(video); 116 | patternSourceCanvas.renderAll(); 117 | videoEl.onloadeddata = function() { 118 | vw = this.videoWidth; 119 | vh = this.videoHeight; 120 | video.setWidth(patternSourceCanvas.width); 121 | video.setHeight(patternSourceCanvas.height); 122 | video.center(); 123 | video.setCoords(); 124 | canvas.renderAll(); 125 | }; 126 | fabric.util.requestAnimFrame(function render() { 127 | patternSourceCanvas.renderAll(); 128 | fabric.util.requestAnimFrame(render); 129 | }); 130 | callback && callback(new fabric.Slider({ 131 | fill: pattern, 132 | width: patternSourceCanvas.width, 133 | height: patternSourceCanvas.height, 134 | left: options.left, 135 | top: options.top, 136 | slides: elements, 137 | interaction: options.interaction, 138 | id: generator.generate(), 139 | pattern: pattern, 140 | patternSourceCanvas: patternSourceCanvas, 141 | filename: elements[0].filename 142 | })); 143 | } else { 144 | console.log('不支援此檔案格式,請重試'); 145 | } 146 | } 147 | fabric.Slider.fromObject = function(objects, callback, options) { 148 | //Define if the first Object is Video 149 | // var firstObj = objects.slides[0].src; 150 | var firstObj; 151 | if (objects.slides[0].thumbnail) { 152 | firstObj = objects.slides[0].thumbnail; 153 | } else { 154 | firstObj = objects.slides[0].src; 155 | } 156 | var extension = firstObj.split('.').pop(); 157 | if (extension.match(/^(gif|png|jpg|jpeg|tiff|svg)$/)) { 158 | new fabric.Image.fromURL(firstObj, function(img) { 159 | var patternSourceCanvas = new fabric.StaticCanvas(); 160 | console.log(img); 161 | img.setHeight(patternSourceCanvas.height); 162 | img.setWidth(patternSourceCanvas.width); 163 | patternSourceCanvas.setBackgroundImage(img); 164 | patternSourceCanvas.renderAll(); 165 | console.log(patternSourceCanvas.getElement()); 166 | var pattern = new fabric.Pattern({ 167 | source: patternSourceCanvas.getElement(), 168 | repeat: 'no-repeat' 169 | }); 170 | callback && callback(new fabric.Slider({ 171 | width: objects.width, 172 | height: objects.height, 173 | scaleX: objects.scaleX, 174 | scaleY: objects.scaleY, 175 | top: objects.top, 176 | left: objects.left, 177 | slides: objects.slides, 178 | interaction: objects.interaction, 179 | fill: pattern, 180 | id: objects.id, 181 | pattern: pattern, 182 | patternSourceCanvas: patternSourceCanvas, 183 | filename: objects.slides[0].filename 184 | })); 185 | }, null, options && options.crossOrigin); 186 | } else if (extension.match(/^(mp4|avi|ogg|ogv|webm)$/)) { 187 | //Add Single Video 188 | var patternSourceCanvas = new fabric.StaticCanvas(); 189 | var vw, vh; 190 | var video = new fabric.Video(firstObj, { 191 | media: { 192 | video: firstObj 193 | } 194 | }); 195 | var videoEl = video.getElement(); 196 | var pattern = new fabric.Pattern({ 197 | source: patternSourceCanvas.getElement(), 198 | repeat: 'no-repeat' 199 | }); 200 | patternSourceCanvas.add(video); 201 | patternSourceCanvas.renderAll(); 202 | videoEl.onloadeddata = function() { 203 | vw = this.videoWidth; 204 | vh = this.videoHeight; 205 | video.setWidth(patternSourceCanvas.width); 206 | video.setHeight(patternSourceCanvas.height); 207 | video.center(); 208 | video.setCoords(); 209 | canvas.renderAll(); 210 | }; 211 | fabric.util.requestAnimFrame(function render() { 212 | patternSourceCanvas.renderAll(); 213 | fabric.util.requestAnimFrame(render); 214 | }); 215 | callback && callback(new fabric.Slider({ 216 | width: objects.width, 217 | height: objects.height, 218 | scaleX: objects.scaleX, 219 | scaleY: objects.scaleY, 220 | top: objects.top, 221 | left: objects.left, 222 | slides: objects.slides, 223 | fill: pattern, 224 | id: objects.id, 225 | interaction: objects.interaction, 226 | pattern: pattern, 227 | patternSourceCanvas: patternSourceCanvas, 228 | filename: objects.slides[0].filename 229 | })); 230 | } else { 231 | console.log('不支援此檔案格式,請重試'); 232 | } 233 | }; 234 | fabric.Slider.async = true; 235 | var generator = new IDGenerator(); 236 | function IDGenerator() { 237 | this.length = 8; 238 | this.timestamp = +new Date; 239 | var _getRandomInt = function( min, max ) { 240 | return Math.floor( Math.random() * ( max - min + 1 ) ) + min; 241 | } 242 | this.generate = function() { 243 | var ts = this.timestamp.toString(); 244 | var parts = ts.split( '' ).reverse(); 245 | var id = ''; 246 | 247 | for( var i = 0; i < this.length; ++i ) { 248 | var index = _getRandomInt( 0, parts.length - 1 ); 249 | id += parts[index]; 250 | } 251 | return id; 252 | } 253 | } 254 | function findObj(id) { 255 | for(var i=0;i-1&&console.warn("this extension might not be fully compatible with your version of fabric.js ("+t.fabric.version+").Consider using the latest compatible build of fabric.js (> "+r+")"),e.util.object.extend(e.Object.prototype,{useCustomIcons:!1,cornerBackgroundColor:"transparent",cornerShape:"",cornerPadding:0,customiseCornerIcons:function(t,e){var r,o;for(r in t)t.hasOwnProperty(r)&&(o={},void 0!==t[r].cornerShape&&(this.cornerShape=t[r].cornerShape),void 0!==t[r].cornerBackgroundColor&&(this.cornerBackgroundColor=t[r].cornerBackgroundColor),void 0!==t[r].borderColor&&(this.borderColor=t[r].borderColor),void 0!==t[r].cornerSize&&(this.cornerSize=t[r].cornerSize),void 0!==t[r].cornerPadding&&(this.cornerPadding=t[r].cornerPadding),void 0===t[r].icon&&"settings"!==Object.keys(t)[0]||(this.useCustomIcons=!0,void 0!==t[r].settings&&(o.settings=t[r].settings),void 0!==t[r].icon&&(o.icon=t[r].icon,this.loadIcon(r,o,function(){e&&"function"==typeof e&&e()}))))},loadIcon:function(t,r,o){var i=this,s=new Image;s.onload=function(){i[t+"Icon"]=this,r.settings&&(i[t+"Settings"]=r.settings),o&&"function"==typeof o&&o()},s.onerror=function(){e.warn(this.src+" icon is not an image")},(r.icon.match(/^http[s]?:\/\//)||"//"===r.icon.substring(0,2))&&(s.crossOrigin="Anonymous"),s.src=r.icon},customizeCornerIcons:function(t){this.customiseCornerIcons(t)},drawControls:function(t){if(!this.hasControls)return this;var e,r=this._calculateCurrentDimensions(),o=r.x,i=r.y,s=this.cornerSize,n=-(o+s)/2,c=-(i+s)/2;return this.useCustomIcons?e="drawImage":(t.lineWidth=1,t.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1,t.strokeStyle=t.fillStyle=this.cornerColor,this.transparentCorners||(t.strokeStyle=this.cornerStrokeColor),e=this.transparentCorners?"stroke":"fill"),t.save(),this._setLineDash(t,this.cornerDashArray,null),this._drawControl("tl",t,e,n,c,this.tlIcon,this.tlSettings),this._drawControl("tr",t,e,n+o,c,this.trIcon,this.trSettings),this._drawControl("bl",t,e,n,c+i,this.blIcon,this.blSettings),this._drawControl("br",t,e,n+o,c+i,this.brIcon,this.brSettings),this.get("lockUniScaling")||(this._drawControl("mt",t,e,n+o/2,c,this.mtIcon,this.mtSettings),this._drawControl("mb",t,e,n+o/2,c+i,this.mbIcon,this.mbSettings),this._drawControl("mr",t,e,n+o,c+i/2,this.mrIcon,this.mrSettings),this._drawControl("ml",t,e,n,c+i/2,this.mlIcon,this.mlSettings)),this.hasRotatingPoint&&this._drawControl("mtr",t,e,n+o/2,c-this.rotatingPointOffset,this.mtrIcon,this.mtrSettings),t.restore(),this},_drawControl:function(t,e,r,i,s,n,c){if(this.isControlVisible(t)){var a=this.cornerSize,h=this.cornerStrokeColor||"transparent",u=this.cornerBackgroundColor||"black",l=this.cornerShape||"rect",d="number"==typeof this.cornerPadding?this.cornerPadding:10;if(c&&(c.cornerSize&&(i=i+a/2-c.cornerSize/2,s=s+a/2-c.cornerSize/2,a=c.cornerSize),l=c.cornerShape||l,u=c.cornerBackgroundColor||u,d="number"==typeof c.cornerPadding?c.cornerPadding:d,h=c.cornerStrokeColor||h),this.useCustomIcons)if(l){switch(e.globalAlpha=1,e.fillStyle=u,e.lineWidth=1,e.strokeStyle=h,l){case"rect":break;case"circle":}void 0!==n&&e[r](n,i+d/2,s+d/2,a-d,a-d)}else void 0!==n&&e[r](n,i,s,a,a);else o()||this.transparentCorners||e.clearRect(i,s,a,a),e[r+"Rect"](i,s,a,a),!this.transparentCorners&&h&&e.strokeRect(i,s,a,a)}}}),e.util.object.extend(e.Canvas.prototype,{overwriteActions:!1,fixedCursors:!1,customiseControls:function(t){var e;for(e in t)t.hasOwnProperty(e)&&(void 0!==t[e].action&&(this.overwriteActions=!0,this.setCustomAction(e,t[e].action)),void 0!==t[e].cursor&&(this.fixedCursors=!0,this.setCustomCursor(e,t[e].cursor)))},setCustomAction:function(t,e){this[t+"Action"]=e},setCustomCursor:function(t,e){this[t+"cursorIcon"]=e},customizeControls:function(t){this.customiseControls(t)},_getActionFromCorner:function(t,e,r){if(!e)return"drag";if(e)if(this[e+"Action"]&&this.overwriteActions)switch(e){case"mtr":return this[e+"Action"]||"rotate";case"ml":case"mr":return r[this.altActionKey]?r[this.altActionKey]?"skewY":"scaleX":this[e+"Action"];case"mt":case"mb":return r[this.altActionKey]?r[this.altActionKey]?"skewY":"scaleY":this[e+"Action"];default:return this[e+"Action"]||"scale"}else switch(e){case"mtr":return"rotate";case"ml":case"mr":return r[this.altActionKey]?"skewY":"scaleX";case"mt":case"mb":return r[this.altActionKey]?"skewX":"scaleY";default:return"scale"}return!1},_setupCurrentTransform:function(t,e){if(e){var r=this.getPointer(t),o=e._findTargetCorner(this.getPointer(t,!0)),s=this._getActionFromCorner(e,o,t),n=this._getOriginFromCorner(e,o);"function"==typeof s&&(s.call(this,t,e),s="void"),this._currentTransform={target:e,action:s,corner:o,scaleX:e.scaleX,scaleY:e.scaleY,skewX:e.skewX,skewY:e.skewY,offsetX:r.x-e.left,offsetY:r.y-e.top,originX:n.x,originY:n.y,ex:r.x,ey:r.y,lastX:r.x,lastY:r.y,left:e.left,top:e.top,theta:i(e.angle),width:e.width*e.scaleX,mouseXSign:1,mouseYSign:1,shiftKey:t.shiftKey,altKey:t[this.centeredKey]},this._currentTransform.original={left:e.left,top:e.top,scaleX:e.scaleX,scaleY:e.scaleY,skewX:e.skewX,skewY:e.skewY,originX:n.x,originY:n.y},"remove"===s&&this._removeAction(t,e),"moveUp"===s&&this._moveLayerUpAction(t,e),"moveDown"===s&&this._moveLayerDownAction(t,e),"object"==typeof s&&"rotateByDegrees"===Object.keys(s)[0]&&this._rotateByDegrees(t,e,s.rotateByDegrees),this._resetCurrentTransform()}},_removeAction:function(t,e){var r=this;this.getActiveGroup()&&"undefined"!==this.getActiveGroup()?(this.getActiveGroup().forEachObject(function(t){t.off(),t.remove()}),this.discardActiveGroup(),setTimeout(function(){r.deactivateAll()},0)):(e.off(),e.remove(),setTimeout(function(){r.deactivateAll()},0))},_moveLayerUpAction:function(t,e){this.getActiveGroup()&&"undefined"!==this.getActiveGroup()?this.getActiveGroup().forEachObject(function(t){t.bringForward()}):e.bringForward()},_moveLayerDownAction:function(t,e){this.getActiveGroup()&&"undefined"!==this.getActiveGroup()?this.getActiveGroup().forEachObject(function(t){t.sendBackwards()}):e.sendBackwards()},_rotateByDegrees:function(t,e,r){var o=parseInt(e.getAngle())+r,i=!1;"center"===e.originX&&"center"===e.originY||!e.centeredRotation||(this._setOriginToCenter(e),i=!0),o=o>360?o-360:o,this.getActiveGroup()&&"undefined"!==this.getActiveGroup()?this.getActiveGroup().forEachObject(function(t){t.setAngle(o).setCoords()}):e.setAngle(o).setCoords(),i&&this._setCenterToOrigin(e),this.renderAll()},_setCornerCursor:function(t,e,r){var o=/\.(?:jpe?g|png|gif|jpg|jpeg|svg)$/;if(this.fixedCursors&&this[t+"cursorIcon"])this[t+"cursorIcon"].match(o)?this.setCursor("url("+this[t+"cursorIcon"]+"), auto"):"resize"===this[t+"cursorIcon"]?this.setCursor(this._getRotatedCornerCursor(t,e,r)):this.setCursor(this[t+"cursorIcon"]);else if(t in s)this.setCursor(this._getRotatedCornerCursor(t,e,r));else{if("mtr"!==t||!e.hasRotatingPoint)return this.setCursor(this.defaultCursor),!1;this.setCursor(this.rotationCursor)}return!1}}),"undefined"!=typeof exports&&(module.exports=this)})(window); -------------------------------------------------------------------------------- /public/js/fabricex.js: -------------------------------------------------------------------------------- 1 | /** 2 | * fabric.canvasex.js 3 | * @author Jim Ma (https://github.com/mazong1123) 4 | * Contact: mazong1123@gmail.com 5 | * License: MIT 6 | */ 7 | (function () { 8 | 'use strict'; 9 | var addListener = fabric.util.addListener; 10 | var removeListener = fabric.util.removeListener; 11 | fabric.CanvasEx = fabric.util.createClass(fabric.Canvas, /** @lends fabric.Canvas */ { 12 | tapholdThreshold: 2000, 13 | _bindEvents: function () { 14 | var self = this; 15 | self.callSuper('_bindEvents'); 16 | self._onDoubleClick = self._onDoubleClick.bind(self); 17 | self._onTapHold = self._onTapHold.bind(self); 18 | }, 19 | _onDoubleClick: function (e) { 20 | var self = this; 21 | var target = self.findRealTarget(e); 22 | self.fire('mouse:dblclick', { 23 | target: target, 24 | e: e 25 | }); 26 | if (target && !self.isDrawingMode) { 27 | // To unify the behavior, the object's double click event does not fire on drawing mode. 28 | target.fire('object:dblclick', { 29 | e: e 30 | }); 31 | } 32 | }, 33 | _onTapHold: function (e) { 34 | var self = this; 35 | var target = self.findRealTarget(e); 36 | self.fire('touch:taphold', { 37 | target: target, 38 | e: e 39 | }); 40 | if (target && !self.isDrawingMode) { 41 | // To unify the behavior, the object's tap hold event does not fire on drawing mode. 42 | target.fire('taphold', { 43 | e: e 44 | }); 45 | } 46 | if (e.type === 'touchend' && self.touchStartTimer != null) { 47 | clearTimeout(self.touchStartTimer); 48 | } 49 | }, 50 | _onMouseDown: function (e) { 51 | var self = this; 52 | self.callSuper('_onMouseDown', e); 53 | if (e.type === 'touchstart') { 54 | var touchStartTimer = setTimeout(function () { 55 | self._onTapHold(e); 56 | self.isLongTap = true; 57 | }, self.tapholdThreshold); 58 | self.touchStartTimer = touchStartTimer; 59 | return; 60 | } 61 | var isTargetGroup = false; 62 | var target = self.findTarget(e); 63 | if (target !== undefined && target._objects !== undefined) { 64 | isTargetGroup = true; 65 | } 66 | // Add right click support and group object click support. 67 | if (e.which === 3 || (isTargetGroup && self.fireEventForObjectInsideGroup)) { 68 | // Skip group to find the real object. 69 | var target = self.findRealTarget(e); 70 | if (!isTargetGroup || !self.fireEventForObjectInsideGroup) { 71 | // Canvas event only for right click. For group object, the super method already fired a canvas event. 72 | self.fire('mouse:down', { target: target, e: e }); 73 | } 74 | 75 | if (target && !self.isDrawingMode) { 76 | // To unify the behavior, the object's mouse down event does not fire on drawing mode. 77 | target.fire('mousedown', { 78 | e: e 79 | }); 80 | } 81 | } 82 | }, 83 | _onMouseUp: function (e) { 84 | var self = this; 85 | self.callSuper('_onMouseUp', e); 86 | if (e.type === 'touchend') { 87 | // Process tap hold. 88 | if (self.touchStartTimer != null) { 89 | clearTimeout(self.touchStartTimer); 90 | } 91 | // Process long tap. 92 | if (self.isLongTap) { 93 | self._onLongTapEnd(e); 94 | self.isLongTap = false; 95 | } 96 | // Process double click 97 | var now = new Date().getTime(); 98 | var lastTouch = self.lastTouch || now + 1; 99 | var delta = now - lastTouch; 100 | if (delta < 300 && delta > 0) { 101 | // After we detct a doubletap, start over 102 | self.lastTouch = null; 103 | self._onDoubleTap(e); 104 | } else { 105 | self.lastTouch = now; 106 | } 107 | return; 108 | } 109 | }, 110 | _onDoubleTap: function (e) { 111 | var self = this; 112 | var target = self.findRealTarget(e); 113 | self.fire('touch:doubletap', { 114 | target: target, 115 | e: e 116 | }); 117 | if (target && !self.isDrawingMode) { 118 | // To unify the behavior, the object's double tap event does not fire on drawing mode. 119 | target.fire('object:doubletap', { 120 | e: e 121 | }); 122 | } 123 | }, 124 | _onLongTapEnd: function (e) { 125 | var self = this; 126 | var target = self.findRealTarget(e); 127 | self.fire('touch:longtapend', { 128 | target: target, 129 | e: e 130 | }); 131 | if (target && !self.isDrawingMode) { 132 | // To unify the behavior, the object's long tap end event does not fire on drawing mode. 133 | target.fire('object:longtapend', { 134 | e: e 135 | }); 136 | } 137 | }, 138 | _initEventListeners: function () { 139 | var self = this; 140 | self.callSuper('_initEventListeners'); 141 | addListener(self.upperCanvasEl, 'dblclick', self._onDoubleClick); 142 | }, 143 | _checkTargetForGroupObject: function (obj, pointer) { 144 | if (obj && 145 | obj.visible && 146 | obj.evented && 147 | this._containsPointForGroupObject(pointer, obj)) { 148 | if ((this.perPixelTargetFind || obj.perPixelTargetFind) && !obj.isEditing) { 149 | var isTransparent = this.isTargetTransparent(obj, pointer.x, pointer.y); 150 | if (!isTransparent) { 151 | return true; 152 | } 153 | } 154 | else { 155 | return true; 156 | } 157 | } 158 | }, 159 | _containsPointForGroupObject: function (pointer, target) { 160 | var xy = this._normalizePointer(target, pointer); 161 | // http://www.geog.ubc.ca/courses/klink/gis.notes/ncgia/u32.html 162 | // http://idav.ucdavis.edu/~okreylos/TAship/Spring2000/PointInPolygon.html 163 | return (target.containsPoint(xy) || target._findTargetCorner(pointer)); 164 | }, 165 | _adjustPointerAccordingToGroupObjects: function (originalPointer, group) { 166 | var groupObjects = group._objects; 167 | var objectLength = groupObjects.length; 168 | if (objectLength <= 0) { 169 | return originalPointer; 170 | } 171 | var minLeft = 99999; 172 | var minTop = 99999; 173 | var i; 174 | for (i = 0; i < objectLength; i++) { 175 | var obj = groupObjects[i]; 176 | if (minLeft > obj.left) { 177 | minLeft = obj.left; 178 | } 179 | if (minTop > obj.top) { 180 | minTop = obj.top; 181 | } 182 | } 183 | originalPointer.x += minLeft - group.left; 184 | originalPointer.y += minTop - group.top; 185 | return originalPointer; 186 | }, 187 | findRealTarget: function (e) { 188 | var self = this; 189 | var target; 190 | if (!self.fireEventForObjectInsideGroup) { 191 | target = self.findTarget(e); 192 | } 193 | else { 194 | // Skip group to find the real object. 195 | var target = self.findTarget(e, true); 196 | if (target !== undefined && target._objects !== undefined) { 197 | var pointer = self.getPointer(e, true); 198 | var objects = target._objects; 199 | pointer = self._adjustPointerAccordingToGroupObjects(pointer, target); 200 | var i = objects.length; 201 | while (i--) { 202 | if (self._checkTargetForGroupObject(objects[i], pointer)) { 203 | target = objects[i]; 204 | break; 205 | } 206 | } 207 | } 208 | } 209 | return target; 210 | }, 211 | removeListeners: function () { 212 | var self = this; 213 | self.callSuper('removeListeners'); 214 | removeListener(self.upperCanvasEl, 'dblclick', self._onDoubleClick); 215 | }, 216 | fireEventForObjectInsideGroup: false 217 | }); 218 | })(); -------------------------------------------------------------------------------- /public/js/moments-zh.js: -------------------------------------------------------------------------------- 1 | //! moment.js locale configuration 2 | //! locale : Chinese (Taiwan) [zh-tw] 3 | //! author : Ben : https://github.com/ben-lin 4 | //! author : Chris Lam : https://github.com/hehachris 5 | 6 | ;(function (global, factory) { 7 | typeof exports === 'object' && typeof module !== 'undefined' 8 | && typeof require === 'function' ? factory(require('../moment')) : 9 | typeof define === 'function' && define.amd ? define(['../moment'], factory) : 10 | factory(global.moment) 11 | }(this, (function (moment) { 'use strict'; 12 | 13 | 14 | var zhTw = moment.defineLocale('zh-tw', { 15 | months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'), 16 | monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), 17 | weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), 18 | weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'), 19 | weekdaysMin : '日_一_二_三_四_五_六'.split('_'), 20 | longDateFormat : { 21 | LT : 'Ah 點 mm 分', 22 | LTS : 'Ah 點 m 分 s 秒', 23 | L : 'YYYY 年 MMMD 日', 24 | LL : 'YYYY 年 MMMD 日', 25 | LLL : 'YYYY 年 MMMD 日 Ah 點 mm 分', 26 | LLLL : 'YYYY 年 MMMD 日 dddd Ah 點 mm 分', 27 | l : 'YYYY 年 MMMD 日', 28 | ll : 'YYYY 年 MMMD 日', 29 | lll : 'YYYY 年 MMMD 日 Ah 點 mm 分', 30 | llll : 'YYYY 年 MMMD 日 ddddAh 點 mm分' 31 | }, 32 | meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, 33 | meridiemHour : function (hour, meridiem) { 34 | if (hour === 12) { 35 | hour = 0; 36 | } 37 | if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') { 38 | return hour; 39 | } else if (meridiem === '中午') { 40 | return hour >= 11 ? hour : hour + 12; 41 | } else if (meridiem === '下午' || meridiem === '晚上') { 42 | return hour + 12; 43 | } 44 | }, 45 | meridiem : function (hour, minute, isLower) { 46 | var hm = hour * 100 + minute; 47 | if (hm < 600) { 48 | return '凌晨'; 49 | } else if (hm < 900) { 50 | return '早上'; 51 | } else if (hm < 1130) { 52 | return '上午'; 53 | } else if (hm < 1230) { 54 | return '中午'; 55 | } else if (hm < 1800) { 56 | return '下午'; 57 | } else { 58 | return '晚上'; 59 | } 60 | }, 61 | calendar : { 62 | sameDay : '[今天]LT', 63 | nextDay : '[明天]LT', 64 | nextWeek : '[下]ddddLT', 65 | lastDay : '[昨天]LT', 66 | lastWeek : '[上]ddddLT', 67 | sameElse : 'L' 68 | }, 69 | ordinalParse: /\d{1,2}(日|月|週)/, 70 | ordinal : function (number, period) { 71 | switch (period) { 72 | case 'd' : 73 | case 'D' : 74 | case 'DDD' : 75 | return number + '日'; 76 | case 'M' : 77 | return number + '月'; 78 | case 'w' : 79 | case 'W' : 80 | return number + '週'; 81 | default : 82 | return number; 83 | } 84 | }, 85 | relativeTime : { 86 | future : '%s內', 87 | past : '%s前', 88 | s : '幾秒', 89 | m : '1 分鐘', 90 | mm : '%d 分鐘', 91 | h : '1 小時', 92 | hh : '%d 小時', 93 | d : '1 天', 94 | dd : '%d 天', 95 | M : '1 個月', 96 | MM : '%d 個月', 97 | y : '1 年', 98 | yy : '%d 年' 99 | } 100 | }); 101 | 102 | return zhTw; 103 | 104 | }))); -------------------------------------------------------------------------------- /public/js/momentstz.js: -------------------------------------------------------------------------------- 1 | //! moment-timezone.js 2 | //! version : 0.5.5 3 | //! author : Tim Wood 4 | //! license : MIT 5 | //! github.com/moment/moment-timezone 6 | 7 | (function (root, factory) { 8 | "use strict"; 9 | 10 | /*global define*/ 11 | if (typeof define === 'function' && define.amd) { 12 | define(['moment'], factory); // AMD 13 | } else if (typeof module === 'object' && module.exports) { 14 | module.exports = factory(require('moment')); // Node 15 | } else { 16 | factory(root.moment); // Browser 17 | } 18 | }(this, function (moment) { 19 | "use strict"; 20 | 21 | // Do not load moment-timezone a second time. 22 | if (moment.tz !== undefined) { 23 | logError('Moment Timezone ' + moment.tz.version + ' was already loaded ' + (moment.tz.dataVersion ? 'with data from ' : 'without any data') + moment.tz.dataVersion); 24 | return moment; 25 | } 26 | 27 | var VERSION = "0.5.5", 28 | zones = {}, 29 | links = {}, 30 | names = {}, 31 | guesses = {}, 32 | cachedGuess, 33 | 34 | momentVersion = moment.version.split('.'), 35 | major = +momentVersion[0], 36 | minor = +momentVersion[1]; 37 | 38 | // Moment.js version check 39 | if (major < 2 || (major === 2 && minor < 6)) { 40 | logError('Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js ' + moment.version + '. See momentjs.com'); 41 | } 42 | 43 | /************************************ 44 | Unpacking 45 | ************************************/ 46 | 47 | function charCodeToInt(charCode) { 48 | if (charCode > 96) { 49 | return charCode - 87; 50 | } else if (charCode > 64) { 51 | return charCode - 29; 52 | } 53 | return charCode - 48; 54 | } 55 | 56 | function unpackBase60(string) { 57 | var i = 0, 58 | parts = string.split('.'), 59 | whole = parts[0], 60 | fractional = parts[1] || '', 61 | multiplier = 1, 62 | num, 63 | out = 0, 64 | sign = 1; 65 | 66 | // handle negative numbers 67 | if (string.charCodeAt(0) === 45) { 68 | i = 1; 69 | sign = -1; 70 | } 71 | 72 | // handle digits before the decimal 73 | for (i; i < whole.length; i++) { 74 | num = charCodeToInt(whole.charCodeAt(i)); 75 | out = 60 * out + num; 76 | } 77 | 78 | // handle digits after the decimal 79 | for (i = 0; i < fractional.length; i++) { 80 | multiplier = multiplier / 60; 81 | num = charCodeToInt(fractional.charCodeAt(i)); 82 | out += num * multiplier; 83 | } 84 | 85 | return out * sign; 86 | } 87 | 88 | function arrayToInt (array) { 89 | for (var i = 0; i < array.length; i++) { 90 | array[i] = unpackBase60(array[i]); 91 | } 92 | } 93 | 94 | function intToUntil (array, length) { 95 | for (var i = 0; i < length; i++) { 96 | array[i] = Math.round((array[i - 1] || 0) + (array[i] * 60000)); // minutes to milliseconds 97 | } 98 | 99 | array[length - 1] = Infinity; 100 | } 101 | 102 | function mapIndices (source, indices) { 103 | var out = [], i; 104 | 105 | for (i = 0; i < indices.length; i++) { 106 | out[i] = source[indices[i]]; 107 | } 108 | 109 | return out; 110 | } 111 | 112 | function unpack (string) { 113 | var data = string.split('|'), 114 | offsets = data[2].split(' '), 115 | indices = data[3].split(''), 116 | untils = data[4].split(' '); 117 | 118 | arrayToInt(offsets); 119 | arrayToInt(indices); 120 | arrayToInt(untils); 121 | 122 | intToUntil(untils, indices.length); 123 | 124 | return { 125 | name : data[0], 126 | abbrs : mapIndices(data[1].split(' '), indices), 127 | offsets : mapIndices(offsets, indices), 128 | untils : untils, 129 | population : data[5] | 0 130 | }; 131 | } 132 | 133 | /************************************ 134 | Zone object 135 | ************************************/ 136 | 137 | function Zone (packedString) { 138 | if (packedString) { 139 | this._set(unpack(packedString)); 140 | } 141 | } 142 | 143 | Zone.prototype = { 144 | _set : function (unpacked) { 145 | this.name = unpacked.name; 146 | this.abbrs = unpacked.abbrs; 147 | this.untils = unpacked.untils; 148 | this.offsets = unpacked.offsets; 149 | this.population = unpacked.population; 150 | }, 151 | 152 | _index : function (timestamp) { 153 | var target = +timestamp, 154 | untils = this.untils, 155 | i; 156 | 157 | for (i = 0; i < untils.length; i++) { 158 | if (target < untils[i]) { 159 | return i; 160 | } 161 | } 162 | }, 163 | 164 | parse : function (timestamp) { 165 | var target = +timestamp, 166 | offsets = this.offsets, 167 | untils = this.untils, 168 | max = untils.length - 1, 169 | offset, offsetNext, offsetPrev, i; 170 | 171 | for (i = 0; i < max; i++) { 172 | offset = offsets[i]; 173 | offsetNext = offsets[i + 1]; 174 | offsetPrev = offsets[i ? i - 1 : i]; 175 | 176 | if (offset < offsetNext && tz.moveAmbiguousForward) { 177 | offset = offsetNext; 178 | } else if (offset > offsetPrev && tz.moveInvalidForward) { 179 | offset = offsetPrev; 180 | } 181 | 182 | if (target < untils[i] - (offset * 60000)) { 183 | return offsets[i]; 184 | } 185 | } 186 | 187 | return offsets[max]; 188 | }, 189 | 190 | abbr : function (mom) { 191 | return this.abbrs[this._index(mom)]; 192 | }, 193 | 194 | offset : function (mom) { 195 | return this.offsets[this._index(mom)]; 196 | } 197 | }; 198 | 199 | /************************************ 200 | Current Timezone 201 | ************************************/ 202 | 203 | function OffsetAt(at) { 204 | var timeString = at.toTimeString(); 205 | var abbr = timeString.match(/\([a-z ]+\)/i); 206 | if (abbr && abbr[0]) { 207 | // 17:56:31 GMT-0600 (CST) 208 | // 17:56:31 GMT-0600 (Central Standard Time) 209 | abbr = abbr[0].match(/[A-Z]/g); 210 | abbr = abbr ? abbr.join('') : undefined; 211 | } else { 212 | // 17:56:31 CST 213 | // 17:56:31 GMT+0800 (台北標準時間) 214 | abbr = timeString.match(/[A-Z]{3,5}/g); 215 | abbr = abbr ? abbr[0] : undefined; 216 | } 217 | 218 | if (abbr === 'GMT') { 219 | abbr = undefined; 220 | } 221 | 222 | this.at = +at; 223 | this.abbr = abbr; 224 | this.offset = at.getTimezoneOffset(); 225 | } 226 | 227 | function ZoneScore(zone) { 228 | this.zone = zone; 229 | this.offsetScore = 0; 230 | this.abbrScore = 0; 231 | } 232 | 233 | ZoneScore.prototype.scoreOffsetAt = function (offsetAt) { 234 | this.offsetScore += Math.abs(this.zone.offset(offsetAt.at) - offsetAt.offset); 235 | if (this.zone.abbr(offsetAt.at).replace(/[^A-Z]/g, '') !== offsetAt.abbr) { 236 | this.abbrScore++; 237 | } 238 | }; 239 | 240 | function findChange(low, high) { 241 | var mid, diff; 242 | 243 | while ((diff = ((high.at - low.at) / 12e4 | 0) * 6e4)) { 244 | mid = new OffsetAt(new Date(low.at + diff)); 245 | if (mid.offset === low.offset) { 246 | low = mid; 247 | } else { 248 | high = mid; 249 | } 250 | } 251 | 252 | return low; 253 | } 254 | 255 | function userOffsets() { 256 | var startYear = new Date().getFullYear() - 2, 257 | last = new OffsetAt(new Date(startYear, 0, 1)), 258 | offsets = [last], 259 | change, next, i; 260 | 261 | for (i = 1; i < 48; i++) { 262 | next = new OffsetAt(new Date(startYear, i, 1)); 263 | if (next.offset !== last.offset) { 264 | change = findChange(last, next); 265 | offsets.push(change); 266 | offsets.push(new OffsetAt(new Date(change.at + 6e4))); 267 | } 268 | last = next; 269 | } 270 | 271 | for (i = 0; i < 4; i++) { 272 | offsets.push(new OffsetAt(new Date(startYear + i, 0, 1))); 273 | offsets.push(new OffsetAt(new Date(startYear + i, 6, 1))); 274 | } 275 | 276 | return offsets; 277 | } 278 | 279 | function sortZoneScores (a, b) { 280 | if (a.offsetScore !== b.offsetScore) { 281 | return a.offsetScore - b.offsetScore; 282 | } 283 | if (a.abbrScore !== b.abbrScore) { 284 | return a.abbrScore - b.abbrScore; 285 | } 286 | return b.zone.population - a.zone.population; 287 | } 288 | 289 | function addToGuesses (name, offsets) { 290 | var i, offset; 291 | arrayToInt(offsets); 292 | for (i = 0; i < offsets.length; i++) { 293 | offset = offsets[i]; 294 | guesses[offset] = guesses[offset] || {}; 295 | guesses[offset][name] = true; 296 | } 297 | } 298 | 299 | function guessesForUserOffsets (offsets) { 300 | var offsetsLength = offsets.length, 301 | filteredGuesses = {}, 302 | out = [], 303 | i, j, guessesOffset; 304 | 305 | for (i = 0; i < offsetsLength; i++) { 306 | guessesOffset = guesses[offsets[i].offset] || {}; 307 | for (j in guessesOffset) { 308 | if (guessesOffset.hasOwnProperty(j)) { 309 | filteredGuesses[j] = true; 310 | } 311 | } 312 | } 313 | 314 | for (i in filteredGuesses) { 315 | if (filteredGuesses.hasOwnProperty(i)) { 316 | out.push(names[i]); 317 | } 318 | } 319 | 320 | return out; 321 | } 322 | 323 | function rebuildGuess () { 324 | 325 | // use Intl API when available and returning valid time zone 326 | try { 327 | var intlName = Intl.DateTimeFormat().resolvedOptions().timeZone; 328 | if (intlName){ 329 | var name = names[normalizeName(intlName)]; 330 | if (name) { 331 | return name; 332 | } 333 | logError("Moment Timezone found " + intlName + " from the Intl api, but did not have that data loaded."); 334 | } 335 | } catch (e) { 336 | // Intl unavailable, fall back to manual guessing. 337 | } 338 | 339 | var offsets = userOffsets(), 340 | offsetsLength = offsets.length, 341 | guesses = guessesForUserOffsets(offsets), 342 | zoneScores = [], 343 | zoneScore, i, j; 344 | 345 | for (i = 0; i < guesses.length; i++) { 346 | zoneScore = new ZoneScore(getZone(guesses[i]), offsetsLength); 347 | for (j = 0; j < offsetsLength; j++) { 348 | zoneScore.scoreOffsetAt(offsets[j]); 349 | } 350 | zoneScores.push(zoneScore); 351 | } 352 | 353 | zoneScores.sort(sortZoneScores); 354 | 355 | return zoneScores.length > 0 ? zoneScores[0].zone.name : undefined; 356 | } 357 | 358 | function guess (ignoreCache) { 359 | if (!cachedGuess || ignoreCache) { 360 | cachedGuess = rebuildGuess(); 361 | } 362 | return cachedGuess; 363 | } 364 | 365 | /************************************ 366 | Global Methods 367 | ************************************/ 368 | 369 | function normalizeName (name) { 370 | return (name || '').toLowerCase().replace(/\//g, '_'); 371 | } 372 | 373 | function addZone (packed) { 374 | var i, name, split, normalized; 375 | 376 | if (typeof packed === "string") { 377 | packed = [packed]; 378 | } 379 | 380 | for (i = 0; i < packed.length; i++) { 381 | split = packed[i].split('|'); 382 | name = split[0]; 383 | normalized = normalizeName(name); 384 | zones[normalized] = packed[i]; 385 | names[normalized] = name; 386 | if (split[5]) { 387 | addToGuesses(normalized, split[2].split(' ')); 388 | } 389 | } 390 | } 391 | 392 | function getZone (name, caller) { 393 | name = normalizeName(name); 394 | 395 | var zone = zones[name]; 396 | var link; 397 | 398 | if (zone instanceof Zone) { 399 | return zone; 400 | } 401 | 402 | if (typeof zone === 'string') { 403 | zone = new Zone(zone); 404 | zones[name] = zone; 405 | return zone; 406 | } 407 | 408 | // Pass getZone to prevent recursion more than 1 level deep 409 | if (links[name] && caller !== getZone && (link = getZone(links[name], getZone))) { 410 | zone = zones[name] = new Zone(); 411 | zone._set(link); 412 | zone.name = names[name]; 413 | return zone; 414 | } 415 | 416 | return null; 417 | } 418 | 419 | function getNames () { 420 | var i, out = []; 421 | 422 | for (i in names) { 423 | if (names.hasOwnProperty(i) && (zones[i] || zones[links[i]]) && names[i]) { 424 | out.push(names[i]); 425 | } 426 | } 427 | 428 | return out.sort(); 429 | } 430 | 431 | function addLink (aliases) { 432 | var i, alias, normal0, normal1; 433 | 434 | if (typeof aliases === "string") { 435 | aliases = [aliases]; 436 | } 437 | 438 | for (i = 0; i < aliases.length; i++) { 439 | alias = aliases[i].split('|'); 440 | 441 | normal0 = normalizeName(alias[0]); 442 | normal1 = normalizeName(alias[1]); 443 | 444 | links[normal0] = normal1; 445 | names[normal0] = alias[0]; 446 | 447 | links[normal1] = normal0; 448 | names[normal1] = alias[1]; 449 | } 450 | } 451 | 452 | function loadData (data) { 453 | addZone(data.zones); 454 | addLink(data.links); 455 | tz.dataVersion = data.version; 456 | } 457 | 458 | function zoneExists (name) { 459 | if (!zoneExists.didShowError) { 460 | zoneExists.didShowError = true; 461 | logError("moment.tz.zoneExists('" + name + "') has been deprecated in favor of !moment.tz.zone('" + name + "')"); 462 | } 463 | return !!getZone(name); 464 | } 465 | 466 | function needsOffset (m) { 467 | return !!(m._a && (m._tzm === undefined)); 468 | } 469 | 470 | function logError (message) { 471 | if (typeof console !== 'undefined' && typeof console.error === 'function') { 472 | console.error(message); 473 | } 474 | } 475 | 476 | /************************************ 477 | moment.tz namespace 478 | ************************************/ 479 | 480 | function tz (input) { 481 | var args = Array.prototype.slice.call(arguments, 0, -1), 482 | name = arguments[arguments.length - 1], 483 | zone = getZone(name), 484 | out = moment.utc.apply(null, args); 485 | 486 | if (zone && !moment.isMoment(input) && needsOffset(out)) { 487 | out.add(zone.parse(out), 'minutes'); 488 | } 489 | 490 | out.tz(name); 491 | 492 | return out; 493 | } 494 | 495 | tz.version = VERSION; 496 | tz.dataVersion = ''; 497 | tz._zones = zones; 498 | tz._links = links; 499 | tz._names = names; 500 | tz.add = addZone; 501 | tz.link = addLink; 502 | tz.load = loadData; 503 | tz.zone = getZone; 504 | tz.zoneExists = zoneExists; // deprecated in 0.1.0 505 | tz.guess = guess; 506 | tz.names = getNames; 507 | tz.Zone = Zone; 508 | tz.unpack = unpack; 509 | tz.unpackBase60 = unpackBase60; 510 | tz.needsOffset = needsOffset; 511 | tz.moveInvalidForward = true; 512 | tz.moveAmbiguousForward = false; 513 | 514 | /************************************ 515 | Interface with Moment.js 516 | ************************************/ 517 | 518 | var fn = moment.fn; 519 | 520 | moment.tz = tz; 521 | 522 | moment.defaultZone = null; 523 | 524 | moment.updateOffset = function (mom, keepTime) { 525 | var zone = moment.defaultZone, 526 | offset; 527 | 528 | if (mom._z === undefined) { 529 | if (zone && needsOffset(mom) && !mom._isUTC) { 530 | mom._d = moment.utc(mom._a)._d; 531 | mom.utc().add(zone.parse(mom), 'minutes'); 532 | } 533 | mom._z = zone; 534 | } 535 | if (mom._z) { 536 | offset = mom._z.offset(mom); 537 | if (Math.abs(offset) < 16) { 538 | offset = offset / 60; 539 | } 540 | if (mom.utcOffset !== undefined) { 541 | mom.utcOffset(-offset, keepTime); 542 | } else { 543 | mom.zone(offset, keepTime); 544 | } 545 | } 546 | }; 547 | 548 | fn.tz = function (name) { 549 | if (name) { 550 | this._z = getZone(name); 551 | if (this._z) { 552 | moment.updateOffset(this); 553 | } else { 554 | logError("Moment Timezone has no data for " + name + ". See http://momentjs.com/timezone/docs/#/data-loading/."); 555 | } 556 | return this; 557 | } 558 | if (this._z) { return this._z.name; } 559 | }; 560 | 561 | function abbrWrap (old) { 562 | return function () { 563 | if (this._z) { return this._z.abbr(this); } 564 | return old.call(this); 565 | }; 566 | } 567 | 568 | function resetZoneWrap (old) { 569 | return function () { 570 | this._z = null; 571 | return old.apply(this, arguments); 572 | }; 573 | } 574 | 575 | fn.zoneName = abbrWrap(fn.zoneName); 576 | fn.zoneAbbr = abbrWrap(fn.zoneAbbr); 577 | fn.utc = resetZoneWrap(fn.utc); 578 | 579 | moment.tz.setDefault = function(name) { 580 | if (major < 2 || (major === 2 && minor < 9)) { 581 | logError('Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js ' + moment.version + '.'); 582 | } 583 | moment.defaultZone = name ? getZone(name) : null; 584 | return moment; 585 | }; 586 | 587 | // Cloning a moment should include the _z property. 588 | var momentProperties = moment.momentProperties; 589 | if (Object.prototype.toString.call(momentProperties) === '[object Array]') { 590 | // moment 2.8.1+ 591 | momentProperties.push('_z'); 592 | momentProperties.push('_a'); 593 | } else if (momentProperties) { 594 | // moment 2.7.0 595 | momentProperties._z = null; 596 | } 597 | 598 | loadData({ 599 | "version": "2016f", 600 | "zones": [ 601 | "Africa/Abidjan|GMT|0|0||48e5", 602 | "Africa/Khartoum|EAT|-30|0||51e5", 603 | "Africa/Algiers|CET|-10|0||26e5", 604 | "Africa/Lagos|WAT|-10|0||17e6", 605 | "Africa/Maputo|CAT|-20|0||26e5", 606 | "Africa/Cairo|EET EEST|-20 -30|010101010|1Cby0 Fb0 c10 8n0 8Nd0 gL0 e10 mn0|15e6", 607 | "Africa/Casablanca|WET WEST|0 -10|01010101010101010101010101010101010101010|1Cco0 Db0 1zd0 Lz0 1Nf0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 Rc0 11A0 e00 e00 U00 11A0 8o0 e00 11A0|32e5", 608 | "Europe/Paris|CET CEST|-10 -20|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|11e6", 609 | "Africa/Johannesburg|SAST|-20|0||84e5", 610 | "Africa/Tripoli|EET CET CEST|-20 -10 -20|0120|1IlA0 TA0 1o00|11e5", 611 | "Africa/Windhoek|WAST WAT|-20 -10|01010101010101010101010|1C1c0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0|32e4", 612 | "America/Adak|HST HDT|a0 90|01010101010101010101010|1BR00 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|326", 613 | "America/Anchorage|AKST AKDT|90 80|01010101010101010101010|1BQX0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|30e4", 614 | "America/Santo_Domingo|AST|40|0||29e5", 615 | "America/Araguaina|BRT BRST|30 20|010|1IdD0 Lz0|14e4", 616 | "America/Argentina/Buenos_Aires|ART|30|0|", 617 | "America/Asuncion|PYST PYT|30 40|01010101010101010101010|1C430 1a10 1fz0 1a10 1fz0 1cN0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0|28e5", 618 | "America/Panama|EST|50|0||15e5", 619 | "America/Bahia|BRT BRST|30 20|010|1FJf0 Rb0|27e5", 620 | "America/Bahia_Banderas|MST CDT CST|70 50 60|01212121212121212121212|1C1l0 1nW0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|84e3", 621 | "America/Fortaleza|BRT|30|0||34e5", 622 | "America/Managua|CST|60|0||22e5", 623 | "America/Manaus|AMT|40|0||19e5", 624 | "America/Bogota|COT|50|0||90e5", 625 | "America/Denver|MST MDT|70 60|01010101010101010101010|1BQV0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|26e5", 626 | "America/Campo_Grande|AMST AMT|30 40|01010101010101010101010|1BIr0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1C10 Lz0 1C10 Lz0 1C10|77e4", 627 | "America/Cancun|CST CDT EST|60 50 50|010101010102|1C1k0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 Dd0|63e4", 628 | "America/Caracas|VET VET|4u 40|01|1QMT0|29e5", 629 | "America/Cayenne|GFT|30|0||58e3", 630 | "America/Chicago|CST CDT|60 50|01010101010101010101010|1BQU0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|92e5", 631 | "America/Chihuahua|MST MDT|70 60|01010101010101010101010|1C1l0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|81e4", 632 | "America/Phoenix|MST|70|0||42e5", 633 | "America/Los_Angeles|PST PDT|80 70|01010101010101010101010|1BQW0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|15e6", 634 | "America/New_York|EST EDT|50 40|01010101010101010101010|1BQT0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|21e6", 635 | "America/Rio_Branco|AMT ACT|40 50|01|1KLE0|31e4", 636 | "America/Fort_Nelson|PST PDT MST|80 70 70|010101010102|1BQW0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0|39e2", 637 | "America/Halifax|AST ADT|40 30|01010101010101010101010|1BQS0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|39e4", 638 | "America/Godthab|WGT WGST|30 20|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|17e3", 639 | "America/Goose_Bay|AST ADT|40 30|01010101010101010101010|1BQQ1 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|76e2", 640 | "America/Grand_Turk|EST EDT AST|50 40 40|0101010101012|1BQT0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|37e2", 641 | "America/Guayaquil|ECT|50|0||27e5", 642 | "America/Guyana|GYT|40|0||80e4", 643 | "America/Havana|CST CDT|50 40|01010101010101010101010|1BQR0 1wo0 U00 1zc0 U00 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0|21e5", 644 | "America/La_Paz|BOT|40|0||19e5", 645 | "America/Lima|PET|50|0||11e6", 646 | "America/Mexico_City|CST CDT|60 50|01010101010101010101010|1C1k0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|20e6", 647 | "America/Metlakatla|PST AKST AKDT|80 90 80|012121212121|1PAa0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|14e2", 648 | "America/Miquelon|PMST PMDT|30 20|01010101010101010101010|1BQR0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|61e2", 649 | "America/Montevideo|UYST UYT|20 30|010101010101|1BQQ0 1ld0 14n0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10 11z0|17e5", 650 | "America/Noronha|FNT|20|0||30e2", 651 | "America/North_Dakota/Beulah|MST MDT CST CDT|70 60 60 50|01232323232323232323232|1BQV0 1zb0 Oo0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", 652 | "America/Paramaribo|SRT|30|0||24e4", 653 | "America/Port-au-Prince|EST EDT|50 40|010101010|1GI70 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e5", 654 | "America/Santiago|CLST CLT|30 40|010101010101010101010|1C1f0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0|62e5", 655 | "America/Sao_Paulo|BRST BRT|20 30|01010101010101010101010|1BIq0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1C10 Lz0 1C10 Lz0 1C10|20e6", 656 | "America/Scoresbysund|EGT EGST|10 0|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|452", 657 | "America/St_Johns|NST NDT|3u 2u|01010101010101010101010|1BQPv 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|11e4", 658 | "Antarctica/Casey|CAST AWST|-b0 -80|0101|1BN30 40P0 KL0|10", 659 | "Antarctica/Davis|DAVT DAVT|-50 -70|0101|1BPw0 3Wn0 KN0|70", 660 | "Antarctica/DumontDUrville|DDUT|-a0|0||80", 661 | "Antarctica/Macquarie|AEDT MIST|-b0 -b0|01|1C140|1", 662 | "Antarctica/Mawson|MAWT|-50|0||60", 663 | "Pacific/Auckland|NZDT NZST|-d0 -c0|01010101010101010101010|1C120 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00|14e5", 664 | "Antarctica/Rothera|ROTT|30|0||130", 665 | "Antarctica/Syowa|SYOT|-30|0||20", 666 | "Antarctica/Troll|UTC CEST|0 -20|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|40", 667 | "Antarctica/Vostok|VOST|-60|0||25", 668 | "Asia/Baghdad|AST|-30|0||66e5", 669 | "Asia/Almaty|+06|-60|0||15e5", 670 | "Asia/Amman|EET EEST|-20 -30|010101010101010101010|1BVy0 1qM0 11A0 1o00 11A0 4bX0 Dd0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0|25e5", 671 | "Asia/Anadyr|ANAT ANAST ANAT|-c0 -c0 -b0|0120|1BWe0 1qN0 WM0|13e3", 672 | "Asia/Aqtobe|+05|-50|0||27e4", 673 | "Asia/Ashgabat|TMT|-50|0||41e4", 674 | "Asia/Baku|AZT AZST|-40 -50|0101010101010|1BWo0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00|27e5", 675 | "Asia/Bangkok|ICT|-70|0||15e6", 676 | "Asia/Barnaul|+06 +07|-60 -70|010101|1BWk0 1qM0 WM0 8Hz0 3rd0", 677 | "Asia/Beirut|EET EEST|-20 -30|01010101010101010101010|1BWm0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0|22e5", 678 | "Asia/Bishkek|KGT|-60|0||87e4", 679 | "Asia/Brunei|BNT|-80|0||42e4", 680 | "Asia/Kolkata|IST|-5u|0||15e6", 681 | "Asia/Chita|YAKT YAKST YAKT IRKT|-90 -a0 -a0 -80|010230|1BWh0 1qM0 WM0 8Hz0 3re0|33e4", 682 | "Asia/Choibalsan|CHOT CHOST|-80 -90|0101010101010|1O8G0 1cJ0 1cP0 1cJ0 1cP0 1fx0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0|38e3", 683 | "Asia/Shanghai|CST|-80|0||23e6", 684 | "Asia/Dhaka|BDT|-60|0||16e6", 685 | "Asia/Damascus|EET EEST|-20 -30|01010101010101010101010|1C0m0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0|26e5", 686 | "Asia/Dili|TLT|-90|0||19e4", 687 | "Asia/Dubai|GST|-40|0||39e5", 688 | "Asia/Dushanbe|TJT|-50|0||76e4", 689 | "Asia/Gaza|EET EEST|-20 -30|01010101010101010101010|1BVW1 SKX 1xd1 MKX 1AN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nz0 1220 1ny0 1220 1qm0 1220 1ny0 1220 1ny0 1220 1ny0|18e5", 690 | "Asia/Hebron|EET EEST|-20 -30|0101010101010101010101010|1BVy0 Tb0 1xd1 MKX bB0 cn0 1cN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nz0 1220 1ny0 1220 1qm0 1220 1ny0 1220 1ny0 1220 1ny0|25e4", 691 | "Asia/Hong_Kong|HKT|-80|0||73e5", 692 | "Asia/Hovd|HOVT HOVST|-70 -80|0101010101010|1O8H0 1cJ0 1cP0 1cJ0 1cP0 1fx0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0|81e3", 693 | "Asia/Irkutsk|IRKT IRKST IRKT|-80 -90 -90|01020|1BWi0 1qM0 WM0 8Hz0|60e4", 694 | "Europe/Istanbul|EET EEST|-20 -30|01010101010101010101010|1BWp0 1qM0 Xc0 1qo0 WM0 1qM0 11A0 1o00 1200 1nA0 11A0 1tA0 U00 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|13e6", 695 | "Asia/Jakarta|WIB|-70|0||31e6", 696 | "Asia/Jayapura|WIT|-90|0||26e4", 697 | "Asia/Jerusalem|IST IDT|-20 -30|01010101010101010101010|1BVA0 17X0 1kp0 1dz0 1c10 1aL0 1eN0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0|81e4", 698 | "Asia/Kabul|AFT|-4u|0||46e5", 699 | "Asia/Kamchatka|PETT PETST PETT|-c0 -c0 -b0|0120|1BWe0 1qN0 WM0|18e4", 700 | "Asia/Karachi|PKT|-50|0||24e6", 701 | "Asia/Urumqi|XJT|-60|0||32e5", 702 | "Asia/Kathmandu|NPT|-5J|0||12e5", 703 | "Asia/Khandyga|VLAT VLAST VLAT YAKT YAKT|-a0 -b0 -b0 -a0 -90|010234|1BWg0 1qM0 WM0 17V0 7zD0|66e2", 704 | "Asia/Krasnoyarsk|KRAT KRAST KRAT|-70 -80 -80|01020|1BWj0 1qM0 WM0 8Hz0|10e5", 705 | "Asia/Kuala_Lumpur|MYT|-80|0||71e5", 706 | "Asia/Magadan|MAGT MAGST MAGT MAGT|-b0 -c0 -c0 -a0|010230|1BWf0 1qM0 WM0 8Hz0 3Cq0|95e3", 707 | "Asia/Makassar|WITA|-80|0||15e5", 708 | "Asia/Manila|PHT|-80|0||24e6", 709 | "Europe/Athens|EET EEST|-20 -30|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|35e5", 710 | "Asia/Novokuznetsk|+07 +06|-70 -60|010|1Dp80 WM0|55e4", 711 | "Asia/Novosibirsk|+06 +07|-60 -70|010101|1BWk0 1qM0 WM0 8Hz0 4eN0|15e5", 712 | "Asia/Omsk|OMST OMSST OMST|-60 -70 -70|01020|1BWk0 1qM0 WM0 8Hz0|12e5", 713 | "Asia/Pyongyang|KST KST|-90 -8u|01|1P4D0|29e5", 714 | "Asia/Rangoon|MMT|-6u|0||48e5", 715 | "Asia/Sakhalin|SAKT SAKST SAKT|-a0 -b0 -b0|010202|1BWg0 1qM0 WM0 8Hz0 3rd0|58e4", 716 | "Asia/Tashkent|UZT|-50|0||23e5", 717 | "Asia/Seoul|KST|-90|0||23e6", 718 | "Asia/Singapore|SGT|-80|0||56e5", 719 | "Asia/Srednekolymsk|MAGT MAGST MAGT SRET|-b0 -c0 -c0 -b0|01023|1BWf0 1qM0 WM0 8Hz0|35e2", 720 | "Asia/Tbilisi|GET|-40|0||11e5", 721 | "Asia/Tehran|IRST IRDT|-3u -4u|01010101010101010101010|1BTUu 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0|14e6", 722 | "Asia/Thimphu|BTT|-60|0||79e3", 723 | "Asia/Tokyo|JST|-90|0||38e6", 724 | "Asia/Tomsk|+06 +07|-60 -70|010101|1BWk0 1qM0 WM0 8Hz0 3Qp0|10e5", 725 | "Asia/Ulaanbaatar|ULAT ULAST|-80 -90|0101010101010|1O8G0 1cJ0 1cP0 1cJ0 1cP0 1fx0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0|12e5", 726 | "Asia/Ust-Nera|MAGT MAGST MAGT VLAT VLAT|-b0 -c0 -c0 -b0 -a0|010234|1BWf0 1qM0 WM0 17V0 7zD0|65e2", 727 | "Asia/Vladivostok|VLAT VLAST VLAT|-a0 -b0 -b0|01020|1BWg0 1qM0 WM0 8Hz0|60e4", 728 | "Asia/Yakutsk|YAKT YAKST YAKT|-90 -a0 -a0|01020|1BWh0 1qM0 WM0 8Hz0|28e4", 729 | "Asia/Yekaterinburg|YEKT YEKST YEKT|-50 -60 -60|01020|1BWl0 1qM0 WM0 8Hz0|14e5", 730 | "Asia/Yerevan|AMT AMST|-40 -50|01010|1BWm0 1qM0 WM0 1qM0|13e5", 731 | "Atlantic/Azores|AZOT AZOST|10 0|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|25e4", 732 | "Europe/Lisbon|WET WEST|0 -10|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|27e5", 733 | "Atlantic/Cape_Verde|CVT|10|0||50e4", 734 | "Atlantic/South_Georgia|GST|20|0||30", 735 | "Atlantic/Stanley|FKST FKT|30 40|010|1C6R0 U10|21e2", 736 | "Australia/Sydney|AEDT AEST|-b0 -a0|01010101010101010101010|1C140 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|40e5", 737 | "Australia/Adelaide|ACDT ACST|-au -9u|01010101010101010101010|1C14u 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|11e5", 738 | "Australia/Brisbane|AEST|-a0|0||20e5", 739 | "Australia/Darwin|ACST|-9u|0||12e4", 740 | "Australia/Eucla|ACWST|-8J|0||368", 741 | "Australia/Lord_Howe|LHDT LHST|-b0 -au|01010101010101010101010|1C130 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu|347", 742 | "Australia/Perth|AWST|-80|0||18e5", 743 | "Pacific/Easter|EASST EAST|50 60|010101010101010101010|1C1f0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0|30e2", 744 | "Europe/Dublin|GMT IST|0 -10|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5", 745 | "Etc/GMT+1|GMT+1|10|0|", 746 | "Etc/GMT+10|GMT+10|a0|0|", 747 | "Etc/GMT+11|GMT+11|b0|0|", 748 | "Etc/GMT+12|GMT+12|c0|0|", 749 | "Etc/GMT+2|GMT+2|20|0|", 750 | "Etc/GMT+3|GMT+3|30|0|", 751 | "Etc/GMT+4|GMT+4|40|0|", 752 | "Etc/GMT+5|GMT+5|50|0|", 753 | "Etc/GMT+6|GMT+6|60|0|", 754 | "Etc/GMT+7|GMT+7|70|0|", 755 | "Etc/GMT+8|GMT+8|80|0|", 756 | "Etc/GMT+9|GMT+9|90|0|", 757 | "Etc/GMT-1|GMT-1|-10|0|", 758 | "Etc/GMT-10|GMT-10|-a0|0|", 759 | "Etc/GMT-11|GMT-11|-b0|0|", 760 | "Etc/GMT-12|GMT-12|-c0|0|", 761 | "Etc/GMT-13|GMT-13|-d0|0|", 762 | "Etc/GMT-14|GMT-14|-e0|0|", 763 | "Etc/GMT-2|GMT-2|-20|0|", 764 | "Etc/GMT-3|GMT-3|-30|0|", 765 | "Etc/GMT-4|GMT-4|-40|0|", 766 | "Etc/GMT-5|GMT-5|-50|0|", 767 | "Etc/GMT-6|GMT-6|-60|0|", 768 | "Etc/GMT-7|GMT-7|-70|0|", 769 | "Etc/GMT-8|GMT-8|-80|0|", 770 | "Etc/GMT-9|GMT-9|-90|0|", 771 | "Etc/UCT|UCT|0|0|", 772 | "Etc/UTC|UTC|0|0|", 773 | "Europe/Astrakhan|+03 +04|-30 -40|010101|1BWn0 1qM0 WM0 8Hz0 3rd0", 774 | "Europe/London|GMT BST|0 -10|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|10e6", 775 | "Europe/Chisinau|EET EEST|-20 -30|01010101010101010101010|1BWo0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|67e4", 776 | "Europe/Kaliningrad|EET EEST FET|-20 -30 -30|01020|1BWo0 1qM0 WM0 8Hz0|44e4", 777 | "Europe/Kirov|+03 +04|-30 -40|01010|1BWn0 1qM0 WM0 8Hz0|48e4", 778 | "Europe/Minsk|EET EEST FET MSK|-20 -30 -30 -30|01023|1BWo0 1qM0 WM0 8Hy0|19e5", 779 | "Europe/Moscow|MSK MSD MSK|-30 -40 -40|01020|1BWn0 1qM0 WM0 8Hz0|16e6", 780 | "Europe/Samara|SAMT SAMST SAMT|-40 -40 -30|0120|1BWm0 1qN0 WM0|12e5", 781 | "Europe/Simferopol|EET EEST MSK MSK|-20 -30 -40 -30|01010101023|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11z0 1nW0|33e4", 782 | "Pacific/Honolulu|HST|a0|0||37e4", 783 | "Indian/Chagos|IOT|-60|0||30e2", 784 | "Indian/Christmas|CXT|-70|0||21e2", 785 | "Indian/Cocos|CCT|-6u|0||596", 786 | "Indian/Kerguelen|TFT|-50|0||130", 787 | "Indian/Mahe|SCT|-40|0||79e3", 788 | "Indian/Maldives|MVT|-50|0||35e4", 789 | "Indian/Mauritius|MUT|-40|0||15e4", 790 | "Indian/Reunion|RET|-40|0||84e4", 791 | "Pacific/Majuro|MHT|-c0|0||28e3", 792 | "MET|MET MEST|-10 -20|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", 793 | "Pacific/Chatham|CHADT CHAST|-dJ -cJ|01010101010101010101010|1C120 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00|600", 794 | "Pacific/Apia|SST SDT WSDT WSST|b0 a0 -e0 -d0|01012323232323232323232|1Dbn0 1ff0 1a00 CI0 AQ0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00|37e3", 795 | "Pacific/Bougainville|PGT BST|-a0 -b0|01|1NwE0|18e4", 796 | "Pacific/Chuuk|CHUT|-a0|0||49e3", 797 | "Pacific/Efate|VUT|-b0|0||66e3", 798 | "Pacific/Enderbury|PHOT|-d0|0||1", 799 | "Pacific/Fakaofo|TKT TKT|b0 -d0|01|1Gfn0|483", 800 | "Pacific/Fiji|FJST FJT|-d0 -c0|01010101010101010101010|1BWe0 1o00 Rc0 1wo0 Ao0 1Nc0 Ao0 1Q00 xz0 1SN0 uM0 1SM0 uM0 1VA0 s00 1VA0 uM0 1SM0 uM0 1SM0 uM0 1SM0|88e4", 801 | "Pacific/Funafuti|TVT|-c0|0||45e2", 802 | "Pacific/Galapagos|GALT|60|0||25e3", 803 | "Pacific/Gambier|GAMT|90|0||125", 804 | "Pacific/Guadalcanal|SBT|-b0|0||11e4", 805 | "Pacific/Guam|ChST|-a0|0||17e4", 806 | "Pacific/Kiritimati|LINT|-e0|0||51e2", 807 | "Pacific/Kosrae|KOST|-b0|0||66e2", 808 | "Pacific/Marquesas|MART|9u|0||86e2", 809 | "Pacific/Pago_Pago|SST|b0|0||37e2", 810 | "Pacific/Nauru|NRT|-c0|0||10e3", 811 | "Pacific/Niue|NUT|b0|0||12e2", 812 | "Pacific/Norfolk|NFT NFT|-bu -b0|01|1PoCu|25e4", 813 | "Pacific/Noumea|NCT|-b0|0||98e3", 814 | "Pacific/Palau|PWT|-90|0||21e3", 815 | "Pacific/Pitcairn|PST|80|0||56", 816 | "Pacific/Pohnpei|PONT|-b0|0||34e3", 817 | "Pacific/Port_Moresby|PGT|-a0|0||25e4", 818 | "Pacific/Rarotonga|CKT|a0|0||13e3", 819 | "Pacific/Tahiti|TAHT|a0|0||18e4", 820 | "Pacific/Tarawa|GILT|-c0|0||29e3", 821 | "Pacific/Tongatapu|TOT|-d0|0||75e3", 822 | "Pacific/Wake|WAKT|-c0|0||16e3", 823 | "Pacific/Wallis|WFT|-c0|0||94" 824 | ], 825 | "links": [ 826 | "Africa/Abidjan|Africa/Accra", 827 | "Africa/Abidjan|Africa/Bamako", 828 | "Africa/Abidjan|Africa/Banjul", 829 | "Africa/Abidjan|Africa/Bissau", 830 | "Africa/Abidjan|Africa/Conakry", 831 | "Africa/Abidjan|Africa/Dakar", 832 | "Africa/Abidjan|Africa/Freetown", 833 | "Africa/Abidjan|Africa/Lome", 834 | "Africa/Abidjan|Africa/Monrovia", 835 | "Africa/Abidjan|Africa/Nouakchott", 836 | "Africa/Abidjan|Africa/Ouagadougou", 837 | "Africa/Abidjan|Africa/Sao_Tome", 838 | "Africa/Abidjan|Africa/Timbuktu", 839 | "Africa/Abidjan|America/Danmarkshavn", 840 | "Africa/Abidjan|Atlantic/Reykjavik", 841 | "Africa/Abidjan|Atlantic/St_Helena", 842 | "Africa/Abidjan|Etc/GMT", 843 | "Africa/Abidjan|Etc/GMT+0", 844 | "Africa/Abidjan|Etc/GMT-0", 845 | "Africa/Abidjan|Etc/GMT0", 846 | "Africa/Abidjan|Etc/Greenwich", 847 | "Africa/Abidjan|GMT", 848 | "Africa/Abidjan|GMT+0", 849 | "Africa/Abidjan|GMT-0", 850 | "Africa/Abidjan|GMT0", 851 | "Africa/Abidjan|Greenwich", 852 | "Africa/Abidjan|Iceland", 853 | "Africa/Algiers|Africa/Tunis", 854 | "Africa/Cairo|Egypt", 855 | "Africa/Casablanca|Africa/El_Aaiun", 856 | "Africa/Johannesburg|Africa/Maseru", 857 | "Africa/Johannesburg|Africa/Mbabane", 858 | "Africa/Khartoum|Africa/Addis_Ababa", 859 | "Africa/Khartoum|Africa/Asmara", 860 | "Africa/Khartoum|Africa/Asmera", 861 | "Africa/Khartoum|Africa/Dar_es_Salaam", 862 | "Africa/Khartoum|Africa/Djibouti", 863 | "Africa/Khartoum|Africa/Juba", 864 | "Africa/Khartoum|Africa/Kampala", 865 | "Africa/Khartoum|Africa/Mogadishu", 866 | "Africa/Khartoum|Africa/Nairobi", 867 | "Africa/Khartoum|Indian/Antananarivo", 868 | "Africa/Khartoum|Indian/Comoro", 869 | "Africa/Khartoum|Indian/Mayotte", 870 | "Africa/Lagos|Africa/Bangui", 871 | "Africa/Lagos|Africa/Brazzaville", 872 | "Africa/Lagos|Africa/Douala", 873 | "Africa/Lagos|Africa/Kinshasa", 874 | "Africa/Lagos|Africa/Libreville", 875 | "Africa/Lagos|Africa/Luanda", 876 | "Africa/Lagos|Africa/Malabo", 877 | "Africa/Lagos|Africa/Ndjamena", 878 | "Africa/Lagos|Africa/Niamey", 879 | "Africa/Lagos|Africa/Porto-Novo", 880 | "Africa/Maputo|Africa/Blantyre", 881 | "Africa/Maputo|Africa/Bujumbura", 882 | "Africa/Maputo|Africa/Gaborone", 883 | "Africa/Maputo|Africa/Harare", 884 | "Africa/Maputo|Africa/Kigali", 885 | "Africa/Maputo|Africa/Lubumbashi", 886 | "Africa/Maputo|Africa/Lusaka", 887 | "Africa/Tripoli|Libya", 888 | "America/Adak|America/Atka", 889 | "America/Adak|US/Aleutian", 890 | "America/Anchorage|America/Juneau", 891 | "America/Anchorage|America/Nome", 892 | "America/Anchorage|America/Sitka", 893 | "America/Anchorage|America/Yakutat", 894 | "America/Anchorage|US/Alaska", 895 | "America/Argentina/Buenos_Aires|America/Argentina/Catamarca", 896 | "America/Argentina/Buenos_Aires|America/Argentina/ComodRivadavia", 897 | "America/Argentina/Buenos_Aires|America/Argentina/Cordoba", 898 | "America/Argentina/Buenos_Aires|America/Argentina/Jujuy", 899 | "America/Argentina/Buenos_Aires|America/Argentina/La_Rioja", 900 | "America/Argentina/Buenos_Aires|America/Argentina/Mendoza", 901 | "America/Argentina/Buenos_Aires|America/Argentina/Rio_Gallegos", 902 | "America/Argentina/Buenos_Aires|America/Argentina/Salta", 903 | "America/Argentina/Buenos_Aires|America/Argentina/San_Juan", 904 | "America/Argentina/Buenos_Aires|America/Argentina/San_Luis", 905 | "America/Argentina/Buenos_Aires|America/Argentina/Tucuman", 906 | "America/Argentina/Buenos_Aires|America/Argentina/Ushuaia", 907 | "America/Argentina/Buenos_Aires|America/Buenos_Aires", 908 | "America/Argentina/Buenos_Aires|America/Catamarca", 909 | "America/Argentina/Buenos_Aires|America/Cordoba", 910 | "America/Argentina/Buenos_Aires|America/Jujuy", 911 | "America/Argentina/Buenos_Aires|America/Mendoza", 912 | "America/Argentina/Buenos_Aires|America/Rosario", 913 | "America/Campo_Grande|America/Cuiaba", 914 | "America/Chicago|America/Indiana/Knox", 915 | "America/Chicago|America/Indiana/Tell_City", 916 | "America/Chicago|America/Knox_IN", 917 | "America/Chicago|America/Matamoros", 918 | "America/Chicago|America/Menominee", 919 | "America/Chicago|America/North_Dakota/Center", 920 | "America/Chicago|America/North_Dakota/New_Salem", 921 | "America/Chicago|America/Rainy_River", 922 | "America/Chicago|America/Rankin_Inlet", 923 | "America/Chicago|America/Resolute", 924 | "America/Chicago|America/Winnipeg", 925 | "America/Chicago|CST6CDT", 926 | "America/Chicago|Canada/Central", 927 | "America/Chicago|US/Central", 928 | "America/Chicago|US/Indiana-Starke", 929 | "America/Chihuahua|America/Mazatlan", 930 | "America/Chihuahua|Mexico/BajaSur", 931 | "America/Denver|America/Boise", 932 | "America/Denver|America/Cambridge_Bay", 933 | "America/Denver|America/Edmonton", 934 | "America/Denver|America/Inuvik", 935 | "America/Denver|America/Ojinaga", 936 | "America/Denver|America/Shiprock", 937 | "America/Denver|America/Yellowknife", 938 | "America/Denver|Canada/Mountain", 939 | "America/Denver|MST7MDT", 940 | "America/Denver|Navajo", 941 | "America/Denver|US/Mountain", 942 | "America/Fortaleza|America/Belem", 943 | "America/Fortaleza|America/Maceio", 944 | "America/Fortaleza|America/Recife", 945 | "America/Fortaleza|America/Santarem", 946 | "America/Halifax|America/Glace_Bay", 947 | "America/Halifax|America/Moncton", 948 | "America/Halifax|America/Thule", 949 | "America/Halifax|Atlantic/Bermuda", 950 | "America/Halifax|Canada/Atlantic", 951 | "America/Havana|Cuba", 952 | "America/Los_Angeles|America/Dawson", 953 | "America/Los_Angeles|America/Ensenada", 954 | "America/Los_Angeles|America/Santa_Isabel", 955 | "America/Los_Angeles|America/Tijuana", 956 | "America/Los_Angeles|America/Vancouver", 957 | "America/Los_Angeles|America/Whitehorse", 958 | "America/Los_Angeles|Canada/Pacific", 959 | "America/Los_Angeles|Canada/Yukon", 960 | "America/Los_Angeles|Mexico/BajaNorte", 961 | "America/Los_Angeles|PST8PDT", 962 | "America/Los_Angeles|US/Pacific", 963 | "America/Los_Angeles|US/Pacific-New", 964 | "America/Managua|America/Belize", 965 | "America/Managua|America/Costa_Rica", 966 | "America/Managua|America/El_Salvador", 967 | "America/Managua|America/Guatemala", 968 | "America/Managua|America/Regina", 969 | "America/Managua|America/Swift_Current", 970 | "America/Managua|America/Tegucigalpa", 971 | "America/Managua|Canada/East-Saskatchewan", 972 | "America/Managua|Canada/Saskatchewan", 973 | "America/Manaus|America/Boa_Vista", 974 | "America/Manaus|America/Porto_Velho", 975 | "America/Manaus|Brazil/West", 976 | "America/Mexico_City|America/Merida", 977 | "America/Mexico_City|America/Monterrey", 978 | "America/Mexico_City|Mexico/General", 979 | "America/New_York|America/Detroit", 980 | "America/New_York|America/Fort_Wayne", 981 | "America/New_York|America/Indiana/Indianapolis", 982 | "America/New_York|America/Indiana/Marengo", 983 | "America/New_York|America/Indiana/Petersburg", 984 | "America/New_York|America/Indiana/Vevay", 985 | "America/New_York|America/Indiana/Vincennes", 986 | "America/New_York|America/Indiana/Winamac", 987 | "America/New_York|America/Indianapolis", 988 | "America/New_York|America/Iqaluit", 989 | "America/New_York|America/Kentucky/Louisville", 990 | "America/New_York|America/Kentucky/Monticello", 991 | "America/New_York|America/Louisville", 992 | "America/New_York|America/Montreal", 993 | "America/New_York|America/Nassau", 994 | "America/New_York|America/Nipigon", 995 | "America/New_York|America/Pangnirtung", 996 | "America/New_York|America/Thunder_Bay", 997 | "America/New_York|America/Toronto", 998 | "America/New_York|Canada/Eastern", 999 | "America/New_York|EST5EDT", 1000 | "America/New_York|US/East-Indiana", 1001 | "America/New_York|US/Eastern", 1002 | "America/New_York|US/Michigan", 1003 | "America/Noronha|Brazil/DeNoronha", 1004 | "America/Panama|America/Atikokan", 1005 | "America/Panama|America/Cayman", 1006 | "America/Panama|America/Coral_Harbour", 1007 | "America/Panama|America/Jamaica", 1008 | "America/Panama|EST", 1009 | "America/Panama|Jamaica", 1010 | "America/Phoenix|America/Creston", 1011 | "America/Phoenix|America/Dawson_Creek", 1012 | "America/Phoenix|America/Hermosillo", 1013 | "America/Phoenix|MST", 1014 | "America/Phoenix|US/Arizona", 1015 | "America/Rio_Branco|America/Eirunepe", 1016 | "America/Rio_Branco|America/Porto_Acre", 1017 | "America/Rio_Branco|Brazil/Acre", 1018 | "America/Santiago|Antarctica/Palmer", 1019 | "America/Santiago|Chile/Continental", 1020 | "America/Santo_Domingo|America/Anguilla", 1021 | "America/Santo_Domingo|America/Antigua", 1022 | "America/Santo_Domingo|America/Aruba", 1023 | "America/Santo_Domingo|America/Barbados", 1024 | "America/Santo_Domingo|America/Blanc-Sablon", 1025 | "America/Santo_Domingo|America/Curacao", 1026 | "America/Santo_Domingo|America/Dominica", 1027 | "America/Santo_Domingo|America/Grenada", 1028 | "America/Santo_Domingo|America/Guadeloupe", 1029 | "America/Santo_Domingo|America/Kralendijk", 1030 | "America/Santo_Domingo|America/Lower_Princes", 1031 | "America/Santo_Domingo|America/Marigot", 1032 | "America/Santo_Domingo|America/Martinique", 1033 | "America/Santo_Domingo|America/Montserrat", 1034 | "America/Santo_Domingo|America/Port_of_Spain", 1035 | "America/Santo_Domingo|America/Puerto_Rico", 1036 | "America/Santo_Domingo|America/St_Barthelemy", 1037 | "America/Santo_Domingo|America/St_Kitts", 1038 | "America/Santo_Domingo|America/St_Lucia", 1039 | "America/Santo_Domingo|America/St_Thomas", 1040 | "America/Santo_Domingo|America/St_Vincent", 1041 | "America/Santo_Domingo|America/Tortola", 1042 | "America/Santo_Domingo|America/Virgin", 1043 | "America/Sao_Paulo|Brazil/East", 1044 | "America/St_Johns|Canada/Newfoundland", 1045 | "Asia/Almaty|Asia/Qyzylorda", 1046 | "Asia/Aqtobe|Asia/Aqtau", 1047 | "Asia/Aqtobe|Asia/Oral", 1048 | "Asia/Ashgabat|Asia/Ashkhabad", 1049 | "Asia/Baghdad|Asia/Aden", 1050 | "Asia/Baghdad|Asia/Bahrain", 1051 | "Asia/Baghdad|Asia/Kuwait", 1052 | "Asia/Baghdad|Asia/Qatar", 1053 | "Asia/Baghdad|Asia/Riyadh", 1054 | "Asia/Bangkok|Asia/Ho_Chi_Minh", 1055 | "Asia/Bangkok|Asia/Phnom_Penh", 1056 | "Asia/Bangkok|Asia/Saigon", 1057 | "Asia/Bangkok|Asia/Vientiane", 1058 | "Asia/Dhaka|Asia/Dacca", 1059 | "Asia/Dubai|Asia/Muscat", 1060 | "Asia/Hong_Kong|Hongkong", 1061 | "Asia/Jakarta|Asia/Pontianak", 1062 | "Asia/Jerusalem|Asia/Tel_Aviv", 1063 | "Asia/Jerusalem|Israel", 1064 | "Asia/Kathmandu|Asia/Katmandu", 1065 | "Asia/Kolkata|Asia/Calcutta", 1066 | "Asia/Kolkata|Asia/Colombo", 1067 | "Asia/Kuala_Lumpur|Asia/Kuching", 1068 | "Asia/Makassar|Asia/Ujung_Pandang", 1069 | "Asia/Seoul|ROK", 1070 | "Asia/Shanghai|Asia/Chongqing", 1071 | "Asia/Shanghai|Asia/Chungking", 1072 | "Asia/Shanghai|Asia/Harbin", 1073 | "Asia/Shanghai|Asia/Macao", 1074 | "Asia/Shanghai|Asia/Macau", 1075 | "Asia/Shanghai|Asia/Taipei", 1076 | "Asia/Shanghai|PRC", 1077 | "Asia/Shanghai|ROC", 1078 | "Asia/Singapore|Singapore", 1079 | "Asia/Tashkent|Asia/Samarkand", 1080 | "Asia/Tehran|Iran", 1081 | "Asia/Thimphu|Asia/Thimbu", 1082 | "Asia/Tokyo|Japan", 1083 | "Asia/Ulaanbaatar|Asia/Ulan_Bator", 1084 | "Asia/Urumqi|Asia/Kashgar", 1085 | "Australia/Adelaide|Australia/Broken_Hill", 1086 | "Australia/Adelaide|Australia/South", 1087 | "Australia/Adelaide|Australia/Yancowinna", 1088 | "Australia/Brisbane|Australia/Lindeman", 1089 | "Australia/Brisbane|Australia/Queensland", 1090 | "Australia/Darwin|Australia/North", 1091 | "Australia/Lord_Howe|Australia/LHI", 1092 | "Australia/Perth|Australia/West", 1093 | "Australia/Sydney|Australia/ACT", 1094 | "Australia/Sydney|Australia/Canberra", 1095 | "Australia/Sydney|Australia/Currie", 1096 | "Australia/Sydney|Australia/Hobart", 1097 | "Australia/Sydney|Australia/Melbourne", 1098 | "Australia/Sydney|Australia/NSW", 1099 | "Australia/Sydney|Australia/Tasmania", 1100 | "Australia/Sydney|Australia/Victoria", 1101 | "Etc/UCT|UCT", 1102 | "Etc/UTC|Etc/Universal", 1103 | "Etc/UTC|Etc/Zulu", 1104 | "Etc/UTC|UTC", 1105 | "Etc/UTC|Universal", 1106 | "Etc/UTC|Zulu", 1107 | "Europe/Astrakhan|Europe/Ulyanovsk", 1108 | "Europe/Athens|Asia/Nicosia", 1109 | "Europe/Athens|EET", 1110 | "Europe/Athens|Europe/Bucharest", 1111 | "Europe/Athens|Europe/Helsinki", 1112 | "Europe/Athens|Europe/Kiev", 1113 | "Europe/Athens|Europe/Mariehamn", 1114 | "Europe/Athens|Europe/Nicosia", 1115 | "Europe/Athens|Europe/Riga", 1116 | "Europe/Athens|Europe/Sofia", 1117 | "Europe/Athens|Europe/Tallinn", 1118 | "Europe/Athens|Europe/Uzhgorod", 1119 | "Europe/Athens|Europe/Vilnius", 1120 | "Europe/Athens|Europe/Zaporozhye", 1121 | "Europe/Chisinau|Europe/Tiraspol", 1122 | "Europe/Dublin|Eire", 1123 | "Europe/Istanbul|Asia/Istanbul", 1124 | "Europe/Istanbul|Turkey", 1125 | "Europe/Lisbon|Atlantic/Canary", 1126 | "Europe/Lisbon|Atlantic/Faeroe", 1127 | "Europe/Lisbon|Atlantic/Faroe", 1128 | "Europe/Lisbon|Atlantic/Madeira", 1129 | "Europe/Lisbon|Portugal", 1130 | "Europe/Lisbon|WET", 1131 | "Europe/London|Europe/Belfast", 1132 | "Europe/London|Europe/Guernsey", 1133 | "Europe/London|Europe/Isle_of_Man", 1134 | "Europe/London|Europe/Jersey", 1135 | "Europe/London|GB", 1136 | "Europe/London|GB-Eire", 1137 | "Europe/Moscow|Europe/Volgograd", 1138 | "Europe/Moscow|W-SU", 1139 | "Europe/Paris|Africa/Ceuta", 1140 | "Europe/Paris|Arctic/Longyearbyen", 1141 | "Europe/Paris|Atlantic/Jan_Mayen", 1142 | "Europe/Paris|CET", 1143 | "Europe/Paris|Europe/Amsterdam", 1144 | "Europe/Paris|Europe/Andorra", 1145 | "Europe/Paris|Europe/Belgrade", 1146 | "Europe/Paris|Europe/Berlin", 1147 | "Europe/Paris|Europe/Bratislava", 1148 | "Europe/Paris|Europe/Brussels", 1149 | "Europe/Paris|Europe/Budapest", 1150 | "Europe/Paris|Europe/Busingen", 1151 | "Europe/Paris|Europe/Copenhagen", 1152 | "Europe/Paris|Europe/Gibraltar", 1153 | "Europe/Paris|Europe/Ljubljana", 1154 | "Europe/Paris|Europe/Luxembourg", 1155 | "Europe/Paris|Europe/Madrid", 1156 | "Europe/Paris|Europe/Malta", 1157 | "Europe/Paris|Europe/Monaco", 1158 | "Europe/Paris|Europe/Oslo", 1159 | "Europe/Paris|Europe/Podgorica", 1160 | "Europe/Paris|Europe/Prague", 1161 | "Europe/Paris|Europe/Rome", 1162 | "Europe/Paris|Europe/San_Marino", 1163 | "Europe/Paris|Europe/Sarajevo", 1164 | "Europe/Paris|Europe/Skopje", 1165 | "Europe/Paris|Europe/Stockholm", 1166 | "Europe/Paris|Europe/Tirane", 1167 | "Europe/Paris|Europe/Vaduz", 1168 | "Europe/Paris|Europe/Vatican", 1169 | "Europe/Paris|Europe/Vienna", 1170 | "Europe/Paris|Europe/Warsaw", 1171 | "Europe/Paris|Europe/Zagreb", 1172 | "Europe/Paris|Europe/Zurich", 1173 | "Europe/Paris|Poland", 1174 | "Pacific/Auckland|Antarctica/McMurdo", 1175 | "Pacific/Auckland|Antarctica/South_Pole", 1176 | "Pacific/Auckland|NZ", 1177 | "Pacific/Chatham|NZ-CHAT", 1178 | "Pacific/Chuuk|Pacific/Truk", 1179 | "Pacific/Chuuk|Pacific/Yap", 1180 | "Pacific/Easter|Chile/EasterIsland", 1181 | "Pacific/Guam|Pacific/Saipan", 1182 | "Pacific/Honolulu|HST", 1183 | "Pacific/Honolulu|Pacific/Johnston", 1184 | "Pacific/Honolulu|US/Hawaii", 1185 | "Pacific/Majuro|Kwajalein", 1186 | "Pacific/Majuro|Pacific/Kwajalein", 1187 | "Pacific/Pago_Pago|Pacific/Midway", 1188 | "Pacific/Pago_Pago|Pacific/Samoa", 1189 | "Pacific/Pago_Pago|US/Samoa", 1190 | "Pacific/Pohnpei|Pacific/Ponape" 1191 | ] 1192 | }); 1193 | 1194 | 1195 | return moment; 1196 | })); -------------------------------------------------------------------------------- /public/vue-fabric.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mudin/vue-fabric/6503af8513f30b9f2bb4ef278b5cd1f0e5dc05d9/public/vue-fabric.png -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 20 | 21 | 27 | -------------------------------------------------------------------------------- /src/assets/dot-circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mudin/vue-fabric/6503af8513f30b9f2bb4ef278b5cd1f0e5dc05d9/src/assets/dot-circle.png -------------------------------------------------------------------------------- /src/assets/rotate-mdr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mudin/vue-fabric/6503af8513f30b9f2bb4ef278b5cd1f0e5dc05d9/src/assets/rotate-mdr.png -------------------------------------------------------------------------------- /src/demos/editor.vue: -------------------------------------------------------------------------------- 1 | 31 | 32 | 114 | 115 | 248 | -------------------------------------------------------------------------------- /src/demos/image-model.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 29 | 30 | 70 | -------------------------------------------------------------------------------- /src/fabric/VueFabric.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 658 | 659 | 661 | -------------------------------------------------------------------------------- /src/fabric/index.js: -------------------------------------------------------------------------------- 1 | import VueFabric from './VueFabric.vue'; 2 | 3 | // eslint-disable-next-line import/prefer-default-export 4 | export default VueFabric; 5 | -------------------------------------------------------------------------------- /src/libs/customiseControls.js: -------------------------------------------------------------------------------- 1 | /* 2 | * fabric.js Controls Extension 3 | * for fabric.js current build 4 | * Simon Kunz 09.02.2016 for pixolith 5 | * Licensed under the MIT license. 6 | */ 7 | 8 | 'use strict'; 9 | (function (window) { 10 | var fabric = window.fabric || (window.fabric = {}), 11 | minExtCompat = '1.6.0', 12 | isVML = function () { 13 | return typeof G_vmlCanvasManager !== 'undefined'; 14 | }, 15 | degreesToRadians = fabric.util.degreesToRadians, 16 | cursorOffset = { 17 | mt: 0, // n 18 | tr: 1, // ne 19 | mr: 2, // e 20 | br: 3, // se 21 | mb: 4, // s 22 | bl: 5, // sw 23 | ml: 6, // w 24 | tl: 7, // nw 25 | }; 26 | 27 | if (minExtCompat.localeCompare(window.fabric.version) > -1) { 28 | console.warn('this extension might not be fully compatible with your version ' + 29 | 'of fabric.js (' + window.fabric.version + ').' + 30 | 'Consider using the latest compatible build of fabric.js (> ' + minExtCompat + ')' 31 | ); 32 | } 33 | 34 | fabric.util.object.extend(fabric.Object.prototype, { 35 | 36 | /** 37 | * When true, image icons are loaded via the drawImage method 38 | * @type Boolean 39 | * @default false 40 | */ 41 | 42 | useCustomIcons: false, 43 | 44 | /** 45 | * Sets a background-color for drawImage operations with transparency 46 | * @type string 47 | * @default transparent 48 | */ 49 | 50 | cornerBackgroundColor: 'transparent', 51 | 52 | /** 53 | * Sets the shape of the background for drawImage operations with transparency 54 | * @type string 55 | * @default rect 56 | */ 57 | 58 | cornerShape: '', 59 | 60 | /** 61 | * Inner Padding between Shape Background and drawn Image 62 | * @type int 63 | * @default rect 64 | */ 65 | 66 | cornerPadding: 0, 67 | 68 | /** 69 | * Set a custom corner icon 70 | * @param {Object} obj settings and icon url. 71 | * @param callback function 72 | */ 73 | 74 | customiseCornerIcons: function (obj, callback) { 75 | var setting, 76 | cornerConfig; 77 | 78 | for (setting in obj) { 79 | if (obj.hasOwnProperty(setting)) { 80 | 81 | cornerConfig = {}; 82 | 83 | if (obj[setting].cornerShape !== undefined) { 84 | this.cornerShape = obj[setting].cornerShape; 85 | } 86 | 87 | if (obj[setting].cornerBackgroundColor !== undefined) { 88 | this.cornerBackgroundColor = obj[setting].cornerBackgroundColor; 89 | } 90 | 91 | if (obj[setting].borderColor !== undefined) { 92 | this.borderColor = obj[setting].borderColor; 93 | } 94 | 95 | if (obj[setting].cornerSize !== undefined) { 96 | this.cornerSize = obj[setting].cornerSize; 97 | } 98 | 99 | if (obj[setting].cornerPadding !== undefined) { 100 | this.cornerPadding = obj[setting].cornerPadding; 101 | } 102 | 103 | if (obj[setting].icon !== undefined || Object.keys(obj)[0] === 'settings') { 104 | this.useCustomIcons = true; 105 | 106 | if (obj[setting].settings !== undefined) { 107 | cornerConfig.settings = obj[setting].settings; 108 | } 109 | 110 | if (obj[setting].icon !== undefined) { 111 | cornerConfig.icon = obj[setting].icon; 112 | 113 | this.loadIcon(setting, cornerConfig, function () { 114 | if (callback && typeof (callback) === 'function') { 115 | callback(); 116 | } 117 | }); 118 | } 119 | } 120 | } 121 | } 122 | }, 123 | 124 | /** 125 | * loads the icon image as an image src. 126 | * @param {Object} corner to load an icon. 127 | * @param cornerConfig as object containing icon url and corner specific settings 128 | * @param callback function. 129 | */ 130 | 131 | loadIcon: function (corner, cornerConfig, callback) { 132 | var self = this, 133 | icon = new Image(); 134 | 135 | icon.onload = function () { 136 | self[corner + 'Icon'] = this; 137 | 138 | if (cornerConfig.settings) { 139 | self[corner + 'Settings'] = cornerConfig.settings; 140 | } 141 | 142 | if (callback && typeof (callback) === 'function') { 143 | callback(); 144 | } 145 | }; 146 | 147 | icon.onerror = function () { 148 | fabric.warn(this.src + ' icon is not an image'); 149 | }; 150 | 151 | if (cornerConfig.icon.match(/^http[s]?:\/\//) || cornerConfig.icon.substring(0, 2) === '//') { 152 | icon.crossOrigin = 'Anonymous'; 153 | } 154 | 155 | icon.src = cornerConfig.icon; 156 | }, 157 | 158 | /** 159 | * copy of the setter method for our american friends. 160 | * @param {Object} obj containing corner icon urls and settings. 161 | */ 162 | 163 | customizeCornerIcons: function (obj) { 164 | this.customiseCornerIcons(obj); 165 | }, 166 | 167 | /** 168 | * Draws corners of an object's bounding box. 169 | * Requires public properties: width, height 170 | * Requires public options: cornerSize, padding 171 | * @param {CanvasRenderingContext2D} ctx Context to draw on 172 | * @return {fabric.Object} thisArg 173 | * @chainable 174 | */ 175 | 176 | drawControls: function (ctx) { 177 | 178 | if (!this.hasControls) { 179 | return this; 180 | } 181 | 182 | var wh = this._calculateCurrentDimensions(), 183 | width = wh.x, 184 | height = wh.y, 185 | scaleOffset = this.cornerSize, 186 | left = -(width + scaleOffset) / 2, 187 | top = -(height + scaleOffset) / 2, 188 | methodName; 189 | 190 | if (!this.useCustomIcons) { 191 | ctx.lineWidth = 1; 192 | ctx.globalAlpha = this.isMoving ? this.borderOpacityWhenMoving : 1; 193 | ctx.strokeStyle = ctx.fillStyle = this.cornerColor; 194 | 195 | if (!this.transparentCorners) { 196 | ctx.strokeStyle = this.cornerStrokeColor; 197 | } 198 | 199 | methodName = this.transparentCorners ? 'stroke' : 'fill'; 200 | } else { 201 | methodName = 'drawImage'; 202 | } 203 | 204 | ctx.save(); 205 | this._setLineDash(ctx, this.cornerDashArray, null); 206 | 207 | // top-left 208 | this._drawControl('tl', ctx, methodName, 209 | left, 210 | top, 211 | this.tlIcon, 212 | this.tlSettings 213 | ); 214 | 215 | // top-right 216 | this._drawControl('tr', ctx, methodName, 217 | left + width, 218 | top, 219 | this.trIcon, 220 | this.trSettings 221 | ); 222 | 223 | // bottom-left 224 | this._drawControl('bl', ctx, methodName, 225 | left, 226 | top + height, 227 | this.blIcon, 228 | this.blSettings 229 | ); 230 | 231 | // bottom-right 232 | this._drawControl('br', ctx, methodName, 233 | left + width, 234 | top + height, 235 | this.brIcon, 236 | this.brSettings 237 | ); 238 | 239 | if (!this.get('lockUniScaling')) { 240 | 241 | // middle-top 242 | this._drawControl('mt', ctx, methodName, 243 | left + width / 2, 244 | top, 245 | this.mtIcon, 246 | this.mtSettings 247 | ); 248 | 249 | // middle-bottom 250 | this._drawControl('mb', ctx, methodName, 251 | left + width / 2, 252 | top + height, 253 | this.mbIcon, 254 | this.mbSettings 255 | ); 256 | 257 | // middle-right 258 | this._drawControl('mr', ctx, methodName, 259 | left + width, 260 | top + height / 2, 261 | this.mrIcon, 262 | this.mrSettings 263 | ); 264 | 265 | // middle-left 266 | this._drawControl('ml', ctx, methodName, 267 | left, 268 | top + height / 2, 269 | this.mlIcon, 270 | this.mlSettings 271 | ); 272 | } 273 | 274 | // middle-top-rotate 275 | if (this.hasRotatingPoint) { 276 | this._drawControl('mtr', ctx, methodName, 277 | left + width / 2, 278 | top - this.rotatingPointOffset, 279 | this.mtrIcon, 280 | this.mtrSettings 281 | ); 282 | } 283 | 284 | ctx.restore(); 285 | 286 | return this; 287 | }, 288 | 289 | /** Draw controls either with background-shape and color (transparency) or plain image (modified core method) 290 | * @private 291 | * {string} icon url of the control 292 | */ 293 | 294 | _drawControl: function (control, ctx, methodName, left, top, icon, settings) { 295 | if (!this.isControlVisible(control)) { 296 | return; 297 | } 298 | 299 | var size = this.cornerSize, 300 | cornerStroke = this.cornerStrokeColor || 'transparent', 301 | cornerBG = this.cornerBackgroundColor || 'black', 302 | cornerShape = this.cornerShape || 'rect', 303 | cornerPadding = typeof this.cornerPadding === 'number' ? this.cornerPadding : 10; 304 | 305 | if (settings) { 306 | if (settings.cornerSize) { 307 | // Set the size, and also recalc left and top 308 | left = left + size / 2 - settings.cornerSize / 2; 309 | top = top + size / 2 - settings.cornerSize / 2; 310 | size = settings.cornerSize; 311 | } 312 | cornerShape = settings.cornerShape || cornerShape; 313 | cornerBG = settings.cornerBackgroundColor || cornerBG; 314 | cornerPadding = typeof settings.cornerPadding === 'number' ? settings.cornerPadding : cornerPadding; 315 | cornerStroke = settings.cornerStrokeColor || cornerStroke; 316 | } 317 | //console.log(cornerBG); 318 | 319 | if (this.useCustomIcons) { 320 | if (cornerShape) { 321 | ctx.globalAlpha = 1; 322 | ctx.fillStyle = cornerBG; 323 | ctx.lineWidth = 1; 324 | ctx.strokeStyle = cornerStroke; 325 | switch (cornerShape) { 326 | case 'rect': 327 | break; 328 | ctx.fillRect(left, top, size, size); 329 | 330 | if (cornerStroke) { 331 | ctx.strokeRect(left, top, size, size); 332 | } 333 | 334 | break; 335 | case 'circle': 336 | break; 337 | ctx.beginPath(); 338 | ctx.arc(left + size / 2, top + size / 2, size / 2, 0, 2 * Math.PI); 339 | ctx.fill(); 340 | 341 | if (cornerStroke) { 342 | ctx.stroke(); 343 | } 344 | 345 | ctx.closePath(); 346 | break; 347 | } 348 | 349 | if (icon !== undefined) { 350 | ctx[methodName]( 351 | icon, 352 | left + cornerPadding / 2, 353 | top + cornerPadding / 2, 354 | size - cornerPadding, 355 | size - cornerPadding 356 | ); 357 | } 358 | 359 | } else { 360 | if (icon !== undefined) { 361 | ctx[methodName]( 362 | icon, 363 | left, 364 | top, 365 | size, 366 | size 367 | ); 368 | } 369 | } 370 | } else { 371 | isVML() || this.transparentCorners || ctx.clearRect(left, top, size, size); 372 | ctx[methodName + 'Rect'](left, top, size, size); 373 | if (!this.transparentCorners && cornerStroke) { 374 | ctx.strokeRect(left, top, size, size); 375 | } 376 | } 377 | 378 | }, 379 | }); 380 | 381 | fabric.util.object.extend(fabric.Canvas.prototype, { 382 | /** 383 | * When true, actions can be overwritten 384 | * @type Boolean 385 | * @default false 386 | */ 387 | 388 | overwriteActions: false, 389 | 390 | /** 391 | * When true, cursors are fixed 392 | * @type Boolean 393 | * @default false 394 | */ 395 | 396 | fixedCursors: false, 397 | 398 | /** 399 | * setter Method for actions and cursors. 400 | * @param {Object} obj containing corner action and cursor url/type. 401 | */ 402 | 403 | customiseControls: function (obj) { 404 | var setting; 405 | 406 | for (setting in obj) { 407 | if (obj.hasOwnProperty(setting)) { 408 | if (obj[setting].action !== undefined) { 409 | this.overwriteActions = true; 410 | this.setCustomAction(setting, obj[setting].action); 411 | } 412 | 413 | if (obj[setting].cursor !== undefined) { 414 | this.fixedCursors = true; 415 | this.setCustomCursor(setting, obj[setting].cursor); 416 | } 417 | } 418 | } 419 | }, 420 | 421 | /** 422 | * loads the icon image as an image src. 423 | * @param {Object} corner to load an icon. 424 | * @param action as a string. 425 | */ 426 | 427 | setCustomAction: function (corner, action) { 428 | this[corner + 'Action'] = action; 429 | }, 430 | 431 | /** 432 | * loads the icon image as an image src. 433 | * @param {Object} corner to load an icon. 434 | * @param cursorUrl as a string. 435 | */ 436 | 437 | setCustomCursor: function (corner, cursorUrl) { 438 | this[corner + 'cursorIcon'] = cursorUrl; 439 | }, 440 | 441 | /** 442 | * copy of the setter method for our american friends. 443 | * @param {Object} obj containing corner action and cursor url/type. 444 | */ 445 | 446 | customizeControls: function (obj) { 447 | this.customiseControls(obj); 448 | }, 449 | 450 | /** 451 | * @private 452 | */ 453 | 454 | _getActionFromCorner: function (target, corner, e) { 455 | if (!corner) { 456 | return 'drag'; 457 | } 458 | 459 | if (corner) { 460 | if (this[corner + 'Action'] && this.overwriteActions) { 461 | switch (corner) { 462 | case 'mtr': 463 | return this[corner + 'Action'] || 'rotate'; 464 | case 'ml': 465 | case 'mr': 466 | if (e[this.altActionKey]) { 467 | return e[this.altActionKey] ? 'skewY' : 'scaleX'; 468 | } 469 | return this[corner + 'Action']; 470 | case 'mt': 471 | case 'mb': 472 | if (e[this.altActionKey]) { 473 | return e[this.altActionKey] ? 'skewY' : 'scaleY'; 474 | } 475 | return this[corner + 'Action']; 476 | default: 477 | return this[corner + 'Action'] || 'scale'; 478 | } 479 | } else { 480 | switch (corner) { 481 | case 'mtr': 482 | return 'rotate'; 483 | case 'ml': 484 | case 'mr': 485 | return e[this.altActionKey] ? 'skewY' : 'scaleX'; 486 | case 'mt': 487 | case 'mb': 488 | return e[this.altActionKey] ? 'skewX' : 'scaleY'; 489 | default: 490 | return 'scale'; 491 | } 492 | } 493 | } 494 | 495 | return false; 496 | }, 497 | 498 | /** 499 | * @private 500 | * @param {Event} e Event object 501 | * @param {fabric.Object} target 502 | */ 503 | _setupCurrentTransform: function (e, target) { 504 | if (!target) { 505 | return; 506 | } 507 | 508 | var pointer = this.getPointer(e), 509 | corner = target._findTargetCorner(this.getPointer(e, true)), 510 | action = this._getActionFromCorner(target, corner, e), 511 | origin = this._getOriginFromCorner(target, corner); 512 | 513 | if (typeof action === 'function') { 514 | action.call(this, e, target); 515 | 516 | // as of fabric 1.7.11 object cache will try to slice the action to check for scale so we need to convert this to a string 517 | action = 'void'; 518 | } 519 | 520 | this._currentTransform = { 521 | target: target, 522 | action: action, 523 | corner: corner, 524 | scaleX: target.scaleX, 525 | scaleY: target.scaleY, 526 | skewX: target.skewX, 527 | skewY: target.skewY, 528 | offsetX: pointer.x - target.left, 529 | offsetY: pointer.y - target.top, 530 | originX: origin.x, 531 | originY: origin.y, 532 | ex: pointer.x, 533 | ey: pointer.y, 534 | lastX: pointer.x, 535 | lastY: pointer.y, 536 | left: target.left, 537 | top: target.top, 538 | theta: degreesToRadians(target.angle), 539 | width: target.width * target.scaleX, 540 | mouseXSign: 1, 541 | mouseYSign: 1, 542 | shiftKey: e.shiftKey, 543 | altKey: e[this.centeredKey], 544 | }; 545 | 546 | this._currentTransform.original = { 547 | left: target.left, 548 | top: target.top, 549 | scaleX: target.scaleX, 550 | scaleY: target.scaleY, 551 | skewX: target.skewX, 552 | skewY: target.skewY, 553 | originX: origin.x, 554 | originY: origin.y, 555 | }; 556 | 557 | if (action === 'remove') { 558 | this._removeAction(e, target); 559 | } 560 | 561 | if (action === 'moveUp') { 562 | this._moveLayerUpAction(e, target); 563 | } 564 | 565 | if (action === 'moveDown') { 566 | this._moveLayerDownAction(e, target); 567 | } 568 | 569 | if (typeof action === 'object') { 570 | if (Object.keys(action)[0] === 'rotateByDegrees') { 571 | this._rotateByDegrees(e, target, action.rotateByDegrees); 572 | } 573 | } 574 | 575 | this._resetCurrentTransform(); 576 | }, 577 | 578 | /** 579 | * Custom remove object action 580 | * @private 581 | * @param {Event} e Event object 582 | * @param {fabric.Object} target 583 | */ 584 | 585 | _removeAction: function (e, target) { 586 | var _this = this; 587 | if (this.getActiveGroup() && this.getActiveGroup() !== 'undefined') { 588 | this.getActiveGroup().forEachObject(function (o) { 589 | o.off(); 590 | o.remove(); 591 | }); 592 | this.discardActiveGroup(); 593 | 594 | // as of fabric 1.6.3 necessary for reasons.. 595 | setTimeout(function () { 596 | _this.deactivateAll(); 597 | }, 0); 598 | 599 | } else { 600 | target.off(); 601 | target.remove(); 602 | 603 | setTimeout(function () { 604 | _this.deactivateAll(); 605 | }, 0); 606 | } 607 | }, 608 | 609 | /** 610 | * Custom move up object action 611 | * @private 612 | * @param {Event} e Event object 613 | * @param {fabric.Object} target 614 | */ 615 | 616 | _moveLayerUpAction: function (e, target) { 617 | if (this.getActiveGroup() && this.getActiveGroup() !== 'undefined') { 618 | this.getActiveGroup().forEachObject(function (o) { 619 | o.bringForward(); 620 | }); 621 | } else { 622 | target.bringForward(); 623 | } 624 | }, 625 | 626 | /** 627 | * Custom move down object action 628 | * @private 629 | * @param {Event} e Event object 630 | * @param {fabric.Object} target 631 | */ 632 | 633 | _moveLayerDownAction: function (e, target) { 634 | if (this.getActiveGroup() && this.getActiveGroup() !== 'undefined') { 635 | this.getActiveGroup().forEachObject(function (o) { 636 | o.sendBackwards(); 637 | }); 638 | } else { 639 | target.sendBackwards(); 640 | } 641 | }, 642 | 643 | /** 644 | * Custom move down object action 645 | * @private 646 | * @param {Event} e Event object 647 | * @param {fabric.Object} target 648 | * @param {Integer} value of rotation 649 | */ 650 | 651 | _rotateByDegrees: function (e, target, value) { 652 | var angle = parseInt(target.getAngle()) + value, 653 | needsOriginRestore = false; 654 | 655 | if ((target.originX !== 'center' || target.originY !== 'center') && target.centeredRotation) { 656 | this._setOriginToCenter(target); 657 | needsOriginRestore = true; 658 | } 659 | 660 | angle = angle > 360 ? angle - 360 : angle; 661 | 662 | if (this.getActiveGroup() && this.getActiveGroup() !== 'undefined') { 663 | this.getActiveGroup().forEachObject(function (obj) { 664 | obj 665 | .setAngle(angle) 666 | .setCoords(); 667 | }); 668 | } else { 669 | target 670 | .setAngle(angle) 671 | .setCoords(); 672 | } 673 | 674 | if (needsOriginRestore) { 675 | this._setCenterToOrigin(target); 676 | } 677 | 678 | this.renderAll(); 679 | }, 680 | 681 | /** 682 | * Sets either the standard behaviour cursors or if fixedCursors is true, tries to set a custom cursor 683 | * either by using an icon or a build-in cursor. Cursor icon extensions are matched with a regular expression. 684 | * @private 685 | * {string} corner name 686 | * {target} event handler of the hovered corner 687 | */ 688 | _setCornerCursor: function (corner, target, e) { 689 | var iconUrlPattern = /\.(?:jpe?g|png|gif|jpg|jpeg|svg)$/; 690 | 691 | if (this.fixedCursors && this[corner + 'cursorIcon']) { 692 | if (this[corner + 'cursorIcon'].match(iconUrlPattern)) { 693 | this.setCursor('url(' + this[corner + 'cursorIcon'] + '), auto'); 694 | } else { 695 | if (this[corner + 'cursorIcon'] === 'resize') { 696 | this.setCursor(this._getRotatedCornerCursor(corner, target, e)); 697 | } else { 698 | this.setCursor(this[corner + 'cursorIcon']); 699 | } 700 | } 701 | } else { 702 | if (corner in cursorOffset) { 703 | this.setCursor(this._getRotatedCornerCursor(corner, target, e)); 704 | } else if (corner === 'mtr' && target.hasRotatingPoint) { 705 | this.setCursor(this.rotationCursor); 706 | } else { 707 | this.setCursor(this.defaultCursor); 708 | return false; 709 | } 710 | } 711 | 712 | return false; 713 | }, 714 | }); 715 | 716 | if (typeof exports !== 'undefined') { 717 | module.exports = this; 718 | } 719 | 720 | })(window); 721 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import App from './App'; 3 | import VueFabric from '../dist/vue-fabric.umd'; 4 | 5 | Vue.component('VueFabric', VueFabric); 6 | 7 | new Vue({ 8 | render: h => h(App) 9 | }).$mount('#app'); 10 | -------------------------------------------------------------------------------- /src/utils/index.js: -------------------------------------------------------------------------------- 1 | class Utils { 2 | // eslint-disable-next-line class-methods-use-this 3 | registeObjectEvent(me, obj) { 4 | console.log('registeObjectEvent'); 5 | obj.on('mousedown', (options) => { 6 | me.$emit('object:mousedown', obj, options); 7 | }); 8 | obj.on('mouseup', (options) => { 9 | me.$emit('object:mouseup', obj, options); 10 | }); 11 | obj.on('mousemove', (options) => { 12 | me.$emit('object:mousemove', obj, options); 13 | }); 14 | obj.on('mouseover', (options) => { 15 | me.$emit('object:mouseover', obj, options); 16 | }); 17 | obj.on('mouseout', (options) => { 18 | me.$emit('object:mouseout', obj, options); 19 | }); 20 | obj.on('mousedblclick', (options) => { 21 | me.$emit('object:mousedblclick', obj, options); 22 | }); 23 | obj.on('mousewheel', (options) => { 24 | me.$emit('object:mousewheel', obj, options); 25 | }); 26 | } 27 | } 28 | const utils = new Utils(); 29 | export default utils; 30 | -------------------------------------------------------------------------------- /vue.config.js: -------------------------------------------------------------------------------- 1 | let externals = []; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | // eslint-disable-next-line global-require 5 | const nodeExternals = require('webpack-node-externals'); 6 | externals = [ 7 | nodeExternals() 8 | ]; 9 | } 10 | 11 | module.exports = { 12 | css: { 13 | loaderOptions: { 14 | less: { 15 | javascriptEnabled: true 16 | } 17 | } 18 | }, 19 | configureWebpack: { 20 | externals 21 | }, 22 | 23 | lintOnSave: true, 24 | 25 | pluginOptions: { 26 | lintStyleOnBuild: true, 27 | stylelint: { 28 | fix: false, 29 | files: [ 30 | 'src/**/*.vue' 31 | ] 32 | } 33 | } 34 | }; 35 | --------------------------------------------------------------------------------