diff --git a/LICENSE b/LICENSE index 9a8ffa0e..14021c8e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 铭飞科技 +Copyright (c) 2020 铭飞科技 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/doc/5.0.0-to-5.1-mysql.sql b/doc/5.0.0-to-5.1-mysql.sql index 889c7339..98188c00 100644 --- a/doc/5.0.0-to-5.1-mysql.sql +++ b/doc/5.0.0-to-5.1-mysql.sql @@ -55,5 +55,7 @@ UPDATE `mdiy_tag_sql` SET `tag_id` = 9, `tag_sql` = ' select\r\n <#if !(pageTag UPDATE `mdiy_tag_sql` SET `tag_id` = 10, `tag_sql` = '<#assign select=\"(SELECT \'\')\"/>\r\n<#if orderby?? >\r\n <#if orderby==\"date\"> \r\n <#assign _orderby=\"content_datetime\">\r\n <#elseif orderby==\"updatedate\">\r\n <#assign _orderby=\"content_updatetime\">\r\n <#elseif orderby==\"hit\"> \r\n <#assign _orderby=\"content_hit\">\r\n <#elseif orderby==\"sort\">\r\n <#assign _orderby=\"content_sort\">\r\n <#else><#assign _orderby=\"cms_content.id\">\r\n <#else>\r\n <#assign _orderby=\"cms_content.id\">\r\n \r\n<#if (pageTag.nextId) gt 0>\r\nSELECT \r\ncms_content.id as id,\r\nleft(content_title,${titlelen?default(40)}) as title,\r\ncontent_title as fulltitle,\r\ncontent_author as author, \r\ncontent_source as source, \r\ncontent_details as content,\r\ncategory.category_title as typename,\r\ncategory.category_id as typeid,\r\n(SELECT \"index.html\") as typelink,\r\ncontent_img as litpic,\r\n<#--内容页动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\"/${modelName}/view.do?id=\", cms_content.id,\"&orderby=${_orderby}\",\"&order=${order!\'ASC\'}\",\"&typeid=${typeid}\") as link,\r\n <#else>\r\n CONCAT(category_path,\"/\",cms_content.id,\".html\") AS link,\r\n \r\ncontent_datetime as date,\r\ncontent_description as descrip,\r\ncontent_hit as hit,\r\ncontent_type as flag,\r\ncontent_keyword as keyword \r\nFROM cms_content \r\nLEFT JOIN cms_category as category ON content_category_id=category.id \r\nWHERE cms_content.id=${pageTag.nextId}\r\n<#else>\r\nSELECT \r\n${select} as id,\r\n${select} as title,\r\n${select} as fulltitle,\r\n${select} as author, \r\n${select} as source, \r\n${select} as content,\r\n${select} as typename,\r\n${select} as typeid,\r\n${select} as typelink,\r\n${select} as litpic,\r\n${select} as link,\r\n${select} as date,\r\n${select} as descrip,\r\n${select} as hit,\r\n${select} as flag,\r\n${select} as keyword FROM cms_content\r\n', `sort` = NULL WHERE `id` = 11; UPDATE `app` SET `app_logo`= CONCAT('[{\"path\":\"',app_logo,'\"}]') WHERE (`id`='1'); +UPDATE `mdiy_tag_sql` SET `tag_id` = 4, `tag_sql` = '<#assign _typeid=\"0\"/>\r\n<#if column?? && column.id?? && column.id?number gt 0>\r\n <#assign _typeid=\"${column.id}\">\r\n <#assign selfid=\"${column.id}\">\r\n\r\n<#if typeid??>\r\n <#assign _typeid=\"${typeid}\">\r\n\r\nselect \r\n @rownum := @rownum + 1 AS typeindex,\r\n id,\r\n id as typeid,\r\n category_title as typetitle,\r\n <#--返回父id集合-->\r\n category_parent_id as pids,\r\n <#--栏目选中的样式-->\r\n IF(<#if selfid?has_content>${selfid}<#else>${_typeid} = id ,\"${class!\'\'}\",\"\") as class,\r\n <#--动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\"/${modelName}/list.do?typeid=\", id) as typelink,\r\n <#else>\r\n <#--栏目类型为链接-->\r\n IF(\"3\" = category_type,category_diy_url,CONCAT(category_path,\"/index.html\")) as typelink,\r\n \r\n category_keyword as typekeyword,\r\n category_diy_url as typeurl,\r\n category_flag as flag,\r\n category_parent_id as parentid,\r\ncategory_descrip as typedescrip,\r\n ( CASE category_img WHEN \'\' THEN category_img ELSE CONVERT ( JSON_UNQUOTE( JSON_EXTRACT( category_img -> \'$[0]\', \'$.path\' ) ) USING utf8 ) END ) as typelitpic ,\r\n(select count(*) from cms_category c where c.category_id=typeid and c.del=0) as childsize\r\n from (SELECT @rownum := 0) r,cms_category \r\n where \r\n cms_category.del=0 \r\n <#--根据站点编号查询-->\r\n <#if appId?? >\r\n and cms_category.app_id=${appId}\r\n \r\n <#--栏目属性-->\r\n <#if flag?? >\r\n and\r\n ( <#list flag?split(\',\') as item>\r\n <#if item?index gt 0> or\r\n FIND_IN_SET(\'${item}\',category_flag)\r\n )\r\n \r\n\r\n <#if noflag?? >\r\n and\r\n (\r\n <#list noflag?split(\',\') as item>\r\n <#if item?index gt 0> and\r\n FIND_IN_SET(\'${item}\',category_flag)=0\r\n or category_flag is null)\r\n \r\n <#--type默认son-->\r\n<#if !type??||!type?has_content>\r\n<#assign type=\"son\"/>\r\n\r\n<#if type?has_content>\r\n <#--顶级栏目(单个)-->\r\n <#if type==\"top\">\r\n <#if _typeid != \"0\">\r\n and id=(SELECT IF(IF(LEFT ( category_parent_id, LOCATE( \",\", category_parent_id ) - 1 ),LEFT ( category_parent_id, LOCATE( \",\", category_parent_id ) - 1 ),category_parent_id),IF(LEFT ( category_parent_id, LOCATE( \",\", category_parent_id ) - 1 ),LEFT ( category_parent_id, LOCATE( \",\", category_parent_id ) - 1 ),category_parent_id),id)FROM cms_category WHERE id = ${_typeid})\r\n \r\n <#elseif type==\"nav\">\r\n and(category_id=0 or category_id is null)\r\n <#--同级栏目(多个)-->\r\n <#elseif type==\"level\">\r\n and\r\n <#if _typeid?has_content>\r\n category_id=(select category_id from cms_category where id=${_typeid})\r\n <#else>\r\n 1=1\r\n \r\n <#--当前栏目(单个)-->\r\n <#elseif type==\"self\">\r\n and \r\n <#if _typeid?has_content>\r\n id=${_typeid}\r\n <#else>\r\n 1=1\r\n \r\n <#--当前栏目的所属栏目(多个)-->\r\n <#elseif type==\"path\">\r\n and \r\n <#if _typeid?has_content>\r\n id in (<#if column?? && column.categoryParentId??>${column.categoryParentId},${_typeid})\r\n <#else>\r\n 1=1\r\n \r\n <#--子栏目(多个)-->\r\n <#elseif type==\"son\">\r\n and \r\n <#if _typeid?has_content>\r\n category_id=${_typeid}\r\n <#else>\r\n 1=1\r\n \r\n <#--上一级栏目没有则取当前栏目(单个)-->\r\n <#elseif type==\"parent\">\r\n and \r\n <#if _typeid?has_content>\r\n <#if column?? && column.categoryId??>\r\n id=${column.categoryId}\r\n <#else>\r\n id=${_typeid}\r\n \r\n <#else>\r\n 1=1\r\n \r\n <#--子栏目或同级栏目(多个)-->\r\n <#elseif type==\"sonOrLevel\">\r\n and \r\n <#if _typeid?has_content>\r\n category_id= if((SELECT count(*) FROM cms_category\r\n WHERE category_id=${_typeid})>0,${_typeid},(select category_id from cms_category where id=${_typeid}))\r\n <#else>\r\n 1=1\r\n \r\n \r\n<#else> <#--默认顶级栏目-->\r\n and\r\n <#if _typeid?has_content>\r\n id=${_typeid}\r\n <#else>\r\n (category_id=0 or category_id is null)\r\n \r\n\r\n<#--字段排序-->\r\n <#if orderby?? >\r\n ORDER BY \r\n <#if orderby==\"date\"> category_datetime\r\n <#elseif orderby==\"sort\"> category_sort\r\n <#else>cms_content.id\r\n <#else>\r\n ORDER BY id\r\n \r\n <#if order?? >\r\n <#if order==\"desc\"> desc\r\n <#if order==\"asc\"> asc\r\n ', `sort` = 1 WHERE `id` = 6; + diff --git a/doc/5.1-patch.sql b/doc/5.1-patch.sql new file mode 100644 index 00000000..2256585d --- /dev/null +++ b/doc/5.1-patch.sql @@ -0,0 +1 @@ +UPDATE `mdiy_tag_sql` SET `tag_id` = 4, `tag_sql` = '<#assign _typeid=\"0\"/>\r\n<#if column?? && column.id?? && column.id?number gt 0>\r\n <#assign _typeid=\"${column.id}\">\r\n <#assign selfid=\"${column.id}\">\r\n\r\n<#if typeid??>\r\n <#assign _typeid=\"${typeid}\">\r\n\r\nselect \r\n @rownum := @rownum + 1 AS typeindex,\r\n id,\r\n id as typeid,\r\n category_title as typetitle,\r\n <#--返回父id集合-->\r\n category_parent_id as pids,\r\n <#--栏目选中的样式-->\r\n IF(<#if selfid?has_content>${selfid}<#else>${_typeid} = id ,\"${class!\'\'}\",\"\") as class,\r\n <#--动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\"/${modelName}/list.do?typeid=\", id) as typelink,\r\n <#else>\r\n <#--栏目类型为链接-->\r\n IF(\"3\" = category_type,category_diy_url,CONCAT(category_path,\"/index.html\")) as typelink,\r\n \r\n category_keyword as typekeyword,\r\n category_diy_url as typeurl,\r\n category_flag as flag,\r\n category_parent_id as parentid,\r\ncategory_descrip as typedescrip,\r\n ( CASE category_img WHEN \'\' THEN category_img ELSE CONVERT ( JSON_UNQUOTE( JSON_EXTRACT( category_img -> \'$[0]\', \'$.path\' ) ) USING utf8 ) END ) as typelitpic ,\r\n(select count(*) from cms_category c where c.category_id=typeid and c.del=0) as childsize\r\n from (SELECT @rownum := 0) r,cms_category \r\n where \r\n cms_category.del=0 \r\n <#--根据站点编号查询-->\r\n <#if appId?? >\r\n and cms_category.app_id=${appId}\r\n \r\n <#--栏目属性-->\r\n <#if flag?? >\r\n and\r\n ( <#list flag?split(\',\') as item>\r\n <#if item?index gt 0> or\r\n FIND_IN_SET(\'${item}\',category_flag)\r\n )\r\n \r\n\r\n <#if noflag?? >\r\n and\r\n (\r\n <#list noflag?split(\',\') as item>\r\n <#if item?index gt 0> and\r\n FIND_IN_SET(\'${item}\',category_flag)=0\r\n or category_flag is null)\r\n \r\n <#--type默认son-->\r\n<#if !type??||!type?has_content>\r\n<#assign type=\"son\"/>\r\n\r\n<#if type?has_content>\r\n <#--顶级栏目(单个)-->\r\n <#if type==\"top\">\r\n <#if _typeid != \"0\">\r\n and id=(SELECT IF(IF(LEFT ( category_parent_id, LOCATE( \",\", category_parent_id ) - 1 ),LEFT ( category_parent_id, LOCATE( \",\", category_parent_id ) - 1 ),category_parent_id),IF(LEFT ( category_parent_id, LOCATE( \",\", category_parent_id ) - 1 ),LEFT ( category_parent_id, LOCATE( \",\", category_parent_id ) - 1 ),category_parent_id),id)FROM cms_category WHERE id = ${_typeid})\r\n \r\n <#elseif type==\"nav\">\r\n and(category_id=0 or category_id is null)\r\n <#--同级栏目(多个)-->\r\n <#elseif type==\"level\">\r\n and\r\n <#if _typeid?has_content>\r\n category_id=(select category_id from cms_category where id=${_typeid})\r\n <#else>\r\n 1=1\r\n \r\n <#--当前栏目(单个)-->\r\n <#elseif type==\"self\">\r\n and \r\n <#if _typeid?has_content>\r\n id=${_typeid}\r\n <#else>\r\n 1=1\r\n \r\n <#--当前栏目的所属栏目(多个)-->\r\n <#elseif type==\"path\">\r\n and \r\n <#if _typeid?has_content>\r\n id in (<#if column?? && column.categoryParentId??>${column.categoryParentId},${_typeid})\r\n <#else>\r\n 1=1\r\n \r\n <#--子栏目(多个)-->\r\n <#elseif type==\"son\">\r\n and \r\n <#if _typeid?has_content>\r\n category_id=${_typeid}\r\n <#else>\r\n 1=1\r\n \r\n <#--上一级栏目没有则取当前栏目(单个)-->\r\n <#elseif type==\"parent\">\r\n and \r\n <#if _typeid?has_content>\r\n <#if column?? && column.categoryId??>\r\n id=${column.categoryId}\r\n <#else>\r\n id=${_typeid}\r\n \r\n <#else>\r\n 1=1\r\n \r\n <#--子栏目或同级栏目(多个)-->\r\n <#elseif type==\"sonOrLevel\">\r\n and \r\n <#if _typeid?has_content>\r\n category_id= if((SELECT count(*) FROM cms_category\r\n WHERE category_id=${_typeid})>0,${_typeid},(select category_id from cms_category where id=${_typeid}))\r\n <#else>\r\n 1=1\r\n \r\n \r\n<#else> <#--默认顶级栏目-->\r\n and\r\n <#if _typeid?has_content>\r\n id=${_typeid}\r\n <#else>\r\n (category_id=0 or category_id is null)\r\n \r\n\r\n<#--字段排序-->\r\n <#if orderby?? >\r\n ORDER BY \r\n <#if orderby==\"date\"> category_datetime\r\n <#elseif orderby==\"sort\"> category_sort\r\n <#else>cms_content.id\r\n <#else>\r\n ORDER BY id\r\n \r\n <#if order?? >\r\n <#if order==\"desc\"> desc\r\n <#if order==\"asc\"> asc\r\n ', `sort` = 1 WHERE `id` = 6; diff --git a/doc/mcms-5.1.sql b/doc/mcms-5.1.sql index ef323bce..07d06cad 100644 --- a/doc/mcms-5.1.sql +++ b/doc/mcms-5.1.sql @@ -1,24 +1,35 @@ -/* -Navicat MySQL Data Transfer +-- MySQL dump 10.13 Distrib 5.6.40, for Win64 (x86_64) +-- +-- Host: 192.168.0.8 Database: mcms-dev-5.1-1 +-- ------------------------------------------------------ +-- Server version 5.7.31 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Current Database: `mcms-dev-5.1-1` +-- + +CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mcms-dev-5.1-1` /*!40100 DEFAULT CHARACTER SET utf8 */; + +USE `mcms-dev-5.1-1`; + +-- +-- Table structure for table `app` +-- -Source Server : localhost_3309 -Source Server Version : 50727 -Source Host : localhost:3309 -Source Database : db-mcms-open - -Target Server Type : MYSQL -Target Server Version : 50727 -File Encoding : 65001 - -Date: 2020-09-14 14:09:56 -*/ - -SET FOREIGN_KEY_CHECKS=0; - --- ---------------------------- --- Table structure for app --- ---------------------------- DROP TABLE IF EXISTS `app`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `app` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '站点id', `app_name` varchar(60) NOT NULL COMMENT '站点名称', @@ -42,16 +53,25 @@ CREATE TABLE `app` ( `create_by` int(11) DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='应用表'; +/*!40101 SET character_set_client = @saved_cs_client */; --- ---------------------------- --- Records of app --- ---------------------------- -INSERT INTO `app` VALUES ('1', 'MCMS-OPEN', 'http://localhost:8080/ms-mcms\r\n', '[{\"path\":\"/upload/1/appLogo/1578375538540.jpg\"}]', '铭飞MCMS', '版权所有 ©铭飞科技有限公司2012-2019 保留一切权利。', 'default', '铭飞MCMS', null, '', '2019-11-16 00:00:00', '', '0', '1', '', null, null, null, null, null); +-- +-- Dumping data for table `app` +-- + +LOCK TABLES `app` WRITE; +/*!40000 ALTER TABLE `app` DISABLE KEYS */; +INSERT INTO `app` VALUES (1,'MCMS-OPEN','http://localhost:8080/ms-mcms\r\n','[{\"path\":\"/upload/1/appLogo/1578375538540.jpg\"}]','铭飞MCMS','版权所有 ©铭飞科技有限公司2012-2019 保留一切权利。','default','铭飞MCMS',NULL,'','2019-11-16 00:00:00','',0,1,'',NULL,NULL,NULL,NULL,NULL); +/*!40000 ALTER TABLE `app` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `cms_category` +-- --- ---------------------------- --- Table structure for cms_category --- ---------------------------- DROP TABLE IF EXISTS `cms_category`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `cms_category` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `category_title` varchar(255) DEFAULT NULL COMMENT '栏目管理名称', @@ -80,60 +100,25 @@ CREATE TABLE `cms_category` ( `category_pinyin` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=150 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='分类'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `cms_category` +-- + +LOCK TABLES `cms_category` WRITE; +/*!40000 ALTER TABLE `cms_category` DISABLE KEYS */; +INSERT INTO `cms_category` VALUES (19,'联系我们',NULL,NULL,'','','/lianxiwomen19',NULL,0,1,50,'2015-09-01 15:31:30','0',NULL,'contact.htm','contact.htm',0,'2','0',0,NULL,NULL,NULL,NULL,'lianxiwomen19'),(23,'常见问题',NULL,NULL,'','','/changjianwenti',NULL,0,1,50,'2015-09-01 15:33:54','0',NULL,'about.htm','liebiao.htm',0,'1','0',0,NULL,NULL,NULL,NULL,'changjianwenti'),(33,'投资',NULL,NULL,'','','/touzi',NULL,0,1,50,'2015-09-02 00:32:02','0',NULL,'detail.htm','list.htm',0,'1','0',0,NULL,NULL,NULL,NULL,'touzi'),(52,'招商加盟',NULL,NULL,'','','/zhaoshangjiameng',NULL,0,1,50,'2016-03-15 17:35:38','0',NULL,'about.htm','about.htm',0,'2','0',0,NULL,NULL,NULL,NULL,'zhaoshangjiameng'),(53,'关于我们',NULL,NULL,'','','/guanyuwomen53',NULL,0,1,50,'2016-03-16 17:16:11','0',NULL,'about.htm','about.htm',0,'2','0',0,NULL,NULL,NULL,NULL,'guanyuwomen53'),(59,'新闻中心',NULL,NULL,'您可以通过以下新闻与公司动态进一步了解我们。我们所签约的客户,无论他们的项目是大或者是小,我们都将提供100%的服务','','/xinwenzhongxin',NULL,0,1,50,'2016-03-26 13:18:53','0',NULL,'news-show.htm','news-list.htm',0,'1','0',0,NULL,NULL,NULL,NULL,'xinwenzhongxin'),(61,'客户案例',NULL,NULL,'新颖的设计方案,大胆的革新思想,灵活的运用最新技术,是品网视觉的特点,我们只做有灵魂的设计','','/kehuanli',NULL,0,1,50,'2016-03-26 13:26:34','0',NULL,'case-show.htm','case-list.htm',0,'1','0',0,NULL,NULL,NULL,NULL,'kehuanli'),(62,'新闻',NULL,NULL,'您可以通过以下新闻与公司动态进一步了解我们。我们所签约的客户,无论他们的项目是大或者是小,我们都将提供100%的服务','','/xinwen',NULL,0,1,50,'2016-03-26 13:27:39','0',NULL,'news-show.htm','news-list.htm',0,'1','0',0,NULL,NULL,NULL,NULL,'xinwen'),(63,'服务',NULL,NULL,'我们为您提供网站策划、网页设计、程序开发、网站推广、域名注册、虚拟主机、企业邮箱等网站建设相关服务;为您提供iOS/Android/Windows Phone等移动平台的APP应用开发;为您提供办公系统、客户关系管理系统、电子政务系统等行业应用系统的开发;为您提供软件定制开发和系统集成服务。','建站资源共享学习平台!','/fuwu',NULL,0,1,50,'2016-03-26 13:29:07','0',NULL,'service.htm','service.htm',0,'2','0',0,NULL,NULL,NULL,NULL,'fuwu'),(65,'网站设计',NULL,NULL,'新颖的设计方案,大胆的革新思想,灵活的运用最新技术,是品网视觉的特点,我们只做有灵魂的设计','精选案例展示','/kehuanli/wangzhansheji','61',0,1,50,'2016-03-26 14:34:49','0',NULL,'case-show.htm','case-list.htm',3,'1','61',0,NULL,NULL,NULL,NULL,'wangzhansheji'),(66,'手机应用',NULL,NULL,'新颖的设计方案,大胆的革新思想,灵活的运用最新技术,是品网视觉的特点,我们只做有灵魂的设计','精选案例展示','/kehuanli/shoujiyingyong','61',0,1,50,'2016-03-26 14:35:49','0',NULL,'case-show.htm','case-list.htm',1,'1','61',0,NULL,NULL,NULL,NULL,'shoujiyingyong'),(67,'平面设计',NULL,NULL,'新颖的设计方案,大胆的革新思想,灵活的运用最新技术,是品网视觉的特点,我们只做有灵魂的设计','精选案例展示','/kehuanli/pingmiansheji','61',0,1,50,'2016-03-26 14:36:15','0',NULL,'case-show.htm','case-list.htm',2,'1','61',0,NULL,NULL,NULL,NULL,'pingmiansheji'),(68,'公司新闻',NULL,NULL,'您可以通过以下新闻与公司动态进一步了解我们。我们所签约的客户,无论他们的项目是大或者是小,我们都将提供100%的服务','','/xinwenzhongxin/gongsixinwen','59',0,1,50,'2016-03-27 09:39:22','0',NULL,'news-show.htm','news-list.htm',3,'1','59',0,NULL,NULL,NULL,NULL,'gongsixinwen'),(69,'行业新闻',NULL,NULL,'','','/xinwenzhongxin/xingyexinwen','59',0,1,50,'2016-03-27 09:39:48','0',NULL,'news-show.htm','news-list.htm',2,'1','59',0,NULL,NULL,NULL,NULL,'xingyexinwen'),(70,'最新动态',NULL,NULL,'新闻中心','','/xinwenzhongxin/zuixindongtai','59',0,1,50,'2016-03-27 09:40:22','0',NULL,'news-show.htm','news-list.htm',1,'1','59',0,NULL,NULL,NULL,NULL,'zuixindongtai'),(83,'研发团队',NULL,NULL,'您可以通过以下新闻与公司动态进一步了解我们。我们所签约的客户,无论他们的项目是大或者是小,我们都将提供100%的服务','','/xinwen/yanfatuandui','62',0,1,50,'2016-03-28 16:51:31','0',NULL,'news-show.htm','news-list.htm',2,'1','62',0,NULL,NULL,NULL,NULL,'yanfatuandui'),(84,'研发成果',NULL,NULL,'专业提供网站模板,网页模板,教程培训,程序插件,网站素材等建站资源。设计者:如果您是模板设计师,插件制作者。我们致力于打造一个优秀的建站资源共享学习平台!您可以在这里放心出售您的模板和插件,我们提供版权保护。购买者:购买本站资源,我们提供“三重保障”(担保交易+人工介入+售后服务),保障购买者的合法权益。织梦猫已经上路,我们将为此不懈努','专业提供网站模板,网页模板,教程培训,程序插件,网站素材等建站资源。我们致力于打造一个优秀的建站资源共享学习平台!','/xinwen/yanfachengguo','62',0,1,50,'2016-03-28 16:54:29','0',NULL,'news-show.htm','news-list.htm',1,'1','62',0,NULL,NULL,NULL,NULL,'yanfachengguo'),(87,'客户的声音',NULL,NULL,'','','/kehudeshengyin',NULL,0,1,50,'2016-03-30 10:27:42','0',NULL,'solution.htm','about.htm',0,'2','0',0,NULL,NULL,NULL,NULL,'kehudeshengyin'),(93,'关于我们',NULL,NULL,'关于我们','关于我们','/guanyuwomen',NULL,0,1,50,'2016-04-11 19:52:30','0',NULL,'about.htm','about.htm',0,'2','0',0,NULL,NULL,NULL,NULL,'guanyuwomen'),(94,'主营业务',NULL,NULL,'关于我们','关于我们','/guanyuwomen/zhuyingyewu','93',0,1,50,'2016-04-11 19:54:05','0',NULL,'about.htm','about.htm',5,'2','93',0,NULL,NULL,NULL,NULL,'zhuyingyewu'),(95,'企业文化',NULL,NULL,'关于我们','关于我们','/guanyuwomen/qiyewenhua','93',0,1,50,'2016-04-11 19:54:43','0',NULL,'about.htm','about-list.htm',4,'2','93',0,NULL,NULL,NULL,NULL,'qiyewenhua'),(96,'资质荣誉',NULL,NULL,'','','/guanyuwomen/zizhirongyu','93',0,1,50,'2016-04-11 19:55:18','0',NULL,'about.htm','news-list.htm',0,'2','93',0,NULL,NULL,NULL,NULL,'zizhirongyu'),(97,'合作伙伴',NULL,NULL,'','','/guanyuwomen/hezuohuoban','93',0,1,50,'2016-04-11 19:55:41','0',NULL,'about.htm','about.htm',0,'2','93',0,NULL,NULL,NULL,NULL,'hezuohuoban'),(98,'企业优势',NULL,NULL,'生态农庄','关于我们','/guanyuwomen/qiyeyoushi','93',0,1,50,'2016-04-11 19:56:04','0',NULL,'about.htm','about.htm',0,'2','93',0,NULL,NULL,NULL,NULL,'qiyeyoushi'),(99,'服务项目',NULL,NULL,'','','/fuwuxiangmu',NULL,0,1,50,'2016-04-11 20:32:40','0',NULL,'service.htm','product.htm',0,'2','0',0,NULL,NULL,NULL,NULL,'fuwuxiangmu'),(100,'首页幻灯',NULL,NULL,'','','/shouyehuandeng',NULL,0,1,50,'2016-04-11 20:56:40','0',NULL,'about.htm','about.htm',0,'1','0',0,NULL,NULL,NULL,NULL,'shouyehuandeng'),(101,' 全案设计',NULL,NULL,'品牌策划年度服务是岳派品牌机构的主要服务方式之一,以一年或更长时间作为服务周期,为企业进行有计划、有步骤的策划、设计、执行等,进行一体化品牌策划推广服务。','专业服务','/fuwuxiangmu/ quanansheji','99',0,1,50,'2016-04-11 21:04:41','0',NULL,'servise.htm','about-list.htm',3,'2','99',0,NULL,NULL,NULL,NULL,' quanansheji'),(102,'企业形象设计',NULL,NULL,'LOGO 标志设计 VIS设计 宣传物料设计视觉是人们接受外部信息的最重要和最主要的通道。设计科学、实施有利的视觉识别,是传播企业经营理念、建立企业知名度、塑造企业形象的快速便捷之途','专业服务','/fuwuxiangmu/qiyexingxiangsheji','99',0,1,50,'2016-04-11 21:05:11','0',NULL,'servise.htm','about-list.htm',4,'2','99',0,NULL,NULL,NULL,NULL,'qiyexingxiangsheji'),(103,'产品包装设计',NULL,NULL,'竞争的优势不仅在于产品,也源于产品包装的设计,一个产品的包装直接影响顾客购买心理,产品的包装是最直接的广告 ,由表及里是自然界认识事物不变的定律。','专业服务','/fuwuxiangmu/chanpinbaozhuangsheji','99',0,1,50,'2016-04-11 21:05:42','0',NULL,'servise.htm','news-list.htm',2,'2','99',0,NULL,NULL,NULL,NULL,'chanpinbaozhuangsheji'),(104,'连锁店设计',NULL,NULL,'连锁店的CI和一般企业的作法有相当大的差异,最主要的因素就是与目标接触的场合不同。连锁店与消费者之间最常发生的接触就是在门店,创造视觉的个性化与标准化,来\r\n加深人们的印象','专业服务','/fuwuxiangmu/liansuodiansheji','99',0,1,50,'2016-04-11 21:05:57','0',NULL,'servise.htm','news-list.htm',0,'2','99',0,NULL,NULL,NULL,NULL,'liansuodiansheji'),(106,'产品列表','[]',NULL,'新颖的设计方案,大胆的革新思想,灵活的运用最新技术,是品网视觉的特点,我们只做有灵魂的设计','我们的作品','/chanpinliebiao',NULL,0,1,50,'2016-04-11 21:15:27','0',NULL,'product-show.htm','product-list.htm',0,'1','',0,'2019-12-28 14:37:22',NULL,NULL,NULL,'chanpinliebiao'),(107,'产品一类',NULL,NULL,'新颖的设计方案,大胆的革新思想,灵活的运用最新技术,是品网视觉的特点,我们只做有灵魂的设计','我们的作品','/chanpinliebiao/chanpinyilei','106',0,1,50,'2016-04-11 21:15:43','0',NULL,'product-show.htm','product-list.htm',2,'1','106',0,NULL,NULL,NULL,NULL,'chanpinyilei'),(108,'产品二类',NULL,NULL,'','','/chanpinliebiao/chanpinerlei','106',0,1,50,'2016-04-11 21:16:21','0',NULL,'product-show.htm','product-list.htm',1,'1','106',0,NULL,NULL,NULL,NULL,'chanpinerlei'),(115,'专家研究院',NULL,NULL,'','','/zhuanjiayanjiuyuan',NULL,0,1,50,'2016-04-11 21:29:24','0',NULL,'show.htm','service.htm',0,'1','0',0,NULL,NULL,NULL,NULL,'zhuanjiayanjiuyuan'),(133,'网站优化',NULL,NULL,'关于我们','网站设计 网站制作 网站维护 网站改版','/guanyuwomen53/wangzhanyouhua','53',0,1,50,'2016-04-17 18:32:05','0',NULL,'about.htm',NULL,3,'2','53',0,NULL,NULL,NULL,NULL,'wangzhanyouhua'),(134,'网络营销',NULL,NULL,'','网站整站优化 网页结构优化 网站关键词优化','/guanyuwomen53/wangluoyingxiao','53',0,1,50,'2016-04-17 18:33:01','0',NULL,'about.htm',NULL,2,'2','53',0,NULL,NULL,NULL,NULL,'wangluoyingxiao'),(135,'域名注册',NULL,NULL,'关于我们','英文国际域名 英文国内域名 中文国际域名 中文国内域名','/guanyuwomen53/yumingzhuce','53',0,1,50,'2016-04-17 18:33:47','0',NULL,'about.htm',NULL,1,'2','53',0,NULL,NULL,NULL,NULL,'yumingzhuce'),(136,'优化报价',NULL,NULL,'联系我们','','/zhaoshangjiameng/youhuabaojia','52',0,1,50,'2016-04-17 21:13:17','0',NULL,'about.htm','about.htm',0,'2','52',0,NULL,NULL,NULL,NULL,'youhuabaojia'),(138,'服务中心',NULL,NULL,'我们为您提供网站策划、网页设计、程序开发、网站推广、域名注册、虚拟主机、企业邮箱等网站建设相关服务;为您提供iOS/Android/Windows Phone等移动平台的APP应用开发;为您提供办公系统、客户关系管理系统、电子政务系统等行业应用系统的开发;为您提供软件定制开发和系统集成服务。','','/fuwu/fuwuzhongxin','63',0,1,50,'2016-04-29 17:15:49','0',NULL,'service.htm','service.htm',0,'2','63',0,NULL,NULL,NULL,NULL,'fuwuzhongxin'),(141,'联系我们',NULL,NULL,'','','/lianxiwomen19/lianxiwomen','19',0,1,50,'2016-05-04 14:42:07','0',NULL,'contact.htm','contact.htm',2,'2','19',0,NULL,NULL,NULL,NULL,'lianxiwomen'),(142,'在线留言',NULL,NULL,'','','/lianxiwomen19/zaixianliuyan','19',0,1,50,'2016-05-04 14:42:31','0',NULL,'advice.htm',NULL,1,'2','19',0,NULL,NULL,NULL,NULL,'zaixianliuyan'),(146,'人才招聘','[]','','','','/rencaizhaopin',NULL,0,1,50,'2016-05-19 17:49:37','0',NULL,'about.htm','about.htm',0,'2','',0,'2020-01-09 11:21:38',NULL,NULL,NULL,'rencaizhaopin'),(147,'长图',NULL,NULL,'','','/shouyehuandeng/changtu','100',0,1,50,'2016-06-02 17:23:49','0',NULL,'index.html','index.html',0,'1','100',0,NULL,NULL,NULL,NULL,'changtu'),(148,'短图',NULL,NULL,'','','/shouyehuandeng/duantu','100',0,1,50,'2016-06-02 17:24:21','0',NULL,'index.html','index.html',0,'1','100',0,NULL,NULL,NULL,NULL,'duantu'),(149,'网站案例','[]',NULL,'','','/wangzhananli',NULL,0,1,50,'2018-07-09 11:07:41',NULL,NULL,'case-list.htm','case-list.htm',1,'1','',0,'2019-12-28 17:49:38',NULL,NULL,NULL,'wangzhananli'); +/*!40000 ALTER TABLE `cms_category` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `cms_content` +-- --- ---------------------------- --- Records of cms_category --- ---------------------------- -INSERT INTO `cms_category` VALUES ('19', '联系我们', null, null, '', '', '/lianxiwomen19', null, '0', '1', '50', '2015-09-01 15:31:30', '0', null, 'contact.htm', 'contact.htm', '0', '2', '0', '0', null, null, null, null, 'lianxiwomen19'); -INSERT INTO `cms_category` VALUES ('23', '常见问题', null, null, '', '', '/changjianwenti', null, '0', '1', '50', '2015-09-01 15:33:54', '0', null, 'about.htm', 'liebiao.htm', '0', '1', '0', '0', null, null, null, null, 'changjianwenti'); -INSERT INTO `cms_category` VALUES ('33', '投资', null, null, '', '', '/touzi', null, '0', '1', '50', '2015-09-02 00:32:02', '0', null, 'detail.htm', 'list.htm', '0', '1', '0', '0', null, null, null, null, 'touzi'); -INSERT INTO `cms_category` VALUES ('52', '招商加盟', null, null, '', '', '/zhaoshangjiameng', null, '0', '1', '50', '2016-03-15 17:35:38', '0', null, 'about.htm', 'about.htm', '0', '2', '0', '0', null, null, null, null, 'zhaoshangjiameng'); -INSERT INTO `cms_category` VALUES ('53', '关于我们', null, null, '', '', '/guanyuwomen53', null, '0', '1', '50', '2016-03-16 17:16:11', '0', null, 'about.htm', 'about.htm', '0', '2', '0', '0', null, null, null, null, 'guanyuwomen53'); -INSERT INTO `cms_category` VALUES ('59', '新闻中心', null, null, '您可以通过以下新闻与公司动态进一步了解我们。我们所签约的客户,无论他们的项目是大或者是小,我们都将提供100%的服务', '', '/xinwenzhongxin', null, '0', '1', '50', '2016-03-26 13:18:53', '0', null, 'news-show.htm', 'news-list.htm', '0', '1', '0', '0', null, null, null, null, 'xinwenzhongxin'); -INSERT INTO `cms_category` VALUES ('61', '客户案例', null, null, '新颖的设计方案,大胆的革新思想,灵活的运用最新技术,是品网视觉的特点,我们只做有灵魂的设计', '', '/kehuanli', null, '0', '1', '50', '2016-03-26 13:26:34', '0', null, 'case-show.htm', 'case-list.htm', '0', '1', '0', '0', null, null, null, null, 'kehuanli'); -INSERT INTO `cms_category` VALUES ('62', '新闻', null, null, '您可以通过以下新闻与公司动态进一步了解我们。我们所签约的客户,无论他们的项目是大或者是小,我们都将提供100%的服务', '', '/xinwen', null, '0', '1', '50', '2016-03-26 13:27:39', '0', null, 'news-show.htm', 'news-list.htm', '0', '1', '0', '0', null, null, null, null, 'xinwen'); -INSERT INTO `cms_category` VALUES ('63', '服务', null, null, '我们为您提供网站策划、网页设计、程序开发、网站推广、域名注册、虚拟主机、企业邮箱等网站建设相关服务;为您提供iOS/Android/Windows Phone等移动平台的APP应用开发;为您提供办公系统、客户关系管理系统、电子政务系统等行业应用系统的开发;为您提供软件定制开发和系统集成服务。', '建站资源共享学习平台!', '/fuwu', null, '0', '1', '50', '2016-03-26 13:29:07', '0', null, 'service.htm', 'service.htm', '0', '2', '0', '0', null, null, null, null, 'fuwu'); -INSERT INTO `cms_category` VALUES ('65', '网站设计', null, null, '新颖的设计方案,大胆的革新思想,灵活的运用最新技术,是品网视觉的特点,我们只做有灵魂的设计', '精选案例展示', '/kehuanli/wangzhansheji', '61', '0', '1', '50', '2016-03-26 14:34:49', '0', null, 'case-show.htm', 'case-list.htm', '3', '1', '61', '0', null, null, null, null, 'wangzhansheji'); -INSERT INTO `cms_category` VALUES ('66', '手机应用', null, null, '新颖的设计方案,大胆的革新思想,灵活的运用最新技术,是品网视觉的特点,我们只做有灵魂的设计', '精选案例展示', '/kehuanli/shoujiyingyong', '61', '0', '1', '50', '2016-03-26 14:35:49', '0', null, 'case-show.htm', 'case-list.htm', '1', '1', '61', '0', null, null, null, null, 'shoujiyingyong'); -INSERT INTO `cms_category` VALUES ('67', '平面设计', null, null, '新颖的设计方案,大胆的革新思想,灵活的运用最新技术,是品网视觉的特点,我们只做有灵魂的设计', '精选案例展示', '/kehuanli/pingmiansheji', '61', '0', '1', '50', '2016-03-26 14:36:15', '0', null, 'case-show.htm', 'case-list.htm', '2', '1', '61', '0', null, null, null, null, 'pingmiansheji'); -INSERT INTO `cms_category` VALUES ('68', '公司新闻', null, null, '您可以通过以下新闻与公司动态进一步了解我们。我们所签约的客户,无论他们的项目是大或者是小,我们都将提供100%的服务', '', '/xinwenzhongxin/gongsixinwen', '59', '0', '1', '50', '2016-03-27 09:39:22', '0', null, 'news-show.htm', 'news-list.htm', '3', '1', '59', '0', null, null, null, null, 'gongsixinwen'); -INSERT INTO `cms_category` VALUES ('69', '行业新闻', null, null, '', '', '/xinwenzhongxin/xingyexinwen', '59', '0', '1', '50', '2016-03-27 09:39:48', '0', null, 'news-show.htm', 'news-list.htm', '2', '1', '59', '0', null, null, null, null, 'xingyexinwen'); -INSERT INTO `cms_category` VALUES ('70', '最新动态', null, null, '新闻中心', '', '/xinwenzhongxin/zuixindongtai', '59', '0', '1', '50', '2016-03-27 09:40:22', '0', null, 'news-show.htm', 'news-list.htm', '1', '1', '59', '0', null, null, null, null, 'zuixindongtai'); -INSERT INTO `cms_category` VALUES ('83', '研发团队', null, null, '您可以通过以下新闻与公司动态进一步了解我们。我们所签约的客户,无论他们的项目是大或者是小,我们都将提供100%的服务', '', '/xinwen/yanfatuandui', '62', '0', '1', '50', '2016-03-28 16:51:31', '0', null, 'news-show.htm', 'news-list.htm', '2', '1', '62', '0', null, null, null, null, 'yanfatuandui'); -INSERT INTO `cms_category` VALUES ('84', '研发成果', null, null, '专业提供网站模板,网页模板,教程培训,程序插件,网站素材等建站资源。设计者:如果您是模板设计师,插件制作者。我们致力于打造一个优秀的建站资源共享学习平台!您可以在这里放心出售您的模板和插件,我们提供版权保护。购买者:购买本站资源,我们提供“三重保障”(担保交易+人工介入+售后服务),保障购买者的合法权益。织梦猫已经上路,我们将为此不懈努', '专业提供网站模板,网页模板,教程培训,程序插件,网站素材等建站资源。我们致力于打造一个优秀的建站资源共享学习平台!', '/xinwen/yanfachengguo', '62', '0', '1', '50', '2016-03-28 16:54:29', '0', null, 'news-show.htm', 'news-list.htm', '1', '1', '62', '0', null, null, null, null, 'yanfachengguo'); -INSERT INTO `cms_category` VALUES ('87', '客户的声音', null, null, '', '', '/kehudeshengyin', null, '0', '1', '50', '2016-03-30 10:27:42', '0', null, 'solution.htm', 'about.htm', '0', '2', '0', '0', null, null, null, null, 'kehudeshengyin'); -INSERT INTO `cms_category` VALUES ('93', '关于我们', null, null, '关于我们', '关于我们', '/guanyuwomen', null, '0', '1', '50', '2016-04-11 19:52:30', '0', null, 'about.htm', 'about.htm', '0', '2', '0', '0', null, null, null, null, 'guanyuwomen'); -INSERT INTO `cms_category` VALUES ('94', '主营业务', null, null, '关于我们', '关于我们', '/guanyuwomen/zhuyingyewu', '93', '0', '1', '50', '2016-04-11 19:54:05', '0', null, 'about.htm', 'about.htm', '5', '2', '93', '0', null, null, null, null, 'zhuyingyewu'); -INSERT INTO `cms_category` VALUES ('95', '企业文化', null, null, '关于我们', '关于我们', '/guanyuwomen/qiyewenhua', '93', '0', '1', '50', '2016-04-11 19:54:43', '0', null, 'about.htm', 'about-list.htm', '4', '2', '93', '0', null, null, null, null, 'qiyewenhua'); -INSERT INTO `cms_category` VALUES ('96', '资质荣誉', null, null, '', '', '/guanyuwomen/zizhirongyu', '93', '0', '1', '50', '2016-04-11 19:55:18', '0', null, 'about.htm', 'news-list.htm', '0', '2', '93', '0', null, null, null, null, 'zizhirongyu'); -INSERT INTO `cms_category` VALUES ('97', '合作伙伴', null, null, '', '', '/guanyuwomen/hezuohuoban', '93', '0', '1', '50', '2016-04-11 19:55:41', '0', null, 'about.htm', 'about.htm', '0', '2', '93', '0', null, null, null, null, 'hezuohuoban'); -INSERT INTO `cms_category` VALUES ('98', '企业优势', null, null, '生态农庄', '关于我们', '/guanyuwomen/qiyeyoushi', '93', '0', '1', '50', '2016-04-11 19:56:04', '0', null, 'about.htm', 'about.htm', '0', '2', '93', '0', null, null, null, null, 'qiyeyoushi'); -INSERT INTO `cms_category` VALUES ('99', '服务项目', null, null, '', '', '/fuwuxiangmu', null, '0', '1', '50', '2016-04-11 20:32:40', '0', null, 'service.htm', 'product.htm', '0', '2', '0', '0', null, null, null, null, 'fuwuxiangmu'); -INSERT INTO `cms_category` VALUES ('100', '首页幻灯', null, null, '', '', '/shouyehuandeng', null, '0', '1', '50', '2016-04-11 20:56:40', '0', null, 'about.htm', 'about.htm', '0', '1', '0', '0', null, null, null, null, 'shouyehuandeng'); -INSERT INTO `cms_category` VALUES ('101', ' 全案设计', null, null, '品牌策划年度服务是岳派品牌机构的主要服务方式之一,以一年或更长时间作为服务周期,为企业进行有计划、有步骤的策划、设计、执行等,进行一体化品牌策划推广服务。', '专业服务', '/fuwuxiangmu/ quanansheji', '99', '0', '1', '50', '2016-04-11 21:04:41', '0', null, 'servise.htm', 'about-list.htm', '3', '2', '99', '0', null, null, null, null, ' quanansheji'); -INSERT INTO `cms_category` VALUES ('102', '企业形象设计', null, null, 'LOGO 标志设计 VIS设计 宣传物料设计视觉是人们接受外部信息的最重要和最主要的通道。设计科学、实施有利的视觉识别,是传播企业经营理念、建立企业知名度、塑造企业形象的快速便捷之途', '专业服务', '/fuwuxiangmu/qiyexingxiangsheji', '99', '0', '1', '50', '2016-04-11 21:05:11', '0', null, 'servise.htm', 'about-list.htm', '4', '2', '99', '0', null, null, null, null, 'qiyexingxiangsheji'); -INSERT INTO `cms_category` VALUES ('103', '产品包装设计', null, null, '竞争的优势不仅在于产品,也源于产品包装的设计,一个产品的包装直接影响顾客购买心理,产品的包装是最直接的广告 ,由表及里是自然界认识事物不变的定律。', '专业服务', '/fuwuxiangmu/chanpinbaozhuangsheji', '99', '0', '1', '50', '2016-04-11 21:05:42', '0', null, 'servise.htm', 'news-list.htm', '2', '2', '99', '0', null, null, null, null, 'chanpinbaozhuangsheji'); -INSERT INTO `cms_category` VALUES ('104', '连锁店设计', null, null, '连锁店的CI和一般企业的作法有相当大的差异,最主要的因素就是与目标接触的场合不同。连锁店与消费者之间最常发生的接触就是在门店,创造视觉的个性化与标准化,来\r\n加深人们的印象', '专业服务', '/fuwuxiangmu/liansuodiansheji', '99', '0', '1', '50', '2016-04-11 21:05:57', '0', null, 'servise.htm', 'news-list.htm', '0', '2', '99', '0', null, null, null, null, 'liansuodiansheji'); -INSERT INTO `cms_category` VALUES ('106', '产品列表', '[]', null, '新颖的设计方案,大胆的革新思想,灵活的运用最新技术,是品网视觉的特点,我们只做有灵魂的设计', '我们的作品', '/chanpinliebiao', null, '0', '1', '50', '2016-04-11 21:15:27', '0', null, 'product-show.htm', 'product-list.htm', '0', '1', '', '0', '2019-12-28 14:37:22', null, null, null, 'chanpinliebiao'); -INSERT INTO `cms_category` VALUES ('107', '产品一类', null, null, '新颖的设计方案,大胆的革新思想,灵活的运用最新技术,是品网视觉的特点,我们只做有灵魂的设计', '我们的作品', '/chanpinliebiao/chanpinyilei', '106', '0', '1', '50', '2016-04-11 21:15:43', '0', null, 'product-show.htm', 'product-list.htm', '2', '1', '106', '0', null, null, null, null, 'chanpinyilei'); -INSERT INTO `cms_category` VALUES ('108', '产品二类', null, null, '', '', '/chanpinliebiao/chanpinerlei', '106', '0', '1', '50', '2016-04-11 21:16:21', '0', null, 'product-show.htm', 'product-list.htm', '1', '1', '106', '0', null, null, null, null, 'chanpinerlei'); -INSERT INTO `cms_category` VALUES ('115', '专家研究院', null, null, '', '', '/zhuanjiayanjiuyuan', null, '0', '1', '50', '2016-04-11 21:29:24', '0', null, 'show.htm', 'service.htm', '0', '1', '0', '0', null, null, null, null, 'zhuanjiayanjiuyuan'); -INSERT INTO `cms_category` VALUES ('133', '网站优化', null, null, '关于我们', '网站设计 网站制作 网站维护 网站改版', '/guanyuwomen53/wangzhanyouhua', '53', '0', '1', '50', '2016-04-17 18:32:05', '0', null, 'about.htm', null, '3', '2', '53', '0', null, null, null, null, 'wangzhanyouhua'); -INSERT INTO `cms_category` VALUES ('134', '网络营销', null, null, '', '网站整站优化 网页结构优化 网站关键词优化', '/guanyuwomen53/wangluoyingxiao', '53', '0', '1', '50', '2016-04-17 18:33:01', '0', null, 'about.htm', null, '2', '2', '53', '0', null, null, null, null, 'wangluoyingxiao'); -INSERT INTO `cms_category` VALUES ('135', '域名注册', null, null, '关于我们', '英文国际域名 英文国内域名 中文国际域名 中文国内域名', '/guanyuwomen53/yumingzhuce', '53', '0', '1', '50', '2016-04-17 18:33:47', '0', null, 'about.htm', null, '1', '2', '53', '0', null, null, null, null, 'yumingzhuce'); -INSERT INTO `cms_category` VALUES ('136', '优化报价', null, null, '联系我们', '', '/zhaoshangjiameng/youhuabaojia', '52', '0', '1', '50', '2016-04-17 21:13:17', '0', null, 'about.htm', 'about.htm', '0', '2', '52', '0', null, null, null, null, 'youhuabaojia'); -INSERT INTO `cms_category` VALUES ('138', '服务中心', null, null, '我们为您提供网站策划、网页设计、程序开发、网站推广、域名注册、虚拟主机、企业邮箱等网站建设相关服务;为您提供iOS/Android/Windows Phone等移动平台的APP应用开发;为您提供办公系统、客户关系管理系统、电子政务系统等行业应用系统的开发;为您提供软件定制开发和系统集成服务。', '', '/fuwu/fuwuzhongxin', '63', '0', '1', '50', '2016-04-29 17:15:49', '0', null, 'service.htm', 'service.htm', '0', '2', '63', '0', null, null, null, null, 'fuwuzhongxin'); -INSERT INTO `cms_category` VALUES ('141', '联系我们', null, null, '', '', '/lianxiwomen19/lianxiwomen', '19', '0', '1', '50', '2016-05-04 14:42:07', '0', null, 'contact.htm', 'contact.htm', '2', '2', '19', '0', null, null, null, null, 'lianxiwomen'); -INSERT INTO `cms_category` VALUES ('142', '在线留言', null, null, '', '', '/lianxiwomen19/zaixianliuyan', '19', '0', '1', '50', '2016-05-04 14:42:31', '0', null, 'advice.htm', null, '1', '2', '19', '0', null, null, null, null, 'zaixianliuyan'); -INSERT INTO `cms_category` VALUES ('146', '人才招聘', '[]', '', '', '', '/rencaizhaopin', null, '0', '1', '50', '2016-05-19 17:49:37', '0', null, 'about.htm', 'about.htm', '0', '2', '', '0', '2020-01-09 11:21:38', null, null, null, 'rencaizhaopin'); -INSERT INTO `cms_category` VALUES ('147', '长图', null, null, '', '', '/shouyehuandeng/changtu', '100', '0', '1', '50', '2016-06-02 17:23:49', '0', null, 'index.html', 'index.html', '0', '1', '100', '0', null, null, null, null, 'changtu'); -INSERT INTO `cms_category` VALUES ('148', '短图', null, null, '', '', '/shouyehuandeng/duantu', '100', '0', '1', '50', '2016-06-02 17:24:21', '0', null, 'index.html', 'index.html', '0', '1', '100', '0', null, null, null, null, 'duantu'); -INSERT INTO `cms_category` VALUES ('149', '网站案例', '[]', null, '', '', '/wangzhananli', null, '0', '1', '50', '2018-07-09 11:07:41', null, null, 'case-list.htm', 'case-list.htm', '1', '1', '', '0', '2019-12-28 17:49:38', null, null, null, 'wangzhananli'); - --- ---------------------------- --- Table structure for cms_content --- ---------------------------- DROP TABLE IF EXISTS `cms_content`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `cms_content` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `app_id` int(11) DEFAULT NULL COMMENT '文章管理的应用id', @@ -158,107 +143,25 @@ CREATE TABLE `cms_content` ( `create_by` int(11) DEFAULT NULL COMMENT '创建人', PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=223 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='文章'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `cms_content` +-- + +LOCK TABLES `cms_content` WRITE; +/*!40000 ALTER TABLE `cms_content` DISABLE KEYS */; +INSERT INTO `cms_content` VALUES (24,1,'关于我们','19','/19\\index.html','

  公司于2012年3月8日,已正式向《景德镇市工商行政管理局》领取营业   执照。

  公司名称:景德镇铭飞科技有限公司

  经营范围:计算机系统服务及技术开发、咨询服务


','公司于2012年3月8日,已正式向《景德镇市工商行政管理局》领取营业 执照。\r\n 公司名称:景德镇铭飞科技有限公司\r\n 经营范围:计算机系统服务及技术开发、咨询服务',' 公司于2012年3月8日,已正式向《景德镇市工商行政管理局》领取营业 执照。\r\n 公司名称:景德镇铭飞科技有限公司\r\n 经营范围:计算机系统服务及技术开发、咨询服务','',0,'2028-01-01 00:00:00','铭飞科技','铭飞科技','0','c,',0,0,NULL,NULL,NULL,NULL),(36,1,'网站建设','53','/53\\index.html','

网站整体策划

企业网站建设目的何在?如何充分挖掘互联网络的资源和优势,如何合理地组织网站内容与功能从而达到客户的需求?
我们将根据市场分析、客户产品及服务的优势、竞争对手分析等等,有效的确立网站定位。根据相关需求分析获得相应网站运营策略,在网站建立之初我们就网站VI形象、网站营销手段、运营模式、网站发展前景等等进行定位。

 

网站设计 DESIGN

网络媒体不同于传统媒体,如果在网站设计的时候仅仅是将文字和图片做一个简单堆积和展示的话,这样的网站跟一片丢落在街头的破旧宣传资料没有任何区别。客户往往通过企业网站就留下了对企业的第一印象,这个第一印象是决定客户是否与你合作的重要因素。
所以在浏览者的角度,我们分析企业特点和品牌内涵,完美的通过网站体现企业形象,并严格采用W3C国际标准进行网站设计,采用DIV+CSS构 架,不但使您的网站具备足够的扩展性,您网站的速度、兼容性、友好性也都会显著提高,更主要的是,代码和表现分离的方式让您的网站改版变得更容易,而针对 SEO搜索引擎优化的工作也变得更加的畅通。

 

网站建设售后服务 SALES

网站建设专家致力于为客户提供优质的产品及服务。为了多渠道的了解客户的需求,快速响应个性化需要,不断完善售后服务工作,我们客户服务管理部在此为您搭建了这个沟通的平台,我们希望通过网络加强与客户的交流。
完善的售后服务是公司信誉的保障和服务趋于完善与成熟的象征,因此,我们在这一方面投入了较大的精力,确保每一位客户的利益得到充分的保障,从而提高企业信誉,发展长期友好的合作。
对于享受我公司建站服务的客户,我们提供免费一年售后服务。

 

网站全程维护 MAINTAIN

网页制作好了以后并不是就没事了?其实日后的更新维护才是最重要的!如果参观网站的访问者每次看到的网站都是一样的,那么它们日后还会来吗?这时候,您的网页要由谁来维护呢?
严格来说,每一个站点都应该由专业人员定期更新维护。互联网络的最大优势就是信息的实时性,只有快速的反映,准确的报道,才能吸引更多的浏览者。
目前很多站点人气很旺,应该和定期更新分不开的。也有很多站点由于种种原因,数月才更新一次,这样就违背了网路最基本的商业目的。网站不是购买一件商品,随着时间的推移而贬值陈旧,只有不断的溶入企业发展动向,推陈出新,才会具有创造力,发挥网路商业潜能。
更新维护不仅仅只局限于简单的更换文字稿,应该是将企业的商业动态和发展方向充分考虑进去, 再结合现有的网站规划结构,迅速作出相应的改进。企业的每一个新项目的推广和价格的浮动、内部结构调整, 不应该只是在报纸、电视等媒体做宣传而忽略网路这个最具有潜力的市场。 这也是我们一直强调的商业网站 CIS 策略。
鉴于目前大多数网站不具有专业维护的技术力量,网站建设公司可为广大客户提供专业服务。每一个企业可根据自身的商业特征制定不同的维护方案,并保证在最短的时间内迅速完成。

 

网页改版 REVISED

企业上网已成趋势,企业网站犹如雨后春笋般地拔起,试问:
您的企业通过互联网进行了巨额的投入,但网站到底给您带来了多大的效益?
您的网站从建立到现在,更新过几次、改版过几次?
功能不全、设计不美观、布局不合理、几乎从不更新的网站会给企形象带来多大的负面影响?
选择网站建站专家,帮您重新审视和构架您的网站系统,我们提供八项全能服务,全面改善您的网站系统,专为您解决企业上网后顾之忧。

 

培训解决方案 TRAIN

为了更好地做好企业外部门户网站的技术培训工作,将选派具有丰富技术培训和实施经验的技术人员组成培训小组,编写详尽实用的培训教材,并且制定切实有效的培训方案。技术培训的工作为应用软件系统管理和使用培训。
在软件产品实践培训中,采用集中培训的方式,由的培训师针对本系统的技术特点,为企业技术人员提供全面培训,培训内容涵盖了本此系统建设过程中使用的主要技术理论和产品实践。
在应用软件系统管理和使用培训中,我们会组织项目开发小组的主要人员针对管理和使用人员的不同需求,提供不同层次的培训课程。


','','网站设计 网站制作 网站维护 网站改版','[{\"path\":\"/upload/article/1638/1464868285592.png\"}]',0,'2028-01-01 00:00:00','','','0','',0,0,NULL,NULL,NULL,NULL),(37,1,'人才招聘','146','/54\\37.html','

*  以人为本,人尽其才"的原则
*  德才兼备,德为先 
*  内部提拔,给员工一个上升的空间
*  绩效考核制度,倡导"能者上,庸者下"的淘汰机制

 

一个企业的竞争力归结到底是人才的竞争力。荣超物业本着"以人为本,人尽其才"的原则,为有志于物业管理行业发展的人才提供一个发展的舞台。在人才招聘中,结合每位应聘者的素质、品格、经验进行综合评价,遵循公平、平等、竞争、择优以及双向选择的原则。

 

企业内部的竞聘、晋升机制,为员工提供了公平竞争的机会。通过挖掘企业内部的人才,调动内部人员的潜力和积极性,促进了优秀人才脱颖而出,实现人力资源的合理配置,把"合适的人放在合适的地方"。

 

建立客观公正的考核制度,是人才使用的一个重要人力资源措施。考核突出对每位员工的工作绩效、工作态度和工作能力进行考评,以提高团队的整体绩效和提高企业的管理服务水平,并倡导"能者上,庸者下"的淘汰机制。

 

企业致力于创造一个员工于企业共同发展的空间和平台,荣超物业期待您的加盟,企业的发展将为您的加入而更为精彩!


','','企业内部的竞聘、晋升机制,为员工提供了公平竞争的机会。通过挖掘企业内部的人才,调动内部人员的潜力和积极性,促进了优秀人才脱颖而出,实现人力资源的合理配置,把\"合适的人放在合适的地方\"。','',0,'2028-01-01 00:00:00','MS','火星猿','0','',0,0,NULL,NULL,NULL,NULL),(52,1,'响应式Web设计的9项基本原则','65','/61/65\\52.html','

响应式web设计对于解决多类型屏幕问题来说是个不错方案,但从印刷的角度来看,其却存在着很多的困难。没有固定的页面尺寸、没有毫米或英寸,没有任何物 理限制,让人感到无从下手。随着建立网站可用的各种小工具越来越多,像素设计局限于桌面和移动端也已经成为历史。因此,现在就让我们来说明一下如何运用响 应式web设计的各项基本原则来实现,而不是抗拒流畅的网页体验。为了简单起见,我们将着重讲布局

','','响应式web设计对于解决多类型屏幕问题来说是个','[{\"path\":\"/upload/article/1/1458980355125.png\"}]',0,'2028-01-01 00:00:00','来自火星的程序猿','MS','0','f,',0,0,NULL,NULL,NULL,NULL),(53,1,'导航设计模式的重要意义','65','/61/65\\53.html','

Gmai就 是单页应用的一个很好的例子,其将多项操作融入了一个单独的“页面”中。单页设计的趋势是这一UI模式中相对不太高端的一种实现方式,在这一设计模式下, 所有内容均可通过同一页面访问。这一模式可以让浏览变得更快、响应更迅速,从而让桌面与web应用之间的界限不再如此分明。

 

对于Spotify等web应用,考虑到用户有时会在背景播放音乐的同时浏览其他音乐,这时单页应用模式的重要性就愈发凸显,通过使用单页应用,用户就无需对页面进行重新加载,也不会造成音乐停止播放。

在 使用单页应用时需要考虑的一个问题就是URL结构。由于内容使用JavaScript动态加载,URL会失去作用,如果设计不当,还会造成无法访问特定视 图。Gmail和Twitter等应用通过为每个视图生成专门的URL来克服这一问题,这一方法还能够解决浏览器后退按钮失效的问题。



','','Gmai 就 是单页应用的一个很好的例子,其将多项','[{\"path\":\"/upload/article/1/1458981328236.jpeg\"}]',0,'2028-01-01 00:00:00','来自火星的程序猿','MS','0','c,',0,0,NULL,NULL,NULL,NULL),(54,1,'如何进行可用性启发式评估','67','/61/67\\54.html','

用 户体验只有在渗透入从创意到开发测试等产品开发的各个阶段时才能发挥最佳效果。当通常来说事情没这么简单,用户体验专家需要反复对已经完成的产品进行优化 才能使其达到我们口中所说的“用户友好”水平。但是,亡羊补牢,为时未晚。对现有网站进行用户体验优化也有自己的好处和缺点。好处是你可以获得更多真实用 户数据和统计信息方便进行用户调研,但另一方面,也会遇到很多变革的阻力,特别是在你要换掉用户“心爱的宝贝”的时候。

作为用户体验专家,你可以自由选择调研的方法,甚至可以使用超越传统工具的方法,但是今天,我想回归简单,谈一谈启发式评估方法。



','','用 户体验只有在渗透入从创意到开发测试等产品','[{\"path\":\"/upload/article/1/1458981122379.png\"}]',0,'2028-01-01 00:00:00','来自火星的程序猿','MS','0','',0,0,NULL,NULL,NULL,NULL),(55,1,'响应式Web设计的9项基本原则','67','/61/67\\55.html','

想象一下走进一个狭小拥挤,遍地垃圾的商店。店员不停怂恿你买自己不想要的东西。在这种情况下,你肯定会马上转身离开去别家。如果有人给你压力,逼迫你在充满敌意的环境下快速做出抉择,你会自然而然的失去信任感。这一点也适用于网络。

网上充满着向你推销各种服务和产品的人。用户要先信任你,才能考虑从你那购买产品或服务。下面列出了10个比较流行的让用户相信、信任你登陆页面的方法。你可以借鉴或者干脆照搬这些方法为你的网上业务建立起值得信赖的网站。

1.快速表现价值


每个来到你登陆页面的用户都会问同一个问题:你能给我带来什么好处?你需要让他们立刻看到你所能提供的价值。使用显眼的标题说明你所能提供的内容,以及你 与竞争对手的不同之处在哪。但是不要太过于强调你自己和你的公司,否则可能会让用户反感而离开。应当着重强调你如何满足用户的需求。

','','想象一下走进一个狭小拥挤,遍地垃圾的商店。店','[{\"path\":\"/upload/article/1/1458981072779.jpg\"}]',0,'2028-01-01 00:00:00','来自火星的程序猿','MS','0','h,',0,0,NULL,NULL,NULL,NULL),(56,1,'原生App切图的那些事儿','66','/61/66\\56.html','

最小的分辨率是320x480,我们把这个尺寸定为基准界面尺寸(baseline),基准尺寸所用的图标定为1倍图(1x)。


在 实际设计过程中,为了降低设计成本,一般拿设备最高的分辨率作为设计稿的原始尺寸,拿iphone来说就是iphone5或5s的640x1136啦,当 然也可以用iphone4或4s的640x960,因为宽度都是640px,他们切图的标准是一样的。显然,以1倍图的基准尺寸(宽320px)为相对的 参考依据,宽640px的设计稿,以原始尺寸切出来的图标称为2倍图(2x)。

 

有人可能会问:为什么不拿320px作为设计稿的原始尺寸呢?因为1倍图放大成为2倍图远比2倍图缩小成1倍图来得模糊!

 

于是,在不考虑iphone6和iphone 6 plus的情况下,为了适配iphone,每个图标需要切两份。

 

Android - 更为繁多的界面尺寸


Android开源自由的代价就是设备规范的不可控,市面上充斥着各种品牌的android手机,有着各种各样的尺寸和分辨率,为了适配各种不同分辨率的设备,同一个图标需要切成N份,每一份对应一个尺寸。

 

另外需要注意的是,Android里面开发用的尺寸单位是dp或sp(dp为元素表现尺寸,sp为字体尺寸)而不是iphone中的px。。。



','','最小的分辨率是320x480,我们把这个尺寸定为基','[{\"path\":\"/upload/article/1/1458981027610.png\"}]',0,'2028-01-01 00:00:00','来自火星的程序猿','MS','0','',1,0,NULL,NULL,NULL,NULL),(57,1,'11个小妙招激发你的灵感','65','/61/65\\57.html','

感到自己深陷千篇一律的设计泥潭无法自拔?

Stylorouge的Rob O’Connor为你送上下面几条建议帮助你解放自己的想象力。

找不到设计灵感?项目在眼前却不知道如何着手或者找不到合适的入手角度?挣扎着想克服阻拦创意的屏障?

别着急,哪怕是最优秀的设计师也会碰上这些问题。你只需要找到方法让大脑重回战斗状态,创意就会源源不断滚滚而来。下面,我们为你整理了一系列能帮助你有效进行头脑风暴的小建议,另外还有五个绝妙的应用协助你捋清头脑风暴的流程。



','','感到自己深陷千篇一律的设计泥潭无法自拔? Sty','[{\"path\":\"/upload/article/1/1458980990018.jpeg\"}]',0,'2028-01-01 00:00:00','来自火星的程序猿','MS','0','p,h,',1,0,NULL,NULL,NULL,NULL),(58,1,'5项提高产品设计的交互模式','65','/61/65\\58.html','

在这个简短的移动端设计模式系列文章的前几篇中,我为大家介绍了几个能够解决开发期间所产生问题的常见设计模式,大家也学到了什么是设计模式,其基本组成 部分有什么,使用它们解决问题的最佳方法都有哪些,以及表单、图片集架构、搜索功能和交互建议等各种问题。另外,大家应该还了解了避免
作为本系列的终篇,我将为大家概括性地介绍5种流行移动应用中常见的界面设计模式以供大家在自己的项目中参考。这些设计模式有助于大家提高设计的可用性,让界面变得更加直观。文章将侧重介绍能够帮助大家进行下列各方面设计的模式:
· 社交分享
· 通知
· 弹窗
· 内容更新
· 用户互动(滑动、点击等)


','','在这个简短的移动端设计模式系列文章的前几篇中','[{\"path\":\"/upload/article/1/1458980956132.jpeg\"}]',0,'2028-01-01 00:00:00','来自火星的程序猿','MS','0','',1,0,NULL,NULL,NULL,NULL),(59,1,'在网页设计中运用柔和色调','65','/61/65\\59.html','

网页中的柔和色调的使用,不止是近来的趋势,这是一项设计师使用多年的技巧,用来创造有冲击力的视觉效果。


当你听到“柔和”一词,想到的可能是淡粉色、淡蓝色、淡黄色,不过这种配色远不止这些颜色。柔和并不一定要感觉像新生儿一样。通过某些适当的方式,配合其他元素,这些色调也可以相当鲜明。


下面我们从优秀的案例网站出发,了解10种在网页设计中运用柔和色调的方法。



','','网页中的柔和色调的使用,不止是近来的趋势,这','[{\"path\":\"/upload/article/1/1458980935362.jpg\"}]',0,'2028-01-01 00:00:00','来自火星的程序猿','MS','0','',1,0,NULL,NULL,NULL,NULL),(60,1,'细数那些精彩纷呈的引导页','65','/61/65\\60.html','

随着苹果ios8的发布,可以看到App store货架上,众多主流App迫不及待地向人们展示产品视频预览,接下去会是被设计师、市场宣传相继关注的焦点,产品宣传的下一轮引爆点。作为能在 App store上先发触达地形成前期推广的视频预览,又会否影响到App安装完毕后的引导页呈现?我们不得而知。鉴于两者形式的展现,间隔于安装App前后, 多少会规避重复性。不管怎样,趁着手机App和扁平风热潮,一起来细数归纳下对手机引导页的所见所想。 早期我们会见到比较多成熟的PC软件或者网页产品的产品安装包或新特性指引页。近几年在移动端平台上兴起了各种门类,形式精彩纷呈的引导页。

','','随着苹果ios8的发布,可以看到App store货架上','[{\"path\":\"/upload/article/1/1458980789639.png\"}]',0,'2028-01-01 00:00:00','来自火星的程序猿','MS','0','',0,0,NULL,NULL,NULL,NULL),(61,1,'从摄影的角度看设计','65','/61/65\\61.html','

一幅好照片要把观众的注意力吸引到趣味中心&mdash;&mdash;被摄主体上。无论是拍什么 类型的照片,都会有一个主体你喜欢拍人物,拍生态,这些都不是问题,但是一旦主体被模糊,欣赏照片时就会忽略照片的主体,这样的照片是不失败不完美的,因 为真正想让观众看的东西并没有一眼看到。例如婚纱照,主体肯定是人物新娘和新郎。如果目光都被新娘后面的景色吸引,而不是新娘,这肯定不会是我们想照的。

 

     网页设计师的重要任务不是根据内容做出网页,而是根据用户需求设计出让用户喜欢并积极使用的网页,能够让用户知道并去使用网站的新产品or关键点 or有价值的信息,那么如何突出这些点?如何让用户看到网页的&ldquo;G点&rdquo;,有让用户点击或者传播的欲望?突出设计 的重点就如同突出摄影的被摄主体一样,把控视觉的重点,你的设计一定会非常精彩。

 

     下面我将通过几种突出被摄重点的摄影方法来诠释设计与摄影的微妙关系。

 



','','一幅好照片要把观众的注意力吸引到趣味中心mdas','[{\"path\":\"/upload/article/1/1458980625909.jpg\"}]',0,'2028-01-01 00:00:00','来自火星的程序猿','MS','0','',1,0,NULL,NULL,NULL,NULL),(62,1,'国内java开源商城系统','65','/61/65\\62.html','

MCMS(http://ms.mingsoft.net)是企业创立初期很好的基础框架,不仅可以实现和现有系统的对接而且有大量的插件模版可以使用。

MS平台开发团队承诺MCMS内容管理系统永久完整开源免费(这真是极好的)!下面就简单的给大家介绍一下MS平台和MCMS为什么如此之快。

MS平台是铭飞团队经过三年的研发,最终以MCMS为基础,集商城、论坛、分期、会员、支付、积分、微信等系统于一体的插件式系统。并实现了淘宝、京东、苏宁、国美等第三方电商平台数据接口的统一。平台中的小插件如:邮件推送、短信接口、定时任务、促销活动、数据采集等非常丰富。

MCMS的模版采用标签式开发,上手非常快。

对于技术小白来说不仅避开了学习复杂的高级开发语言,而且MStore有大量成熟的模版直接下载之后换换图片和内容就可以使用,要是需要调整只需要写简单的标签就可以。

对于前端工程师来说只需要写好页面样式并在页面内容部分套上标签,就可以做出一套优美的动态网站。并且还可以实现留言板、用户登录等数据交互功能。

MStore主页:

对于学习JAVA开发的工程师来说这无疑是最好的学习项目,并且最大的优势在于整个系统的结构非常清晰,使用的都是当下JAVA最常用最热门的技术,由于MCMS是全部开源并且作为MS的技术架构在使用这也就说明在学习MCMS的同时也学会了相应的框架使用方法。

MCMS结构图解:


MCMS的群站解决方案和模块式的开发架构,让我们管理项目非常方便。不仅很好的解决了因为项目过多而导致的管理紊乱现象,而且还在一定程度上使服务器的资源得到最大化的利用,也避免同时维护多套系统的繁杂。由于是纯JAVA系统这里安全性完全可以放心。

由于MS平台采用的是模块和插件式的开发,这又进一步从代码层面上提升了我们维护简便性和针对性,而不是像传统项目那样需要维护整套代码。比如:短信插件出问题了那么我们只需要单独的去维护端短信插件即可,其他插件模块不会因为短信插件在维护而受到影响。

MS平台采用模块式开发,严格的说MCMS只是属于MS平台中的一个基础模块。这给定向业务和第三方平台的接入提供了很好的结构支持,从另一个角度来说MCMS严格的遵循了开闭原则,是支持无限拓展的。并且每一次拓展都不会伤害到原有的代码。不仅从结构上保障了系统的开发速度而且不会因为系统的升级或者是插件影响到系统的稳定性。

同时MCMS将底层复杂的前端代码和第三方接口以及JDK中常用的方法做了很完善的二次封装,从代码角度来讲也大大的节省的开发时间。做到了真正的让代码飞起来!而且更为难得的是这些封装都具有极强规律性,和易用性这里简单的给大家举几个例子:

封装的freemarker


封装表单


封装的上传图片插件


封装的分页


MS平台中有大量的插件和模版可以使用资源非常丰富,目前已经发布或者计划发布的官方模版有八套,开发者提交并且还在审核中的有162套,并且还在以每天10套左右的速度增加。目前已经发布或者准备发布的官方插件有:BBS(论坛),商城,微信,分期,短信,淘宝,支付等由于数量众多这里就不一一列举。开发者提交的有短信模版插件、邮件模版插件、淘宝开放平台插件等其中大部分还在审核阶段。

MS平台的资源之所以如此丰富插件和模块。一方面除了系统从结构上支持无缝对接之外,MS平台还拥有一大批优质的开发者。开发者在平台提交优质插件之后定价权在自己手中,这又从另外一个角度上大大刺激了海量优质插件的诞生。


','','MCMS(http://ms.mingsoft.net)是企业创立初期很好的基础框架,不仅可以实现和现有系统的对接而且有大量的插件模版可以使用。','[{\"path\":\"/upload/article/1/1458980449738.jpeg\"}]',0,'2028-01-01 00:00:00','来自火星的程序猿','MS','0','',1,0,NULL,NULL,NULL,NULL),(63,1,'国内java开源 cms系统','65','/61/65\\63.html','

MCMS(http://ms.mingsoft.net)是企业创立初期很好的基础框架,不仅可以实现和现有系统的对接而且有大量的插件模版可以使用。

MS平台开发团队承诺MCMS内容管理系统永久完整开源免费(这真是极好的)!下面就简单的给大家介绍一下MS平台和MCMS为什么如此之快。

MS平台是铭飞团队经过多年的研发,最终以MCMS为基础,集商城、论坛、分期、会员、支付、积分、微信等系统于一体的插件式系统。并实现了淘宝、京东、苏宁、国美等第三方电商平台数据接口的统一。平台中的小插件如:邮件推送、短信接口、定时任务、促销活动、数据采集等非常丰富。

MCMS的模版采用标签式开发,上手非常快。

对于技术小白来说不仅避开了学习复杂的高级开发语言,而且MStore有大量成熟的模版直接下载之后换换图片和内容就可以使用,要是需要调整只需要写简单的标签就可以。

对于前端工程师来说只需要写好页面样式并在页面内容部分套上标签,就可以做出一套优美的动态网站。并且还可以实现留言板、用户登录等数据交互功能。

MStroe主页:


','','MCMS(http://ms.mingsoft.net)是企业创立初期很好的基础框架,不仅可以实现和现有系统的对接而且有大量的插件模版可以使用。','[{\"path\":\"/upload/article/1/1458980395756.jpg\"}]',0,'2028-01-01 00:00:00','来自火星的程序猿','MS','0','h,',1,0,NULL,NULL,NULL,NULL),(70,1,'2015年 铭飞MCms获得最热门开源项目第40位','69','/59/69\\70.html','

自 Git@OSC 上线以来受到广大开源作者的喜爱。值此新年之际,开源中国整理出 Git@OSC 最热门开源项目 Top50,对 Git@OSC 的发展至今所取得的成绩进行总结。此榜单主要通过开源项目的 Watch、Star、Fork 数量来评定,项目类型不尽相同,难免有纰漏,如有遗漏或者不妥之处,希望大家批评指正。若您对 Git@OSC 未来的发展有何意见或者建议,也欢迎在评论区留言告诉我们。

下面是项目列表:

1、JFinal

项 目简介:JFinal 是基于 Java 语言的极速 WEB + ORM 框架,其核心设计目标是开发迅速、代码量少、学习简单、功能强大、轻量级、易扩展、Restful。在拥有Java语言所有优势的同时再拥有ruby、 python、php等动态语言的开发效率!为您节约更多时间,去陪恋人、家人和朋友 :)

2、jeewx

项目简介:免费开源JAVA微信管家平台,实现了微信平台的基础功能,便于用户二次开发。JEEWX支持微信第三方平台全网发布、支持微信插件开发机制,可轻松集成微信H5插件。

3、tiny

项目简介:值得拥有的企业级j2ee应用开发框架套件,专业团队开发,完整的生态体系,活跃的社区氛围,无限的水平扩展能力,7*24不间断运维能力。

4、CMS

一款使用Java语言开发的CMS,使用了Spring MVC,Spring,MyBatis等流行框架,提供首页大图管理、目录管理、文章管理和管理员管理等功能。是学习和二次开发的首选。

5、jeecg

项 目推荐:JEECG是一款J2EE企业级快速智能开发平台,开源界“小普元”超越传统商业企业级开发平台。基于代码生成器,引领新的开发模式 (Online Coding模式(自定义表单)->代码生成器模式->手工MERGE智能开发), 可以帮助解决Java项目60%的重复工作,让开发更多关注业务逻辑。既能快速提高开发效率,帮助公司节省人力成本,同时又不失灵活性。

6、Mybatis_PageHelper

项目简介:Mybatis_PageHelper 是 Mybatis 分页插件,支持任何复杂的单表、多表分页。

7、JeeSite

项目简介:JeeSite 是一个企业信息化开发基础平台,Java EE(J2EE)快速开发框架,使用经典技术组合(Spring、Spring MVC、Apache Shiro、MyBatis、Bootstrap UI),包括核心模块如:组织机构、角色用户、权限授权、数据权限、内容管理、工作流等。

8、LigerUI

项目简介:基于jQuery的UI框架,包括表单、布局、表格等等常用UI控件,使用LigerUI可以快速轻松地创建风格统一的界面效果。

9、CrossApp

项目简介:一款完全开源、免费、跨平台的移动应用开发引擎,开发者可以完全免费、毫无顾虑的使用CrossApp开发任何项目。本引擎基于C++语言编写,OpenGl ES2.0图形渲染。拥有丰富的UI控件、丰富的第三方库、集成各种系统接口。

10、thinkphp

项目简介:ThinkPHP 是一个免费开源的,快速、简单的面向对象的 轻量级PHP开发框架 ,创立于2006年初,遵循Apache2开源协议发布,是为了敏捷WEB应用开发和简化企业应用开发而诞生的。ThinkPHP从诞生以来一直秉承简洁 实用的设计原则,在保持出色的性能和至简的代码的同时,也注重易用性。

11、KJFrameForAndroid

项目简介:KJFrameForAndroid的设计思想是通过封装Android原生SDK中复杂的复杂操作而达到简化Android应用级开发,最终实现快速而又安全高效的开发APP。我们的目标是用最少的代码,完成最多的操作,用最高的效率,完成最复杂的功能。

12、zbus

项目简介:ZBUS=MQ+RPC+PROXY 服务总线  1)支持消息队列, 发布订阅, RPC, 代理(TCP/DMZ)   2)亿级消息堆积能力、支持HA高可用  3)无依赖单个Jar包 ~300K   4)丰富的API--JAVA/C/C++/C#/Python/Node.JS多语言接入,支持HTTP/Thrift等协议接入

13、ECP

项目简介:ECP  是基于jfinal、avalon、bootstrap、jqGrid、snaker工作流开发的客户关系及进销存财务系统。支持多企业使用。

14、jfinal-weixin

项目简介:JFinal Weixin 是基于 JFinal 的微信公众号极速开发 SDK,只需浏览 Demo 代码即可进行极速开发,自 JFinal Weixin 1.2 版本开始已添加对多公众号支持。

15、cim

项目简介:基于apache  mina 的 java即时通讯服务端。与android 客户端完美结合,同时支持其他语言(ios,c,ActionScript,.net等)客户端的即时通信。

16、webmagic

项目简介:webmagic的是一个无须配置、便于二次开发的爬虫框架,它提供简单灵活的API,只需少量代码即可实现一个爬虫。

17、Mapper

项目简介:极其方便的使用Mybatis单表的增删改查。通用Mapper都可以极大的方便开发人员。可以随意的按照自己的需要选择通用方法,还可以很方便的开发自己的通用方法。

18、smart-framework

项目简介:轻量级 Java Web 开发框架,内置 IOC、AOP、ORM、DAO、MVC 等特性,基于 Servlet 3.0 规范,使用 Java 注解取代 XML 配置。

19、git-quick-start

项目简介:这是一个git的快速入门项目,使用一些gif图片来播放一些基础的git命令使用方法。

20、EasyPR

项目简介:EasyPR是一个中文的开源车牌识别系统,其目标是成为一个简单、高效、准确的车牌识别引擎。 相比于其他的车牌识别系统,EasyPR有如下特点: * 它基于openCV这个开源库。这意味着你可以获取全部源代码,并且移植到java等平台。

21、docker-training

项目简介:此次课程是:希云cSphere免费为国内docker爱好者进行docker培训。希云cSphere致力于为企业提供专业的docker管理平台,和paas平台!

22、fastjson

项目简介:fastjson 是一个性能很好的 Java 语言实现的 JSON 解析器和生成器,来自阿里巴巴的工程师开发。

23、springrain

项目简介:springrain是spring的极简封装,spring一站式开发的范例。

24、easypoi

项目简介:POI 工具类,Excel的快速导入导出,Excel模板导出,Word模板导出,可以仅仅5行代码就可以完成Excel的导入导出,修改导出格式简单粗暴,快速有效,easypoi值得你尝试。

25、s2jh

项目简介:基于SSH的企业Web应用开发框架。集结最新主流时尚开源技术的面向企业级Web应用的基础开发框架,提供一个J2EE相关主流开源技术架构整合及一些企业应用基础通用功能和组件的设计实现的最佳实践和原型参考。

26、eova

项目简介:J2EE快速开发平台,master 为最新代码,稳定版->请下载最新的Tag版本,Eova仅兼容webkit 内核浏览器,IE和火狐是不兼容的,推荐使用谷歌浏览器。

27、zentaopms

项目简介:禅道是第一款国产的开源项目管理软件。它集产品管理、项目管理、质量管理、文档管理、组织管理和事务管理于一体,是一款专业的研发项目管理软件,完整地覆 盖了项目管理的核心流程。注重实效,合软件架构合理,操作简洁高效,扩展灵活,多语言支持,多风格支持,搜索功能,统计功能——这一切,您通过禅道,都可 以拥有!

28、DotNetCodes

项目简介:一些常用的功能性代码,可以减少许多开发时间,而且类与类之间没有什么依赖,每个类都可以单独拿出来使用。

29、B-JUI

项目简介:B-JUI(Best jQuery UI) 前端框架,轻松开发,专注您的业务,从B-JUI开始。

30、DuxCms 2.0

项目简介:DUXCMS是一款针对于中小网站与二次开发平台的一款管理系统,基于canphp3框架,后台采用拼图UI,更加利于多平台使用于开发者快速开发。开发版基于正式版进行的部分优化于实验性功能,不建议作为正式建站使用。

31、Cynthia

项目简介:Cynthia提供了一个基于Web的、开源的、跨平台的软件项目管理和问题管理的解决方案。通过极大的灵活度,实现了特殊性和普遍性的统一。 它提供了强大的自定义配置功能,用户能够根据自己的实际情况配置问题的流转和数据模板,它同时内置了强大的Cache模块提高数据的访问效率。

32、anycmd

项目简介:一个完全开源的,完整支持rbac的,将会支持xacml、javascript的通用的权限框架、引擎、中间件、解决方案。

33、OpenCenter

项目简介:基于Apache2.0 开源通用 用户及后台管理框架,提供了注册登录、头像裁剪、单点登录、权限管理、扩展资料管理、等级头衔、自定义积分管理、用户行为日志机制、模块装卸、插件机制,提供建议的安装程序。

34、PhalApi

项目简介:PHP轻量级开源接口框架,专注于后台接口的快速开发。在移动互联网时代的这十年,希望此框架能对各接口开发有实际的帮助,欢迎使用!我们致力于将PhalApi维护成像恒星一样:不断更新,保持生气;为接口负责,为开源负责!

35、zftlive

项目简介:这是一个集成目前Android主流优秀第三方组件、优秀好用的自定义控件、实用工具类封装、以及一些APP共通模块(比如:版本更新、意见反馈、引导界面等等)的开发包,帮助程序员快速开发自己的APP。

36、commonrpc

项 目简介:还在羡慕BAT等公司的大流量的架构吗?让你的java系统引用解耦,互相独立,commonrpc 就可以办到。commonrpc 是一个以netty 传输协议框架为基础, 自定义 spring shcema标签的rpc框架,不侵入任何业务代码,插件模式,即插即用;一个高性能分布式rpc框架,支持tcp,http协议,扩展性强。

37、Dos.ORM

项目简介:Dos.ORM(原Hxj.Data)于2009年发布,并发布实体生成工具。在开发过程参考了多个ORM框架,特别是NBear,MySoft、EF、Dapper等。吸取了他们的一些精华,加入自己的新思想。该组件已在上百个成熟企业项目中应用。

38、PSI

项目简介:PSI是开源进销存系统。PSI是希腊字母Ψ的读音。产品寓意:PSI本身不完美,但追求的是不断改进的品质,距离终极产品就一步之遥(因为在希腊字母表中,Ψ之后是Ω,Ω有终极的意思)。

39、JECP

项目简介:

JECP 集合了easyui +jfinal +druid+freemarker,非常方便开发。目前只完成了系统管理模块,属于开发整合。具体功能本人时间不多,未能实现。工作流采用的是activiti,目前已在另外的项目中采用。等应用成熟后会后续添加到JECP中。

40、MCMS

项目简介:免费开源铭飞MCMS系统完整J2EE代码,提供商城、微信、论坛等更多丰富插件,每月28更新新版本。快的不像JAVA系统。

41、WeX5

项目简介:WeX5是跨端移动快速开发框架;只需一次开发,即可发布、运行于各种前端平台上;支持iOS ipa、android apk、微信服务号/企业号应用、web app和其他轻应用的快速开发。

42、QQLikeUI

项目简介:Qt实现的高仿QQ6.x UI,登录窗体与主窗体已经部分实现,窗体目前还不能自由改变大小,但是可以随意拖动。

43、ThinkCMFX

项目简介:ThinkCMF 是一款高速PHP内容管理框架,扩展性良好可高程度的提高开发者的开发效率,节省开发成本。

44、jeewx-api

项目简介:现在微信越来越火,基于微信的公众号和服务号越来越丰富,虽然微信帮助文档已经提供了相关的接口,但是接口比较多,通过代码自己调用比较麻烦,所以为减轻开发者独自创造轮子,将微信API进行了统一封装!

45、jfinalbbs

项目简介:使用PHP开发的论坛遍地都是,但使用JAVA来开发社区基本上没有,朋也使用JFinal框架开发了一个属于JAVA语言的社区软件,在这开源供大家借鉴使用,大神勿喷。

46、openerp-china

项目简介:OpenERP中国版,降低OpenERP中国社区项目的参与门槛。

47、manual_dota

项目简介:《刀塔传奇》开源项目,服务器+客户端,蛮牛主办深圳玩贝科技组织。

48、examxx

项目简介:Exam++是国内首款基于JAVA与MYSQL开发的网络考试系统。它可以稳定、顺畅的运行在Windows与Linux平台上。您可以通过它快捷方便的创建试题和题库,发布试卷,组织考试,系统自动批改。

49、webbase

项目简介:务系统框架,包括员工管理,组织机构,请假出差申请,流程审批,信息汇总,excel导出等基础功能。

50、HeartBeat

项目简介:心跳检测各类应用服务器(如Tomcat,Jetty),WEB服务器(如 Apache,Nginx) 的JAVA WEB应用程序。


','','自 Git@OSC 上线以来受到广大开源作者的喜爱。值此新年之际,开源中国整理出 Git@OSC 最热门开源项目 Top50,对 Git@OSC 的发展至今所取得的成绩进行总结。此榜单主要通过开源项目的 Watch、Star、Fork 数量来评定','[{\"path\":\"/upload/article/1/1461384072200.jpeg\"}]',0,'2028-01-01 00:00:00','来自火星的程序猿','MS','0','c,',1,0,NULL,NULL,NULL,NULL),(71,1,'国内java开源 cms系统','68','/59/68\\71.html','

MCMS(http://ms.mingsoft.net)是企业创立初期很好的基础框架,不仅可以实现和现有系统的对接而且有大量的插件模版可以使用。

MS平台开发团队承诺MCMS内容管理系统永久完整开源免费(这真是极好的)!下面就简单的给大家介绍一下MS平台和MCMS为什么如此之快。

MS平台是铭飞团队经过多年的研发,最终以MCMS为基础,集商城、论坛、分期、会员、支付、积分、微信等系统于一体的插件式系统。并实现了淘宝、京东、苏宁、国美等第三方电商平台数据接口的统一。平台中的小插件如:邮件推送、短信接口、定时任务、促销活动、数据采集等非常丰富。

MCMS的模版采用标签式开发,上手非常快。

对于技术小白来说不仅避开了学习复杂的高级开发语言,而且MStore有大量成熟的模版直接下载之后换换图片和内容就可以使用,要是需要调整只需要写简单的标签就可以。

对于前端工程师来说只需要写好页面样式并在页面内容部分套上标签,就可以做出一套优美的动态网站。并且还可以实现留言板、用户登录等数据交互功能。

MStroe主页:

\"1461658200683.jpg\"\"1461658233757.jpg\"\"1461658203315.png\"


','','MCMS(http://ms.mingsoft.net)是企业创立初期很好的基础框架,不仅可以实现和现有系统的对接而且有大量的插件模版可以使用。','[{\"path\":\"/upload/article/1638/1464847653084.jpeg\"}]',0,'2028-01-01 00:00:00','来自火星的程序猿','MS','0','',0,0,NULL,NULL,NULL,NULL),(72,1,'2016年CMS开源系统排行榜','68','/59/68\\72.html','

首先还是介绍一下什么是CMS。
CMS(Content Management System),中文叫作整站系统、文章系统。
大概2004以前,如果想进行网站内容管理,基本上都是靠手工维护,但千变万化的信息流,但没有好的程序支持,还继续靠手工完成是不可能的事。
如果有一个好的系统来支撑你的网站,那将节省大量的人力物力,开发者就可能给客户一个软件包,可以用它定期人工修改网站。
只要你配置安装好,你的编辑,在线记者,更新员只要定期更新数据,剩下的事就交给CMS去处理。

铭飞CMS(MCMS)

\"1461658172067.jpg\"

特点: 
Java领域唯一完全免费开源的系统,值得点个赞!在2015年开源中国排名第40位,铭飞cms系统也采用模块化开发,功能可扩展更方便。铭飞还提供了MStore资源平台,提供更多的模版与插件源码,这给整个系统来说增加了很多想象的空间。
免费完整开源:基于MIT协议,源代码完全开源,无商业限制,MS开发团队承诺将MCMS内容系统永久完整开源;
标签化建站:不需要专业的后台开发技能,只要使用系统提供的标签,就能轻松建设网站;
html静态化:系统支持全站静态化;
跨终端:站点同时支持PC与移动端访问,同时会自动根据访问的终端切换到对应的界面,数据由系统统一管理;
海量模版:铭飞通过MStore(MS商城)分享更多免费、精美的企业网站模版,降低建站成本;
丰富插件:为了让MCms适应更多的业务场景,在MStore用户可以下载对应的插件,如:站群插件、微信插件、商城插件等;
每月更新:铭飞团队承诺每月28日为系统升级日,分享更多好用等模版与插件;
文档丰富:为了让用户更快速的使用MCms系统进行开发,铭飞团队持续更新开发相关文档,如标签文档、使用文档、视频教程等;
评价:
算是Java领域开源的新星吧,框架的选型都很用心。对一个java程序猿来说二次开发很轻松。小编感觉铭飞并不是一个简单cms系统,从铭飞官方提供的MStore来看,系统可以实现各种业务模块,例如商城、分期系统、淘宝API、微信API等都有提供,同时也关注官方的MS平台,相信这是Java领域的福音。


','','CMS(Content Management System),中文叫作整站系统、文章系统。\r\n大概2004以前,如果想进行网站内容管理,基本上都是靠手工维护,但千变万化的信息流,但没有好的程序支持,还继续靠手工完成是不可能的事。','[{\"path\":\"/upload/article/1/1461384142045.png\"}]',0,'2028-01-01 00:00:00','来自火星的程序猿','MS','0','',0,0,NULL,NULL,NULL,NULL),(73,1,'国内java开源商城系统','68','/59/68\\73.html','

MCMS(http://ms.mingsoft.net)是企业创立初期很好的基础框架,不仅可以实现和现有系统的对接而且有大量的插件模版可以使用。

MS平台开发团队承诺MCMS内容管理系统永久完整开源免费(这真是极好的)!下面就简单的给大家介绍一下MS平台和MCMS为什么如此之快。

MS平台是铭飞团队经过三年的研发,最终以MCMS为基础,集商城、论坛、分期、会员、支付、积分、微信等系统于一体的插件式系统。并实现了淘宝、京东、苏宁、国美等第三方电商平台数据接口的统一。平台中的小插件如:邮件推送、短信接口、定时任务、促销活动、数据采集等非常丰富。

MCMS的模版采用标签式开发,上手非常快。

对于技术小白来说不仅避开了学习复杂的高级开发语言,而且MStore有大量成熟的模版直接下载之后换换图片和内容就可以使用,要是需要调整只需要写简单的标签就可以。

对于前端工程师来说只需要写好页面样式并在页面内容部分套上标签,就可以做出一套优美的动态网站。并且还可以实现留言板、用户登录等数据交互功能。

MStore主页:

\"1461658043545.jpg\"

对于学习JAVA开发的工程师来说这无疑是最好的学习项目,并且最大的优势在于整个系统的结构非常清晰,使用的都是当下JAVA最常用最热门的技术,由于MCMS是全部开源并且作为MS的技术架构在使用这也就说明在学习MCMS的同时也学会了相应的框架使用方法。

MCMS结构图解:

\"1461115606898073191.png\"/

MCMS的群站解决方案和模块式的开发架构,让我们管理项目非常方便。不仅很好的解决了因为项目过多而导致的管理紊乱现象,而且还在一定程度上使服务器的资源得到最大化的利用,也避免同时维护多套系统的繁杂。由于是纯JAVA系统这里安全性完全可以放心。

由于MS平台采用的是模块和插件式的开发,这又进一步从代码层面上提升了我们维护简便性和针对性,而不是像传统项目那样需要维护整套代码。比如:短信插件出问题了那么我们只需要单独的去维护端短信插件即可,其他插件模块不会因为短信插件在维护而受到影响。

MS平台采用模块式开发,严格的说MCMS只是属于MS平台中的一个基础模块。这给定向业务和第三方平台的接入提供了很好的结构支持,从另一个角度来说MCMS严格的遵循了开闭原则,是支持无限拓展的。并且每一次拓展都不会伤害到原有的代码。不仅从结构上保障了系统的开发速度而且不会因为系统的升级或者是插件影响到系统的稳定性。

同时MCMS将底层复杂的前端代码和第三方接口以及JDK中常用的方法做了很完善的二次封装,从代码角度来讲也大大的节省的开发时间。做到了真正的让代码飞起来!而且更为难得的是这些封装都具有极强规律性,和易用性这里简单的给大家举几个例子:

封装的freemarker

\"1461115607308036067.png\"/

封装表单

\"1461115607472060206.png\"/

MS平台中有大量的插件和模版可以使用资源非常丰富,目前已经发布或者计划发布的官方模版有八套,开发者提交并且还在审核中的有162套,并且还在以每天10套左右的速度增加。目前已经发布或者准备发布的官方插件有:BBS(论坛),商城,微信,分期,短信,淘宝,支付等由于数量众多这里就不一一列举。开发者提交的有短信模版插件、邮件模版插件、淘宝开放平台插件等其中大部分还在审核阶段。

MS平台的资源之所以如此丰富插件和模块。一方面除了系统从结构上支持无缝对接之外,MS平台还拥有一大批优质的开发者。开发者在平台提交优质插件之后定价权在自己手中,这又从另外一个角度上大大刺激了海量优质插件的诞生。


','','MCMS(http://ms.mingsoft.net)是企业创立初期很好的基础框架,不仅可以实现和现有系统的对接而且有大量的插件模版可以使用。','[{\"path\":\"/upload/article/1/1461384035654.png\"}]',0,'2028-01-01 00:00:00','来自火星的程序猿','MS','0','h,',2,0,NULL,NULL,NULL,NULL),(74,1,'国内java开源bbs系统','68','/59/68\\74.html','

铭飞MCMS内容管理系统完整开源版J2EE代码

当前版本:5.4.2 铭飞MS官网:http://ms.mingsoft.net官网同时提供一键运行版本下载,请步移官网....

特点

免费开源:纯Java开发,MS开发团队承诺将MCMS内容系统永久完整开源;

终端统一: 铭飞MCMS支持PC与MOBILE皮肤定制,同时使用MS团队移动JS插件,轻松实现手机多屏幕适配,想想看你发布的信息第一时间在PC上展示又能在手机上展示,这是件多么幸福的事情,数据统一、平台统一、终端统一是MS团队一直在努力的方向;

扩展性:以铭飞MCMS为核心,MS官网提供第三方插件安装,最新的插件用户可以通过更新功能获得,同时MS也鼓励并支持第三方开发人员发布优质的插件;

更新升级: 铭飞MCMS提供了行业内最完美的升级方案,从此升级无需手动下载复制粘贴,一切完全由MS升级插件无缝完成;

文档手册:铭飞不断向外部公布最新文档,如二次开发手册、标签使用手册,减轻用户学习成本;

站群:MCMS支持站群,只需在服务器上架设一套铭飞MCMS就可以创建多个个网站,并且网站之间的数据是独立存在,很大程度降低了维护成本,与服务器资源的开销;

其他:html静态生成、标签式建站

技术支持:提永久升级服务技术交流群,不定期会升级系统,开发可以关注后台的更新板块;

面向对象

铭飞MCMS是企业在创立初期很好的技术基础框架,加快公司项目开发进度,当然也可以对现有的系统进行升级;

个人开发者也可以使用MCMS承接外包项目;

初学JAVA的同学可以下载源代码来进行学习交流;

开发框及语言

铭飞MCMS(铭飞内容管理系统)是一款支持不同平台、不同终端并且支持多站点的内容管理系统,

· SpringMVC4+Spring4+MyBatis3+Freemarker技术架构

· 基于java技术开发,继承其强大、稳定、安全、高效、跨平台等多方面的优点;

· 标签化建站,只要你懂html就能建站;

· 完全生成全站静态页面;

· 可自定义路径结构,全面提高页面访问速度;

有人说铭飞MCMS是全国唯一完整开源的J2EE版本系统!团队希望看到更多的优秀好用的开源系统,我们一直会努力下去!

运行环境

原则上支持全系列JAVA运行环境;

WEB服务器:Weblogic、Tomcat、WebSphere、JBoss 等

数据库服务器:Mysql等

操作系统:Windows、Linux、Unix 等

开发环境

建议开发者使用一下环境,这样避免版本带来的冲突

IDE:eclipse、MyEclise

DB:Mysql5.5

JDK:JAVA 7、J2EE6

重要文件说明

数据库连接文件: config.properties

数据库文件:doc/db-mcms-open.sql

数据库编码:UTF-8

模板文件:templets/1549/mooc

后台访问路径:

http://+ip地址(或localhost)+tomcat端口+项目发布名/ms/login.do

如果出现无法访问的情况输入

http://+ip地址(或localhost)+tomcat端口+项目发布名/initApp进行初始化

账号:msopen

密码:msopen

代码部署与常见问题

铭飞MS官方开发社区文档 http://ms.mingsoft.net/mbbs/12998/detail.do

系统美图

\"1461657686925.jpg\"


','','当前版本:5.4.2 铭飞MS官网:http://ms.mingsoft.net官网同时提供一键运行版本下载,请步移官网....','[{\"path\":\"/upload/article/1/1461383961935.png\"}]',0,'2028-01-01 00:00:00','来自火星的程序猿','MS','0','',1,0,NULL,NULL,NULL,NULL),(112,1,'新科科技','87','/61/87\\112.html','

主营品牌车型:奔驰、宝马、奥迪、路虎、保时捷、宾利、劳斯莱斯、北京现代、上海大众斯柯达、东风标致、东风悦达起亚、东风雪铁龙、东风本田雪弗兰、上海大众、进口大众、道奇、吉普、雷诺、别克、马自达、中华、福特、海南马自达等各种中高档进口和国产轿车。在汽车销售行业里有着较高的知名度和良好的信誉。

经营业务:除了销售各种品牌车外,还经营汽车保险、汽车装潢、汽车按揭、二手车评估、二手车收购、二手车置换,并免费为您提供上牌等一条龙服务。

 

郑重承诺:保证您从我公司购买的车是全市场上最低的价格,让您购的放心, 我公司所售车辆均为各品牌4S店的车,选车、交钱、提车、开发票、售后保养,一切的一切都在4S店办理,我们就相当于是4S店的跑量销售员(批发价)。 说白了,就是您在4S店买车我们帮您还价。 您在我公司定了车以后,我们会安排4S店的销售员和你联系。

经营宗旨:减少成本和跑量给消费者带来最大的实惠!金杯银杯不如客户的口碑!只要您买过就会介绍朋友来买!

宝诚导购流程:我公司为了让大家更放心的购买汽车,现进行经营模式调整,较以前更加灵活、更加方便、更具备人性化。如果有客户觉得我们的价格比较实惠,但又担心车的来源,在这种情况下,我公司对有顾虑的客户,我们帮您排除这个疑虑。在我们公司签定车合同后,我们安排4S店销售员和您联系,办理所有相关手续。具体导购流程如下:

第一步:您可以先到您所需品牌的任何一家4S店看车,选车,然后决定要什么车型。

第二步:决定好所需车型,在某品牌4S店进行砍价,和销售员谈个最低价,但切忌不要交定金。

第三步:拨打我们公司电话,告诉我们您需要的车型和颜色,以及哪家4S店。和我们谈好您觉得的满意的价格,我们觉得有钱可赚(少赚点没关系,不亏就行),意见达成一致。

第四步:直接到我们公司签定车合同并交付定金。
第五步:我公司安排销售人员陪同客户去4S店提车并办理相关手续。


','','在网上寻觅了很久很久。终于找到了这里。晃眼一看,好多漂亮的模板。下载了几个都很好用。希望越做越好,多提供些精品资源!找了好久啊,一直想有一个这样的网站,找来找去,老感觉么有合适的。偶然间来到这儿,爽。找到啦!对于网站建设新手来说,是一个最好的平台,你可以随心找到你最喜欢的网站模板,做出你喜欢的网站。\r\n专业提供网站模板,网页模板,模板教程,网页制作,程序插件,网站素材等建站资源,我们致为于打造优秀的建站资源共享平台! ','[{\"path\":\"/upload/article/1/1459305011132.png\"}]',0,'2028-01-01 00:00:00','公关前台','','0','h,',0,0,NULL,NULL,NULL,NULL),(113,1,'联娱公司','87','/61/87\\113.html','

 1、特色服务

1.1 提供专业的危险品一条龙服务,从专业的危险品取样,代做报告(化工报告和商检报告危包证),及提供报关单证,报关,申报,交接危险品货物,至货物安全的到达目的港,全方位的D/D TO D/D 服务;

1.2 东航,国泰,阿联酋,汉莎4GV包装使用备案免检企业,可采用4GV作为货物外包装,免于检验;

1.3 能够协助客户用MSDS 来代替化工报告的业务。

 

2、 常规服务

2.1 订舱:快捷、顺畅、全面快捷

便捷多样的订舱渠道(EK,MU,CX,LH,KL,AF,FM,CA等)顺畅:熟悉各航空公司危险品订舱要求及操作流程。全面:承接全球各航空公司航线化工品、危险品运输

2.2 仓库 运输

提供全方位专业的打托、包装、唛头、标签及更换外包装等服务;公司自备各类具有危险品资质的车辆,满足客户上门提货的需求。

2.3 报关、报检

代办空运危险品的报关报检,上海化工院鉴定,IMI鉴定证书,代做危包证等服务。

2.4 货物查询

E-SERVICE:自助式网上查询系统,方便客户跟踪、查询货物状态。

 

3、 实力资质

3.1 专业人员

资深的客户服务人员、订舱操作人员、危险品货物交接人员,拥有丰富的化工品、危险品专业知识和具有良好的沟通能力,熟悉各航空公司对危险品的操作流程。

3.2 完善系统

专业的流程化订舱体系ERP操作系统,从接单、订舱、货物包装商检、报关交接等一系列货物运输环节,R-Q HSE安全控制体系,监控并确保货物安全规范运输。

3.3 资质及设施

中国外经贸部批准的一级货运代理证书,中国航空运输协会批准颁发的一级货运代理证书,中国货代百强企业;

操作人员拥有中国航协ITAT 颁发的危险品操作人员证书和DGM 及浦东机场货栈颁发的危险品资质证书;

在机场内拥有6000平方米的普通仓库,4000 平方米的专业危险品仓库,齐备叉车,打包机等专业的仓储设备,120辆专用危险品运输车辆为客户提供专业、安全、便捷、快速的仓储及配送服务。


','','找模板找了很久了,于是找到了,觉的这里的模板很不错,下载了两套试试,果然可以用。于是充值了,希望站长以后多多指点啊!站长很友好,为我们这些新手站长提供这么多的模版。大家一起交流,才能成长得更快吧!感谢,感谢网友,你们辛苦了!对于网站建设新手来说,是一个最好的平台,你可以随心找到你最喜欢的网站模板,做出你喜欢的网站。专业提供网站模板,网页模板,模板教程,网页制作,程序插件,网站素材等建站资源,我们致为于打造优秀的建站资源共享平台! ','[{\"path\":\"/upload/article/1/1459305021450.png\"}]',0,'2028-01-01 00:00:00','总经理','','0','c,',0,0,NULL,NULL,NULL,NULL),(130,1,'关于我们','93','/93\\130.html','

广州城市规划设计有限公司是中欧国际旅游规划设计研究院(Sino-Europe Academy of Tourism Planning and Design)旗下之专业机构,公司专注于城市规划、旅游规划设计与商业综合体设计,构建了从规划设计、品牌营销、资本运作到管理咨询等全产品链集成一体化服务,提供从总体策划、建筑景观设计、资源引进、战略实施、平台搭建到运营管理等全程、专业化解决方案。


广州规划设计以“产业联动、搭建平台、金融孵化”为经营哲学,推动旅游业与民俗艺术、饮食、地产、绿色农业及金融业的融合发展,同时依托中欧国际旅游规划设计研究院的学术背景与国际资源,搭建行业交互平台,提供切合旅游企业需要的一揽子专业协同服务。

广州规划设计秉持“文化开发与生态保护相结合”的规划设计理念,切实将“因地制宜、以人为本、市场引导、经济可行、体验为怀、低碳环保”的精神贯穿于每一个项目之中,倡导空间与艺术相结合、经济与美学相融合、历史文明与现代时尚相调和,力求每个作品都能达到人文景观与大自然的和谐完美融合。

广州规划设计与国际行业组织、海内外同行及国内知名高等院校如香港大学、中山大学、同济大学、广东财经大学等建立和保持着密切的合作与互动关系,致力于整合行业高端智慧,引进行业优质资源,推动中国旅游业迈向更高的竞争层次。


','','广州城市规划设计有限公司是中欧国际旅游规划设计研究院(Sino-Europe Academy of Tourism Planning and Design)旗下之专业机构,公司专注于城市规...','[{\"path\":\"/upload/article/1/1460376794567.jpg\"}]',0,'2028-01-01 00:00:00','关于我们','','0','h,',0,0,NULL,NULL,NULL,NULL),(131,1,'主营业务','94','/93/94\\131.html','

 广州规划设计在为客户提供市场分析和战略规划服务的基础上,确保初步规划和概念逐渐成形最终落地运营的产品。

广州规划设计的业务范畴主要集中在旅游规划、城市规划、建筑设计与景观设计,构筑了策划、规划、设计、营销、资本引进与管理咨询等全程服务。同时,帮助客户了解市场行情、评估风险、厘清发展计划、商业战略和公共政策内在的不确定因素。

广州规划设计在打造景区特色、建立生态系统、营造文化环境等多领域都有着不可撼动的行业地位,规划业务服务集中在总体规划、城市规划、区域规划、旅游商业模式策划、生态环境规划、城市战略规划等。根据项目的不同尺度和背景,有选择地搭配合适的各项专业人才团队,为客户提供全面而合理的解决方案


广州规划设计与国际行业组织、海内外同行及国内知名高等院校如香港大学、中山大学、同济大学、广东财经大学等建立和保持着密切的合作与互动关系,致力于整合行业高端智慧,引进行业优质资源,推动中国旅游业迈向更高的竞争层次。

 


经营哲学:



用智慧与资本描摹设计蓝图
中国旅游业已经跨入互联网时代的大门中,互联网正在彻底颠覆传统咨询业的知识架构和业务模式,CEDAR站在互联网大潮的浪尖上,以高瞻的视角描摹着旅游行业的发展蓝图。
      ● 产业联动
互联网时代正在颠覆旅游业传统的商业模式。CEDAR积极应对这种变革,依托中欧国际旅游规划设计研究院(SEATPD)的资源优势,推动文化、地产与旅游业的横向联合发展,以此延伸到移动互联、绿色农业、金融资本、现代物流业等产业领域。
      ● 搭建平台
互联网时代的行业生态系统也在发生着改变。以往单一、专业式的服务模式不再为客户所青睐,CEDAR创新构建协同式、交互式、大数据、系统服务式的行业平台,整合行业各专业领域的优势资源,基于共同的平台进行专业协作,为旅游业提供一揽子系统化的解决方案。
      ● 金融孵化
大平台的背后是高度的智慧与资源整合,更是金融资本的有效支撑。CEDAR协助旅游企业开发设计植入性产品,做好定制化产品的孵化,开展引资融资服务,帮助客户在产业版图拓展中淘金。同时,以规划设计为撬动点,通过小资本或技术入股,撬动大资本大产业。

服务能力:


     

     

产业咨询:

CEDAR专家以宏观、战略、系统、科学、可操作性的视角,为客户提供产业整体发展咨询,服务涉及项目的前期市场研究、战略定位、产品开发、空间结构规划、区域规划、旅游品牌营销到景区的企业管理、企业文化、人力资源等全方位一揽子主导整合服务。

规划设计
CEDAR规划设计包括旅游区及城市商业综合体的景观设计、建筑设计及环境文化设计。

我们主张设计创新,试图对每一处场景赋予独一无二的精神,并合理地对景观建筑、规划资源进行配置与优化,加强景观、建筑与规划领域的互动,为客户提供从城市规划、建筑设计到景观设计的全程化、一体化、专业化解决方案。

品牌营销
 CEDAR依托团队丰富的品牌管理与营销策划能力,为旅游品牌提供从市场研究、品牌形象策划、整合营销传播、公共关系到节事会展营销等整合系统服务。

资本运作
CEDAR不仅推动规划设计的科学前瞻,更愿意借助中欧国际旅游规划设计研究院(SEATPD)的国际背景、宽厚人脉及资源整合力,打造旅游企业的金融孵化平台,通过“咨询管理+ 资本运作”的模式,为旅游业发展引进资本、人才、管理体系、商业模式、企业文化、市场营销等综合支撑。


','','互联网时代正在颠覆旅游业传统的商业模式。CEDAR积极应对这种变革,依托中欧国际旅游规划设计研究院(SEATPD)的资源优势,推动文化、地产与旅游业的横向联合发展,以此延伸到移动互联、绿色农业、金融资本、现代物流业等产业领域。','[{\"path\":\"/upload/article/1638/1464838231122.jpg\"}]',5,'2028-01-01 00:00:00','关于我们','','0','f,',0,0,NULL,NULL,NULL,NULL),(132,1,'合作伙伴','95','/93/95\\132.html','

全心全力,美善相随,这个世代不缺技艺超群之才,却匮乏尽心尽力之士,CEDAR信实守约

捧着一颗心来,不带半根草去,竭力置身于客户的立场换位思考,除去一切不利于客户利益的自我私欲

精诚坦荡,肝胆相照,将自己的专业本色全意展现,为客户创造超值的服务体验  



','','让设计充满新奇和创造力,同时也饱含着和谐、力量与深意。\r\n\"适度\" 是一种幸福的生活态度。\r\n设计哲学 \"合适的设计\",设计中最难的环节往往并非创新,而是在精确适配下的创造。\r\n打造令人灵感迸发及纵情享受的情绪空间。\r\n','[{\"path\":\"/upload/article/1638/1464838215050.jpg\"}]',0,'2028-01-01 00:00:00','CORPORATE CULTURE','CORPORATE PART','0','h,',0,0,NULL,NULL,NULL,NULL),(133,1,'合作伙伴','97','/93/97\\133.html','

 广州规划设计,立足于互联网思潮下商业模式创新的宏大视野,以科学的规划设计为基点,以战略执行、资源导入、品牌营销、管理咨询为后续深度服务,联袂海内外卓越专业机构,构筑行业智慧高地,并搭建行业性交互式平台,推动旅游业持续稳健地发展。 

战略学术联盟:

 


  

战略设计联盟:

 

MORMANFOSTER                 乐昂国际设计集团                 香港郑中设计师事务所                 中国建筑装饰集团

 


','设计的意义在于寻求人、建筑、自然之间相融与相生的智慧','某某,中国知名室内设计师,2005年于北京创立筑邦臣设计公司,他擅长用东方哲学思考解决问题,关注各类空间形态对人的影响,同时注重设计的商业化表现。张海涛说:“希望在设计中融入丰富的文化表达,以打造可以令人思考的空间意境。”他一直坚信,中国拥有丰富的文化底蕴,在未来“中国设计”将充满无限可能!','[{\"path\":\"/upload/article/1569/1461506188829.jpg\"}]',0,'2028-01-01 00:00:00','THE MEANING OF THE DESIGN IS TO SEEK HARMONY BETWEEN PEOPLEOTHER/, ARCHITECTUREOTHER/, NATURAL AND OF WISDOM','张三','0','p,',0,0,NULL,NULL,NULL,NULL),(134,1,'亚太旅游规划设计十大影响力品牌','96','/93/96\\134.html','

2009年12月13日由中国民族建筑研究会与中国房地产及住宅研究会共同主办,“2009•第六届中国人居典范建筑规划设计方案竞赛”颁奖大会在北京•京都信苑饭店隆重召开。经过九个多月来的精心组织与评选,全国共有241个方案获奖。通过本届竞赛,在全国建设领域树立一批人居规划设计典范,对促进全国建筑规划设计和建设水平的提高起到示范推动作用。


','','2009年12月13日由中国民族建筑研究会与中国 房地产 及住宅研究会共同主办,2009第六届中国人居典范建筑规划设计方案竞赛颁奖大会在北京京都信苑饭店隆重召开。经过九个多月来的精...','[{\"path\":\"/upload/article/1/1460377619458.jpg\"}]',0,'2028-01-01 00:00:00','关于我们','','0','',0,0,NULL,NULL,NULL,NULL),(135,1,'2009中国人居典范●最佳设计方案','96','/93/96\\135.html','

2009年12月13日由中国民族建筑研究会与中国房地产及住宅研究会共同主办,“2009•第六届中国人居典范建筑规划设计方案竞赛”颁奖大会在北京•京都信苑饭店隆重召开。经过九个多月来的精心组织与评选,全国共有241个方案获奖。通过本届竞赛,在全国建设领域树立一批人居规划设计典范,对促进全国建筑规划设计和建设水平的提高起到示范推动作用。

','最佳设计方案','2009年12月13日由中国民族建筑研究会与中国 房地产 及住宅研究会共同主办,2009第六届中国人居典范建筑规划...','[{\"path\":\"/upload/article/1/1460377712056.png\",\"url\":\"/ms-mcms/upload/article/1/1460377712056.png\",\"uid\":1577438320364,\"status\":\"success\"}]',0,'2028-01-01 00:00:00','关于我们','','0','h',0,0,'2019-12-27 17:19:23',NULL,NULL,NULL),(136,1,'定制化项目金融孵化模式','98','/93/98\\136.html','

广州规划设计以金融资本为支撑,以规划设计为撬动点,协助旅游业开发高潜力项目,推动项目融资,帮助客户在产业版图拓展中淘金入市。

','','广州规划设计以金融资本为支撑,以规划设计为撬动点,协助旅游业开发高潜力项目,推动项目融资..','[{\"path\":\"/upload/article/1585/1462265098563.jpg\"}]',0,'2028-01-01 00:00:00','关于我们','1','0','',0,0,NULL,NULL,NULL,NULL),(137,1,'幻灯一','147','/100\\137.html',NULL,'','','[{\"path\":\"/upload/article/1638/1465808003859.jpg\"}]',0,'2028-01-01 00:00:00','','','0','',0,0,NULL,NULL,NULL,NULL),(138,1,'幻灯二','147','/100\\138.html',NULL,'','','[{\"path\":\"/upload/article/1638/1465808020382.jpg\"}]',0,'2028-01-01 00:00:00','','','0','',0,0,NULL,NULL,NULL,NULL),(139,1,'幻灯三','147','/100\\139.html',NULL,'','','[{\"path\":\"/upload/article/1638/1465808030831.jpg\"}]',0,'2028-01-01 00:00:00','','','0','f,',0,0,NULL,NULL,NULL,NULL),(140,1,'幻灯四','147','/100\\140.html',NULL,'','','[{\"path\":\"/upload/article/1638/1464858626484.jpg\"}]',0,'2028-01-01 00:00:00','首页幻灯','','0','',0,0,NULL,NULL,NULL,NULL),(141,1,'城市规划','101','/99/101\\141.html','

- 城市商业综合体规划 - 新城(新区)规划 - 温城市更新与旧城改造
- 小城镇建设规划 - 历史文化名城/镇保护研究与规划 - 产业园区规划



','','城市商业综合体规划 -新城(新区)规划 -温城市更新与旧城改造 -小城镇建设规划 -历史文化名城/镇保护研究与规划 -产业园区规划...','[{\"path\":\"/upload/article/1/1460380106006.jpg\"}]',0,'2028-01-01 00:00:00','专业服务','','0','',0,0,NULL,NULL,NULL,NULL),(142,1,'环境艺术设计','102','/99/102\\142.html','

CEDAR以美学与生态的双重视野开展环境艺术的探索与实践,营造健康、高雅、舒适、美观的现代生态环境,以此提升城市及旅游景区的软环境。

','','CEDAR以美学与生态的双重视野开展环境艺术的探索与实践,营造健康、高雅、舒适、美观的现代生态环境,以此提升城市及旅游景区的软环境。...','[{\"path\":\"/upload/article/1/1460380199624.jpg\"}]',0,'2028-01-01 00:00:00','专业服务','','0','c,',0,0,NULL,NULL,NULL,NULL),(143,1,'旅游形象策划','103','/99/103\\143.html','

在把握好旅游地的地脉(地理根据)、文脉(文化根据)和商脉(市场根据)的基础上,为旅游地做好旅游形象定位,并开展理念基础(MI)、行为准则(BI)、视觉形象(VI)的系统策...

','','在把握好旅游地的地脉(地理根据)、文脉(文化根据)和商脉(市场根据)的基础上,为旅游地做好旅游形象定位,并开展理念基础(MI)、行为准则(BI)、视觉形象(VI)的系统策...','[{\"path\":\"/upload/article/1/1460380287863.jpg\"}]',0,'2028-01-01 00:00:00','专业服务','','0','p,',0,0,NULL,NULL,NULL,NULL),(144,1,'旅游企业管理','104','/99/104\\144.html','

目的地与景区管理:

- 发展战略规划- 营销管理体系咨询- 品牌管理体系咨询

- 组织架构与流程再造- 投资运营与管理- 资源与环境保护

 

酒店管理:

- 酒店运营管理- 酒店物业管理- 酒店产品与服务管理

- 酒店人力资源管理- 酒店投资与财务管理- 酒店危机管理

 

住宿业管理:  

为酒楼、茶楼、旅馆、非星级宾馆等住宿接待业提供经营管理咨询服务。


','','目的地与景区管理: -发展战略规划 -营销管理体系咨询 -品牌管理体系咨询 -组织架构与流程再造 -投资运营与管理 -资源与环境保护 酒店管理: -酒店运营管理 -酒店物业管理 -酒店产品...','[{\"path\":\"/upload/article/1/1460380343199.jpg\"}]',0,'2028-01-01 00:00:00','专业服务','','0','h,',0,0,NULL,NULL,NULL,NULL),(146,1,'广东梅州市雁洋旅游服务区域城市规划','107','/106/107\\146.html','

项目地址:广东梅州市雁洋镇 规划面积:1,281,863平方米 项目委托:广东梅州市人民政府

 

全世界客家人的首都,客家文化的遗产中心

 

雁洋的自然环境、人文历史以及作为世界自然度假胜地门户的地理位置,与梅州市的城市特色和资源形成互补,为当地居民及国内外游客提供一种轻松的绿色体验。我们试图通过推广建筑、农业、文化资源的保护,把现有的文化基础设施开发成为世界级别的旅游胜地。

 

\"\" \"\" \"\"

 

\"\"


','','项目地址:广东梅州市雁洋镇\r\n规划面积:1,281,863平方米\r\n项目委托:广东梅州市人民政府','[{\"path\":\"/upload/article/1/1460380700438.png\"}]',0,'2028-01-01 00:00:00','来自火星的程序猿','MS','0','',0,0,NULL,NULL,NULL,NULL),(147,1,'海口湾酒店公寓第二期建筑设计','108','/106/108\\147.html','

项目地址:海南省海口市北部海口湾西部滨海地区

总用地面积:47957.1平方米

总建筑面积:116154.65平方米

总地上建筑面积:94523.55平方米

总地下建筑面积:21631.1平方米

委托单位:某地产集团海南公司  

 

海口湾时尚度假新平台

 

设计定位:

功能定位----- 提供度假体验的产权式酒店,并引入购物、娱乐、餐饮等多元复合功能;

形象定位----- 海口城市形象的名片,塑造融入城市环境的建筑形象,与滨海景观相协调。

设计策略:

区域融合与区域发展融为一体;功能复合,丰富海口湾岸线景观。

建筑设计策略:

商业集中布局;景观视线保障;建筑退台设计;绿色节能规划。

 

\"\" \"\"

 

\"\" \"\"


','','项目地址:海南省海口市北部海口湾西部滨海地区\r\n总用地面积:47957.1平方米\r\n总建筑面积:116154.65平方米\r\n总地上建筑面积:94523.55平方米','[{\"path\":\"/upload/article/1/1460380774867.png\"}]',0,'2028-01-01 00:00:00','来自火星的程序猿','MS','0','h,',0,0,NULL,NULL,NULL,NULL),(148,1,'昆山水月周庄旅游地产概念营销策划','107','/106/109\\148.html','

周庄拥有丰富的自然资源、人文资源及极具优势的地理位置,区域发展潜力巨大,古镇旅游品牌价值大,区域发展热点已经形成,旅游经济的发展为房地产市场提供了巨大的想象空间。

我们的项目研判与理解:

- 天生丽质,但区域发展态势不明朗;

- 以前瞻性的眼光,组合运营多元化地产运营模式,与周边项目形成错位,整合旅游、休闲、度假、商务、商业与投资资源,方可突出重围。

 

项目总体概念定位:

 

液体周庄------- 未来水乡

“未来水乡概念”· 复合型旅游休闲港湾 

 

功能定位:

 

复合型旅游休闲港湾 -------

集中于“休闲”功能,满足“在家度假”的生活梦想。以“液态生活”为主题,用原生态的景观,再现原汁原味的水乡生活。

水乡生活体验基地 --- 

其功能主要集中在“体验”上,营造休闲的氛围,形成与都市截然不同的氛围,创造一种江南文化的现代体验。

 

商业空间规划:

 

 

\"\" \"\"

 

由沿路商街和船概念水街构成 

沿路商街的主题:渔人码头

- 主要经营特色餐饮、新派江南菜;

- 手工艺品,生活气息浓郁为特色;

- 江南古董店。

 

船概念水街的主题:在水一坊

- 茶坊、咖啡店;

- 鱼、蟹、虾等特色水产品;

- 菱角等水产植物。

 

 

 

 

 

总体定位 ------- 品质派旅游地产商

Slogan:江南液上海,休闲水乡情



','','周庄拥有丰富的自然资源、人文资源及极具优势的地理位置,区域发展潜力巨大,古镇旅游品牌价值大,区域发展热点已经形成,旅游经济的发展为房地产市场提供了巨大的想象空间。','[{\"path\":\"/upload/article/1/1460380829450.jpg\"}]',0,'2028-01-01 00:00:00','来自火星的程序猿','MS','0','',0,0,NULL,NULL,NULL,NULL),(149,1,'京杭大运河旅游形象研究与策划','107','/106/110\\149.html','

项目地址:浙江杭州、苏州

项目委托:杭州市旅游局、苏州市旅游局

 

运河文化,吴地风情

 

在现代旅游业的发展当中,旅游形象设计正在发挥着越来越重要的作用。

旅游形象设计能使旅游地政府和公众对本地旅游的资源核心、产品定位和发展目标有更清楚地认识,使旅游地在众多的同类产品中以鲜明的姿态出现在旅游者面前。

本次苏杭大运河旅游形象策划,我们是在大运河杭州、苏州段旅游市场和旅游资源分析的基础上,结合对规划区域地方性的研究和受众特征的调查分析,提出了明确的区域旅游形象的核心理念和外在界面。

 

地方性研究:

前期我们开展地方性研究、受众调查和分析、形象替代性分析等,同时,主要讨论和创建旅游形象的具体表达,如理念、传播口号、视觉符号等。对京杭段古运河旅游形象构成的背景要素、地方性特征要素、形象修正要素进行了详细的分析,并对游客认知特征进行了调查研究,为进一步旅游形象设计奠定了基础。后面主要根据前期研究成果,创建旅游形象的具体表达体系。

策划思路:

古运河旅游形象的设计采用“用形象口号作为形象定位的精辟表达”的方法。

主要有两种设计思路:

第一,采取资源导向型旅游形象口号的设计模式,或者运用白描、比喻、夸张等表现手法自我阐释自己的资源优势,或者采用领先、比附、衬托等表现手法比较阐释自己的资源优势;

第二,采取游客导向型旅游形象口号的设计模式,或者运用感情、借势、公关、悬念等表现手段来刺激旅游需求,或者运用距离、时间、心理、承诺等表现手段来克服潜在旅游者的出游阻力 。    

整体形象定位:

“清名运河图,江南绝版地”        

运河形象体系构建:     

1、品牌标识系统设计; 

2、宣传口号提炼; 

3、品牌音乐符号:  以运河音为体,创作出适合各种乐器弹奏的曲目,并请知名词作家为之谱词。        

4、吴地运河宣传片、专题片、微电影整体策划拍摄制作。



','','项目地址:浙江杭州、苏州\r\n项目委托:杭州市旅游局、苏州市旅游局\r\n \r\n运河文化,吴地风情','[{\"path\":\"/upload/article/1/1460380900751.png\"}]',0,'2028-01-01 00:00:00','来自火星的程序猿','MS','0','h,',0,0,NULL,NULL,NULL,NULL),(150,1,'佛山某师军史馆设计','107','/106/111\\150.html','

\"\" \"\"

 

\"\"


','','','[{\"path\":\"/upload/article/1/1460380995728.jpg\"}]',0,'2028-01-01 00:00:00','来自火星的程序猿','MS','0','f,',0,0,NULL,NULL,NULL,NULL),(157,1,'旅游规划','107','/106/107\\157.html','

- 区域旅游发展规划- 历史文化区旅游开发规划- 风景名胜区旅游开发规划
- 生态旅游区开发规划- 温泉滨海度假区旅游开发规划- 旅游地产开发规划
- 乡村旅游开发规划- 主题公园开发规划- 城市旅游开发规划

','','- 区域旅游发展规划\r\n- 历史文化区旅游开发规划\r\n- 风景名胜区旅游开发规划','[{\"path\":\"/upload/article/1/1460384875034.jpg\"}]',0,'2028-01-01 00:00:00','来自火星的程序猿','MS','0','',0,0,NULL,NULL,NULL,NULL),(158,1,'旅游规划','101','/99/101\\158.html','

- 区域旅游发展规划- 历史文化区旅游开发规划- 风景名胜区旅游开发规划
- 生态旅游区开发规划- 温泉滨海度假区旅游开发规划- 旅游地产开发规划
- 乡村旅游开发规划- 主题公园开发规划- 城市旅游开发规划

','','区域旅游发展规划 -历史文化区旅游开发规划 -风景名胜区旅游开发规划 -生态旅游区开发规划 -温泉滨海度假区旅游开发规划 -旅游地产开发规划 -乡村旅游开发','[{\"path\":\"/upload/article/1/1460385002423.jpg\"}]',0,'2028-01-01 00:00:00','专业服务','','0','f,',0,0,NULL,NULL,NULL,NULL),(163,1,'得品牌者得市场','99','/99\\index.html','

凭借专业的网站策划队伍、专业的美工设计师、一流的程序开发人员,丰富的制作经验和高超的创意水平,根据您的企业的行业类型和产品特点度身定制品 牌网站。精益求精的网页制作人员、严谨的应用程序开发人员、尽善尽美的售后服务人员。这一切,是我们为您提供专业网站建设服务,也是让你在同行业中傲视群 雄

','','精益求精的网页制作人员、严谨的应用程序开发人员、尽善尽美的售后服务人员。这一切,是我们为您提供专业网站建设服务,也是让你在同行业中傲视群 雄','[{\"path\":\"/upload/article/1638/1464746921150.jpg\"}]',0,'2028-01-01 00:00:00','','','0','f,',0,0,NULL,NULL,NULL,NULL),(164,1,'海派卓越规划设计智业团队','98','/93/98\\164.html','

广州规划设计麾下聚集了众多从美国旧金山艺术大学、奥本大学、香港理工大学毕业的海派旅游规划与建筑、景观设计高端人才,其国际化视野和开放创新的风格,将确保香柏领先的、卓越的规划设计水平和创造超出客户预期的服务效果。

','','广州规划设计麾下聚集了众多从美国旧金山艺术大学、奥本大学、香港理工大学毕业的海派旅游规','[{\"path\":\"/upload/article/1585/1462265091247.jpg\"}]',0,'2028-01-01 00:00:00','','2','0','',0,0,NULL,NULL,NULL,NULL),(165,1,'高质量行业交互平台','98','/93/98\\165.html','

广州规划设计创新构建协同式、交互式、大数据及系统式行业服务平台,整合企业管理、金融、互联网、媒介各领域专业资源,为旅游行业提供一揽子系统化解决方

','高质量行业交互平台','广州规划设计创新构建协同式、交互式、大数据及系统式行业服务平台。。。','[{\"path\":\"/upload/article/1585/1462265083093.jpg\"}]',0,'2028-01-01 00:00:00','','3','0','c,',0,0,NULL,NULL,NULL,NULL),(166,1,'01品牌创建','62','/63\\166.html',NULL,'','品牌命名/品牌文化/品牌识别设计\r\n最初的品牌播种,决定了品牌是要长成野草还是参天大树。所谓三岁看大,品牌风格确立也要从萌芽开始,让品牌自始至终保持活力与竞争力,健康茁长的成长。\r\n服务项目:\r\n品牌文化理念挖掘 / 挖掘一种品牌文化,并力求这种文化与更多目标消费群相关品牌命名 /\r\n创造符合品牌精神的独特名称 / 品牌视觉识别(VIS)设计 /\r\n基于市场与设计角度创造严谨而实用的形象设计 /','[{\"path\":\"/upload/article/1/1460771365547.jpg\"}]',0,'2028-01-01 00:00:00','65','','0','',0,0,NULL,NULL,NULL,NULL),(167,1,'品牌改造设计','138','/63\\167.html','

公司为危化客户提供危化行业危化车辆销售、金融支持、服务、二维检测、罐体检测与清洗、紧急救援、从业人员培训、二手车置换、危化物流信息平台、事故车维修理赔等多功能于一体的服务中心,提供专业的产品与服务,保障危化车辆运输安全。
全天候服务:本公司在周末、节假日均提供正常服务。在夜间,公司设有值班人员。客户遇险可及时打电话到公司,相关人员将在最短的时间内提供救援服务。
送服务上门:客户无论是租车、修车、保养或其它相关问题,如客户不便来我公司办理,公司可派相关专业人员上门提供服务。
替换车辆:客户所租车辆遇险或发生故障,在车辆修理期间,公司可提供临时替换车辆。
定时保养:本公司按时给租赁车辆实施保养,以保障客户所租车辆处于正常运转状态。
车辆保险:本公司为全部租赁车辆办理保险,并负责出险索赔。客户可以放心地驾驶所租车辆。
自驾租赁:不论您是家庭出行、商务往来、公务出行、出外旅行还是短期替换车,我们都能向您提供符合您需求的租赁车辆。多样的车型、专业的服务、低廉的价格使您体验便捷舒适的汽车租赁服务。
代驾租赁:本公司拥有一支经过严格训练,高素质、熟悉长春及周边地区道路情况的驾驶员队伍,随时可以根据您的需要提供代驾租赁服务。
商旅服务:为客户提供机场单程、往返的接送服务,面向长期客户的定向购车租赁服务。
职业驾驶员的代驾服务:
汽车租赁商务车队拥有宝马、别克商务、奥迪、帕萨特、桑塔纳志俊等数十种品牌的商务车型,及一支文化素质高、配置合理并经过专业培训的司机队伍。商务车队秉承良好"高效、快速、品质、服务于人"的服务宗旨,以过硬的专业技术,快速的反应,高标准的服务,为客户提供全天候汽车代驾服务。

','','品牌形象的改造与提升设计\r\n品牌发展到一定的阶段,因为企业发展模式及战略目标发生改变,其原有的形象已经不能承载企业未来发展的战略需求时,则需要创造更具生长气质的视觉形象,为未来打算,为未来改变!品牌改造设计正好填补着类客户的发展需求。\r\n服务项目:\r\n品牌形象改造设计 / 令形象更适合品牌定位,提升 / 完善品牌形象\r\n完善并继承优秀基因,为企业注入新鲜的视觉活力\r\n与客户品牌发展模式及战略目标相匹配','[{\"path\":\"/upload/article/1/1460771447978.jpg\"}]',0,'2028-01-01 00:00:00','66','','0','h,',0,0,NULL,NULL,NULL,NULL),(168,1,'品牌推广设计','138','/63\\168.html','

1、特色服务:

1.1 承接各类化学品、危险品的进出口的贸易代理业务

1.2 承接样品、修理物品、暂时进出口等特殊贸易方式的进出口代理业务

1.3 代办两用物项进出口许可证:包括电子钥匙的申领、进出口经营登记申请及进出口许可证的办理

1.4 承接黄磷、硝化棉的贸易采购业务

 

2、常规服务:

2.1 接单:专业的客服人员和完善的操作流程,提供贸易代理的咨询和操作服务

2.2 制单:全套进出口单证的制作

2.3 外汇结算:及时准确的安排收付外汇,保证外贸义务的及时履行

 

3、实力资质:

3.1 专业人员

资深客户服务及管理人员,拥有丰富的化工品、危险品专业知识和贸易操作经验,为客户提供化学品、危险品进出口贸易代理服务。

3.2 完善体系

1) 专业的一体化ERP系统,从接单到代理合同、单证制作、交付货代、结算货款、出口退税,严格控制贸易代理的每一个环节。

2) RQHSE安全控制体系,监控并确保货物安全规范的操作。

3.3 采购资源

与国内多家大型能源型企业为长期合作伙伴关系,可为境外的黄磷、硝化棉需求商稳定供货。

3.4 相关资质

1)外经贸核准的进出口经营许可

2)海关核准的企业报关资质

3)商检局核准的出入境检验检疫报检资质

4)外汇管理局核准的企业进出口外汇经营资质

5)安监局审核的危险化学品经营许可  

6)健全的服务网络:在国内主要港口如上海、天津、青岛等设有分支机构,国内代理网络齐全。


','','形象画册 / 产品样本 / 招商手册 / 企业年报\r\n印刷品是企业最常用最有效的推广方式,也是挖掘潜在客户的钥匙。好的设计能循序渐进的引导读者,让读者更清楚的了解产品,从而择需购买。一本设计粗糙的画册,不等被翻开便会被丢弃。\r\n服务项目:\r\n印刷品设计 / 具有企业特色的形象画册设计、产品目录及年报设计.\r\n企业内刊策划设计 / 为大型企业策划设计品牌内部刊物','[{\"path\":\"/upload/article/1/1460771488365.jpg\"}]',0,'2028-01-01 00:00:00','67','','0','c,',0,0,NULL,NULL,NULL,NULL),(172,1,'网络优化','133','/53/133\\index.html','

网站整体策划

企业网站建设目的何在?如何充分挖掘互联网络的资源和优势,如何合理地组织网站内容与功能从而达到客户的需求?
我们将根据市场分析、客户产品及服务的优势、竞争对手分析等等,有效的确立网站定位。根据相关需求分析获得相应网站运营策略,在网站建立之初我们就网站VI形象、网站营销手段、运营模式、网站发展前景等等进行定位。

 

网站设计 DESIGN

网络媒体不同于传统媒体,如果在网站设计的时候仅仅是将文字和图片做一个简单堆积和展示的话,这样的网站跟一片丢落在街头的破旧宣传资料没有任何区别。客户往往通过企业网站就留下了对企业的第一印象,这个第一印象是决定客户是否与你合作的重要因素。
所以站在浏览者的角度,我们分析企业特点和品牌内涵,完美的通过网站体现企业形象,并严格采用W3C国际标准进行网站设计,采用DIV+CSS构 架,不但使您的网站具备足够的扩展性,您网站的速度、兼容性、友好性也都会显著提高,更主要的是,代码和表现分离的方式让您的网站改版变得更容易,而针对 SEO搜索引擎优化的工作也变得更加的畅通。

 

网站建设售后服务 SALES

<p style="padding: 0px; margin-top: 0px; margin-bottom: 0px; line-height: 24px; color: rgb(68, 68, 68); font-family: Verdana, Arial, Tahoma; font-size: 12px; white-space: normal; >网站建设专家致力于为客户提供优质的产品及服务。为了多渠道的了解客户的需求,快速响应个性化需要,不断完善售后服务工作,我们客户服务管理部在此为您搭建了这个沟通的平台,我们希望通过网络加强与客户的交流。
完善的售后服务是公司信誉的保障和服务趋于完善与成熟的象征,因此,我们在这一方面投入了较大的精力,确保每一位客户的利益得到充分的保障,从而提高企业信誉,发展长期友好的合作。
对于享受我公司建站服务的客户,我们提供免费一年售后服务。

 

网站全程维护 MAINTAIN

网页制作好了以后并不是就没事了?其实日后的更新维护才是最重要的!如果参观网站的访问者每次看到的网站都是一样的,那么它们日后还会来吗?这时候,您的网页要由谁来维护呢?
严格来说,每一个站点都应该由专业人员定期更新维护。互联网络的最大优势就是信息的实时性,只有快速的反映,准确的报道,才能吸引更多的浏览者。
目前很多站点人气很旺,应该和定期更新分不开的。也有很多站点由于种种原因,数月才更新一次,这样就违背了网路最基本的商业目的。网站不是购买一件商品,随着时间的推移而贬值陈旧,只有不断的溶入企业发展动向,推陈出新,才会具有创造力,发挥网路商业潜能。
更新维护不仅仅只局限于简单的更换文字稿,应该是将企业的商业动态和发展方向充分考虑进去, 再结合现有的网站规划结构,迅速作出相应的改进。企业的每一个新项目的推广和价格的浮动、内部结构调整, 不应该只是在报纸、电视等媒体做宣传而忽略网路这个最具有潜力的市场。 这也是我们一直强调的商业网站 CIS 策略。
鉴于目前大多数网站不具有专业维护的技术力量,网站建设公司可为广大客户提供专业服务。每一个企业可根据自身的商业特征制定不同的维护方案,并保证在最短的时间内迅速完成。

 

网页改版 REVISED

企业上网已成趋势,企业网站犹如雨后春笋般地拔起,试问:
您的企业通过互联网进行了巨额的投入,但网站到底给您带来了多大的效益?
您的网站从建立到现在,更新过几次、改版过几次?
功能不全、设计不美观、布局不合理、几乎从不更新的网站会给企形象带来多大的负面影响?
选择网站建站专家,帮您重新审视和构架您的网站系统,我们提供八项全能服务,全面改善您的网站系统,专为您解决企业上网后顾之忧。

 

培训解决方案 TRAIN

为了更好地做好企业外部门户网站的技术培训工作,将选派具有丰富技术培训和实施经验的技术人员组成培训小组,编写详尽实用的培训教材,并且制定切实有效的培训方案。技术培训的工作为应用软件系统管理和使用培训。
在软件产品实践培训中,采用集中培训的方式,的培训师针对本系统的技术特点,为企业技术人员提供全面培训,培训内容涵盖了本此系统建设过程中使用的主要技术理论和产品实践。
在应用软件系统管理和使用培训中,我们会组织项目开发小组的主要人员针对管理和使用人员的不同需求,提供不同层次的培训课程。


','网络媒体不同于传统媒体,如果在网站设计的时候仅仅是将文字和图片做一个简单堆积和展示的话,这样的网站跟一片丢落在街头的破旧宣传资料没有任何区别。客户往往通过企业网站就留下了对企业的第一印象,这个第一印象是决定客户是否与你合作的重要因素。','企业网站建设目的何在?如何充分挖掘互联网络的资源和优势,如何合理地组织网站内容与功能从而达到客户的需求?\r\n我们将根据市场分析、客户产品及服务的优势、竞争对手分析等等,有效的确立网站定位。根据相关需求分析获得相应网站运营策略,在网站建立之初我们就网站VI形象、网站营销手段、运营模式、网站发展前景等等进行定位。','[{\"path\":\"/upload/article/1/1460889312736.jpg\"}]',0,'2028-01-01 00:00:00','','','0','p,',0,0,NULL,NULL,NULL,NULL),(173,1,'网络营销','134','/53/134\\index.html','

互联网品牌推广怎么做?

互联网品牌推广有个新鲜名词叫数字营销,数字营销是新发展起来的一种营销模式,是利用互联网特性和技术,更加有效、高性价比地完成整合营销计划,达到传统 的IMC不能达到的高效客户关系管理等,从而精准地实施营销策略,实现企业营销的高效率、低成本、大影响。可以按两种意思来理解:网络整合营销是利用网络 技术和网络特性最大化、最快速、最有效、最精准的进行整合营销;网络整合营销是以为客户提供有价值的信息为基础,由客户创造、传播为主导的整合营销理念进 行的网络营销。

 

目前品牌在推广上遇到什么问题?

作为品牌主,你是否有这样的困惑?
● 很早就有了互联网品牌网站,可是却不知如何利用,网络也没有给你创造任何经济效益!
● 希望通过网络推广获得效益,但面对市场上纷繁复杂、层出不穷的网络推广概念和方式让人眼花缭乱,却无从下手!
● 花了很多钱做网站推广,却没什么效果,也不知道问题出在哪里?
● 看到竞争对手迅速壮大,却不知道他们究竟如何利用好网络营销的秘诀?

 

是怎么做的?

当我们的客户确定需要进行数字营销传播时,我们将提供以下服务:
营销型网站建设,网络调研,搜索引擎营销(SEO和SEM),软文营销(博客营销、论坛营销、SNS营销、新闻营销、许可邮件营销),口碑互动营销(圈子 营销、社区营销、博客营销),群营销(网络广告、论坛营销、SNS营销、IM和QQ群营销)。将以上传播进行有机的整合营销推广,制定传播营销方案。

一、提供推广资料和目标,提供报价。
二、提供营销型网站方案。
三、确定传播关键字。
四、确定搜索引擎营销策略,进行关键词甩选。
五、进行后台数据分析,确定网络广告文案。
六、制定病毒式营销计划,确定博客营销、论坛营销、SNS营销载体。
七、确定新闻营销、博客营销、论坛营销的整体方案。
八、制定网络整合营销传播计划。
九、效果评估。
十、提供传播报告。


','营销型网站建设','互联网品牌推广有个新鲜名词叫数字营销,数字营销是新发展起来的一种营销模式,是利用互联网特性和技术,更加有效、高性价比地完成整合营销计划,达到传统 的IMC不能达到的高效客户关系管理等,从而精准地实施营销策略,实现企业营销的高效率、低成本、大影响。可以按两种意思来理解:网络整合营销是利用网络 技术和网络特性最大化、最快速、最有效、最精准的进行整合营销;网络整合营销是以为客户提供有价值的信息为基础,由客户创造、传播为主导的整合营销理念进 行的网络营销。','[{\"path\":\"/upload/article/1/1460889475526.jpg\"}]',0,'2028-01-01 00:00:00','','','0','h,',0,0,NULL,NULL,NULL,NULL),(174,1,'域名注册','135','/53/135\\index.html','

域名?

Internet这个信息时代的宠儿,已经走出了襁褓,为越来越多的人所认识,电子商务、网上销售、网络广告已成为商界关注的热点。"上网"已成为不少人的口头禅。但是,要想在网上建立服务器发布信息,则必须首先注册自己的域名,只有有了自己的域名才能让别人访问到自己。所以,域名注册是在互联网上建立任何服务的基础。同时,由于域名的唯一性,尽早注册又是十分必要的。

 


国际域名注册

 

域名价格域名价格域名说明
CN英文域名注册
80 元/年
域名类型:.cn/ .com.cn/ .net.cn/ .org.cn等
国际域名注册
80 元/年
(多年购买优惠)
域名类型:.com/ .net/ .org/ .biz
英文.ASIA
159 元/年
域名意义:表示亚洲
顶级域名.MOBI
168 元/年
(多年购买优惠)
域名意义:手机域名,WAP网站首要之选
新顶级域名TEL
158 元/年
域名意义:电话,网络名片
英文.TRAVEL
1800 元/年
域名意义:旅游域名,国际域名
香港域名.HK
215 元/年
域名类型:.hk/ .com.hk
新顶级域名.NAME
100 元/年
域名意义:国际顶级域名,个人域名的标志
新顶级域名.INFO
100 元/年
域名意义:国际域名,表示网络信息服务组织
英文.CC
298 元/年
域名意义:商业公司,中国公司
英文.TV
330 元/年
域名意义:表示电视,宽频时代的主流域名
英文名.IN
580 元/年
域名意义:India(印度)的国家域名
英文.LA
880 元/年
域名意义:表示洛杉矶
英文 .JOBS
2800 元/年
域名意义:国际顶级域名,主要面向招聘和求职市场
英文 .ME
315 元/年
域名意义:国际顶级域名,.Me代表“我”,属于你!


','Internet这个信息时代的宠儿','上网\"已成为不少人的口头禅。但是,要想在网上建立服务器发布信息,则必须首先注册自己的域名,只有有了自己的域名才能让别人访问到自己。所以,域名注册是在互联网上建立任何服务的基础。同时,由于域名的唯一性,尽早注册又是十分必要的。','[{\"path\":\"/upload/article/1638/1464868329275.png\"}]',0,'2028-01-01 00:00:00','','','0','c,',0,0,NULL,NULL,NULL,NULL),(177,1,'国内开源 java cms,铭飞MCms','70','/59/70\\177.html','

MCMS是企业创立初期很好的基础框架,不仅可以实现和现有系统的对接而且有大量的插件模版可以使用。

MS平台开发团队承诺MCMS内容管理系统永久完整开源免费(这真是极好的)!下面就简单的给大家介绍一下MS平台和MCMS为什么如此之快。

MS平台是铭飞团队经过多年的研发,最终以MCMS为基础,集商城、论坛、分期、会员、支付、积分、微信等系统于一体的插件式系统。并实现了淘宝、京东、苏宁、国美等第三方电商平台数据接口的统一。平台中的小插件如:邮件推送、短信接口、定时任务、促销活动、数据采集等非常丰富。

MCMS的模版采用标签式开发,上手非常快。

对于技术小白来说不仅避开了学习复杂的高级开发语言,而且MStore有大量成熟的模版直接下载之后换换图片和内容就可以使用,要是需要调整只需要写简单的标签就可以。

对于前端工程师来说只需要写好页面样式并在页面内容部分套上标签,就可以做出一套优美的动态网站。并且还可以实现留言板、用户登录等数据交互功能。


','','MCMS是企业创立初期很好的基础框架,不仅可以实现和现有系统的对接而且有大量的插件模版可以使用。\r\n\r\nMS平台开发团队承诺MCMS内容管理系统永久完整开源免费(这真是极','[{\"path\":\"/upload/article/1/1461384090357.jpeg\"}]',0,'2028-01-01 00:00:00','来自火星的程序猿','MS','0','h,',1,0,NULL,NULL,NULL,NULL),(178,1,'价值源自分享','68','/59/68\\178.html','

MStore(铭飞商城)是铭飞(MS)平台为开发者提供模版与插件作品分享平台,为企业提供优质产品和服务我们致力于打造一个优秀的Java资源共享学习平台。

MStore离不开您的参与,
如果您是开发者(前端&后台)

1.要分享自己的得意模板、插件、教程?欢迎您来这里,找到需要她、欣赏她的人。
2.想找个网络模板收藏夹存放自己喜爱的模板? 这里就是您的选择。
3.想结交更多热爱模板、插件的朋友?那就快来展示您的作品,寻找志趣相投的朋友吧。

如果您是企业:
1.这里有一群精力旺盛有着代码执着追求的开发者分享的模版与插件,相信他们肯定为您提供更好的服务。
2.更多Java coder分享的更多插件,满足您各种项目需求,降低开发与维护成本。
3.这里有专业设计人员提供的更多精美模版,帮您省去设计投入成本。
4.同时也希望您为分享者点个赞。

铭飞已经上路,我们将为此不懈努力,期待得到您的支持!

','','MStore(铭飞商城)是铭飞(MS)平台为开发者提供模版与插件作品分享平台,为企业提供优质产品和服务我们致力于打造一个优秀的Java资源共享学习平台。','[{\"path\":\"/upload/article/1/1461383921888.jpeg\"}]',0,'2028-01-01 00:00:00','来自火星的程序猿','MS','0','',1,0,NULL,NULL,NULL,NULL),(179,1,'铭飞商城MStore——价值源自分享','68','/59/68\\179.html','

MStore(铭飞商城)是铭飞(MS)平台为开发者提供模版与插件作品分享平台,为企业提供优质产品和服务我们致力于打造一个优秀的Java资源共享学习平台。

MStore离不开您的参与,
如果您是开发者(前端&后台)

1.要分享自己的得意模板、插件、教程?欢迎您来这里,找到需要她、欣赏她的人。
2.想找个网络模板收藏夹存放自己喜爱的模板? 这里就是您的选择。
3.想结交更多热爱模板、插件的朋友?那就快来展示您的作品,寻找志趣相投的朋友吧。

如果您是企业:
1.这里有一群精力旺盛有着代码执着追求的开发者分享的模版与插件,相信他们肯定为您提供更好的服务。
2.更多Java coder分享的更多插件,满足您各种项目需求,降低开发与维护成本。
3.这里有专业设计人员提供的更多精美模版,帮您省去设计投入成本。
4.同时也希望您为分享者点个赞。

铭飞已经上路,我们将为此不懈努力,期待得到您的支持!

','','MStore(铭飞商城)是铭飞(MS)平台为开发者提供模版与插件作品分享平台,为企业提供优质产品和服务我们致力于打造一个优秀的Java资源共享学习平台。\r\n','[{\"path\":\"/upload/article/1/1461383937683.jpeg\"}]',0,'2028-01-01 00:00:00','来自火星的程序猿','MS','0','h,',1,0,NULL,NULL,NULL,NULL),(182,1,'人才理念','52','/52\\index.html','

网络营销是以互联网络为基础,通过数字化的信息和网络媒体的交互性来辅助营销目标实现的一种新型的市场营销方式。

 

      据统计,在国外,80%的个人和企业都选择网络媒介进行营销推广,并从中获得了极好的效果。而在中国,选择网络营销的企业和个人只有7-8%,不到国外的十分之一。

 

      随着网络影响的进一步扩大,随着人们对于网络营销理解的进一步加深,以及越来越多出现的网络营销推广的成功案例,人们已经开始意识到网络营销的诸多优点,越来越多的企业和个人通过网络进行营销推广


','网络营销是以互联网络为基础','网络营销是以互联网络为基础,通过数字化的信息和网络媒体的交互性来辅助营销目标实现的一种新型的市场营销方式。','[{\"path\":\"/upload/article/1584/1462521245856.jpg\"}]',0,'2028-01-01 00:00:00','','','0','',0,0,NULL,NULL,NULL,NULL),(183,1,'联系我们','136','/52/136\\index.html','

\"1-1203302131502F.jpg\"/\"1-120330213210F7.jpg\"/\"1-12033021312C17.jpg\"/

','','这里是一个充满活力和梦想的企业,我们不反对个性,我们不安于现状,我们亲手创造价值,我们永远在进步……如果你也是名有梦想勇于尝试的人,那就赶快加入我们吧!\r\n\r\n我们面向全国招募有志之士,欢迎自荐或向周围的好友推荐。','',0,'2028-01-01 00:00:00','','','0','',0,0,NULL,NULL,NULL,NULL),(185,1,'联系我们','141','/19/141\\index.html','

联系电话:888888

QQ:1391265900

邮箱:1391265900@qq.com

地址:来自火星的程序猿


','','这里是一个充满活力和梦想的企业,我们不反对个性,我们不安于现状,我们亲手创造价值,我们永远在进步……如果你也是名有梦想勇于尝试的人,那就赶快加入我们吧!\r\n\r\n我们面向全国招募有志之士,欢迎自荐或向周围的好友推荐。','[{\"path\":\"/upload/article/1638/1465720290023.jpg\"}]',4,'2028-01-01 00:00:00','','','0','',0,0,NULL,NULL,NULL,NULL),(190,1,'在线留言','142','/19/142\\index.html',NULL,'','','',0,'2028-01-01 00:00:00','','','0','',0,0,NULL,NULL,NULL,NULL),(191,1,'“绿色装饰”融入杭州市民中心装饰工程','84','/62/84\\191.html','

日前,公司成功中标杭州市民中心G楼约18000多平方米四层公共区域装饰工程,这是继杭州钱江新城国际会议中心之后的又一城市标志性建筑工程。
在该项目施工过程中,公司始终将“绿色装饰”理念融入其中。“绿色装饰”是指在设计、装修选材、施工等整个过程都符合绿色环保的理念,把对环 境造成的危害降低到最小,让市民享受到真正的绿色生活。随着社会的不断发展,“绿色装饰”日趋成为广大建筑装饰企业努力的方向。
公司项目部在杭州市民中心G楼工程中,严格按照健康、环保、安全的施工标准,精心施工,力争达到“浙江省建筑安全文明标化工地”的要求。在原 材料的选用上精挑细选,大量运用了玻璃、大理石材等绿色环保和高品质的装饰材料,突显出了简约、明快、自然的设计风格,创造出宽阔、绿色、实用的公共空 间。
此外项目部还非常注重采取新工艺、新方法,不仅提高了工程的整体美观性和实用性,而且加快了施工进度,提升了工作效率。由于本工程是圆型结构的楼层施 工,特别是石材在圆弧和圆柱造型上用量大,大大增加了工程的施工难度。因此,项目部按工程施工位置的不同分别采用了石材干挂施工工艺和石材湿贴与灌浆施工 工艺。通过这两种施工工艺铺出来的石材平整、洁净、色泽一致,无裂痕和缺损,既美观又方便今后日常护理。
作为杭州市重点工程,杭州市民中心G楼公共区域装饰工程得到了公司领导的高度重视。总经理高利明亲自坐镇指挥,组建了一支强有力的项目领导管 理班子,采用矩阵式组织管理体系,即采取以项目经理为第一责任人,分解项目绿色施工指标,形成完善的绿色施工组织、责任体系,在保证质量、安全等基本要求 的前提下,通过科学管理和技术进步,最大限度地节约资源与减少对环境负面影响,实现四位一体的绿色环保施工,打造“绿色装饰”精品工程。

','','此外项目部还非常注重采取新工艺、新方法,不仅提高了工程的整体美观性和实用性,而且加快了施工进度,提升了工作效率。由于本工程是圆型结构的楼层施 工,特别是石材在圆弧和圆柱造型上用量大,大大增加了工程的施工难度。','[{\"path\":\"/upload/article/1638/1464861354733.jpg\"}]',0,'2028-01-01 00:00:00','铭飞','铭飞','0','h,',0,0,NULL,NULL,NULL,NULL),(192,1,'纽约时髦客手中那些让人尖叫的包','83','/62/84\\192.html','

对于时尚达人而言,包袋与衣服的混搭也是一种必杀技。休闲手提包可以搭配不同的造型,而搭配运动裤就是更加直接地表现出时尚休闲风的最佳配搭方案。 宽松舒适的运动裤相信是不少男士最爱,但却很难搭出时尚感,更一不小心就给人过于随便的印象。而手提包在款式、颜色、材质及图案方面层出不穷,再搭配不同款式的运动裤,打造半运动化的时装搭配,让运动休闲和时尚文化完美结合,塑造出运动感的摩登简约风,让整体穿着随意且舒适。

','','对于时尚达人而言,包袋与衣服的混搭也是一种必杀技。休闲手提包可以搭配不同的造型,而搭配运动裤就是更加直接地表现出时尚休闲风的最佳配搭方案。','[{\"path\":\"/upload/article/1638/1464861380560.png\"}]',0,'2028-01-01 00:00:00','铭飞','铭飞','0','p,',0,0,NULL,NULL,NULL,NULL),(193,1,'宋朝华率队赴贵州招商洽谈推进重大项目','83','/62/84\\193.html','

市委副书记、市长宋朝华率队前往贵州省贵阳市,实地考察由中铁贵旅公司投资开发建设的中铁国际生态城项目,并与公司高层进行了深入友好座谈,洽谈推进重大项目落户我市仁寿县相关事宜。

 

中国中铁旗下子公司——中铁贵旅公司开发建设的中铁国际生态城项目位于贵阳市龙洞堡空港经济区,总投资500亿元,占地面积约20平方公里,打造集旅游、休闲、度假、运动、文化、养老、养生和居住等多种功能于一体的世界级旅游度假目的地,2011年被列为“贵州省十二五旅游发展规划十大旅游项目”之一,是贵州省的重点项目。在中铁贵旅公司董事长张敏的陪同下,宋朝华一行参观考察了中铁国际生态城展示中心、中铁国际生态旅游城市综合体项目、安纳塔拉度假酒店和巫山香杏小镇等旅游开发项目,认真听取了项目规划建设有关情况介绍,对中铁国际生态城项目规划理念新、设计水平高、推进速度快表示由衷赞赏,对中铁贵旅公司有意来我市仁寿县投资发展表示热烈欢迎。

 

座谈会上,双方就推进项目落户事宜进行了深入友好会谈。宋朝华指出,中铁贵旅公司实力强、品牌响、理念新,对公司投资开发黑龙滩休闲旅游度假中心项目充满信心。通过深入考察和友好洽谈,双方就项目投资有关事宜达成了共识,并将于近期正式签署合作协议。张敏表示,天府眉山交通区位优越,旅游资源独特,发展潜力巨大,集团拟投资200亿元以上开发建设黑龙滩旅游项目。该项目将按照国际化水准,坚持以游为主、高举高打,紧紧围绕“吃、住、行、游、购、娱”六要素,走产业高端、高端产业的路线,全力打造5a级景区,为发展旅游产业和造福眉山人民作出央企应有的贡献。


','','市委副书记、市长宋朝华率队前往贵州省贵阳市,实地考察由中铁贵旅公司投资开发建设的中铁国际生态城项目,并与公司高层进行了深入友好座谈,洽谈推进重大项目落户我市仁寿县相关事宜。\r\n ','[{\"path\":\"/upload/article/1638/1464861385314.jpg\"}]',0,'2028-01-01 00:00:00','铭飞','铭飞','0','',0,0,NULL,NULL,NULL,NULL),(194,1,'红木市场是否低迷 消费者仍在','83','/62/83\\194.html','

森和汽车城,位于广州市天河北路,是一家高端品牌汽车的城市综合展厅,本来是全方位展示豪华新车的地方。上周,突然在门口拉上了横幅——东阳红木清货大甩卖。记者于日前一探,吓了一跳。门口的广场上停着几辆大货车,不断有红木家具被抬出来打包装车。走进去视觉更混乱,当庭摆着一套五件鹿角椅,旁边是满雕龙的金丝楠木顶箱柜,内庭中央还展示着一辆豪华轿车,而周边则摆满红木家具,完全没有红木家具应该有的意境。更令人瞠目结舌的是,里面人流熙熙攘攘,整个场景可以让你直接穿越到上世纪八十年代中期一个小县城的展销会。

 

  “销售情况非常可观,首日已经突破100万元销售,周末差不多也是这个数。”东阳红木销售负责人穆延东告诉记者,这次的清货周四开始,周日结束,下周同样如此,中间的时间会对产品进行调整,再销售一次就结束了。记者在店内粗略看了一下,产品以清式家具为主,材质则以金丝楠木、微凹黄檀、缅甸花梨、南美酸枝、东南亚酸枝为主,大红酸枝和明式风格的产品不多,就连在今年APEC上出现的大红酸枝交椅的完整复刻版,也随便被摆在了角落。从做工和风格以及雕刻工艺来看,这些货物并非出自一家工厂。“此次清货的红木家具,来自东阳红木家具六家工厂,这些货基本是这些厂家去年接的订单直接生产的,但今年有很多客户取消了订单,加上市场环境变化,代理商出货也很慢。工厂不像经销商,可以囤货,它必须保持周转,否则就得停工待产坐以待毙。所以几家厂子就联合起来,将厂里现有的产品变现,自谋生路。”穆延东告诉记者,他们在北京、上海也有此类清货会,销售情况都不错,相对而言,广州的销售情况不如北京、上海。“可能是产品材质的问题,微凹黄檀和缅甸花梨的产品比较畅销,但南美酸枝和东南亚酸枝的产品不太被认可。有很多消费者直接询问有没有大红酸枝的产品,也有很多消费者询问有没有明式风格的产品。”他透露,下周销售的产品将会进行调整,还是针对普通消费者,以老挝大红酸枝(交趾黄檀)、缅甸花梨的材质为主,增加明式风格家具的品类,但还是以清式风格为主。


','','内庭中央还展示着一辆豪华轿车,而周边则摆满红木家具,完全没有红木家具应该有的意境。更令人瞠目结舌的是,里面人流熙熙攘攘','[{\"path\":\"/upload/article/1638/1464861401214.jpg\"}]',0,'2028-01-01 00:00:00','铭飞','铭飞','0','',0,0,NULL,NULL,NULL,NULL),(195,1,'众多国宝级古典家具悉数亮相','83','/62/83\\195.html','

海南黄花梨圆包脚罗汉床、小叶紫檀云龙纹镶理石圆桌、富贵满堂多宝阁……昨日(12月13日)上午,第三届中国(江门)传统家具精品鉴赏会暨2014中国(江门)红木家具经销大会在五邑华侨广场会展中心正式开幕,众多国宝级古典家具作品以及海南黄花梨等珍贵木材亮相。

 

  此次活动由江门市古典家具行业协会主办,江门市新会区古典家具行业协会、台山市大江古典家具商会共同协办,会期为12月13日至16日,有来自我市新会、台山的50家代表性企业参展,云集了20多个省市经销商、行业精英,这是我市古典家具行业促进交流合作,展示广作精品,推广“江门红木”的重要平台。

 

  出席展会开幕式的有关嘉宾有:中国家具协会副理事长、传统家具专业委员会主席团常设主席陈宝光,故宫博物院常务副院长、故宫博物院研究员王亚民,中国家具协会传统家具专业委员会主席、江门市古典家具行业协会会长伍炳亮,省家具协会会长王克,省工艺美术协会会长舒海波等。

 

  我市是红木广作工艺的发源地之一,也是全国红木家具重要的生产基地,拥有深厚的文化和精妙的技艺,人才云集。借助这次展会,伍炳亮认为,一方面,“将有利于增加广大爱好者对传统家具的了解,在提升自己的审美观和鉴赏力,领略艺术魅力的同时,享受艺术带来的美好生活”;另一方面,这将成为我市对外展示的窗口,“展示我市优秀传统家具作品和设计,引领当代仿古家具健康发展”。

 

  王亚民在致辞中说:“江门在传统家具制作方面有很长的历史,涌现出了一批家具行业的企业家,对传统家具的继承创新与发展都做出了自己的探索和非常令人鼓舞的成就,在全国形成影响。”

 

  陈宝光则希望:“江门红木家具企业能够借这次展会,进一步推动行业良性发展,为全国红木家具发展作出贡献。”


','','海南黄花梨圆包脚罗汉床、小叶紫檀云龙纹镶理石圆桌、富贵满堂多宝阁……昨日(12月13日)上午,第三届中国(江门)传统家具精品鉴赏会暨2014中国(江门)红木家具....','[{\"path\":\"/upload/article/1638/1464861408016.jpg\"}]',0,'2028-01-01 00:00:00','铭飞','铭飞','0','f,',0,0,NULL,NULL,NULL,NULL),(196,1,'戴为红木燃情成都,开启幸福之门','83','/62/83\\196.html','

有人说,成都,是一个让人来了就不想离开的地方,是一座悠远的文化名城,它用睿智和远见,让每一个人共享一座城市的幸福,因此被评为“最具幸福感的城市”。

 

那么,当中国国粹文化的传承者、追求幸福感的红木家具知名品牌——东莞市弘开实业有限公司(以下简称戴为红木)与成都邂逅,必能为广大成都市民增添更多新的幸福感。

近期,出于对中国传统文化的热爱,以及对红木艺术的执着、深情和追求,戴为红木携带“幸福之家”主题活动礼遇成都,使其鸿儒红木家居艺术馆隆重开业,为已进入寒冬的成都燃起了一把火,掀起了中式红木家具热潮!

 

据了解,戴为红木成都鸿儒红木家居艺术馆在锦江区三色路,展馆面积达500多平方米。艺术馆整体宏伟大气,装修精致,馆内的精品极富特色设计,尤其是第四层展示了戴为红木的代表性设计风格,不仅拥有宁静致远的品茶茶室,静心悟道之香道品香室,古色古香的贵宾区,休闲娱乐之棋牌室等高端居室,而且居室采用了鸿儒家居VIP会员制度。这意味着,在这里,不仅可以享受国粹文化的熏陶,还能尊享贵宾待遇的幸福感。


','','近期,出于对中国传统文化的热爱,以及对红木艺术的执着、深情和追求,戴为红木携带“幸福之家”主题活动礼遇成都,使其鸿儒红木家居艺术馆隆重开业,为已进入寒冬的成都燃起了一把火,掀起了中式红木家具热潮!','[{\"path\":\"/upload/article/1638/1464861413861.jpg\"}]',0,'2028-01-01 00:00:00','铭飞','铭飞','0','h,',0,0,NULL,NULL,NULL,NULL),(197,1,'质检整治电商售假 红木家具市场良莠不齐','83','/62/83\\197.html','

今年以来,质检总局执法督查司按照网上发现、源头追溯、落地查处的要求,组织开展电子商务产品专项执法打假活动,积极构建适应电子商务执法打假的全国执法协查工作机制,推动属地查处工作的开展,全国共查处电商产品质量违法案件400余件。

2014年6月,江苏省淮安市质监局根据总局执法司统一部署,对江苏杰翔羽绒有限公司进行了执法检查。经查,该公司涉嫌生产并通过“天猫商城”和“京东商城”等电子商务平台销售以假充真蚕丝被。目前,江苏省淮安市淮安质监局已对该案立案查处。


','','质检总局执法督查司按照网上发现、源头追溯、落地查处的要求,组织开展电子商务产品专项执法打假活动,积极构建适应电子商务执法打假的全国执法协查工作机制...','[{\"path\":\"/upload/article/1638/1464861373394.png\"}]',0,'2028-01-01 00:00:00','铭飞','铭飞','0','',0,0,NULL,NULL,NULL,NULL),(198,1,'东西方两大甜妞聚首巴黎时装周头排','83','/62/83\\198.html','

巴黎时装周许晴倾力助阵,当天许晴身着黑色拼接装头排看秀,大秀美腿,加上干净利落的妆容,整体造型简洁率性,绿色的刺绣手包更添俏皮,银色的尖头高跟鞋成点睛之笔,许晴此次看秀的装扮可谓彰显了至纯至简主义。

对于此次的装扮许晴表示:“这次的服装都是看似简单其实细节之处非常打动我,像这件是硬朗的皮质与柔软的丝绵材质的拼接,好比是一刚一柔,代表女子都有柔软和刚强的两面,刚柔并济。”许晴和MirandaKerr在头牌看秀时不时凑在一起交流,时而发出会心微笑时而一起鼓掌,成为现场最闪耀的亮点,很多时尚博主达人都纷纷夸赞二人拥有最甜美的笑脸。


','','巴黎时装周许晴倾力助阵,当天许晴身着黑色拼接装头排看秀,大秀美腿,加上干净利落的妆容,整体造型简洁率性,绿色的刺绣手包更添俏皮..','[{\"path\":\"/upload/article/1638/1464861364631.jpg\"}]',0,'2028-01-01 00:00:00','铭飞','铭飞','0','',0,0,NULL,NULL,NULL,NULL),(199,1,'宋朝华率队赴贵州招商洽谈推进重大项目','83','/62/83\\199.html','

市委副书记、市长宋朝华率队前往贵州省贵阳市,实地考察由中铁贵旅公司投资开发建设的中铁国际生态城项目,并与公司高层进行了深入友好座谈,洽谈推进重大项目落户我市仁寿县相关事宜。

 

中国中铁旗下子公司——中铁贵旅公司开发建设的中铁国际生态城项目位于贵阳市龙洞堡空港经济区,总投资500亿元,占地面积约20平方公里,打造集旅游、休闲、度假、运动、文化、养老、养生和居住等多种功能于一体的世界级旅游度假目的地,2011年被列为“贵州省十二五旅游发展规划十大旅游项目”之一,是贵州省的重点项目。在中铁贵旅公司董事长张敏的陪同下,宋朝华一行参观考察了中铁国际生态城展示中心、中铁国际生态旅游城市综合体项目、安纳塔拉度假酒店和巫山香杏小镇等旅游开发项目,认真听取了项目规划建设有关情况介绍,对中铁国际生态城项目规划理念新、设计水平高、推进速度快表示由衷赞赏,对中铁贵旅公司有意来我市仁寿县投资发展表示热烈欢迎。

 

座谈会上,双方就推进项目落户事宜进行了深入友好会谈。宋朝华指出,中铁贵旅公司实力强、品牌响、理念新,对公司投资开发黑龙滩休闲旅游度假中心项目充满信心。通过深入考察和友好洽谈,双方就项目投资有关事宜达成了共识,并将于近期正式签署合作协议。张敏表示,天府眉山交通区位优越,旅游资源独特,发展潜力巨大,集团拟投资200亿元以上开发建设黑龙滩旅游项目。该项目将按照国际化水准,坚持以游为主、高举高打,紧紧围绕“吃、住、行、游、购、娱”六要素,走产业高端、高端产业的路线,全力打造5a级景区,为发展旅游产业和造福眉山人民作出央企应有的贡献。


','','市委副书记、市长宋朝华率队前往贵州省贵阳市,实地考察由中铁贵旅公司投资开发建设的中铁国际生态城项目,并与公司高层进行了深入友好座谈,洽谈推进重大项目落户我市仁寿县相关事宜。','[{\"path\":\"/upload/article/1638/1464861360036.png\"}]',0,'2028-01-01 00:00:00','铭飞','铭飞','0','c,',0,0,NULL,NULL,NULL,NULL),(200,1,'奔驰斯宾特A3 豪华版','107','/106/107\\200.html','

斯宾特系列(Sprinter)系列技术领先,动力强劲。座位数从10座到20座均可选择,跟据配置不同,价格也从95.8万——178万可以选择。为您带来不同的商务体验。下面为您带来的就是斯宾特A3-9座旗舰型,号称移动总裁办公室的豪华商务房车。

从看到斯宾特的第一眼,您就会喜欢上他,不仅仅因为他豪华大气的外观,更得益于梅赛德斯-奔驰精湛造车技艺的极致发挥和处处以人为本的至臻理念,时刻让您感受到其中极高的舒适和享受。车门电动滑动装置,配合智能化遥控车钥匙开启,您可以轻而易举的开合车门,体现无微不至的尊荣享受。尽显豪华大气本色!


后轮双胎配置使车身的承载能力更加强大,更加稳定、安全。奔驰商务车秉承了梅赛德斯-奔驰品牌百年的造车传统,奔驰商务车中斯宾特以豪华大气的外观、卓尔不凡的品质、坚实可靠的性能,再一次演绎了梅赛德斯-奔驰对至善臻美的不懈追求。新一代梅赛德斯-奔驰商务车斯宾特技术更上一层楼,为高级商务车行业树立新标杆。外观造型气度恢弘、浑然天成;细节设计周密严谨、精益求精。梅赛德斯-奔驰造车专家独运匠心,精心打造,为客户带来具有更大空间、更强动力和更高安全保障的斯宾特。

 

车内中控隔屏、BOSE顶级KTV系统及酒柜吧台。高大的车身设计带来无与伦比的车内空间,车内净高1.98米。这使您进出车仓无需弯腰低头,也喻示着此车的拥有者在生意场上的强势,无需向任何人低头。车内后仓配备阿尔卑斯小牛皮手工订制的豪华航空座椅,尽显商务头等仓本色,两个可以360度旋转的座椅和侧置沙发可以让车内座椅布局自由组合。带来超乎想像的谈判空间!


隔屏上集成了一台来自三星的40英寸3D液晶电视,配合卫星电视接收器可以接收国内100多个电视频道,DVD庭影院系统也可以播放高清视频。让您在旅途中不再无聊。来自瑞士的水晶杯在酒柜的LED灯光照射下晶莹剔透,更显皇家风范。


','','斯宾特系列(Sprinter)系列技术领先,动力强劲。座位数从10座到20座均可选择,跟据配置不同,价格也从95.8万178万可以选择。为您带来不同的商务体验。下面为.','[{\"path\":\"/upload/article/1638/1464851333470.jpg\"}]',0,'2028-01-01 00:00:00','来自火星的程序猿','MS','0','p,',0,0,NULL,NULL,NULL,NULL),(201,1,'福特E350 游艇版','107','/106/107\\201.html','

其实商务车在人们眼里就是普通的客车,没有人会花时间去研究它,欣赏它。商务车给人的印象,就是整体的一箱车,发动机不是在驾驶与副驾驶的座椅下边,就是在车子的后面。没有前发动机舱,很少有人会把普通的商务车与“霸气”这个词汇文明发言在一起。而作为一款纯正的“美国”商务车,GMC3500完全打破中国人传统意识里的对商务车的形象。 

','','其实商务车在人们眼里就是普通的客车,没有人会花时间去研究它,欣赏它。商务车给人的印象,就是整体的一箱车,发动机不是在驾驶与副驾驶的座椅下...','[{\"path\":\"/upload/article/1638/1464851477741.jpg\"}]',0,'2028-01-01 00:00:00','来自火星的程序猿','MS','0','',0,0,NULL,NULL,NULL,NULL),(202,1,'GMC3500 平顶舒适版','107','/106/107\\202.html','

对于这样一款外观霸气,承载性高的原装进口商务车和它实在的销售价格,都让这款车的性价比大大提升了不少。对于市场上一些追求个性的客户群来讲,GMC3500恰恰就是一款能够让他们体现出个性化的座驾,留有足够改装想象和个性发展的空间,体验生活品味,从GMC开始。新款GMC Savana 3500 舒适版商务车是您一个很不错的选择。

','','对于这样一款外观霸气,承载性高的原装进口商务车和它实在的销售价格,都让这款车的性价比大大提升了不少。对于市场上一些追求个性的客户群来讲,...','[{\"path\":\"/upload/article/1638/1464851473102.jpg\"}]',0,'2028-01-01 00:00:00','来自火星的程序猿','MS','0','',0,0,NULL,NULL,NULL,NULL),(203,1,'宾特奔驰斯A系列','107','/106/107\\203.html','

奔驰斯宾特系列礼宾车在豪华商务车系中,一向是高端、舒适的代名词。在秉承了奔驰的贵族气质的同时,其全新定制的奢华内饰让人感觉犹如进入了高档的商务会所。定位为大型集团公司商务接待用车。其超高端的豪华配置能够很好的提升用车企业的自身品质,给来访者一种最高礼遇,是对商务洽谈活动的一种实质推动和提升。 

','','奔驰斯宾特系列礼宾车在豪华商务车系中,一向是高端、舒适的代名词。在秉承了奔驰的贵族气质的同时,其全新定制的奢华内饰让人感觉犹如进入了高档..','[{\"path\":\"/upload/article/1638/1465808166467.png\"}]',0,'2028-01-01 00:00:00','来自火星的程序猿','MS','0','c,',0,0,NULL,NULL,NULL,NULL),(204,1,'1','148','/100/148\\204.html',NULL,'','','[{\"path\":\"/upload/article/1638/1464859580381.jpg\"}]',0,'2028-01-01 00:00:00','','','0','',0,0,NULL,NULL,NULL,NULL),(205,1,'2','148','/100/148\\205.html',NULL,'','','[{\"path\":\"/upload/article/1638/1464859585818.jpg\"}]',0,'2028-01-01 00:00:00','','','0','',0,0,NULL,NULL,NULL,NULL),(206,1,'3','148','/100/148\\206.html',NULL,'','','[{\"path\":\"/upload/article/1638/1464859590366.jpg\"}]',0,'2028-01-01 00:00:00','','','0','',0,0,NULL,NULL,NULL,NULL),(207,1,'4','148','/100/148\\207.html',NULL,'','','[{\"path\":\"/upload/article/1638/1464859595151.jpg\"}]',0,'2028-01-01 00:00:00','','','0','',0,0,NULL,NULL,NULL,NULL),(208,1,'5','148','/100/148\\208.html',NULL,'','','[{\"path\":\"/upload/article/1638/1464859599849.jpg\"}]',0,'2028-01-01 00:00:00','','','0','',0,0,NULL,NULL,NULL,NULL),(209,1,'6','148','/100/148\\209.html',NULL,'','高品质景观缔造者\r\nHigh quality landscape architects.','[{\"path\":\"/upload/article/1638/1464859604208.jpg\"}]',0,'2028-01-01 00:00:00','园林绿化二级资质企业','','0','',0,0,NULL,NULL,NULL,NULL),(210,1,'幻灯五','147','/100/147\\210.html',NULL,'','做精品设计、建优良工程、打造精品工程\r\nBoutique design, construction engineering, excellent build quality engineering.','[{\"path\":\"/upload/article/1638/1464859633594.jpg\"}]',0,'2028-01-01 00:00:00','园林绿化二级资质企业','','0','',0,0,NULL,NULL,NULL,NULL),(211,1,'幻灯六','147','/100/147\\211.html',NULL,'','与您一起携手,共同谱写园林绿化事业的新篇章!\r\nWork with you to jointly write a new chapter landscaping business!','[{\"path\":\"/upload/article/1638/1464859625584.jpg\"}]',0,'2028-01-01 00:00:00','园林绿化二级资质企业','','0','',0,0,NULL,NULL,NULL,NULL),(212,1,'愿景','95','/93/95\\212.html','
  1. 创造价值,提供优质的产品和服务,赢得用户的喜爱和尊敬。

  2. 利益均沾,让公司的每一成员都获得满意的回报。

  3. 合作共赢,与合作伙伴共同成长,赢得行业尊敬。

  4. 注重企业责任,关爱社会、回馈社会,赢得社会尊敬。


','','我们拥有稳定的充满创作激情的设计团队,核心人员由公司创立至今伴随我们一个又一个客户的成长,保证了稳定的设计出品质量及熟知我们所合作过的每一个客户的设计需求,现在,团队不断壮大。','[{\"path\":\"/upload/article/1638/1464940624025.png\"}]',0,'2028-01-01 00:00:00','','','0','h,',0,0,NULL,NULL,NULL,NULL),(213,1,'价值观','95','/93/95\\213.html','
  1. 创造价值:一切工作围绕为用户价值展开,不做任何对用户没有价值的面子工作。

  2. 积极主动:在做好本职工作的前提下,积极主动为公司解决问题,推动公司发展。

  3. 踏实奋进:不报幻想,实事求是,锐意进取。不把“运气”当作成事的前提,抱美好的梦想,作最坏的打算。

  4. 合作共赢:抱着共赢的心态,积极与企业内外合作,充分利用各方优势,创造价值。


','','我们已为数百家企业、政府和社会团体完成品牌的传播与设计,积累了大量丰富的经验,可为您提供大量同类企业和机构的案例进行比较参考。','[{\"path\":\"/upload/article/1638/1464940619456.jpg\"}]',0,'2028-01-01 00:00:00','','','0','p,',0,0,NULL,NULL,NULL,NULL),(214,1,'经营理念','95','/93/95\\214.html','
  1. 注重长远发展,不因商业利益伤害用户价值。

  2. 关注并深刻理解用户需求,不断以卓越的产品和服务满足用户需求。

  3. 重视与用户的情感沟通,尊重用户感受,与用户共成长。

  4. 合作共赢:抱着共赢的心态,积极与企业内外合作,充分利用各方优势,创造价值。


','','可提供一站式全面服务:品牌的定位——企业文化梳理——企业/品牌形象设计——品牌传播——环境空间设计——宣传物品的落地','[{\"path\":\"/upload/article/1638/1464940614692.jpg\"}]',0,'2028-01-01 00:00:00','','','0','f,',0,0,NULL,NULL,NULL,NULL),(215,1,'管理理念','95','/93/95\\215.html','
  1. 努力为员工提供良好的工作环境和科学的激励机制。

  2. 努力让适合的人干适合的事,为员工提供丰富的培训和晋升机会,使员工和公司共同成长。

  3. 尊重和信任员工,鼓励员工充分发挥聪明才智,使其在自己的领域获得成功。


','','多年来,我们始终专注于品牌的设计与塑造,坚持站在市场的角度,为客户创作出准确的、极具商业价值的形象设计与品牌传播策略。','[{\"path\":\"/upload/article/1638/1464940610305.jpg\"}]',0,'2028-01-01 00:00:00','','','0','c,',0,0,NULL,NULL,NULL,NULL),(216,1,'李镇江','115','/115\\216.html','

锐诚PPT创始人,资深PPT设计师、培训师、品牌策划师,任全国知名地产公司高级策划师,大型教育集团品牌运营总监;创办锐诚PPT后,为中原演示设计领域带来全新标准,帮助数百家企业定制演示精品,让演示创造更多价值。精通各种高端PPT设计、 精通版式、配色、文字逻辑和动画,设计案例上百件。擅长在实战中为学员点拨,让学员快速提升美感,做出更漂亮的作品。


','','资深PPT设计师','[{\"path\":\"/upload/article/1638/1464860436576.png\",\"url\":\"/ms-mcms/upload/article/1638/1464860436576.png\",\"uid\":1577521906651,\"status\":\"success\"}]',0,'2028-01-01 00:00:00','','','0','h',0,0,'2019-12-28 16:31:58',NULL,NULL,NULL),(217,1,'曹瑛','115','/115\\217.html','

锐诚PPT特邀首席技术专家,连续五年荣获美国微软公司评出的全球最有价值专家奖(简称MVP),通过微软办公专家国际认证(简称MOS)。出版专业PPT书籍《PPT高效设计-5分钟完美打造PPT课件》,在历届网络PPT大赛中做评委。阿瑛老师从事PPT设及教学十余年,PPT公开课上千场,经验极其丰富,授课轻松风趣,让0基础的学员都可以快速提升技能,做出漂亮的PPT。

','','锐诚PPT特邀首席技术专家','[{\"path\":\"/upload/article/1638/1464860564066.png\"}]',0,'2028-01-01 00:00:00','','','0','p,',0,0,NULL,NULL,NULL,NULL),(218,1,'孙建东','115','/115\\218.html','

锐诚PPT培训部总监,17年PPT研究积淀,5年网络教室的教学经验。2013年获得全国振兴杯多媒体制作员比赛第7名 。多次获得省市局级办公软件技术大赛奖,独撰《PPT高效设计—6招完美打造工作型PPT》全国发行。曾任中国石化干部管理学院担任“PPT高级制作技巧”课程授课讲师。幽默,轻松的授课方式,快乐中传授高效快捷的实用技术。


','','锐诚PPT培训部总监','[{\"path\":\"/upload/article/1638/1464860506257.png\"}]',0,'2028-01-01 00:00:00','','','0','c,',0,0,NULL,NULL,NULL,NULL),(219,1,'梅幸','115','/115\\219.html','

锐诚PPT金牌设计师,毕业于上海美术学院视觉传达专业,曾在国内某知名4A广告公司任职,五年动画和PPT设计经验,拥有丰富的高端定制设计经验,专注于企业展示/工作汇报/品牌宣讲/竞聘/路演等高端PPT设计,设计理念:创意是设计的灵魂!在动画、质感和版式的设计上力求完美。


','','锐诚PPT金牌设计师','[{\"path\":\"/upload/article/1638/1464860570155.png\",\"url\":\"/ms-mcms/upload/article/1638/1464860570155.png\",\"uid\":1577436839397,\"status\":\"success\"}]',0,'2028-01-01 00:00:00','','','0','f',0,0,'2019-12-27 16:58:00',NULL,NULL,NULL),(220,1,'攀臣广告','149','/149\\220.html','

攀臣广告(上海)有限公司(以下简称:攀臣)是一家专注于亚克力制品(化妆品展架、展览展示道具、展架展柜陈列架、商场展示道具、展示盒、手机宣传架、发光展架、广告灯箱、标识标牌、工艺礼品、奖杯奖牌授权牌、商超货架置物架、台牌台卡台签、相框相架、金银珠宝展示礼盒、抽奖箱收纳箱、办公文具类、家居生活类、各类广告字、机器配套、产品附件配件等等)设计加工制作为一体的公司 。涉及:商务、工业、建筑、交通、商业、家居生活、广告、医学、照明、酒店餐饮、金融银行服务、学校教育、政府事业单位、景点旅游、展厅展览、零售店面、奢侈品、面包糕点等众多业态领域,产品基本覆盖全行业。

','','','[{\"path\":\"/upload/1//article/1531105696938.jpg\"}]',0,'2018-07-09 11:07:00','http://www.panchen-china.com/','','0','',0,0,NULL,NULL,NULL,NULL),(221,1,'华赋科创','149','/149\\221.html','

深圳市华赋科创电子有限公司 成立于2009年,主要从事 IC 等电子元器件的推广、销售及开发应用服务。华赋是STMicro、NXP、ONSemi、TI、ADI、Intersil、Infineon、Vishay、Fujitsu、Yageo、Samsung、AOS、Fairchild、Freescale、Cypress、ROHM、HTC、Eastsoft、台湾安国、风华高科、等国内外著名公司的授权代理商或分销商。拥有微控制器、系统管理器件、通信接口器件、数据转换器件、信号调理器件、电源管理器件、存储器、连接器、分立半导体及被动器件等十多个产品种类。香港、深圳两地设立库房,现货库存产品达上万中,支持香港、海外交货。目前已与多家国外分销商建立了战略合作伙伴关系,其中包括:Mouser、 Rochester、Digi-Key、Future、Arrow、Avnet等,为国内客户提供海外订购产品服务,满足客户从研发到批量生产的所有采购需求。


','','','[{\"path\":\"/upload/1//article/1531105877049.jpg\"}]',0,'2018-07-09 11:09:00','http://www.huaful.com/','','0','',0,0,NULL,NULL,NULL,NULL),(222,1,'洛阳洛龙','149','/149\\222.html','

洛龙区人民政府门户网作为洛阳市洛龙区电子政务(网上行政)建设的重要组成部分,是政府信息公开的法定载体,是政府面向社会服务的平台,是公众与政府交流互动的桥梁,是宣传洛龙的主要窗口,对于促进政府信息公开、推进依法行政、接受公众监督、改进行政管理、全面履行政府职能和建设阳光政府具有重要意义。

','x','x','[{\"path\":\"/upload/1//article/1531105970322.jpg\",\"url\":\"/ms-mcms/upload/1//article/1531105970322.jpg\",\"uid\":1578390819577,\"status\":\"success\"}]',0,'2018-07-09 11:12:00','http://www.luolong.gov.cn/ ','','0','f',0,0,'2020-01-07 17:53:55',NULL,NULL,NULL); +/*!40000 ALTER TABLE `cms_content` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `cms_history_log` +-- --- ---------------------------- --- Records of cms_content --- ---------------------------- -INSERT INTO `cms_content` VALUES ('24', '1', '关于我们', '19', '/19\\index.html', '

  公司于2012年3月8日,已正式向《景德镇市工商行政管理局》领取营业   执照。

  公司名称:景德镇铭飞科技有限公司

  经营范围:计算机系统服务及技术开发、咨询服务


', '公司于2012年3月8日,已正式向《景德镇市工商行政管理局》领取营业 执照。\r\n 公司名称:景德镇铭飞科技有限公司\r\n 经营范围:计算机系统服务及技术开发、咨询服务', ' 公司于2012年3月8日,已正式向《景德镇市工商行政管理局》领取营业 执照。\r\n 公司名称:景德镇铭飞科技有限公司\r\n 经营范围:计算机系统服务及技术开发、咨询服务', '', '0', '2028-01-01 00:00:00', '铭飞科技', '铭飞科技', '0', 'c,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('36', '1', '网站建设', '53', '/53\\index.html', '

网站整体策划

企业网站建设目的何在?如何充分挖掘互联网络的资源和优势,如何合理地组织网站内容与功能从而达到客户的需求?
我们将根据市场分析、客户产品及服务的优势、竞争对手分析等等,有效的确立网站定位。根据相关需求分析获得相应网站运营策略,在网站建立之初我们就网站VI形象、网站营销手段、运营模式、网站发展前景等等进行定位。

 

网站设计 DESIGN

网络媒体不同于传统媒体,如果在网站设计的时候仅仅是将文字和图片做一个简单堆积和展示的话,这样的网站跟一片丢落在街头的破旧宣传资料没有任何区别。客户往往通过企业网站就留下了对企业的第一印象,这个第一印象是决定客户是否与你合作的重要因素。
所以在浏览者的角度,我们分析企业特点和品牌内涵,完美的通过网站体现企业形象,并严格采用W3C国际标准进行网站设计,采用DIV+CSS构 架,不但使您的网站具备足够的扩展性,您网站的速度、兼容性、友好性也都会显著提高,更主要的是,代码和表现分离的方式让您的网站改版变得更容易,而针对 SEO搜索引擎优化的工作也变得更加的畅通。

 

网站建设售后服务 SALES

网站建设专家致力于为客户提供优质的产品及服务。为了多渠道的了解客户的需求,快速响应个性化需要,不断完善售后服务工作,我们客户服务管理部在此为您搭建了这个沟通的平台,我们希望通过网络加强与客户的交流。
完善的售后服务是公司信誉的保障和服务趋于完善与成熟的象征,因此,我们在这一方面投入了较大的精力,确保每一位客户的利益得到充分的保障,从而提高企业信誉,发展长期友好的合作。
对于享受我公司建站服务的客户,我们提供免费一年售后服务。

 

网站全程维护 MAINTAIN

网页制作好了以后并不是就没事了?其实日后的更新维护才是最重要的!如果参观网站的访问者每次看到的网站都是一样的,那么它们日后还会来吗?这时候,您的网页要由谁来维护呢?
严格来说,每一个站点都应该由专业人员定期更新维护。互联网络的最大优势就是信息的实时性,只有快速的反映,准确的报道,才能吸引更多的浏览者。
目前很多站点人气很旺,应该和定期更新分不开的。也有很多站点由于种种原因,数月才更新一次,这样就违背了网路最基本的商业目的。网站不是购买一件商品,随着时间的推移而贬值陈旧,只有不断的溶入企业发展动向,推陈出新,才会具有创造力,发挥网路商业潜能。
更新维护不仅仅只局限于简单的更换文字稿,应该是将企业的商业动态和发展方向充分考虑进去, 再结合现有的网站规划结构,迅速作出相应的改进。企业的每一个新项目的推广和价格的浮动、内部结构调整, 不应该只是在报纸、电视等媒体做宣传而忽略网路这个最具有潜力的市场。 这也是我们一直强调的商业网站 CIS 策略。
鉴于目前大多数网站不具有专业维护的技术力量,网站建设公司可为广大客户提供专业服务。每一个企业可根据自身的商业特征制定不同的维护方案,并保证在最短的时间内迅速完成。

 

网页改版 REVISED

企业上网已成趋势,企业网站犹如雨后春笋般地拔起,试问:
您的企业通过互联网进行了巨额的投入,但网站到底给您带来了多大的效益?
您的网站从建立到现在,更新过几次、改版过几次?
功能不全、设计不美观、布局不合理、几乎从不更新的网站会给企形象带来多大的负面影响?
选择网站建站专家,帮您重新审视和构架您的网站系统,我们提供八项全能服务,全面改善您的网站系统,专为您解决企业上网后顾之忧。

 

培训解决方案 TRAIN

为了更好地做好企业外部门户网站的技术培训工作,将选派具有丰富技术培训和实施经验的技术人员组成培训小组,编写详尽实用的培训教材,并且制定切实有效的培训方案。技术培训的工作为应用软件系统管理和使用培训。
在软件产品实践培训中,采用集中培训的方式,由的培训师针对本系统的技术特点,为企业技术人员提供全面培训,培训内容涵盖了本此系统建设过程中使用的主要技术理论和产品实践。
在应用软件系统管理和使用培训中,我们会组织项目开发小组的主要人员针对管理和使用人员的不同需求,提供不同层次的培训课程。


', '', '网站设计 网站制作 网站维护 网站改版', '[{\"path\":\"/upload/article/1638/1464868285592.png\"}]', '0', '2028-01-01 00:00:00', '', '', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('37', '1', '人才招聘', '146', '/54\\37.html', '

*  以人为本,人尽其才"的原则
*  德才兼备,德为先 
*  内部提拔,给员工一个上升的空间
*  绩效考核制度,倡导"能者上,庸者下"的淘汰机制

 

一个企业的竞争力归结到底是人才的竞争力。荣超物业本着"以人为本,人尽其才"的原则,为有志于物业管理行业发展的人才提供一个发展的舞台。在人才招聘中,结合每位应聘者的素质、品格、经验进行综合评价,遵循公平、平等、竞争、择优以及双向选择的原则。

 

企业内部的竞聘、晋升机制,为员工提供了公平竞争的机会。通过挖掘企业内部的人才,调动内部人员的潜力和积极性,促进了优秀人才脱颖而出,实现人力资源的合理配置,把"合适的人放在合适的地方"。

 

建立客观公正的考核制度,是人才使用的一个重要人力资源措施。考核突出对每位员工的工作绩效、工作态度和工作能力进行考评,以提高团队的整体绩效和提高企业的管理服务水平,并倡导"能者上,庸者下"的淘汰机制。

 

企业致力于创造一个员工于企业共同发展的空间和平台,荣超物业期待您的加盟,企业的发展将为您的加入而更为精彩!


', '', '企业内部的竞聘、晋升机制,为员工提供了公平竞争的机会。通过挖掘企业内部的人才,调动内部人员的潜力和积极性,促进了优秀人才脱颖而出,实现人力资源的合理配置,把\"合适的人放在合适的地方\"。', '', '0', '2028-01-01 00:00:00', 'MS', '火星猿', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('52', '1', '响应式Web设计的9项基本原则', '65', '/61/65\\52.html', '

响应式web设计对于解决多类型屏幕问题来说是个不错方案,但从印刷的角度来看,其却存在着很多的困难。没有固定的页面尺寸、没有毫米或英寸,没有任何物 理限制,让人感到无从下手。随着建立网站可用的各种小工具越来越多,像素设计局限于桌面和移动端也已经成为历史。因此,现在就让我们来说明一下如何运用响 应式web设计的各项基本原则来实现,而不是抗拒流畅的网页体验。为了简单起见,我们将着重讲布局

', '', '响应式web设计对于解决多类型屏幕问题来说是个', '[{\"path\":\"/upload/article/1/1458980355125.png\"}]', '0', '2028-01-01 00:00:00', '来自火星的程序猿', 'MS', '0', 'f,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('53', '1', '导航设计模式的重要意义', '65', '/61/65\\53.html', '

Gmai就 是单页应用的一个很好的例子,其将多项操作融入了一个单独的“页面”中。单页设计的趋势是这一UI模式中相对不太高端的一种实现方式,在这一设计模式下, 所有内容均可通过同一页面访问。这一模式可以让浏览变得更快、响应更迅速,从而让桌面与web应用之间的界限不再如此分明。

 

对于Spotify等web应用,考虑到用户有时会在背景播放音乐的同时浏览其他音乐,这时单页应用模式的重要性就愈发凸显,通过使用单页应用,用户就无需对页面进行重新加载,也不会造成音乐停止播放。

在 使用单页应用时需要考虑的一个问题就是URL结构。由于内容使用JavaScript动态加载,URL会失去作用,如果设计不当,还会造成无法访问特定视 图。Gmail和Twitter等应用通过为每个视图生成专门的URL来克服这一问题,这一方法还能够解决浏览器后退按钮失效的问题。



', '', 'Gmai 就 是单页应用的一个很好的例子,其将多项', '[{\"path\":\"/upload/article/1/1458981328236.jpeg\"}]', '0', '2028-01-01 00:00:00', '来自火星的程序猿', 'MS', '0', 'c,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('54', '1', '如何进行可用性启发式评估', '67', '/61/67\\54.html', '

用 户体验只有在渗透入从创意到开发测试等产品开发的各个阶段时才能发挥最佳效果。当通常来说事情没这么简单,用户体验专家需要反复对已经完成的产品进行优化 才能使其达到我们口中所说的“用户友好”水平。但是,亡羊补牢,为时未晚。对现有网站进行用户体验优化也有自己的好处和缺点。好处是你可以获得更多真实用 户数据和统计信息方便进行用户调研,但另一方面,也会遇到很多变革的阻力,特别是在你要换掉用户“心爱的宝贝”的时候。

作为用户体验专家,你可以自由选择调研的方法,甚至可以使用超越传统工具的方法,但是今天,我想回归简单,谈一谈启发式评估方法。



', '', '用 户体验只有在渗透入从创意到开发测试等产品', '[{\"path\":\"/upload/article/1/1458981122379.png\"}]', '0', '2028-01-01 00:00:00', '来自火星的程序猿', 'MS', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('55', '1', '响应式Web设计的9项基本原则', '67', '/61/67\\55.html', '

想象一下走进一个狭小拥挤,遍地垃圾的商店。店员不停怂恿你买自己不想要的东西。在这种情况下,你肯定会马上转身离开去别家。如果有人给你压力,逼迫你在充满敌意的环境下快速做出抉择,你会自然而然的失去信任感。这一点也适用于网络。

网上充满着向你推销各种服务和产品的人。用户要先信任你,才能考虑从你那购买产品或服务。下面列出了10个比较流行的让用户相信、信任你登陆页面的方法。你可以借鉴或者干脆照搬这些方法为你的网上业务建立起值得信赖的网站。

1.快速表现价值


每个来到你登陆页面的用户都会问同一个问题:你能给我带来什么好处?你需要让他们立刻看到你所能提供的价值。使用显眼的标题说明你所能提供的内容,以及你 与竞争对手的不同之处在哪。但是不要太过于强调你自己和你的公司,否则可能会让用户反感而离开。应当着重强调你如何满足用户的需求。

', '', '想象一下走进一个狭小拥挤,遍地垃圾的商店。店', '[{\"path\":\"/upload/article/1/1458981072779.jpg\"}]', '0', '2028-01-01 00:00:00', '来自火星的程序猿', 'MS', '0', 'h,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('56', '1', '原生App切图的那些事儿', '66', '/61/66\\56.html', '

最小的分辨率是320x480,我们把这个尺寸定为基准界面尺寸(baseline),基准尺寸所用的图标定为1倍图(1x)。


在 实际设计过程中,为了降低设计成本,一般拿设备最高的分辨率作为设计稿的原始尺寸,拿iphone来说就是iphone5或5s的640x1136啦,当 然也可以用iphone4或4s的640x960,因为宽度都是640px,他们切图的标准是一样的。显然,以1倍图的基准尺寸(宽320px)为相对的 参考依据,宽640px的设计稿,以原始尺寸切出来的图标称为2倍图(2x)。

 

有人可能会问:为什么不拿320px作为设计稿的原始尺寸呢?因为1倍图放大成为2倍图远比2倍图缩小成1倍图来得模糊!

 

于是,在不考虑iphone6和iphone 6 plus的情况下,为了适配iphone,每个图标需要切两份。

 

Android - 更为繁多的界面尺寸


Android开源自由的代价就是设备规范的不可控,市面上充斥着各种品牌的android手机,有着各种各样的尺寸和分辨率,为了适配各种不同分辨率的设备,同一个图标需要切成N份,每一份对应一个尺寸。

 

另外需要注意的是,Android里面开发用的尺寸单位是dp或sp(dp为元素表现尺寸,sp为字体尺寸)而不是iphone中的px。。。



', '', '最小的分辨率是320x480,我们把这个尺寸定为基', '[{\"path\":\"/upload/article/1/1458981027610.png\"}]', '0', '2028-01-01 00:00:00', '来自火星的程序猿', 'MS', '0', '', '1', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('57', '1', '11个小妙招激发你的灵感', '65', '/61/65\\57.html', '

感到自己深陷千篇一律的设计泥潭无法自拔?

Stylorouge的Rob O’Connor为你送上下面几条建议帮助你解放自己的想象力。

找不到设计灵感?项目在眼前却不知道如何着手或者找不到合适的入手角度?挣扎着想克服阻拦创意的屏障?

别着急,哪怕是最优秀的设计师也会碰上这些问题。你只需要找到方法让大脑重回战斗状态,创意就会源源不断滚滚而来。下面,我们为你整理了一系列能帮助你有效进行头脑风暴的小建议,另外还有五个绝妙的应用协助你捋清头脑风暴的流程。



', '', '感到自己深陷千篇一律的设计泥潭无法自拔? Sty', '[{\"path\":\"/upload/article/1/1458980990018.jpeg\"}]', '0', '2028-01-01 00:00:00', '来自火星的程序猿', 'MS', '0', 'p,h,', '1', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('58', '1', '5项提高产品设计的交互模式', '65', '/61/65\\58.html', '

在这个简短的移动端设计模式系列文章的前几篇中,我为大家介绍了几个能够解决开发期间所产生问题的常见设计模式,大家也学到了什么是设计模式,其基本组成 部分有什么,使用它们解决问题的最佳方法都有哪些,以及表单、图片集架构、搜索功能和交互建议等各种问题。另外,大家应该还了解了避免
作为本系列的终篇,我将为大家概括性地介绍5种流行移动应用中常见的界面设计模式以供大家在自己的项目中参考。这些设计模式有助于大家提高设计的可用性,让界面变得更加直观。文章将侧重介绍能够帮助大家进行下列各方面设计的模式:
· 社交分享
· 通知
· 弹窗
· 内容更新
· 用户互动(滑动、点击等)


', '', '在这个简短的移动端设计模式系列文章的前几篇中', '[{\"path\":\"/upload/article/1/1458980956132.jpeg\"}]', '0', '2028-01-01 00:00:00', '来自火星的程序猿', 'MS', '0', '', '1', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('59', '1', '在网页设计中运用柔和色调', '65', '/61/65\\59.html', '

网页中的柔和色调的使用,不止是近来的趋势,这是一项设计师使用多年的技巧,用来创造有冲击力的视觉效果。


当你听到“柔和”一词,想到的可能是淡粉色、淡蓝色、淡黄色,不过这种配色远不止这些颜色。柔和并不一定要感觉像新生儿一样。通过某些适当的方式,配合其他元素,这些色调也可以相当鲜明。


下面我们从优秀的案例网站出发,了解10种在网页设计中运用柔和色调的方法。



', '', '网页中的柔和色调的使用,不止是近来的趋势,这', '[{\"path\":\"/upload/article/1/1458980935362.jpg\"}]', '0', '2028-01-01 00:00:00', '来自火星的程序猿', 'MS', '0', '', '1', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('60', '1', '细数那些精彩纷呈的引导页', '65', '/61/65\\60.html', '

随着苹果ios8的发布,可以看到App store货架上,众多主流App迫不及待地向人们展示产品视频预览,接下去会是被设计师、市场宣传相继关注的焦点,产品宣传的下一轮引爆点。作为能在 App store上先发触达地形成前期推广的视频预览,又会否影响到App安装完毕后的引导页呈现?我们不得而知。鉴于两者形式的展现,间隔于安装App前后, 多少会规避重复性。不管怎样,趁着手机App和扁平风热潮,一起来细数归纳下对手机引导页的所见所想。 早期我们会见到比较多成熟的PC软件或者网页产品的产品安装包或新特性指引页。近几年在移动端平台上兴起了各种门类,形式精彩纷呈的引导页。

', '', '随着苹果ios8的发布,可以看到App store货架上', '[{\"path\":\"/upload/article/1/1458980789639.png\"}]', '0', '2028-01-01 00:00:00', '来自火星的程序猿', 'MS', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('61', '1', '从摄影的角度看设计', '65', '/61/65\\61.html', '

一幅好照片要把观众的注意力吸引到趣味中心&mdash;&mdash;被摄主体上。无论是拍什么 类型的照片,都会有一个主体你喜欢拍人物,拍生态,这些都不是问题,但是一旦主体被模糊,欣赏照片时就会忽略照片的主体,这样的照片是不失败不完美的,因 为真正想让观众看的东西并没有一眼看到。例如婚纱照,主体肯定是人物新娘和新郎。如果目光都被新娘后面的景色吸引,而不是新娘,这肯定不会是我们想照的。

 

     网页设计师的重要任务不是根据内容做出网页,而是根据用户需求设计出让用户喜欢并积极使用的网页,能够让用户知道并去使用网站的新产品or关键点 or有价值的信息,那么如何突出这些点?如何让用户看到网页的&ldquo;G点&rdquo;,有让用户点击或者传播的欲望?突出设计 的重点就如同突出摄影的被摄主体一样,把控视觉的重点,你的设计一定会非常精彩。

 

     下面我将通过几种突出被摄重点的摄影方法来诠释设计与摄影的微妙关系。

 



', '', '一幅好照片要把观众的注意力吸引到趣味中心mdas', '[{\"path\":\"/upload/article/1/1458980625909.jpg\"}]', '0', '2028-01-01 00:00:00', '来自火星的程序猿', 'MS', '0', '', '1', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('62', '1', '国内java开源商城系统', '65', '/61/65\\62.html', '

MCMS(http://ms.mingsoft.net)是企业创立初期很好的基础框架,不仅可以实现和现有系统的对接而且有大量的插件模版可以使用。

MS平台开发团队承诺MCMS内容管理系统永久完整开源免费(这真是极好的)!下面就简单的给大家介绍一下MS平台和MCMS为什么如此之快。

MS平台是铭飞团队经过三年的研发,最终以MCMS为基础,集商城、论坛、分期、会员、支付、积分、微信等系统于一体的插件式系统。并实现了淘宝、京东、苏宁、国美等第三方电商平台数据接口的统一。平台中的小插件如:邮件推送、短信接口、定时任务、促销活动、数据采集等非常丰富。

MCMS的模版采用标签式开发,上手非常快。

对于技术小白来说不仅避开了学习复杂的高级开发语言,而且MStore有大量成熟的模版直接下载之后换换图片和内容就可以使用,要是需要调整只需要写简单的标签就可以。

对于前端工程师来说只需要写好页面样式并在页面内容部分套上标签,就可以做出一套优美的动态网站。并且还可以实现留言板、用户登录等数据交互功能。

MStore主页:

对于学习JAVA开发的工程师来说这无疑是最好的学习项目,并且最大的优势在于整个系统的结构非常清晰,使用的都是当下JAVA最常用最热门的技术,由于MCMS是全部开源并且作为MS的技术架构在使用这也就说明在学习MCMS的同时也学会了相应的框架使用方法。

MCMS结构图解:


MCMS的群站解决方案和模块式的开发架构,让我们管理项目非常方便。不仅很好的解决了因为项目过多而导致的管理紊乱现象,而且还在一定程度上使服务器的资源得到最大化的利用,也避免同时维护多套系统的繁杂。由于是纯JAVA系统这里安全性完全可以放心。

由于MS平台采用的是模块和插件式的开发,这又进一步从代码层面上提升了我们维护简便性和针对性,而不是像传统项目那样需要维护整套代码。比如:短信插件出问题了那么我们只需要单独的去维护端短信插件即可,其他插件模块不会因为短信插件在维护而受到影响。

MS平台采用模块式开发,严格的说MCMS只是属于MS平台中的一个基础模块。这给定向业务和第三方平台的接入提供了很好的结构支持,从另一个角度来说MCMS严格的遵循了开闭原则,是支持无限拓展的。并且每一次拓展都不会伤害到原有的代码。不仅从结构上保障了系统的开发速度而且不会因为系统的升级或者是插件影响到系统的稳定性。

同时MCMS将底层复杂的前端代码和第三方接口以及JDK中常用的方法做了很完善的二次封装,从代码角度来讲也大大的节省的开发时间。做到了真正的让代码飞起来!而且更为难得的是这些封装都具有极强规律性,和易用性这里简单的给大家举几个例子:

封装的freemarker


封装表单


封装的上传图片插件


封装的分页


MS平台中有大量的插件和模版可以使用资源非常丰富,目前已经发布或者计划发布的官方模版有八套,开发者提交并且还在审核中的有162套,并且还在以每天10套左右的速度增加。目前已经发布或者准备发布的官方插件有:BBS(论坛),商城,微信,分期,短信,淘宝,支付等由于数量众多这里就不一一列举。开发者提交的有短信模版插件、邮件模版插件、淘宝开放平台插件等其中大部分还在审核阶段。

MS平台的资源之所以如此丰富插件和模块。一方面除了系统从结构上支持无缝对接之外,MS平台还拥有一大批优质的开发者。开发者在平台提交优质插件之后定价权在自己手中,这又从另外一个角度上大大刺激了海量优质插件的诞生。


', '', 'MCMS(http://ms.mingsoft.net)是企业创立初期很好的基础框架,不仅可以实现和现有系统的对接而且有大量的插件模版可以使用。', '[{\"path\":\"/upload/article/1/1458980449738.jpeg\"}]', '0', '2028-01-01 00:00:00', '来自火星的程序猿', 'MS', '0', '', '1', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('63', '1', '国内java开源 cms系统', '65', '/61/65\\63.html', '

MCMS(http://ms.mingsoft.net)是企业创立初期很好的基础框架,不仅可以实现和现有系统的对接而且有大量的插件模版可以使用。

MS平台开发团队承诺MCMS内容管理系统永久完整开源免费(这真是极好的)!下面就简单的给大家介绍一下MS平台和MCMS为什么如此之快。

MS平台是铭飞团队经过多年的研发,最终以MCMS为基础,集商城、论坛、分期、会员、支付、积分、微信等系统于一体的插件式系统。并实现了淘宝、京东、苏宁、国美等第三方电商平台数据接口的统一。平台中的小插件如:邮件推送、短信接口、定时任务、促销活动、数据采集等非常丰富。

MCMS的模版采用标签式开发,上手非常快。

对于技术小白来说不仅避开了学习复杂的高级开发语言,而且MStore有大量成熟的模版直接下载之后换换图片和内容就可以使用,要是需要调整只需要写简单的标签就可以。

对于前端工程师来说只需要写好页面样式并在页面内容部分套上标签,就可以做出一套优美的动态网站。并且还可以实现留言板、用户登录等数据交互功能。

MStroe主页:


', '', 'MCMS(http://ms.mingsoft.net)是企业创立初期很好的基础框架,不仅可以实现和现有系统的对接而且有大量的插件模版可以使用。', '[{\"path\":\"/upload/article/1/1458980395756.jpg\"}]', '0', '2028-01-01 00:00:00', '来自火星的程序猿', 'MS', '0', 'h,', '1', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('70', '1', '2015年 铭飞MCms获得最热门开源项目第40位', '69', '/59/69\\70.html', '

自 Git@OSC 上线以来受到广大开源作者的喜爱。值此新年之际,开源中国整理出 Git@OSC 最热门开源项目 Top50,对 Git@OSC 的发展至今所取得的成绩进行总结。此榜单主要通过开源项目的 Watch、Star、Fork 数量来评定,项目类型不尽相同,难免有纰漏,如有遗漏或者不妥之处,希望大家批评指正。若您对 Git@OSC 未来的发展有何意见或者建议,也欢迎在评论区留言告诉我们。

下面是项目列表:

1、JFinal

项 目简介:JFinal 是基于 Java 语言的极速 WEB + ORM 框架,其核心设计目标是开发迅速、代码量少、学习简单、功能强大、轻量级、易扩展、Restful。在拥有Java语言所有优势的同时再拥有ruby、 python、php等动态语言的开发效率!为您节约更多时间,去陪恋人、家人和朋友 :)

2、jeewx

项目简介:免费开源JAVA微信管家平台,实现了微信平台的基础功能,便于用户二次开发。JEEWX支持微信第三方平台全网发布、支持微信插件开发机制,可轻松集成微信H5插件。

3、tiny

项目简介:值得拥有的企业级j2ee应用开发框架套件,专业团队开发,完整的生态体系,活跃的社区氛围,无限的水平扩展能力,7*24不间断运维能力。

4、CMS

一款使用Java语言开发的CMS,使用了Spring MVC,Spring,MyBatis等流行框架,提供首页大图管理、目录管理、文章管理和管理员管理等功能。是学习和二次开发的首选。

5、jeecg

项 目推荐:JEECG是一款J2EE企业级快速智能开发平台,开源界“小普元”超越传统商业企业级开发平台。基于代码生成器,引领新的开发模式 (Online Coding模式(自定义表单)->代码生成器模式->手工MERGE智能开发), 可以帮助解决Java项目60%的重复工作,让开发更多关注业务逻辑。既能快速提高开发效率,帮助公司节省人力成本,同时又不失灵活性。

6、Mybatis_PageHelper

项目简介:Mybatis_PageHelper 是 Mybatis 分页插件,支持任何复杂的单表、多表分页。

7、JeeSite

项目简介:JeeSite 是一个企业信息化开发基础平台,Java EE(J2EE)快速开发框架,使用经典技术组合(Spring、Spring MVC、Apache Shiro、MyBatis、Bootstrap UI),包括核心模块如:组织机构、角色用户、权限授权、数据权限、内容管理、工作流等。

8、LigerUI

项目简介:基于jQuery的UI框架,包括表单、布局、表格等等常用UI控件,使用LigerUI可以快速轻松地创建风格统一的界面效果。

9、CrossApp

项目简介:一款完全开源、免费、跨平台的移动应用开发引擎,开发者可以完全免费、毫无顾虑的使用CrossApp开发任何项目。本引擎基于C++语言编写,OpenGl ES2.0图形渲染。拥有丰富的UI控件、丰富的第三方库、集成各种系统接口。

10、thinkphp

项目简介:ThinkPHP 是一个免费开源的,快速、简单的面向对象的 轻量级PHP开发框架 ,创立于2006年初,遵循Apache2开源协议发布,是为了敏捷WEB应用开发和简化企业应用开发而诞生的。ThinkPHP从诞生以来一直秉承简洁 实用的设计原则,在保持出色的性能和至简的代码的同时,也注重易用性。

11、KJFrameForAndroid

项目简介:KJFrameForAndroid的设计思想是通过封装Android原生SDK中复杂的复杂操作而达到简化Android应用级开发,最终实现快速而又安全高效的开发APP。我们的目标是用最少的代码,完成最多的操作,用最高的效率,完成最复杂的功能。

12、zbus

项目简介:ZBUS=MQ+RPC+PROXY 服务总线  1)支持消息队列, 发布订阅, RPC, 代理(TCP/DMZ)   2)亿级消息堆积能力、支持HA高可用  3)无依赖单个Jar包 ~300K   4)丰富的API--JAVA/C/C++/C#/Python/Node.JS多语言接入,支持HTTP/Thrift等协议接入

13、ECP

项目简介:ECP  是基于jfinal、avalon、bootstrap、jqGrid、snaker工作流开发的客户关系及进销存财务系统。支持多企业使用。

14、jfinal-weixin

项目简介:JFinal Weixin 是基于 JFinal 的微信公众号极速开发 SDK,只需浏览 Demo 代码即可进行极速开发,自 JFinal Weixin 1.2 版本开始已添加对多公众号支持。

15、cim

项目简介:基于apache  mina 的 java即时通讯服务端。与android 客户端完美结合,同时支持其他语言(ios,c,ActionScript,.net等)客户端的即时通信。

16、webmagic

项目简介:webmagic的是一个无须配置、便于二次开发的爬虫框架,它提供简单灵活的API,只需少量代码即可实现一个爬虫。

17、Mapper

项目简介:极其方便的使用Mybatis单表的增删改查。通用Mapper都可以极大的方便开发人员。可以随意的按照自己的需要选择通用方法,还可以很方便的开发自己的通用方法。

18、smart-framework

项目简介:轻量级 Java Web 开发框架,内置 IOC、AOP、ORM、DAO、MVC 等特性,基于 Servlet 3.0 规范,使用 Java 注解取代 XML 配置。

19、git-quick-start

项目简介:这是一个git的快速入门项目,使用一些gif图片来播放一些基础的git命令使用方法。

20、EasyPR

项目简介:EasyPR是一个中文的开源车牌识别系统,其目标是成为一个简单、高效、准确的车牌识别引擎。 相比于其他的车牌识别系统,EasyPR有如下特点: * 它基于openCV这个开源库。这意味着你可以获取全部源代码,并且移植到java等平台。

21、docker-training

项目简介:此次课程是:希云cSphere免费为国内docker爱好者进行docker培训。希云cSphere致力于为企业提供专业的docker管理平台,和paas平台!

22、fastjson

项目简介:fastjson 是一个性能很好的 Java 语言实现的 JSON 解析器和生成器,来自阿里巴巴的工程师开发。

23、springrain

项目简介:springrain是spring的极简封装,spring一站式开发的范例。

24、easypoi

项目简介:POI 工具类,Excel的快速导入导出,Excel模板导出,Word模板导出,可以仅仅5行代码就可以完成Excel的导入导出,修改导出格式简单粗暴,快速有效,easypoi值得你尝试。

25、s2jh

项目简介:基于SSH的企业Web应用开发框架。集结最新主流时尚开源技术的面向企业级Web应用的基础开发框架,提供一个J2EE相关主流开源技术架构整合及一些企业应用基础通用功能和组件的设计实现的最佳实践和原型参考。

26、eova

项目简介:J2EE快速开发平台,master 为最新代码,稳定版->请下载最新的Tag版本,Eova仅兼容webkit 内核浏览器,IE和火狐是不兼容的,推荐使用谷歌浏览器。

27、zentaopms

项目简介:禅道是第一款国产的开源项目管理软件。它集产品管理、项目管理、质量管理、文档管理、组织管理和事务管理于一体,是一款专业的研发项目管理软件,完整地覆 盖了项目管理的核心流程。注重实效,合软件架构合理,操作简洁高效,扩展灵活,多语言支持,多风格支持,搜索功能,统计功能——这一切,您通过禅道,都可 以拥有!

28、DotNetCodes

项目简介:一些常用的功能性代码,可以减少许多开发时间,而且类与类之间没有什么依赖,每个类都可以单独拿出来使用。

29、B-JUI

项目简介:B-JUI(Best jQuery UI) 前端框架,轻松开发,专注您的业务,从B-JUI开始。

30、DuxCms 2.0

项目简介:DUXCMS是一款针对于中小网站与二次开发平台的一款管理系统,基于canphp3框架,后台采用拼图UI,更加利于多平台使用于开发者快速开发。开发版基于正式版进行的部分优化于实验性功能,不建议作为正式建站使用。

31、Cynthia

项目简介:Cynthia提供了一个基于Web的、开源的、跨平台的软件项目管理和问题管理的解决方案。通过极大的灵活度,实现了特殊性和普遍性的统一。 它提供了强大的自定义配置功能,用户能够根据自己的实际情况配置问题的流转和数据模板,它同时内置了强大的Cache模块提高数据的访问效率。

32、anycmd

项目简介:一个完全开源的,完整支持rbac的,将会支持xacml、javascript的通用的权限框架、引擎、中间件、解决方案。

33、OpenCenter

项目简介:基于Apache2.0 开源通用 用户及后台管理框架,提供了注册登录、头像裁剪、单点登录、权限管理、扩展资料管理、等级头衔、自定义积分管理、用户行为日志机制、模块装卸、插件机制,提供建议的安装程序。

34、PhalApi

项目简介:PHP轻量级开源接口框架,专注于后台接口的快速开发。在移动互联网时代的这十年,希望此框架能对各接口开发有实际的帮助,欢迎使用!我们致力于将PhalApi维护成像恒星一样:不断更新,保持生气;为接口负责,为开源负责!

35、zftlive

项目简介:这是一个集成目前Android主流优秀第三方组件、优秀好用的自定义控件、实用工具类封装、以及一些APP共通模块(比如:版本更新、意见反馈、引导界面等等)的开发包,帮助程序员快速开发自己的APP。

36、commonrpc

项 目简介:还在羡慕BAT等公司的大流量的架构吗?让你的java系统引用解耦,互相独立,commonrpc 就可以办到。commonrpc 是一个以netty 传输协议框架为基础, 自定义 spring shcema标签的rpc框架,不侵入任何业务代码,插件模式,即插即用;一个高性能分布式rpc框架,支持tcp,http协议,扩展性强。

37、Dos.ORM

项目简介:Dos.ORM(原Hxj.Data)于2009年发布,并发布实体生成工具。在开发过程参考了多个ORM框架,特别是NBear,MySoft、EF、Dapper等。吸取了他们的一些精华,加入自己的新思想。该组件已在上百个成熟企业项目中应用。

38、PSI

项目简介:PSI是开源进销存系统。PSI是希腊字母Ψ的读音。产品寓意:PSI本身不完美,但追求的是不断改进的品质,距离终极产品就一步之遥(因为在希腊字母表中,Ψ之后是Ω,Ω有终极的意思)。

39、JECP

项目简介:

JECP 集合了easyui +jfinal +druid+freemarker,非常方便开发。目前只完成了系统管理模块,属于开发整合。具体功能本人时间不多,未能实现。工作流采用的是activiti,目前已在另外的项目中采用。等应用成熟后会后续添加到JECP中。

40、MCMS

项目简介:免费开源铭飞MCMS系统完整J2EE代码,提供商城、微信、论坛等更多丰富插件,每月28更新新版本。快的不像JAVA系统。

41、WeX5

项目简介:WeX5是跨端移动快速开发框架;只需一次开发,即可发布、运行于各种前端平台上;支持iOS ipa、android apk、微信服务号/企业号应用、web app和其他轻应用的快速开发。

42、QQLikeUI

项目简介:Qt实现的高仿QQ6.x UI,登录窗体与主窗体已经部分实现,窗体目前还不能自由改变大小,但是可以随意拖动。

43、ThinkCMFX

项目简介:ThinkCMF 是一款高速PHP内容管理框架,扩展性良好可高程度的提高开发者的开发效率,节省开发成本。

44、jeewx-api

项目简介:现在微信越来越火,基于微信的公众号和服务号越来越丰富,虽然微信帮助文档已经提供了相关的接口,但是接口比较多,通过代码自己调用比较麻烦,所以为减轻开发者独自创造轮子,将微信API进行了统一封装!

45、jfinalbbs

项目简介:使用PHP开发的论坛遍地都是,但使用JAVA来开发社区基本上没有,朋也使用JFinal框架开发了一个属于JAVA语言的社区软件,在这开源供大家借鉴使用,大神勿喷。

46、openerp-china

项目简介:OpenERP中国版,降低OpenERP中国社区项目的参与门槛。

47、manual_dota

项目简介:《刀塔传奇》开源项目,服务器+客户端,蛮牛主办深圳玩贝科技组织。

48、examxx

项目简介:Exam++是国内首款基于JAVA与MYSQL开发的网络考试系统。它可以稳定、顺畅的运行在Windows与Linux平台上。您可以通过它快捷方便的创建试题和题库,发布试卷,组织考试,系统自动批改。

49、webbase

项目简介:务系统框架,包括员工管理,组织机构,请假出差申请,流程审批,信息汇总,excel导出等基础功能。

50、HeartBeat

项目简介:心跳检测各类应用服务器(如Tomcat,Jetty),WEB服务器(如 Apache,Nginx) 的JAVA WEB应用程序。


', '', '自 Git@OSC 上线以来受到广大开源作者的喜爱。值此新年之际,开源中国整理出 Git@OSC 最热门开源项目 Top50,对 Git@OSC 的发展至今所取得的成绩进行总结。此榜单主要通过开源项目的 Watch、Star、Fork 数量来评定', '[{\"path\":\"/upload/article/1/1461384072200.jpeg\"}]', '0', '2028-01-01 00:00:00', '来自火星的程序猿', 'MS', '0', 'c,', '1', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('71', '1', '国内java开源 cms系统', '68', '/59/68\\71.html', '

MCMS(http://ms.mingsoft.net)是企业创立初期很好的基础框架,不仅可以实现和现有系统的对接而且有大量的插件模版可以使用。

MS平台开发团队承诺MCMS内容管理系统永久完整开源免费(这真是极好的)!下面就简单的给大家介绍一下MS平台和MCMS为什么如此之快。

MS平台是铭飞团队经过多年的研发,最终以MCMS为基础,集商城、论坛、分期、会员、支付、积分、微信等系统于一体的插件式系统。并实现了淘宝、京东、苏宁、国美等第三方电商平台数据接口的统一。平台中的小插件如:邮件推送、短信接口、定时任务、促销活动、数据采集等非常丰富。

MCMS的模版采用标签式开发,上手非常快。

对于技术小白来说不仅避开了学习复杂的高级开发语言,而且MStore有大量成熟的模版直接下载之后换换图片和内容就可以使用,要是需要调整只需要写简单的标签就可以。

对于前端工程师来说只需要写好页面样式并在页面内容部分套上标签,就可以做出一套优美的动态网站。并且还可以实现留言板、用户登录等数据交互功能。

MStroe主页:

\"1461658200683.jpg\"\"1461658233757.jpg\"\"1461658203315.png\"


', '', 'MCMS(http://ms.mingsoft.net)是企业创立初期很好的基础框架,不仅可以实现和现有系统的对接而且有大量的插件模版可以使用。', '[{\"path\":\"/upload/article/1638/1464847653084.jpeg\"}]', '0', '2028-01-01 00:00:00', '来自火星的程序猿', 'MS', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('72', '1', '2016年CMS开源系统排行榜', '68', '/59/68\\72.html', '

首先还是介绍一下什么是CMS。
CMS(Content Management System),中文叫作整站系统、文章系统。
大概2004以前,如果想进行网站内容管理,基本上都是靠手工维护,但千变万化的信息流,但没有好的程序支持,还继续靠手工完成是不可能的事。
如果有一个好的系统来支撑你的网站,那将节省大量的人力物力,开发者就可能给客户一个软件包,可以用它定期人工修改网站。
只要你配置安装好,你的编辑,在线记者,更新员只要定期更新数据,剩下的事就交给CMS去处理。

铭飞CMS(MCMS)

\"1461658172067.jpg\"

特点: 
Java领域唯一完全免费开源的系统,值得点个赞!在2015年开源中国排名第40位,铭飞cms系统也采用模块化开发,功能可扩展更方便。铭飞还提供了MStore资源平台,提供更多的模版与插件源码,这给整个系统来说增加了很多想象的空间。
免费完整开源:基于MIT协议,源代码完全开源,无商业限制,MS开发团队承诺将MCMS内容系统永久完整开源;
标签化建站:不需要专业的后台开发技能,只要使用系统提供的标签,就能轻松建设网站;
html静态化:系统支持全站静态化;
跨终端:站点同时支持PC与移动端访问,同时会自动根据访问的终端切换到对应的界面,数据由系统统一管理;
海量模版:铭飞通过MStore(MS商城)分享更多免费、精美的企业网站模版,降低建站成本;
丰富插件:为了让MCms适应更多的业务场景,在MStore用户可以下载对应的插件,如:站群插件、微信插件、商城插件等;
每月更新:铭飞团队承诺每月28日为系统升级日,分享更多好用等模版与插件;
文档丰富:为了让用户更快速的使用MCms系统进行开发,铭飞团队持续更新开发相关文档,如标签文档、使用文档、视频教程等;
评价:
算是Java领域开源的新星吧,框架的选型都很用心。对一个java程序猿来说二次开发很轻松。小编感觉铭飞并不是一个简单cms系统,从铭飞官方提供的MStore来看,系统可以实现各种业务模块,例如商城、分期系统、淘宝API、微信API等都有提供,同时也关注官方的MS平台,相信这是Java领域的福音。


', '', 'CMS(Content Management System),中文叫作整站系统、文章系统。\r\n大概2004以前,如果想进行网站内容管理,基本上都是靠手工维护,但千变万化的信息流,但没有好的程序支持,还继续靠手工完成是不可能的事。', '[{\"path\":\"/upload/article/1/1461384142045.png\"}]', '0', '2028-01-01 00:00:00', '来自火星的程序猿', 'MS', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('73', '1', '国内java开源商城系统', '68', '/59/68\\73.html', '

MCMS(http://ms.mingsoft.net)是企业创立初期很好的基础框架,不仅可以实现和现有系统的对接而且有大量的插件模版可以使用。

MS平台开发团队承诺MCMS内容管理系统永久完整开源免费(这真是极好的)!下面就简单的给大家介绍一下MS平台和MCMS为什么如此之快。

MS平台是铭飞团队经过三年的研发,最终以MCMS为基础,集商城、论坛、分期、会员、支付、积分、微信等系统于一体的插件式系统。并实现了淘宝、京东、苏宁、国美等第三方电商平台数据接口的统一。平台中的小插件如:邮件推送、短信接口、定时任务、促销活动、数据采集等非常丰富。

MCMS的模版采用标签式开发,上手非常快。

对于技术小白来说不仅避开了学习复杂的高级开发语言,而且MStore有大量成熟的模版直接下载之后换换图片和内容就可以使用,要是需要调整只需要写简单的标签就可以。

对于前端工程师来说只需要写好页面样式并在页面内容部分套上标签,就可以做出一套优美的动态网站。并且还可以实现留言板、用户登录等数据交互功能。

MStore主页:

\"1461658043545.jpg\"

对于学习JAVA开发的工程师来说这无疑是最好的学习项目,并且最大的优势在于整个系统的结构非常清晰,使用的都是当下JAVA最常用最热门的技术,由于MCMS是全部开源并且作为MS的技术架构在使用这也就说明在学习MCMS的同时也学会了相应的框架使用方法。

MCMS结构图解:

\"1461115606898073191.png\"/

MCMS的群站解决方案和模块式的开发架构,让我们管理项目非常方便。不仅很好的解决了因为项目过多而导致的管理紊乱现象,而且还在一定程度上使服务器的资源得到最大化的利用,也避免同时维护多套系统的繁杂。由于是纯JAVA系统这里安全性完全可以放心。

由于MS平台采用的是模块和插件式的开发,这又进一步从代码层面上提升了我们维护简便性和针对性,而不是像传统项目那样需要维护整套代码。比如:短信插件出问题了那么我们只需要单独的去维护端短信插件即可,其他插件模块不会因为短信插件在维护而受到影响。

MS平台采用模块式开发,严格的说MCMS只是属于MS平台中的一个基础模块。这给定向业务和第三方平台的接入提供了很好的结构支持,从另一个角度来说MCMS严格的遵循了开闭原则,是支持无限拓展的。并且每一次拓展都不会伤害到原有的代码。不仅从结构上保障了系统的开发速度而且不会因为系统的升级或者是插件影响到系统的稳定性。

同时MCMS将底层复杂的前端代码和第三方接口以及JDK中常用的方法做了很完善的二次封装,从代码角度来讲也大大的节省的开发时间。做到了真正的让代码飞起来!而且更为难得的是这些封装都具有极强规律性,和易用性这里简单的给大家举几个例子:

封装的freemarker

\"1461115607308036067.png\"/

封装表单

\"1461115607472060206.png\"/

MS平台中有大量的插件和模版可以使用资源非常丰富,目前已经发布或者计划发布的官方模版有八套,开发者提交并且还在审核中的有162套,并且还在以每天10套左右的速度增加。目前已经发布或者准备发布的官方插件有:BBS(论坛),商城,微信,分期,短信,淘宝,支付等由于数量众多这里就不一一列举。开发者提交的有短信模版插件、邮件模版插件、淘宝开放平台插件等其中大部分还在审核阶段。

MS平台的资源之所以如此丰富插件和模块。一方面除了系统从结构上支持无缝对接之外,MS平台还拥有一大批优质的开发者。开发者在平台提交优质插件之后定价权在自己手中,这又从另外一个角度上大大刺激了海量优质插件的诞生。


', '', 'MCMS(http://ms.mingsoft.net)是企业创立初期很好的基础框架,不仅可以实现和现有系统的对接而且有大量的插件模版可以使用。', '[{\"path\":\"/upload/article/1/1461384035654.png\"}]', '0', '2028-01-01 00:00:00', '来自火星的程序猿', 'MS', '0', 'h,', '2', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('74', '1', '国内java开源bbs系统', '68', '/59/68\\74.html', '

铭飞MCMS内容管理系统完整开源版J2EE代码

当前版本:5.4.2 铭飞MS官网:http://ms.mingsoft.net官网同时提供一键运行版本下载,请步移官网....

特点

免费开源:纯Java开发,MS开发团队承诺将MCMS内容系统永久完整开源;

终端统一: 铭飞MCMS支持PC与MOBILE皮肤定制,同时使用MS团队移动JS插件,轻松实现手机多屏幕适配,想想看你发布的信息第一时间在PC上展示又能在手机上展示,这是件多么幸福的事情,数据统一、平台统一、终端统一是MS团队一直在努力的方向;

扩展性:以铭飞MCMS为核心,MS官网提供第三方插件安装,最新的插件用户可以通过更新功能获得,同时MS也鼓励并支持第三方开发人员发布优质的插件;

更新升级: 铭飞MCMS提供了行业内最完美的升级方案,从此升级无需手动下载复制粘贴,一切完全由MS升级插件无缝完成;

文档手册:铭飞不断向外部公布最新文档,如二次开发手册、标签使用手册,减轻用户学习成本;

站群:MCMS支持站群,只需在服务器上架设一套铭飞MCMS就可以创建多个个网站,并且网站之间的数据是独立存在,很大程度降低了维护成本,与服务器资源的开销;

其他:html静态生成、标签式建站

技术支持:提永久升级服务技术交流群,不定期会升级系统,开发可以关注后台的更新板块;

面向对象

铭飞MCMS是企业在创立初期很好的技术基础框架,加快公司项目开发进度,当然也可以对现有的系统进行升级;

个人开发者也可以使用MCMS承接外包项目;

初学JAVA的同学可以下载源代码来进行学习交流;

开发框及语言

铭飞MCMS(铭飞内容管理系统)是一款支持不同平台、不同终端并且支持多站点的内容管理系统,

· SpringMVC4+Spring4+MyBatis3+Freemarker技术架构

· 基于java技术开发,继承其强大、稳定、安全、高效、跨平台等多方面的优点;

· 标签化建站,只要你懂html就能建站;

· 完全生成全站静态页面;

· 可自定义路径结构,全面提高页面访问速度;

有人说铭飞MCMS是全国唯一完整开源的J2EE版本系统!团队希望看到更多的优秀好用的开源系统,我们一直会努力下去!

运行环境

原则上支持全系列JAVA运行环境;

WEB服务器:Weblogic、Tomcat、WebSphere、JBoss 等

数据库服务器:Mysql等

操作系统:Windows、Linux、Unix 等

开发环境

建议开发者使用一下环境,这样避免版本带来的冲突

IDE:eclipse、MyEclise

DB:Mysql5.5

JDK:JAVA 7、J2EE6

重要文件说明

数据库连接文件: config.properties

数据库文件:doc/db-mcms-open.sql

数据库编码:UTF-8

模板文件:templets/1549/mooc

后台访问路径:

http://+ip地址(或localhost)+tomcat端口+项目发布名/ms/login.do

如果出现无法访问的情况输入

http://+ip地址(或localhost)+tomcat端口+项目发布名/initApp进行初始化

账号:msopen

密码:msopen

代码部署与常见问题

铭飞MS官方开发社区文档 http://ms.mingsoft.net/mbbs/12998/detail.do

系统美图

\"1461657686925.jpg\"


', '', '当前版本:5.4.2 铭飞MS官网:http://ms.mingsoft.net官网同时提供一键运行版本下载,请步移官网....', '[{\"path\":\"/upload/article/1/1461383961935.png\"}]', '0', '2028-01-01 00:00:00', '来自火星的程序猿', 'MS', '0', '', '1', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('112', '1', '新科科技', '87', '/61/87\\112.html', '

主营品牌车型:奔驰、宝马、奥迪、路虎、保时捷、宾利、劳斯莱斯、北京现代、上海大众斯柯达、东风标致、东风悦达起亚、东风雪铁龙、东风本田雪弗兰、上海大众、进口大众、道奇、吉普、雷诺、别克、马自达、中华、福特、海南马自达等各种中高档进口和国产轿车。在汽车销售行业里有着较高的知名度和良好的信誉。

经营业务:除了销售各种品牌车外,还经营汽车保险、汽车装潢、汽车按揭、二手车评估、二手车收购、二手车置换,并免费为您提供上牌等一条龙服务。

 

郑重承诺:保证您从我公司购买的车是全市场上最低的价格,让您购的放心, 我公司所售车辆均为各品牌4S店的车,选车、交钱、提车、开发票、售后保养,一切的一切都在4S店办理,我们就相当于是4S店的跑量销售员(批发价)。 说白了,就是您在4S店买车我们帮您还价。 您在我公司定了车以后,我们会安排4S店的销售员和你联系。

经营宗旨:减少成本和跑量给消费者带来最大的实惠!金杯银杯不如客户的口碑!只要您买过就会介绍朋友来买!

宝诚导购流程:我公司为了让大家更放心的购买汽车,现进行经营模式调整,较以前更加灵活、更加方便、更具备人性化。如果有客户觉得我们的价格比较实惠,但又担心车的来源,在这种情况下,我公司对有顾虑的客户,我们帮您排除这个疑虑。在我们公司签定车合同后,我们安排4S店销售员和您联系,办理所有相关手续。具体导购流程如下:

第一步:您可以先到您所需品牌的任何一家4S店看车,选车,然后决定要什么车型。

第二步:决定好所需车型,在某品牌4S店进行砍价,和销售员谈个最低价,但切忌不要交定金。

第三步:拨打我们公司电话,告诉我们您需要的车型和颜色,以及哪家4S店。和我们谈好您觉得的满意的价格,我们觉得有钱可赚(少赚点没关系,不亏就行),意见达成一致。

第四步:直接到我们公司签定车合同并交付定金。
第五步:我公司安排销售人员陪同客户去4S店提车并办理相关手续。


', '', '在网上寻觅了很久很久。终于找到了这里。晃眼一看,好多漂亮的模板。下载了几个都很好用。希望越做越好,多提供些精品资源!找了好久啊,一直想有一个这样的网站,找来找去,老感觉么有合适的。偶然间来到这儿,爽。找到啦!对于网站建设新手来说,是一个最好的平台,你可以随心找到你最喜欢的网站模板,做出你喜欢的网站。\r\n专业提供网站模板,网页模板,模板教程,网页制作,程序插件,网站素材等建站资源,我们致为于打造优秀的建站资源共享平台! ', '[{\"path\":\"/upload/article/1/1459305011132.png\"}]', '0', '2028-01-01 00:00:00', '公关前台', '', '0', 'h,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('113', '1', '联娱公司', '87', '/61/87\\113.html', '

 1、特色服务

1.1 提供专业的危险品一条龙服务,从专业的危险品取样,代做报告(化工报告和商检报告危包证),及提供报关单证,报关,申报,交接危险品货物,至货物安全的到达目的港,全方位的D/D TO D/D 服务;

1.2 东航,国泰,阿联酋,汉莎4GV包装使用备案免检企业,可采用4GV作为货物外包装,免于检验;

1.3 能够协助客户用MSDS 来代替化工报告的业务。

 

2、 常规服务

2.1 订舱:快捷、顺畅、全面快捷

便捷多样的订舱渠道(EK,MU,CX,LH,KL,AF,FM,CA等)顺畅:熟悉各航空公司危险品订舱要求及操作流程。全面:承接全球各航空公司航线化工品、危险品运输

2.2 仓库 运输

提供全方位专业的打托、包装、唛头、标签及更换外包装等服务;公司自备各类具有危险品资质的车辆,满足客户上门提货的需求。

2.3 报关、报检

代办空运危险品的报关报检,上海化工院鉴定,IMI鉴定证书,代做危包证等服务。

2.4 货物查询

E-SERVICE:自助式网上查询系统,方便客户跟踪、查询货物状态。

 

3、 实力资质

3.1 专业人员

资深的客户服务人员、订舱操作人员、危险品货物交接人员,拥有丰富的化工品、危险品专业知识和具有良好的沟通能力,熟悉各航空公司对危险品的操作流程。

3.2 完善系统

专业的流程化订舱体系ERP操作系统,从接单、订舱、货物包装商检、报关交接等一系列货物运输环节,R-Q HSE安全控制体系,监控并确保货物安全规范运输。

3.3 资质及设施

中国外经贸部批准的一级货运代理证书,中国航空运输协会批准颁发的一级货运代理证书,中国货代百强企业;

操作人员拥有中国航协ITAT 颁发的危险品操作人员证书和DGM 及浦东机场货栈颁发的危险品资质证书;

在机场内拥有6000平方米的普通仓库,4000 平方米的专业危险品仓库,齐备叉车,打包机等专业的仓储设备,120辆专用危险品运输车辆为客户提供专业、安全、便捷、快速的仓储及配送服务。


', '', '找模板找了很久了,于是找到了,觉的这里的模板很不错,下载了两套试试,果然可以用。于是充值了,希望站长以后多多指点啊!站长很友好,为我们这些新手站长提供这么多的模版。大家一起交流,才能成长得更快吧!感谢,感谢网友,你们辛苦了!对于网站建设新手来说,是一个最好的平台,你可以随心找到你最喜欢的网站模板,做出你喜欢的网站。专业提供网站模板,网页模板,模板教程,网页制作,程序插件,网站素材等建站资源,我们致为于打造优秀的建站资源共享平台! ', '[{\"path\":\"/upload/article/1/1459305021450.png\"}]', '0', '2028-01-01 00:00:00', '总经理', '', '0', 'c,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('130', '1', '关于我们', '93', '/93\\130.html', '

广州城市规划设计有限公司是中欧国际旅游规划设计研究院(Sino-Europe Academy of Tourism Planning and Design)旗下之专业机构,公司专注于城市规划、旅游规划设计与商业综合体设计,构建了从规划设计、品牌营销、资本运作到管理咨询等全产品链集成一体化服务,提供从总体策划、建筑景观设计、资源引进、战略实施、平台搭建到运营管理等全程、专业化解决方案。


广州规划设计以“产业联动、搭建平台、金融孵化”为经营哲学,推动旅游业与民俗艺术、饮食、地产、绿色农业及金融业的融合发展,同时依托中欧国际旅游规划设计研究院的学术背景与国际资源,搭建行业交互平台,提供切合旅游企业需要的一揽子专业协同服务。

广州规划设计秉持“文化开发与生态保护相结合”的规划设计理念,切实将“因地制宜、以人为本、市场引导、经济可行、体验为怀、低碳环保”的精神贯穿于每一个项目之中,倡导空间与艺术相结合、经济与美学相融合、历史文明与现代时尚相调和,力求每个作品都能达到人文景观与大自然的和谐完美融合。

广州规划设计与国际行业组织、海内外同行及国内知名高等院校如香港大学、中山大学、同济大学、广东财经大学等建立和保持着密切的合作与互动关系,致力于整合行业高端智慧,引进行业优质资源,推动中国旅游业迈向更高的竞争层次。


', '', '广州城市规划设计有限公司是中欧国际旅游规划设计研究院(Sino-Europe Academy of Tourism Planning and Design)旗下之专业机构,公司专注于城市规...', '[{\"path\":\"/upload/article/1/1460376794567.jpg\"}]', '0', '2028-01-01 00:00:00', '关于我们', '', '0', 'h,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('131', '1', '主营业务', '94', '/93/94\\131.html', '

 广州规划设计在为客户提供市场分析和战略规划服务的基础上,确保初步规划和概念逐渐成形最终落地运营的产品。

广州规划设计的业务范畴主要集中在旅游规划、城市规划、建筑设计与景观设计,构筑了策划、规划、设计、营销、资本引进与管理咨询等全程服务。同时,帮助客户了解市场行情、评估风险、厘清发展计划、商业战略和公共政策内在的不确定因素。

广州规划设计在打造景区特色、建立生态系统、营造文化环境等多领域都有着不可撼动的行业地位,规划业务服务集中在总体规划、城市规划、区域规划、旅游商业模式策划、生态环境规划、城市战略规划等。根据项目的不同尺度和背景,有选择地搭配合适的各项专业人才团队,为客户提供全面而合理的解决方案


广州规划设计与国际行业组织、海内外同行及国内知名高等院校如香港大学、中山大学、同济大学、广东财经大学等建立和保持着密切的合作与互动关系,致力于整合行业高端智慧,引进行业优质资源,推动中国旅游业迈向更高的竞争层次。

 


经营哲学:



用智慧与资本描摹设计蓝图
中国旅游业已经跨入互联网时代的大门中,互联网正在彻底颠覆传统咨询业的知识架构和业务模式,CEDAR站在互联网大潮的浪尖上,以高瞻的视角描摹着旅游行业的发展蓝图。
      ● 产业联动
互联网时代正在颠覆旅游业传统的商业模式。CEDAR积极应对这种变革,依托中欧国际旅游规划设计研究院(SEATPD)的资源优势,推动文化、地产与旅游业的横向联合发展,以此延伸到移动互联、绿色农业、金融资本、现代物流业等产业领域。
      ● 搭建平台
互联网时代的行业生态系统也在发生着改变。以往单一、专业式的服务模式不再为客户所青睐,CEDAR创新构建协同式、交互式、大数据、系统服务式的行业平台,整合行业各专业领域的优势资源,基于共同的平台进行专业协作,为旅游业提供一揽子系统化的解决方案。
      ● 金融孵化
大平台的背后是高度的智慧与资源整合,更是金融资本的有效支撑。CEDAR协助旅游企业开发设计植入性产品,做好定制化产品的孵化,开展引资融资服务,帮助客户在产业版图拓展中淘金。同时,以规划设计为撬动点,通过小资本或技术入股,撬动大资本大产业。

服务能力:


     

     

产业咨询:

CEDAR专家以宏观、战略、系统、科学、可操作性的视角,为客户提供产业整体发展咨询,服务涉及项目的前期市场研究、战略定位、产品开发、空间结构规划、区域规划、旅游品牌营销到景区的企业管理、企业文化、人力资源等全方位一揽子主导整合服务。

规划设计
CEDAR规划设计包括旅游区及城市商业综合体的景观设计、建筑设计及环境文化设计。

我们主张设计创新,试图对每一处场景赋予独一无二的精神,并合理地对景观建筑、规划资源进行配置与优化,加强景观、建筑与规划领域的互动,为客户提供从城市规划、建筑设计到景观设计的全程化、一体化、专业化解决方案。

品牌营销
 CEDAR依托团队丰富的品牌管理与营销策划能力,为旅游品牌提供从市场研究、品牌形象策划、整合营销传播、公共关系到节事会展营销等整合系统服务。

资本运作
CEDAR不仅推动规划设计的科学前瞻,更愿意借助中欧国际旅游规划设计研究院(SEATPD)的国际背景、宽厚人脉及资源整合力,打造旅游企业的金融孵化平台,通过“咨询管理+ 资本运作”的模式,为旅游业发展引进资本、人才、管理体系、商业模式、企业文化、市场营销等综合支撑。


', '', '互联网时代正在颠覆旅游业传统的商业模式。CEDAR积极应对这种变革,依托中欧国际旅游规划设计研究院(SEATPD)的资源优势,推动文化、地产与旅游业的横向联合发展,以此延伸到移动互联、绿色农业、金融资本、现代物流业等产业领域。', '[{\"path\":\"/upload/article/1638/1464838231122.jpg\"}]', '5', '2028-01-01 00:00:00', '关于我们', '', '0', 'f,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('132', '1', '合作伙伴', '95', '/93/95\\132.html', '

全心全力,美善相随,这个世代不缺技艺超群之才,却匮乏尽心尽力之士,CEDAR信实守约

捧着一颗心来,不带半根草去,竭力置身于客户的立场换位思考,除去一切不利于客户利益的自我私欲

精诚坦荡,肝胆相照,将自己的专业本色全意展现,为客户创造超值的服务体验  



', '', '让设计充满新奇和创造力,同时也饱含着和谐、力量与深意。\r\n\"适度\" 是一种幸福的生活态度。\r\n设计哲学 \"合适的设计\",设计中最难的环节往往并非创新,而是在精确适配下的创造。\r\n打造令人灵感迸发及纵情享受的情绪空间。\r\n', '[{\"path\":\"/upload/article/1638/1464838215050.jpg\"}]', '0', '2028-01-01 00:00:00', 'CORPORATE CULTURE', 'CORPORATE PART', '0', 'h,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('133', '1', '合作伙伴', '97', '/93/97\\133.html', '

 广州规划设计,立足于互联网思潮下商业模式创新的宏大视野,以科学的规划设计为基点,以战略执行、资源导入、品牌营销、管理咨询为后续深度服务,联袂海内外卓越专业机构,构筑行业智慧高地,并搭建行业性交互式平台,推动旅游业持续稳健地发展。 

战略学术联盟:

 


  

战略设计联盟:

 

MORMANFOSTER                 乐昂国际设计集团                 香港郑中设计师事务所                 中国建筑装饰集团

 


', '设计的意义在于寻求人、建筑、自然之间相融与相生的智慧', '某某,中国知名室内设计师,2005年于北京创立筑邦臣设计公司,他擅长用东方哲学思考解决问题,关注各类空间形态对人的影响,同时注重设计的商业化表现。张海涛说:“希望在设计中融入丰富的文化表达,以打造可以令人思考的空间意境。”他一直坚信,中国拥有丰富的文化底蕴,在未来“中国设计”将充满无限可能!', '[{\"path\":\"/upload/article/1569/1461506188829.jpg\"}]', '0', '2028-01-01 00:00:00', 'THE MEANING OF THE DESIGN IS TO SEEK HARMONY BETWEEN PEOPLEOTHER/, ARCHITECTUREOTHER/, NATURAL AND OF WISDOM', '张三', '0', 'p,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('134', '1', '亚太旅游规划设计十大影响力品牌', '96', '/93/96\\134.html', '

2009年12月13日由中国民族建筑研究会与中国房地产及住宅研究会共同主办,“2009•第六届中国人居典范建筑规划设计方案竞赛”颁奖大会在北京•京都信苑饭店隆重召开。经过九个多月来的精心组织与评选,全国共有241个方案获奖。通过本届竞赛,在全国建设领域树立一批人居规划设计典范,对促进全国建筑规划设计和建设水平的提高起到示范推动作用。


', '', '2009年12月13日由中国民族建筑研究会与中国 房地产 及住宅研究会共同主办,2009第六届中国人居典范建筑规划设计方案竞赛颁奖大会在北京京都信苑饭店隆重召开。经过九个多月来的精...', '[{\"path\":\"/upload/article/1/1460377619458.jpg\"}]', '0', '2028-01-01 00:00:00', '关于我们', '', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('135', '1', '2009中国人居典范●最佳设计方案', '96', '/93/96\\135.html', '

2009年12月13日由中国民族建筑研究会与中国房地产及住宅研究会共同主办,“2009•第六届中国人居典范建筑规划设计方案竞赛”颁奖大会在北京•京都信苑饭店隆重召开。经过九个多月来的精心组织与评选,全国共有241个方案获奖。通过本届竞赛,在全国建设领域树立一批人居规划设计典范,对促进全国建筑规划设计和建设水平的提高起到示范推动作用。

', '最佳设计方案', '2009年12月13日由中国民族建筑研究会与中国 房地产 及住宅研究会共同主办,2009第六届中国人居典范建筑规划...', '[{\"path\":\"/upload/article/1/1460377712056.png\",\"url\":\"/ms-mcms/upload/article/1/1460377712056.png\",\"uid\":1577438320364,\"status\":\"success\"}]', '0', '2028-01-01 00:00:00', '关于我们', '', '0', 'h', '0', '0', '2019-12-27 17:19:23', null, null, null); -INSERT INTO `cms_content` VALUES ('136', '1', '定制化项目金融孵化模式', '98', '/93/98\\136.html', '

广州规划设计以金融资本为支撑,以规划设计为撬动点,协助旅游业开发高潜力项目,推动项目融资,帮助客户在产业版图拓展中淘金入市。

', '', '广州规划设计以金融资本为支撑,以规划设计为撬动点,协助旅游业开发高潜力项目,推动项目融资..', '[{\"path\":\"/upload/article/1585/1462265098563.jpg\"}]', '0', '2028-01-01 00:00:00', '关于我们', '1', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('137', '1', '幻灯一', '147', '/100\\137.html', null, '', '', '[{\"path\":\"/upload/article/1638/1465808003859.jpg\"}]', '0', '2028-01-01 00:00:00', '', '', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('138', '1', '幻灯二', '147', '/100\\138.html', null, '', '', '[{\"path\":\"/upload/article/1638/1465808020382.jpg\"}]', '0', '2028-01-01 00:00:00', '', '', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('139', '1', '幻灯三', '147', '/100\\139.html', null, '', '', '[{\"path\":\"/upload/article/1638/1465808030831.jpg\"}]', '0', '2028-01-01 00:00:00', '', '', '0', 'f,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('140', '1', '幻灯四', '147', '/100\\140.html', null, '', '', '[{\"path\":\"/upload/article/1638/1464858626484.jpg\"}]', '0', '2028-01-01 00:00:00', '首页幻灯', '', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('141', '1', '城市规划', '101', '/99/101\\141.html', '

- 城市商业综合体规划 - 新城(新区)规划 - 温城市更新与旧城改造
- 小城镇建设规划 - 历史文化名城/镇保护研究与规划 - 产业园区规划



', '', '城市商业综合体规划 -新城(新区)规划 -温城市更新与旧城改造 -小城镇建设规划 -历史文化名城/镇保护研究与规划 -产业园区规划...', '[{\"path\":\"/upload/article/1/1460380106006.jpg\"}]', '0', '2028-01-01 00:00:00', '专业服务', '', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('142', '1', '环境艺术设计', '102', '/99/102\\142.html', '

CEDAR以美学与生态的双重视野开展环境艺术的探索与实践,营造健康、高雅、舒适、美观的现代生态环境,以此提升城市及旅游景区的软环境。

', '', 'CEDAR以美学与生态的双重视野开展环境艺术的探索与实践,营造健康、高雅、舒适、美观的现代生态环境,以此提升城市及旅游景区的软环境。...', '[{\"path\":\"/upload/article/1/1460380199624.jpg\"}]', '0', '2028-01-01 00:00:00', '专业服务', '', '0', 'c,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('143', '1', '旅游形象策划', '103', '/99/103\\143.html', '

在把握好旅游地的地脉(地理根据)、文脉(文化根据)和商脉(市场根据)的基础上,为旅游地做好旅游形象定位,并开展理念基础(MI)、行为准则(BI)、视觉形象(VI)的系统策...

', '', '在把握好旅游地的地脉(地理根据)、文脉(文化根据)和商脉(市场根据)的基础上,为旅游地做好旅游形象定位,并开展理念基础(MI)、行为准则(BI)、视觉形象(VI)的系统策...', '[{\"path\":\"/upload/article/1/1460380287863.jpg\"}]', '0', '2028-01-01 00:00:00', '专业服务', '', '0', 'p,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('144', '1', '旅游企业管理', '104', '/99/104\\144.html', '

目的地与景区管理:

- 发展战略规划- 营销管理体系咨询- 品牌管理体系咨询

- 组织架构与流程再造- 投资运营与管理- 资源与环境保护

 

酒店管理:

- 酒店运营管理- 酒店物业管理- 酒店产品与服务管理

- 酒店人力资源管理- 酒店投资与财务管理- 酒店危机管理

 

住宿业管理:  

为酒楼、茶楼、旅馆、非星级宾馆等住宿接待业提供经营管理咨询服务。


', '', '目的地与景区管理: -发展战略规划 -营销管理体系咨询 -品牌管理体系咨询 -组织架构与流程再造 -投资运营与管理 -资源与环境保护 酒店管理: -酒店运营管理 -酒店物业管理 -酒店产品...', '[{\"path\":\"/upload/article/1/1460380343199.jpg\"}]', '0', '2028-01-01 00:00:00', '专业服务', '', '0', 'h,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('146', '1', '广东梅州市雁洋旅游服务区域城市规划', '107', '/106/107\\146.html', '

项目地址:广东梅州市雁洋镇 规划面积:1,281,863平方米 项目委托:广东梅州市人民政府

 

全世界客家人的首都,客家文化的遗产中心

 

雁洋的自然环境、人文历史以及作为世界自然度假胜地门户的地理位置,与梅州市的城市特色和资源形成互补,为当地居民及国内外游客提供一种轻松的绿色体验。我们试图通过推广建筑、农业、文化资源的保护,把现有的文化基础设施开发成为世界级别的旅游胜地。

 

\"\" \"\" \"\"

 

\"\"


', '', '项目地址:广东梅州市雁洋镇\r\n规划面积:1,281,863平方米\r\n项目委托:广东梅州市人民政府', '[{\"path\":\"/upload/article/1/1460380700438.png\"}]', '0', '2028-01-01 00:00:00', '来自火星的程序猿', 'MS', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('147', '1', '海口湾酒店公寓第二期建筑设计', '108', '/106/108\\147.html', '

项目地址:海南省海口市北部海口湾西部滨海地区

总用地面积:47957.1平方米

总建筑面积:116154.65平方米

总地上建筑面积:94523.55平方米

总地下建筑面积:21631.1平方米

委托单位:某地产集团海南公司  

 

海口湾时尚度假新平台

 

设计定位:

功能定位----- 提供度假体验的产权式酒店,并引入购物、娱乐、餐饮等多元复合功能;

形象定位----- 海口城市形象的名片,塑造融入城市环境的建筑形象,与滨海景观相协调。

设计策略:

区域融合与区域发展融为一体;功能复合,丰富海口湾岸线景观。

建筑设计策略:

商业集中布局;景观视线保障;建筑退台设计;绿色节能规划。

 

\"\" \"\"

 

\"\" \"\"


', '', '项目地址:海南省海口市北部海口湾西部滨海地区\r\n总用地面积:47957.1平方米\r\n总建筑面积:116154.65平方米\r\n总地上建筑面积:94523.55平方米', '[{\"path\":\"/upload/article/1/1460380774867.png\"}]', '0', '2028-01-01 00:00:00', '来自火星的程序猿', 'MS', '0', 'h,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('148', '1', '昆山水月周庄旅游地产概念营销策划', '107', '/106/109\\148.html', '

周庄拥有丰富的自然资源、人文资源及极具优势的地理位置,区域发展潜力巨大,古镇旅游品牌价值大,区域发展热点已经形成,旅游经济的发展为房地产市场提供了巨大的想象空间。

我们的项目研判与理解:

- 天生丽质,但区域发展态势不明朗;

- 以前瞻性的眼光,组合运营多元化地产运营模式,与周边项目形成错位,整合旅游、休闲、度假、商务、商业与投资资源,方可突出重围。

 

项目总体概念定位:

 

液体周庄------- 未来水乡

“未来水乡概念”· 复合型旅游休闲港湾 

 

功能定位:

 

复合型旅游休闲港湾 -------

集中于“休闲”功能,满足“在家度假”的生活梦想。以“液态生活”为主题,用原生态的景观,再现原汁原味的水乡生活。

水乡生活体验基地 --- 

其功能主要集中在“体验”上,营造休闲的氛围,形成与都市截然不同的氛围,创造一种江南文化的现代体验。

 

商业空间规划:

 

 

\"\" \"\"

 

由沿路商街和船概念水街构成 

沿路商街的主题:渔人码头

- 主要经营特色餐饮、新派江南菜;

- 手工艺品,生活气息浓郁为特色;

- 江南古董店。

 

船概念水街的主题:在水一坊

- 茶坊、咖啡店;

- 鱼、蟹、虾等特色水产品;

- 菱角等水产植物。

 

 

 

 

 

总体定位 ------- 品质派旅游地产商

Slogan:江南液上海,休闲水乡情



', '', '周庄拥有丰富的自然资源、人文资源及极具优势的地理位置,区域发展潜力巨大,古镇旅游品牌价值大,区域发展热点已经形成,旅游经济的发展为房地产市场提供了巨大的想象空间。', '[{\"path\":\"/upload/article/1/1460380829450.jpg\"}]', '0', '2028-01-01 00:00:00', '来自火星的程序猿', 'MS', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('149', '1', '京杭大运河旅游形象研究与策划', '107', '/106/110\\149.html', '

项目地址:浙江杭州、苏州

项目委托:杭州市旅游局、苏州市旅游局

 

运河文化,吴地风情

 

在现代旅游业的发展当中,旅游形象设计正在发挥着越来越重要的作用。

旅游形象设计能使旅游地政府和公众对本地旅游的资源核心、产品定位和发展目标有更清楚地认识,使旅游地在众多的同类产品中以鲜明的姿态出现在旅游者面前。

本次苏杭大运河旅游形象策划,我们是在大运河杭州、苏州段旅游市场和旅游资源分析的基础上,结合对规划区域地方性的研究和受众特征的调查分析,提出了明确的区域旅游形象的核心理念和外在界面。

 

地方性研究:

前期我们开展地方性研究、受众调查和分析、形象替代性分析等,同时,主要讨论和创建旅游形象的具体表达,如理念、传播口号、视觉符号等。对京杭段古运河旅游形象构成的背景要素、地方性特征要素、形象修正要素进行了详细的分析,并对游客认知特征进行了调查研究,为进一步旅游形象设计奠定了基础。后面主要根据前期研究成果,创建旅游形象的具体表达体系。

策划思路:

古运河旅游形象的设计采用“用形象口号作为形象定位的精辟表达”的方法。

主要有两种设计思路:

第一,采取资源导向型旅游形象口号的设计模式,或者运用白描、比喻、夸张等表现手法自我阐释自己的资源优势,或者采用领先、比附、衬托等表现手法比较阐释自己的资源优势;

第二,采取游客导向型旅游形象口号的设计模式,或者运用感情、借势、公关、悬念等表现手段来刺激旅游需求,或者运用距离、时间、心理、承诺等表现手段来克服潜在旅游者的出游阻力 。    

整体形象定位:

“清名运河图,江南绝版地”        

运河形象体系构建:     

1、品牌标识系统设计; 

2、宣传口号提炼; 

3、品牌音乐符号:  以运河音为体,创作出适合各种乐器弹奏的曲目,并请知名词作家为之谱词。        

4、吴地运河宣传片、专题片、微电影整体策划拍摄制作。



', '', '项目地址:浙江杭州、苏州\r\n项目委托:杭州市旅游局、苏州市旅游局\r\n \r\n运河文化,吴地风情', '[{\"path\":\"/upload/article/1/1460380900751.png\"}]', '0', '2028-01-01 00:00:00', '来自火星的程序猿', 'MS', '0', 'h,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('150', '1', '佛山某师军史馆设计', '107', '/106/111\\150.html', '

\"\" \"\"

 

\"\"


', '', '', '[{\"path\":\"/upload/article/1/1460380995728.jpg\"}]', '0', '2028-01-01 00:00:00', '来自火星的程序猿', 'MS', '0', 'f,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('157', '1', '旅游规划', '107', '/106/107\\157.html', '

- 区域旅游发展规划- 历史文化区旅游开发规划- 风景名胜区旅游开发规划
- 生态旅游区开发规划- 温泉滨海度假区旅游开发规划- 旅游地产开发规划
- 乡村旅游开发规划- 主题公园开发规划- 城市旅游开发规划

', '', '- 区域旅游发展规划\r\n- 历史文化区旅游开发规划\r\n- 风景名胜区旅游开发规划', '[{\"path\":\"/upload/article/1/1460384875034.jpg\"}]', '0', '2028-01-01 00:00:00', '来自火星的程序猿', 'MS', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('158', '1', '旅游规划', '101', '/99/101\\158.html', '

- 区域旅游发展规划- 历史文化区旅游开发规划- 风景名胜区旅游开发规划
- 生态旅游区开发规划- 温泉滨海度假区旅游开发规划- 旅游地产开发规划
- 乡村旅游开发规划- 主题公园开发规划- 城市旅游开发规划

', '', '区域旅游发展规划 -历史文化区旅游开发规划 -风景名胜区旅游开发规划 -生态旅游区开发规划 -温泉滨海度假区旅游开发规划 -旅游地产开发规划 -乡村旅游开发', '[{\"path\":\"/upload/article/1/1460385002423.jpg\"}]', '0', '2028-01-01 00:00:00', '专业服务', '', '0', 'f,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('163', '1', '得品牌者得市场', '99', '/99\\index.html', '

凭借专业的网站策划队伍、专业的美工设计师、一流的程序开发人员,丰富的制作经验和高超的创意水平,根据您的企业的行业类型和产品特点度身定制品 牌网站。精益求精的网页制作人员、严谨的应用程序开发人员、尽善尽美的售后服务人员。这一切,是我们为您提供专业网站建设服务,也是让你在同行业中傲视群 雄

', '', '精益求精的网页制作人员、严谨的应用程序开发人员、尽善尽美的售后服务人员。这一切,是我们为您提供专业网站建设服务,也是让你在同行业中傲视群 雄', '[{\"path\":\"/upload/article/1638/1464746921150.jpg\"}]', '0', '2028-01-01 00:00:00', '', '', '0', 'f,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('164', '1', '海派卓越规划设计智业团队', '98', '/93/98\\164.html', '

广州规划设计麾下聚集了众多从美国旧金山艺术大学、奥本大学、香港理工大学毕业的海派旅游规划与建筑、景观设计高端人才,其国际化视野和开放创新的风格,将确保香柏领先的、卓越的规划设计水平和创造超出客户预期的服务效果。

', '', '广州规划设计麾下聚集了众多从美国旧金山艺术大学、奥本大学、香港理工大学毕业的海派旅游规', '[{\"path\":\"/upload/article/1585/1462265091247.jpg\"}]', '0', '2028-01-01 00:00:00', '', '2', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('165', '1', '高质量行业交互平台', '98', '/93/98\\165.html', '

广州规划设计创新构建协同式、交互式、大数据及系统式行业服务平台,整合企业管理、金融、互联网、媒介各领域专业资源,为旅游行业提供一揽子系统化解决方

', '高质量行业交互平台', '广州规划设计创新构建协同式、交互式、大数据及系统式行业服务平台。。。', '[{\"path\":\"/upload/article/1585/1462265083093.jpg\"}]', '0', '2028-01-01 00:00:00', '', '3', '0', 'c,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('166', '1', '01品牌创建', '62', '/63\\166.html', null, '', '品牌命名/品牌文化/品牌识别设计\r\n最初的品牌播种,决定了品牌是要长成野草还是参天大树。所谓三岁看大,品牌风格确立也要从萌芽开始,让品牌自始至终保持活力与竞争力,健康茁长的成长。\r\n服务项目:\r\n品牌文化理念挖掘 / 挖掘一种品牌文化,并力求这种文化与更多目标消费群相关品牌命名 /\r\n创造符合品牌精神的独特名称 / 品牌视觉识别(VIS)设计 /\r\n基于市场与设计角度创造严谨而实用的形象设计 /', '[{\"path\":\"/upload/article/1/1460771365547.jpg\"}]', '0', '2028-01-01 00:00:00', '65', '', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('167', '1', '品牌改造设计', '138', '/63\\167.html', '

公司为危化客户提供危化行业危化车辆销售、金融支持、服务、二维检测、罐体检测与清洗、紧急救援、从业人员培训、二手车置换、危化物流信息平台、事故车维修理赔等多功能于一体的服务中心,提供专业的产品与服务,保障危化车辆运输安全。
全天候服务:本公司在周末、节假日均提供正常服务。在夜间,公司设有值班人员。客户遇险可及时打电话到公司,相关人员将在最短的时间内提供救援服务。
送服务上门:客户无论是租车、修车、保养或其它相关问题,如客户不便来我公司办理,公司可派相关专业人员上门提供服务。
替换车辆:客户所租车辆遇险或发生故障,在车辆修理期间,公司可提供临时替换车辆。
定时保养:本公司按时给租赁车辆实施保养,以保障客户所租车辆处于正常运转状态。
车辆保险:本公司为全部租赁车辆办理保险,并负责出险索赔。客户可以放心地驾驶所租车辆。
自驾租赁:不论您是家庭出行、商务往来、公务出行、出外旅行还是短期替换车,我们都能向您提供符合您需求的租赁车辆。多样的车型、专业的服务、低廉的价格使您体验便捷舒适的汽车租赁服务。
代驾租赁:本公司拥有一支经过严格训练,高素质、熟悉长春及周边地区道路情况的驾驶员队伍,随时可以根据您的需要提供代驾租赁服务。
商旅服务:为客户提供机场单程、往返的接送服务,面向长期客户的定向购车租赁服务。
职业驾驶员的代驾服务:
汽车租赁商务车队拥有宝马、别克商务、奥迪、帕萨特、桑塔纳志俊等数十种品牌的商务车型,及一支文化素质高、配置合理并经过专业培训的司机队伍。商务车队秉承良好"高效、快速、品质、服务于人"的服务宗旨,以过硬的专业技术,快速的反应,高标准的服务,为客户提供全天候汽车代驾服务。

', '', '品牌形象的改造与提升设计\r\n品牌发展到一定的阶段,因为企业发展模式及战略目标发生改变,其原有的形象已经不能承载企业未来发展的战略需求时,则需要创造更具生长气质的视觉形象,为未来打算,为未来改变!品牌改造设计正好填补着类客户的发展需求。\r\n服务项目:\r\n品牌形象改造设计 / 令形象更适合品牌定位,提升 / 完善品牌形象\r\n完善并继承优秀基因,为企业注入新鲜的视觉活力\r\n与客户品牌发展模式及战略目标相匹配', '[{\"path\":\"/upload/article/1/1460771447978.jpg\"}]', '0', '2028-01-01 00:00:00', '66', '', '0', 'h,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('168', '1', '品牌推广设计', '138', '/63\\168.html', '

1、特色服务:

1.1 承接各类化学品、危险品的进出口的贸易代理业务

1.2 承接样品、修理物品、暂时进出口等特殊贸易方式的进出口代理业务

1.3 代办两用物项进出口许可证:包括电子钥匙的申领、进出口经营登记申请及进出口许可证的办理

1.4 承接黄磷、硝化棉的贸易采购业务

 

2、常规服务:

2.1 接单:专业的客服人员和完善的操作流程,提供贸易代理的咨询和操作服务

2.2 制单:全套进出口单证的制作

2.3 外汇结算:及时准确的安排收付外汇,保证外贸义务的及时履行

 

3、实力资质:

3.1 专业人员

资深客户服务及管理人员,拥有丰富的化工品、危险品专业知识和贸易操作经验,为客户提供化学品、危险品进出口贸易代理服务。

3.2 完善体系

1) 专业的一体化ERP系统,从接单到代理合同、单证制作、交付货代、结算货款、出口退税,严格控制贸易代理的每一个环节。

2) RQHSE安全控制体系,监控并确保货物安全规范的操作。

3.3 采购资源

与国内多家大型能源型企业为长期合作伙伴关系,可为境外的黄磷、硝化棉需求商稳定供货。

3.4 相关资质

1)外经贸核准的进出口经营许可

2)海关核准的企业报关资质

3)商检局核准的出入境检验检疫报检资质

4)外汇管理局核准的企业进出口外汇经营资质

5)安监局审核的危险化学品经营许可  

6)健全的服务网络:在国内主要港口如上海、天津、青岛等设有分支机构,国内代理网络齐全。


', '', '形象画册 / 产品样本 / 招商手册 / 企业年报\r\n印刷品是企业最常用最有效的推广方式,也是挖掘潜在客户的钥匙。好的设计能循序渐进的引导读者,让读者更清楚的了解产品,从而择需购买。一本设计粗糙的画册,不等被翻开便会被丢弃。\r\n服务项目:\r\n印刷品设计 / 具有企业特色的形象画册设计、产品目录及年报设计.\r\n企业内刊策划设计 / 为大型企业策划设计品牌内部刊物', '[{\"path\":\"/upload/article/1/1460771488365.jpg\"}]', '0', '2028-01-01 00:00:00', '67', '', '0', 'c,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('172', '1', '网络优化', '133', '/53/133\\index.html', '

网站整体策划

企业网站建设目的何在?如何充分挖掘互联网络的资源和优势,如何合理地组织网站内容与功能从而达到客户的需求?
我们将根据市场分析、客户产品及服务的优势、竞争对手分析等等,有效的确立网站定位。根据相关需求分析获得相应网站运营策略,在网站建立之初我们就网站VI形象、网站营销手段、运营模式、网站发展前景等等进行定位。

 

网站设计 DESIGN

网络媒体不同于传统媒体,如果在网站设计的时候仅仅是将文字和图片做一个简单堆积和展示的话,这样的网站跟一片丢落在街头的破旧宣传资料没有任何区别。客户往往通过企业网站就留下了对企业的第一印象,这个第一印象是决定客户是否与你合作的重要因素。
所以站在浏览者的角度,我们分析企业特点和品牌内涵,完美的通过网站体现企业形象,并严格采用W3C国际标准进行网站设计,采用DIV+CSS构 架,不但使您的网站具备足够的扩展性,您网站的速度、兼容性、友好性也都会显著提高,更主要的是,代码和表现分离的方式让您的网站改版变得更容易,而针对 SEO搜索引擎优化的工作也变得更加的畅通。

 

网站建设售后服务 SALES

<p style="padding: 0px; margin-top: 0px; margin-bottom: 0px; line-height: 24px; color: rgb(68, 68, 68); font-family: Verdana, Arial, Tahoma; font-size: 12px; white-space: normal; >网站建设专家致力于为客户提供优质的产品及服务。为了多渠道的了解客户的需求,快速响应个性化需要,不断完善售后服务工作,我们客户服务管理部在此为您搭建了这个沟通的平台,我们希望通过网络加强与客户的交流。
完善的售后服务是公司信誉的保障和服务趋于完善与成熟的象征,因此,我们在这一方面投入了较大的精力,确保每一位客户的利益得到充分的保障,从而提高企业信誉,发展长期友好的合作。
对于享受我公司建站服务的客户,我们提供免费一年售后服务。

 

网站全程维护 MAINTAIN

网页制作好了以后并不是就没事了?其实日后的更新维护才是最重要的!如果参观网站的访问者每次看到的网站都是一样的,那么它们日后还会来吗?这时候,您的网页要由谁来维护呢?
严格来说,每一个站点都应该由专业人员定期更新维护。互联网络的最大优势就是信息的实时性,只有快速的反映,准确的报道,才能吸引更多的浏览者。
目前很多站点人气很旺,应该和定期更新分不开的。也有很多站点由于种种原因,数月才更新一次,这样就违背了网路最基本的商业目的。网站不是购买一件商品,随着时间的推移而贬值陈旧,只有不断的溶入企业发展动向,推陈出新,才会具有创造力,发挥网路商业潜能。
更新维护不仅仅只局限于简单的更换文字稿,应该是将企业的商业动态和发展方向充分考虑进去, 再结合现有的网站规划结构,迅速作出相应的改进。企业的每一个新项目的推广和价格的浮动、内部结构调整, 不应该只是在报纸、电视等媒体做宣传而忽略网路这个最具有潜力的市场。 这也是我们一直强调的商业网站 CIS 策略。
鉴于目前大多数网站不具有专业维护的技术力量,网站建设公司可为广大客户提供专业服务。每一个企业可根据自身的商业特征制定不同的维护方案,并保证在最短的时间内迅速完成。

 

网页改版 REVISED

企业上网已成趋势,企业网站犹如雨后春笋般地拔起,试问:
您的企业通过互联网进行了巨额的投入,但网站到底给您带来了多大的效益?
您的网站从建立到现在,更新过几次、改版过几次?
功能不全、设计不美观、布局不合理、几乎从不更新的网站会给企形象带来多大的负面影响?
选择网站建站专家,帮您重新审视和构架您的网站系统,我们提供八项全能服务,全面改善您的网站系统,专为您解决企业上网后顾之忧。

 

培训解决方案 TRAIN

为了更好地做好企业外部门户网站的技术培训工作,将选派具有丰富技术培训和实施经验的技术人员组成培训小组,编写详尽实用的培训教材,并且制定切实有效的培训方案。技术培训的工作为应用软件系统管理和使用培训。
在软件产品实践培训中,采用集中培训的方式,的培训师针对本系统的技术特点,为企业技术人员提供全面培训,培训内容涵盖了本此系统建设过程中使用的主要技术理论和产品实践。
在应用软件系统管理和使用培训中,我们会组织项目开发小组的主要人员针对管理和使用人员的不同需求,提供不同层次的培训课程。


', '网络媒体不同于传统媒体,如果在网站设计的时候仅仅是将文字和图片做一个简单堆积和展示的话,这样的网站跟一片丢落在街头的破旧宣传资料没有任何区别。客户往往通过企业网站就留下了对企业的第一印象,这个第一印象是决定客户是否与你合作的重要因素。', '企业网站建设目的何在?如何充分挖掘互联网络的资源和优势,如何合理地组织网站内容与功能从而达到客户的需求?\r\n我们将根据市场分析、客户产品及服务的优势、竞争对手分析等等,有效的确立网站定位。根据相关需求分析获得相应网站运营策略,在网站建立之初我们就网站VI形象、网站营销手段、运营模式、网站发展前景等等进行定位。', '[{\"path\":\"/upload/article/1/1460889312736.jpg\"}]', '0', '2028-01-01 00:00:00', '', '', '0', 'p,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('173', '1', '网络营销', '134', '/53/134\\index.html', '

互联网品牌推广怎么做?

互联网品牌推广有个新鲜名词叫数字营销,数字营销是新发展起来的一种营销模式,是利用互联网特性和技术,更加有效、高性价比地完成整合营销计划,达到传统 的IMC不能达到的高效客户关系管理等,从而精准地实施营销策略,实现企业营销的高效率、低成本、大影响。可以按两种意思来理解:网络整合营销是利用网络 技术和网络特性最大化、最快速、最有效、最精准的进行整合营销;网络整合营销是以为客户提供有价值的信息为基础,由客户创造、传播为主导的整合营销理念进 行的网络营销。

 

目前品牌在推广上遇到什么问题?

作为品牌主,你是否有这样的困惑?
● 很早就有了互联网品牌网站,可是却不知如何利用,网络也没有给你创造任何经济效益!
● 希望通过网络推广获得效益,但面对市场上纷繁复杂、层出不穷的网络推广概念和方式让人眼花缭乱,却无从下手!
● 花了很多钱做网站推广,却没什么效果,也不知道问题出在哪里?
● 看到竞争对手迅速壮大,却不知道他们究竟如何利用好网络营销的秘诀?

 

是怎么做的?

当我们的客户确定需要进行数字营销传播时,我们将提供以下服务:
营销型网站建设,网络调研,搜索引擎营销(SEO和SEM),软文营销(博客营销、论坛营销、SNS营销、新闻营销、许可邮件营销),口碑互动营销(圈子 营销、社区营销、博客营销),群营销(网络广告、论坛营销、SNS营销、IM和QQ群营销)。将以上传播进行有机的整合营销推广,制定传播营销方案。

一、提供推广资料和目标,提供报价。
二、提供营销型网站方案。
三、确定传播关键字。
四、确定搜索引擎营销策略,进行关键词甩选。
五、进行后台数据分析,确定网络广告文案。
六、制定病毒式营销计划,确定博客营销、论坛营销、SNS营销载体。
七、确定新闻营销、博客营销、论坛营销的整体方案。
八、制定网络整合营销传播计划。
九、效果评估。
十、提供传播报告。


', '营销型网站建设', '互联网品牌推广有个新鲜名词叫数字营销,数字营销是新发展起来的一种营销模式,是利用互联网特性和技术,更加有效、高性价比地完成整合营销计划,达到传统 的IMC不能达到的高效客户关系管理等,从而精准地实施营销策略,实现企业营销的高效率、低成本、大影响。可以按两种意思来理解:网络整合营销是利用网络 技术和网络特性最大化、最快速、最有效、最精准的进行整合营销;网络整合营销是以为客户提供有价值的信息为基础,由客户创造、传播为主导的整合营销理念进 行的网络营销。', '[{\"path\":\"/upload/article/1/1460889475526.jpg\"}]', '0', '2028-01-01 00:00:00', '', '', '0', 'h,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('174', '1', '域名注册', '135', '/53/135\\index.html', '

域名?

Internet这个信息时代的宠儿,已经走出了襁褓,为越来越多的人所认识,电子商务、网上销售、网络广告已成为商界关注的热点。"上网"已成为不少人的口头禅。但是,要想在网上建立服务器发布信息,则必须首先注册自己的域名,只有有了自己的域名才能让别人访问到自己。所以,域名注册是在互联网上建立任何服务的基础。同时,由于域名的唯一性,尽早注册又是十分必要的。

 


国际域名注册

 

域名价格域名价格域名说明
CN英文域名注册
80 元/年
域名类型:.cn/ .com.cn/ .net.cn/ .org.cn等
国际域名注册
80 元/年
(多年购买优惠)
域名类型:.com/ .net/ .org/ .biz
英文.ASIA
159 元/年
域名意义:表示亚洲
顶级域名.MOBI
168 元/年
(多年购买优惠)
域名意义:手机域名,WAP网站首要之选
新顶级域名TEL
158 元/年
域名意义:电话,网络名片
英文.TRAVEL
1800 元/年
域名意义:旅游域名,国际域名
香港域名.HK
215 元/年
域名类型:.hk/ .com.hk
新顶级域名.NAME
100 元/年
域名意义:国际顶级域名,个人域名的标志
新顶级域名.INFO
100 元/年
域名意义:国际域名,表示网络信息服务组织
英文.CC
298 元/年
域名意义:商业公司,中国公司
英文.TV
330 元/年
域名意义:表示电视,宽频时代的主流域名
英文名.IN
580 元/年
域名意义:India(印度)的国家域名
英文.LA
880 元/年
域名意义:表示洛杉矶
英文 .JOBS
2800 元/年
域名意义:国际顶级域名,主要面向招聘和求职市场
英文 .ME
315 元/年
域名意义:国际顶级域名,.Me代表“我”,属于你!


', 'Internet这个信息时代的宠儿', '上网\"已成为不少人的口头禅。但是,要想在网上建立服务器发布信息,则必须首先注册自己的域名,只有有了自己的域名才能让别人访问到自己。所以,域名注册是在互联网上建立任何服务的基础。同时,由于域名的唯一性,尽早注册又是十分必要的。', '[{\"path\":\"/upload/article/1638/1464868329275.png\"}]', '0', '2028-01-01 00:00:00', '', '', '0', 'c,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('177', '1', '国内开源 java cms,铭飞MCms', '70', '/59/70\\177.html', '

MCMS是企业创立初期很好的基础框架,不仅可以实现和现有系统的对接而且有大量的插件模版可以使用。

MS平台开发团队承诺MCMS内容管理系统永久完整开源免费(这真是极好的)!下面就简单的给大家介绍一下MS平台和MCMS为什么如此之快。

MS平台是铭飞团队经过多年的研发,最终以MCMS为基础,集商城、论坛、分期、会员、支付、积分、微信等系统于一体的插件式系统。并实现了淘宝、京东、苏宁、国美等第三方电商平台数据接口的统一。平台中的小插件如:邮件推送、短信接口、定时任务、促销活动、数据采集等非常丰富。

MCMS的模版采用标签式开发,上手非常快。

对于技术小白来说不仅避开了学习复杂的高级开发语言,而且MStore有大量成熟的模版直接下载之后换换图片和内容就可以使用,要是需要调整只需要写简单的标签就可以。

对于前端工程师来说只需要写好页面样式并在页面内容部分套上标签,就可以做出一套优美的动态网站。并且还可以实现留言板、用户登录等数据交互功能。


', '', 'MCMS是企业创立初期很好的基础框架,不仅可以实现和现有系统的对接而且有大量的插件模版可以使用。\r\n\r\nMS平台开发团队承诺MCMS内容管理系统永久完整开源免费(这真是极', '[{\"path\":\"/upload/article/1/1461384090357.jpeg\"}]', '0', '2028-01-01 00:00:00', '来自火星的程序猿', 'MS', '0', 'h,', '1', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('178', '1', '价值源自分享', '68', '/59/68\\178.html', '

MStore(铭飞商城)是铭飞(MS)平台为开发者提供模版与插件作品分享平台,为企业提供优质产品和服务我们致力于打造一个优秀的Java资源共享学习平台。

MStore离不开您的参与,
如果您是开发者(前端&后台)

1.要分享自己的得意模板、插件、教程?欢迎您来这里,找到需要她、欣赏她的人。
2.想找个网络模板收藏夹存放自己喜爱的模板? 这里就是您的选择。
3.想结交更多热爱模板、插件的朋友?那就快来展示您的作品,寻找志趣相投的朋友吧。

如果您是企业:
1.这里有一群精力旺盛有着代码执着追求的开发者分享的模版与插件,相信他们肯定为您提供更好的服务。
2.更多Java coder分享的更多插件,满足您各种项目需求,降低开发与维护成本。
3.这里有专业设计人员提供的更多精美模版,帮您省去设计投入成本。
4.同时也希望您为分享者点个赞。

铭飞已经上路,我们将为此不懈努力,期待得到您的支持!

', '', 'MStore(铭飞商城)是铭飞(MS)平台为开发者提供模版与插件作品分享平台,为企业提供优质产品和服务我们致力于打造一个优秀的Java资源共享学习平台。', '[{\"path\":\"/upload/article/1/1461383921888.jpeg\"}]', '0', '2028-01-01 00:00:00', '来自火星的程序猿', 'MS', '0', '', '1', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('179', '1', '铭飞商城MStore——价值源自分享', '68', '/59/68\\179.html', '

MStore(铭飞商城)是铭飞(MS)平台为开发者提供模版与插件作品分享平台,为企业提供优质产品和服务我们致力于打造一个优秀的Java资源共享学习平台。

MStore离不开您的参与,
如果您是开发者(前端&后台)

1.要分享自己的得意模板、插件、教程?欢迎您来这里,找到需要她、欣赏她的人。
2.想找个网络模板收藏夹存放自己喜爱的模板? 这里就是您的选择。
3.想结交更多热爱模板、插件的朋友?那就快来展示您的作品,寻找志趣相投的朋友吧。

如果您是企业:
1.这里有一群精力旺盛有着代码执着追求的开发者分享的模版与插件,相信他们肯定为您提供更好的服务。
2.更多Java coder分享的更多插件,满足您各种项目需求,降低开发与维护成本。
3.这里有专业设计人员提供的更多精美模版,帮您省去设计投入成本。
4.同时也希望您为分享者点个赞。

铭飞已经上路,我们将为此不懈努力,期待得到您的支持!

', '', 'MStore(铭飞商城)是铭飞(MS)平台为开发者提供模版与插件作品分享平台,为企业提供优质产品和服务我们致力于打造一个优秀的Java资源共享学习平台。\r\n', '[{\"path\":\"/upload/article/1/1461383937683.jpeg\"}]', '0', '2028-01-01 00:00:00', '来自火星的程序猿', 'MS', '0', 'h,', '1', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('182', '1', '人才理念', '52', '/52\\index.html', '

网络营销是以互联网络为基础,通过数字化的信息和网络媒体的交互性来辅助营销目标实现的一种新型的市场营销方式。

 

      据统计,在国外,80%的个人和企业都选择网络媒介进行营销推广,并从中获得了极好的效果。而在中国,选择网络营销的企业和个人只有7-8%,不到国外的十分之一。

 

      随着网络影响的进一步扩大,随着人们对于网络营销理解的进一步加深,以及越来越多出现的网络营销推广的成功案例,人们已经开始意识到网络营销的诸多优点,越来越多的企业和个人通过网络进行营销推广


', '网络营销是以互联网络为基础', '网络营销是以互联网络为基础,通过数字化的信息和网络媒体的交互性来辅助营销目标实现的一种新型的市场营销方式。', '[{\"path\":\"/upload/article/1584/1462521245856.jpg\"}]', '0', '2028-01-01 00:00:00', '', '', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('183', '1', '联系我们', '136', '/52/136\\index.html', '

\"1-1203302131502F.jpg\"/\"1-120330213210F7.jpg\"/\"1-12033021312C17.jpg\"/

', '', '这里是一个充满活力和梦想的企业,我们不反对个性,我们不安于现状,我们亲手创造价值,我们永远在进步……如果你也是名有梦想勇于尝试的人,那就赶快加入我们吧!\r\n\r\n我们面向全国招募有志之士,欢迎自荐或向周围的好友推荐。', '', '0', '2028-01-01 00:00:00', '', '', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('185', '1', '联系我们', '141', '/19/141\\index.html', '

联系电话:888888

QQ:1391265900

邮箱:1391265900@qq.com

地址:来自火星的程序猿


', '', '这里是一个充满活力和梦想的企业,我们不反对个性,我们不安于现状,我们亲手创造价值,我们永远在进步……如果你也是名有梦想勇于尝试的人,那就赶快加入我们吧!\r\n\r\n我们面向全国招募有志之士,欢迎自荐或向周围的好友推荐。', '[{\"path\":\"/upload/article/1638/1465720290023.jpg\"}]', '4', '2028-01-01 00:00:00', '', '', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('190', '1', '在线留言', '142', '/19/142\\index.html', null, '', '', '', '0', '2028-01-01 00:00:00', '', '', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('191', '1', '“绿色装饰”融入杭州市民中心装饰工程', '84', '/62/84\\191.html', '

日前,公司成功中标杭州市民中心G楼约18000多平方米四层公共区域装饰工程,这是继杭州钱江新城国际会议中心之后的又一城市标志性建筑工程。
在该项目施工过程中,公司始终将“绿色装饰”理念融入其中。“绿色装饰”是指在设计、装修选材、施工等整个过程都符合绿色环保的理念,把对环 境造成的危害降低到最小,让市民享受到真正的绿色生活。随着社会的不断发展,“绿色装饰”日趋成为广大建筑装饰企业努力的方向。
公司项目部在杭州市民中心G楼工程中,严格按照健康、环保、安全的施工标准,精心施工,力争达到“浙江省建筑安全文明标化工地”的要求。在原 材料的选用上精挑细选,大量运用了玻璃、大理石材等绿色环保和高品质的装饰材料,突显出了简约、明快、自然的设计风格,创造出宽阔、绿色、实用的公共空 间。
此外项目部还非常注重采取新工艺、新方法,不仅提高了工程的整体美观性和实用性,而且加快了施工进度,提升了工作效率。由于本工程是圆型结构的楼层施 工,特别是石材在圆弧和圆柱造型上用量大,大大增加了工程的施工难度。因此,项目部按工程施工位置的不同分别采用了石材干挂施工工艺和石材湿贴与灌浆施工 工艺。通过这两种施工工艺铺出来的石材平整、洁净、色泽一致,无裂痕和缺损,既美观又方便今后日常护理。
作为杭州市重点工程,杭州市民中心G楼公共区域装饰工程得到了公司领导的高度重视。总经理高利明亲自坐镇指挥,组建了一支强有力的项目领导管 理班子,采用矩阵式组织管理体系,即采取以项目经理为第一责任人,分解项目绿色施工指标,形成完善的绿色施工组织、责任体系,在保证质量、安全等基本要求 的前提下,通过科学管理和技术进步,最大限度地节约资源与减少对环境负面影响,实现四位一体的绿色环保施工,打造“绿色装饰”精品工程。

', '', '此外项目部还非常注重采取新工艺、新方法,不仅提高了工程的整体美观性和实用性,而且加快了施工进度,提升了工作效率。由于本工程是圆型结构的楼层施 工,特别是石材在圆弧和圆柱造型上用量大,大大增加了工程的施工难度。', '[{\"path\":\"/upload/article/1638/1464861354733.jpg\"}]', '0', '2028-01-01 00:00:00', '铭飞', '铭飞', '0', 'h,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('192', '1', '纽约时髦客手中那些让人尖叫的包', '83', '/62/84\\192.html', '

对于时尚达人而言,包袋与衣服的混搭也是一种必杀技。休闲手提包可以搭配不同的造型,而搭配运动裤就是更加直接地表现出时尚休闲风的最佳配搭方案。 宽松舒适的运动裤相信是不少男士最爱,但却很难搭出时尚感,更一不小心就给人过于随便的印象。而手提包在款式、颜色、材质及图案方面层出不穷,再搭配不同款式的运动裤,打造半运动化的时装搭配,让运动休闲和时尚文化完美结合,塑造出运动感的摩登简约风,让整体穿着随意且舒适。

', '', '对于时尚达人而言,包袋与衣服的混搭也是一种必杀技。休闲手提包可以搭配不同的造型,而搭配运动裤就是更加直接地表现出时尚休闲风的最佳配搭方案。', '[{\"path\":\"/upload/article/1638/1464861380560.png\"}]', '0', '2028-01-01 00:00:00', '铭飞', '铭飞', '0', 'p,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('193', '1', '宋朝华率队赴贵州招商洽谈推进重大项目', '83', '/62/84\\193.html', '

市委副书记、市长宋朝华率队前往贵州省贵阳市,实地考察由中铁贵旅公司投资开发建设的中铁国际生态城项目,并与公司高层进行了深入友好座谈,洽谈推进重大项目落户我市仁寿县相关事宜。

 

中国中铁旗下子公司——中铁贵旅公司开发建设的中铁国际生态城项目位于贵阳市龙洞堡空港经济区,总投资500亿元,占地面积约20平方公里,打造集旅游、休闲、度假、运动、文化、养老、养生和居住等多种功能于一体的世界级旅游度假目的地,2011年被列为“贵州省十二五旅游发展规划十大旅游项目”之一,是贵州省的重点项目。在中铁贵旅公司董事长张敏的陪同下,宋朝华一行参观考察了中铁国际生态城展示中心、中铁国际生态旅游城市综合体项目、安纳塔拉度假酒店和巫山香杏小镇等旅游开发项目,认真听取了项目规划建设有关情况介绍,对中铁国际生态城项目规划理念新、设计水平高、推进速度快表示由衷赞赏,对中铁贵旅公司有意来我市仁寿县投资发展表示热烈欢迎。

 

座谈会上,双方就推进项目落户事宜进行了深入友好会谈。宋朝华指出,中铁贵旅公司实力强、品牌响、理念新,对公司投资开发黑龙滩休闲旅游度假中心项目充满信心。通过深入考察和友好洽谈,双方就项目投资有关事宜达成了共识,并将于近期正式签署合作协议。张敏表示,天府眉山交通区位优越,旅游资源独特,发展潜力巨大,集团拟投资200亿元以上开发建设黑龙滩旅游项目。该项目将按照国际化水准,坚持以游为主、高举高打,紧紧围绕“吃、住、行、游、购、娱”六要素,走产业高端、高端产业的路线,全力打造5a级景区,为发展旅游产业和造福眉山人民作出央企应有的贡献。


', '', '市委副书记、市长宋朝华率队前往贵州省贵阳市,实地考察由中铁贵旅公司投资开发建设的中铁国际生态城项目,并与公司高层进行了深入友好座谈,洽谈推进重大项目落户我市仁寿县相关事宜。\r\n ', '[{\"path\":\"/upload/article/1638/1464861385314.jpg\"}]', '0', '2028-01-01 00:00:00', '铭飞', '铭飞', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('194', '1', '红木市场是否低迷 消费者仍在', '83', '/62/83\\194.html', '

森和汽车城,位于广州市天河北路,是一家高端品牌汽车的城市综合展厅,本来是全方位展示豪华新车的地方。上周,突然在门口拉上了横幅——东阳红木清货大甩卖。记者于日前一探,吓了一跳。门口的广场上停着几辆大货车,不断有红木家具被抬出来打包装车。走进去视觉更混乱,当庭摆着一套五件鹿角椅,旁边是满雕龙的金丝楠木顶箱柜,内庭中央还展示着一辆豪华轿车,而周边则摆满红木家具,完全没有红木家具应该有的意境。更令人瞠目结舌的是,里面人流熙熙攘攘,整个场景可以让你直接穿越到上世纪八十年代中期一个小县城的展销会。

 

  “销售情况非常可观,首日已经突破100万元销售,周末差不多也是这个数。”东阳红木销售负责人穆延东告诉记者,这次的清货周四开始,周日结束,下周同样如此,中间的时间会对产品进行调整,再销售一次就结束了。记者在店内粗略看了一下,产品以清式家具为主,材质则以金丝楠木、微凹黄檀、缅甸花梨、南美酸枝、东南亚酸枝为主,大红酸枝和明式风格的产品不多,就连在今年APEC上出现的大红酸枝交椅的完整复刻版,也随便被摆在了角落。从做工和风格以及雕刻工艺来看,这些货物并非出自一家工厂。“此次清货的红木家具,来自东阳红木家具六家工厂,这些货基本是这些厂家去年接的订单直接生产的,但今年有很多客户取消了订单,加上市场环境变化,代理商出货也很慢。工厂不像经销商,可以囤货,它必须保持周转,否则就得停工待产坐以待毙。所以几家厂子就联合起来,将厂里现有的产品变现,自谋生路。”穆延东告诉记者,他们在北京、上海也有此类清货会,销售情况都不错,相对而言,广州的销售情况不如北京、上海。“可能是产品材质的问题,微凹黄檀和缅甸花梨的产品比较畅销,但南美酸枝和东南亚酸枝的产品不太被认可。有很多消费者直接询问有没有大红酸枝的产品,也有很多消费者询问有没有明式风格的产品。”他透露,下周销售的产品将会进行调整,还是针对普通消费者,以老挝大红酸枝(交趾黄檀)、缅甸花梨的材质为主,增加明式风格家具的品类,但还是以清式风格为主。


', '', '内庭中央还展示着一辆豪华轿车,而周边则摆满红木家具,完全没有红木家具应该有的意境。更令人瞠目结舌的是,里面人流熙熙攘攘', '[{\"path\":\"/upload/article/1638/1464861401214.jpg\"}]', '0', '2028-01-01 00:00:00', '铭飞', '铭飞', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('195', '1', '众多国宝级古典家具悉数亮相', '83', '/62/83\\195.html', '

海南黄花梨圆包脚罗汉床、小叶紫檀云龙纹镶理石圆桌、富贵满堂多宝阁……昨日(12月13日)上午,第三届中国(江门)传统家具精品鉴赏会暨2014中国(江门)红木家具经销大会在五邑华侨广场会展中心正式开幕,众多国宝级古典家具作品以及海南黄花梨等珍贵木材亮相。

 

  此次活动由江门市古典家具行业协会主办,江门市新会区古典家具行业协会、台山市大江古典家具商会共同协办,会期为12月13日至16日,有来自我市新会、台山的50家代表性企业参展,云集了20多个省市经销商、行业精英,这是我市古典家具行业促进交流合作,展示广作精品,推广“江门红木”的重要平台。

 

  出席展会开幕式的有关嘉宾有:中国家具协会副理事长、传统家具专业委员会主席团常设主席陈宝光,故宫博物院常务副院长、故宫博物院研究员王亚民,中国家具协会传统家具专业委员会主席、江门市古典家具行业协会会长伍炳亮,省家具协会会长王克,省工艺美术协会会长舒海波等。

 

  我市是红木广作工艺的发源地之一,也是全国红木家具重要的生产基地,拥有深厚的文化和精妙的技艺,人才云集。借助这次展会,伍炳亮认为,一方面,“将有利于增加广大爱好者对传统家具的了解,在提升自己的审美观和鉴赏力,领略艺术魅力的同时,享受艺术带来的美好生活”;另一方面,这将成为我市对外展示的窗口,“展示我市优秀传统家具作品和设计,引领当代仿古家具健康发展”。

 

  王亚民在致辞中说:“江门在传统家具制作方面有很长的历史,涌现出了一批家具行业的企业家,对传统家具的继承创新与发展都做出了自己的探索和非常令人鼓舞的成就,在全国形成影响。”

 

  陈宝光则希望:“江门红木家具企业能够借这次展会,进一步推动行业良性发展,为全国红木家具发展作出贡献。”


', '', '海南黄花梨圆包脚罗汉床、小叶紫檀云龙纹镶理石圆桌、富贵满堂多宝阁……昨日(12月13日)上午,第三届中国(江门)传统家具精品鉴赏会暨2014中国(江门)红木家具....', '[{\"path\":\"/upload/article/1638/1464861408016.jpg\"}]', '0', '2028-01-01 00:00:00', '铭飞', '铭飞', '0', 'f,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('196', '1', '戴为红木燃情成都,开启幸福之门', '83', '/62/83\\196.html', '

有人说,成都,是一个让人来了就不想离开的地方,是一座悠远的文化名城,它用睿智和远见,让每一个人共享一座城市的幸福,因此被评为“最具幸福感的城市”。

 

那么,当中国国粹文化的传承者、追求幸福感的红木家具知名品牌——东莞市弘开实业有限公司(以下简称戴为红木)与成都邂逅,必能为广大成都市民增添更多新的幸福感。

近期,出于对中国传统文化的热爱,以及对红木艺术的执着、深情和追求,戴为红木携带“幸福之家”主题活动礼遇成都,使其鸿儒红木家居艺术馆隆重开业,为已进入寒冬的成都燃起了一把火,掀起了中式红木家具热潮!

 

据了解,戴为红木成都鸿儒红木家居艺术馆在锦江区三色路,展馆面积达500多平方米。艺术馆整体宏伟大气,装修精致,馆内的精品极富特色设计,尤其是第四层展示了戴为红木的代表性设计风格,不仅拥有宁静致远的品茶茶室,静心悟道之香道品香室,古色古香的贵宾区,休闲娱乐之棋牌室等高端居室,而且居室采用了鸿儒家居VIP会员制度。这意味着,在这里,不仅可以享受国粹文化的熏陶,还能尊享贵宾待遇的幸福感。


', '', '近期,出于对中国传统文化的热爱,以及对红木艺术的执着、深情和追求,戴为红木携带“幸福之家”主题活动礼遇成都,使其鸿儒红木家居艺术馆隆重开业,为已进入寒冬的成都燃起了一把火,掀起了中式红木家具热潮!', '[{\"path\":\"/upload/article/1638/1464861413861.jpg\"}]', '0', '2028-01-01 00:00:00', '铭飞', '铭飞', '0', 'h,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('197', '1', '质检整治电商售假 红木家具市场良莠不齐', '83', '/62/83\\197.html', '

今年以来,质检总局执法督查司按照网上发现、源头追溯、落地查处的要求,组织开展电子商务产品专项执法打假活动,积极构建适应电子商务执法打假的全国执法协查工作机制,推动属地查处工作的开展,全国共查处电商产品质量违法案件400余件。

2014年6月,江苏省淮安市质监局根据总局执法司统一部署,对江苏杰翔羽绒有限公司进行了执法检查。经查,该公司涉嫌生产并通过“天猫商城”和“京东商城”等电子商务平台销售以假充真蚕丝被。目前,江苏省淮安市淮安质监局已对该案立案查处。


', '', '质检总局执法督查司按照网上发现、源头追溯、落地查处的要求,组织开展电子商务产品专项执法打假活动,积极构建适应电子商务执法打假的全国执法协查工作机制...', '[{\"path\":\"/upload/article/1638/1464861373394.png\"}]', '0', '2028-01-01 00:00:00', '铭飞', '铭飞', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('198', '1', '东西方两大甜妞聚首巴黎时装周头排', '83', '/62/83\\198.html', '

巴黎时装周许晴倾力助阵,当天许晴身着黑色拼接装头排看秀,大秀美腿,加上干净利落的妆容,整体造型简洁率性,绿色的刺绣手包更添俏皮,银色的尖头高跟鞋成点睛之笔,许晴此次看秀的装扮可谓彰显了至纯至简主义。

对于此次的装扮许晴表示:“这次的服装都是看似简单其实细节之处非常打动我,像这件是硬朗的皮质与柔软的丝绵材质的拼接,好比是一刚一柔,代表女子都有柔软和刚强的两面,刚柔并济。”许晴和MirandaKerr在头牌看秀时不时凑在一起交流,时而发出会心微笑时而一起鼓掌,成为现场最闪耀的亮点,很多时尚博主达人都纷纷夸赞二人拥有最甜美的笑脸。


', '', '巴黎时装周许晴倾力助阵,当天许晴身着黑色拼接装头排看秀,大秀美腿,加上干净利落的妆容,整体造型简洁率性,绿色的刺绣手包更添俏皮..', '[{\"path\":\"/upload/article/1638/1464861364631.jpg\"}]', '0', '2028-01-01 00:00:00', '铭飞', '铭飞', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('199', '1', '宋朝华率队赴贵州招商洽谈推进重大项目', '83', '/62/83\\199.html', '

市委副书记、市长宋朝华率队前往贵州省贵阳市,实地考察由中铁贵旅公司投资开发建设的中铁国际生态城项目,并与公司高层进行了深入友好座谈,洽谈推进重大项目落户我市仁寿县相关事宜。

 

中国中铁旗下子公司——中铁贵旅公司开发建设的中铁国际生态城项目位于贵阳市龙洞堡空港经济区,总投资500亿元,占地面积约20平方公里,打造集旅游、休闲、度假、运动、文化、养老、养生和居住等多种功能于一体的世界级旅游度假目的地,2011年被列为“贵州省十二五旅游发展规划十大旅游项目”之一,是贵州省的重点项目。在中铁贵旅公司董事长张敏的陪同下,宋朝华一行参观考察了中铁国际生态城展示中心、中铁国际生态旅游城市综合体项目、安纳塔拉度假酒店和巫山香杏小镇等旅游开发项目,认真听取了项目规划建设有关情况介绍,对中铁国际生态城项目规划理念新、设计水平高、推进速度快表示由衷赞赏,对中铁贵旅公司有意来我市仁寿县投资发展表示热烈欢迎。

 

座谈会上,双方就推进项目落户事宜进行了深入友好会谈。宋朝华指出,中铁贵旅公司实力强、品牌响、理念新,对公司投资开发黑龙滩休闲旅游度假中心项目充满信心。通过深入考察和友好洽谈,双方就项目投资有关事宜达成了共识,并将于近期正式签署合作协议。张敏表示,天府眉山交通区位优越,旅游资源独特,发展潜力巨大,集团拟投资200亿元以上开发建设黑龙滩旅游项目。该项目将按照国际化水准,坚持以游为主、高举高打,紧紧围绕“吃、住、行、游、购、娱”六要素,走产业高端、高端产业的路线,全力打造5a级景区,为发展旅游产业和造福眉山人民作出央企应有的贡献。


', '', '市委副书记、市长宋朝华率队前往贵州省贵阳市,实地考察由中铁贵旅公司投资开发建设的中铁国际生态城项目,并与公司高层进行了深入友好座谈,洽谈推进重大项目落户我市仁寿县相关事宜。', '[{\"path\":\"/upload/article/1638/1464861360036.png\"}]', '0', '2028-01-01 00:00:00', '铭飞', '铭飞', '0', 'c,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('200', '1', '奔驰斯宾特A3 豪华版', '107', '/106/107\\200.html', '

斯宾特系列(Sprinter)系列技术领先,动力强劲。座位数从10座到20座均可选择,跟据配置不同,价格也从95.8万——178万可以选择。为您带来不同的商务体验。下面为您带来的就是斯宾特A3-9座旗舰型,号称移动总裁办公室的豪华商务房车。

从看到斯宾特的第一眼,您就会喜欢上他,不仅仅因为他豪华大气的外观,更得益于梅赛德斯-奔驰精湛造车技艺的极致发挥和处处以人为本的至臻理念,时刻让您感受到其中极高的舒适和享受。车门电动滑动装置,配合智能化遥控车钥匙开启,您可以轻而易举的开合车门,体现无微不至的尊荣享受。尽显豪华大气本色!


后轮双胎配置使车身的承载能力更加强大,更加稳定、安全。奔驰商务车秉承了梅赛德斯-奔驰品牌百年的造车传统,奔驰商务车中斯宾特以豪华大气的外观、卓尔不凡的品质、坚实可靠的性能,再一次演绎了梅赛德斯-奔驰对至善臻美的不懈追求。新一代梅赛德斯-奔驰商务车斯宾特技术更上一层楼,为高级商务车行业树立新标杆。外观造型气度恢弘、浑然天成;细节设计周密严谨、精益求精。梅赛德斯-奔驰造车专家独运匠心,精心打造,为客户带来具有更大空间、更强动力和更高安全保障的斯宾特。

 

车内中控隔屏、BOSE顶级KTV系统及酒柜吧台。高大的车身设计带来无与伦比的车内空间,车内净高1.98米。这使您进出车仓无需弯腰低头,也喻示着此车的拥有者在生意场上的强势,无需向任何人低头。车内后仓配备阿尔卑斯小牛皮手工订制的豪华航空座椅,尽显商务头等仓本色,两个可以360度旋转的座椅和侧置沙发可以让车内座椅布局自由组合。带来超乎想像的谈判空间!


隔屏上集成了一台来自三星的40英寸3D液晶电视,配合卫星电视接收器可以接收国内100多个电视频道,DVD庭影院系统也可以播放高清视频。让您在旅途中不再无聊。来自瑞士的水晶杯在酒柜的LED灯光照射下晶莹剔透,更显皇家风范。


', '', '斯宾特系列(Sprinter)系列技术领先,动力强劲。座位数从10座到20座均可选择,跟据配置不同,价格也从95.8万178万可以选择。为您带来不同的商务体验。下面为.', '[{\"path\":\"/upload/article/1638/1464851333470.jpg\"}]', '0', '2028-01-01 00:00:00', '来自火星的程序猿', 'MS', '0', 'p,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('201', '1', '福特E350 游艇版', '107', '/106/107\\201.html', '

其实商务车在人们眼里就是普通的客车,没有人会花时间去研究它,欣赏它。商务车给人的印象,就是整体的一箱车,发动机不是在驾驶与副驾驶的座椅下边,就是在车子的后面。没有前发动机舱,很少有人会把普通的商务车与“霸气”这个词汇文明发言在一起。而作为一款纯正的“美国”商务车,GMC3500完全打破中国人传统意识里的对商务车的形象。 

', '', '其实商务车在人们眼里就是普通的客车,没有人会花时间去研究它,欣赏它。商务车给人的印象,就是整体的一箱车,发动机不是在驾驶与副驾驶的座椅下...', '[{\"path\":\"/upload/article/1638/1464851477741.jpg\"}]', '0', '2028-01-01 00:00:00', '来自火星的程序猿', 'MS', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('202', '1', 'GMC3500 平顶舒适版', '107', '/106/107\\202.html', '

对于这样一款外观霸气,承载性高的原装进口商务车和它实在的销售价格,都让这款车的性价比大大提升了不少。对于市场上一些追求个性的客户群来讲,GMC3500恰恰就是一款能够让他们体现出个性化的座驾,留有足够改装想象和个性发展的空间,体验生活品味,从GMC开始。新款GMC Savana 3500 舒适版商务车是您一个很不错的选择。

', '', '对于这样一款外观霸气,承载性高的原装进口商务车和它实在的销售价格,都让这款车的性价比大大提升了不少。对于市场上一些追求个性的客户群来讲,...', '[{\"path\":\"/upload/article/1638/1464851473102.jpg\"}]', '0', '2028-01-01 00:00:00', '来自火星的程序猿', 'MS', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('203', '1', '宾特奔驰斯A系列', '107', '/106/107\\203.html', '

奔驰斯宾特系列礼宾车在豪华商务车系中,一向是高端、舒适的代名词。在秉承了奔驰的贵族气质的同时,其全新定制的奢华内饰让人感觉犹如进入了高档的商务会所。定位为大型集团公司商务接待用车。其超高端的豪华配置能够很好的提升用车企业的自身品质,给来访者一种最高礼遇,是对商务洽谈活动的一种实质推动和提升。 

', '', '奔驰斯宾特系列礼宾车在豪华商务车系中,一向是高端、舒适的代名词。在秉承了奔驰的贵族气质的同时,其全新定制的奢华内饰让人感觉犹如进入了高档..', '[{\"path\":\"/upload/article/1638/1465808166467.png\"}]', '0', '2028-01-01 00:00:00', '来自火星的程序猿', 'MS', '0', 'c,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('204', '1', '1', '148', '/100/148\\204.html', null, '', '', '[{\"path\":\"/upload/article/1638/1464859580381.jpg\"}]', '0', '2028-01-01 00:00:00', '', '', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('205', '1', '2', '148', '/100/148\\205.html', null, '', '', '[{\"path\":\"/upload/article/1638/1464859585818.jpg\"}]', '0', '2028-01-01 00:00:00', '', '', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('206', '1', '3', '148', '/100/148\\206.html', null, '', '', '[{\"path\":\"/upload/article/1638/1464859590366.jpg\"}]', '0', '2028-01-01 00:00:00', '', '', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('207', '1', '4', '148', '/100/148\\207.html', null, '', '', '[{\"path\":\"/upload/article/1638/1464859595151.jpg\"}]', '0', '2028-01-01 00:00:00', '', '', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('208', '1', '5', '148', '/100/148\\208.html', null, '', '', '[{\"path\":\"/upload/article/1638/1464859599849.jpg\"}]', '0', '2028-01-01 00:00:00', '', '', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('209', '1', '6', '148', '/100/148\\209.html', null, '', '高品质景观缔造者\r\nHigh quality landscape architects.', '[{\"path\":\"/upload/article/1638/1464859604208.jpg\"}]', '0', '2028-01-01 00:00:00', '园林绿化二级资质企业', '', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('210', '1', '幻灯五', '147', '/100/147\\210.html', null, '', '做精品设计、建优良工程、打造精品工程\r\nBoutique design, construction engineering, excellent build quality engineering.', '[{\"path\":\"/upload/article/1638/1464859633594.jpg\"}]', '0', '2028-01-01 00:00:00', '园林绿化二级资质企业', '', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('211', '1', '幻灯六', '147', '/100/147\\211.html', null, '', '与您一起携手,共同谱写园林绿化事业的新篇章!\r\nWork with you to jointly write a new chapter landscaping business!', '[{\"path\":\"/upload/article/1638/1464859625584.jpg\"}]', '0', '2028-01-01 00:00:00', '园林绿化二级资质企业', '', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('212', '1', '愿景', '95', '/93/95\\212.html', '
  1. 创造价值,提供优质的产品和服务,赢得用户的喜爱和尊敬。

  2. 利益均沾,让公司的每一成员都获得满意的回报。

  3. 合作共赢,与合作伙伴共同成长,赢得行业尊敬。

  4. 注重企业责任,关爱社会、回馈社会,赢得社会尊敬。


', '', '我们拥有稳定的充满创作激情的设计团队,核心人员由公司创立至今伴随我们一个又一个客户的成长,保证了稳定的设计出品质量及熟知我们所合作过的每一个客户的设计需求,现在,团队不断壮大。', '[{\"path\":\"/upload/article/1638/1464940624025.png\"}]', '0', '2028-01-01 00:00:00', '', '', '0', 'h,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('213', '1', '价值观', '95', '/93/95\\213.html', '
  1. 创造价值:一切工作围绕为用户价值展开,不做任何对用户没有价值的面子工作。

  2. 积极主动:在做好本职工作的前提下,积极主动为公司解决问题,推动公司发展。

  3. 踏实奋进:不报幻想,实事求是,锐意进取。不把“运气”当作成事的前提,抱美好的梦想,作最坏的打算。

  4. 合作共赢:抱着共赢的心态,积极与企业内外合作,充分利用各方优势,创造价值。


', '', '我们已为数百家企业、政府和社会团体完成品牌的传播与设计,积累了大量丰富的经验,可为您提供大量同类企业和机构的案例进行比较参考。', '[{\"path\":\"/upload/article/1638/1464940619456.jpg\"}]', '0', '2028-01-01 00:00:00', '', '', '0', 'p,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('214', '1', '经营理念', '95', '/93/95\\214.html', '
  1. 注重长远发展,不因商业利益伤害用户价值。

  2. 关注并深刻理解用户需求,不断以卓越的产品和服务满足用户需求。

  3. 重视与用户的情感沟通,尊重用户感受,与用户共成长。

  4. 合作共赢:抱着共赢的心态,积极与企业内外合作,充分利用各方优势,创造价值。


', '', '可提供一站式全面服务:品牌的定位——企业文化梳理——企业/品牌形象设计——品牌传播——环境空间设计——宣传物品的落地', '[{\"path\":\"/upload/article/1638/1464940614692.jpg\"}]', '0', '2028-01-01 00:00:00', '', '', '0', 'f,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('215', '1', '管理理念', '95', '/93/95\\215.html', '
  1. 努力为员工提供良好的工作环境和科学的激励机制。

  2. 努力让适合的人干适合的事,为员工提供丰富的培训和晋升机会,使员工和公司共同成长。

  3. 尊重和信任员工,鼓励员工充分发挥聪明才智,使其在自己的领域获得成功。


', '', '多年来,我们始终专注于品牌的设计与塑造,坚持站在市场的角度,为客户创作出准确的、极具商业价值的形象设计与品牌传播策略。', '[{\"path\":\"/upload/article/1638/1464940610305.jpg\"}]', '0', '2028-01-01 00:00:00', '', '', '0', 'c,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('216', '1', '李镇江', '115', '/115\\216.html', '

锐诚PPT创始人,资深PPT设计师、培训师、品牌策划师,任全国知名地产公司高级策划师,大型教育集团品牌运营总监;创办锐诚PPT后,为中原演示设计领域带来全新标准,帮助数百家企业定制演示精品,让演示创造更多价值。精通各种高端PPT设计、 精通版式、配色、文字逻辑和动画,设计案例上百件。擅长在实战中为学员点拨,让学员快速提升美感,做出更漂亮的作品。


', '', '资深PPT设计师', '[{\"path\":\"/upload/article/1638/1464860436576.png\",\"url\":\"/ms-mcms/upload/article/1638/1464860436576.png\",\"uid\":1577521906651,\"status\":\"success\"}]', '0', '2028-01-01 00:00:00', '', '', '0', 'h', '0', '0', '2019-12-28 16:31:58', null, null, null); -INSERT INTO `cms_content` VALUES ('217', '1', '曹瑛', '115', '/115\\217.html', '

锐诚PPT特邀首席技术专家,连续五年荣获美国微软公司评出的全球最有价值专家奖(简称MVP),通过微软办公专家国际认证(简称MOS)。出版专业PPT书籍《PPT高效设计-5分钟完美打造PPT课件》,在历届网络PPT大赛中做评委。阿瑛老师从事PPT设及教学十余年,PPT公开课上千场,经验极其丰富,授课轻松风趣,让0基础的学员都可以快速提升技能,做出漂亮的PPT。

', '', '锐诚PPT特邀首席技术专家', '[{\"path\":\"/upload/article/1638/1464860564066.png\"}]', '0', '2028-01-01 00:00:00', '', '', '0', 'p,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('218', '1', '孙建东', '115', '/115\\218.html', '

锐诚PPT培训部总监,17年PPT研究积淀,5年网络教室的教学经验。2013年获得全国振兴杯多媒体制作员比赛第7名 。多次获得省市局级办公软件技术大赛奖,独撰《PPT高效设计—6招完美打造工作型PPT》全国发行。曾任中国石化干部管理学院担任“PPT高级制作技巧”课程授课讲师。幽默,轻松的授课方式,快乐中传授高效快捷的实用技术。


', '', '锐诚PPT培训部总监', '[{\"path\":\"/upload/article/1638/1464860506257.png\"}]', '0', '2028-01-01 00:00:00', '', '', '0', 'c,', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('219', '1', '梅幸', '115', '/115\\219.html', '

锐诚PPT金牌设计师,毕业于上海美术学院视觉传达专业,曾在国内某知名4A广告公司任职,五年动画和PPT设计经验,拥有丰富的高端定制设计经验,专注于企业展示/工作汇报/品牌宣讲/竞聘/路演等高端PPT设计,设计理念:创意是设计的灵魂!在动画、质感和版式的设计上力求完美。


', '', '锐诚PPT金牌设计师', '[{\"path\":\"/upload/article/1638/1464860570155.png\",\"url\":\"/ms-mcms/upload/article/1638/1464860570155.png\",\"uid\":1577436839397,\"status\":\"success\"}]', '0', '2028-01-01 00:00:00', '', '', '0', 'f', '0', '0', '2019-12-27 16:58:00', null, null, null); -INSERT INTO `cms_content` VALUES ('220', '1', '攀臣广告', '149', '/149\\220.html', '

攀臣广告(上海)有限公司(以下简称:攀臣)是一家专注于亚克力制品(化妆品展架、展览展示道具、展架展柜陈列架、商场展示道具、展示盒、手机宣传架、发光展架、广告灯箱、标识标牌、工艺礼品、奖杯奖牌授权牌、商超货架置物架、台牌台卡台签、相框相架、金银珠宝展示礼盒、抽奖箱收纳箱、办公文具类、家居生活类、各类广告字、机器配套、产品附件配件等等)设计加工制作为一体的公司 。涉及:商务、工业、建筑、交通、商业、家居生活、广告、医学、照明、酒店餐饮、金融银行服务、学校教育、政府事业单位、景点旅游、展厅展览、零售店面、奢侈品、面包糕点等众多业态领域,产品基本覆盖全行业。

', '', '', '[{\"path\":\"/upload/1//article/1531105696938.jpg\"}]', '0', '2018-07-09 11:07:00', 'http://www.panchen-china.com/', '', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('221', '1', '华赋科创', '149', '/149\\221.html', '

深圳市华赋科创电子有限公司 成立于2009年,主要从事 IC 等电子元器件的推广、销售及开发应用服务。华赋是STMicro、NXP、ONSemi、TI、ADI、Intersil、Infineon、Vishay、Fujitsu、Yageo、Samsung、AOS、Fairchild、Freescale、Cypress、ROHM、HTC、Eastsoft、台湾安国、风华高科、等国内外著名公司的授权代理商或分销商。拥有微控制器、系统管理器件、通信接口器件、数据转换器件、信号调理器件、电源管理器件、存储器、连接器、分立半导体及被动器件等十多个产品种类。香港、深圳两地设立库房,现货库存产品达上万中,支持香港、海外交货。目前已与多家国外分销商建立了战略合作伙伴关系,其中包括:Mouser、 Rochester、Digi-Key、Future、Arrow、Avnet等,为国内客户提供海外订购产品服务,满足客户从研发到批量生产的所有采购需求。


', '', '', '[{\"path\":\"/upload/1//article/1531105877049.jpg\"}]', '0', '2018-07-09 11:09:00', 'http://www.huaful.com/', '', '0', '', '0', '0', null, null, null, null); -INSERT INTO `cms_content` VALUES ('222', '1', '洛阳洛龙', '149', '/149\\222.html', '

洛龙区人民政府门户网作为洛阳市洛龙区电子政务(网上行政)建设的重要组成部分,是政府信息公开的法定载体,是政府面向社会服务的平台,是公众与政府交流互动的桥梁,是宣传洛龙的主要窗口,对于促进政府信息公开、推进依法行政、接受公众监督、改进行政管理、全面履行政府职能和建设阳光政府具有重要意义。

', 'x', 'x', '[{\"path\":\"/upload/1//article/1531105970322.jpg\",\"url\":\"/ms-mcms/upload/1//article/1531105970322.jpg\",\"uid\":1578390819577,\"status\":\"success\"}]', '0', '2018-07-09 11:12:00', 'http://www.luolong.gov.cn/ ', '', '0', 'f', '0', '0', '2020-01-07 17:53:55', null, null, null); - --- ---------------------------- --- Table structure for cms_history_log --- ---------------------------- DROP TABLE IF EXISTS `cms_history_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `cms_history_log` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `hl_is_mobile` varchar(255) DEFAULT NULL COMMENT '是否为移动端', @@ -272,20 +175,25 @@ CREATE TABLE `cms_history_log` ( `create_by` int(11) DEFAULT NULL COMMENT '创建人', PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='文章浏览记录'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `cms_history_log` +-- + +LOCK TABLES `cms_history_log` WRITE; +/*!40000 ALTER TABLE `cms_history_log` DISABLE KEYS */; +INSERT INTO `cms_history_log` VALUES (1,'0',NULL,'127.0.0.2','7',0,NULL,NULL,NULL,NULL),(2,'0',NULL,'127.0.0.2','2',0,NULL,NULL,NULL,NULL),(3,'0',NULL,'127.0.0.1','2',0,NULL,NULL,NULL,NULL),(4,'0',NULL,'127.0.0.1','8',0,NULL,NULL,NULL,NULL),(5,'0',NULL,'127.0.0.1','7',0,NULL,NULL,NULL,NULL); +/*!40000 ALTER TABLE `cms_history_log` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `file` +-- --- ---------------------------- --- Records of cms_history_log --- ---------------------------- -INSERT INTO `cms_history_log` VALUES ('1', '0', null, '127.0.0.2', '7', '0', null, null, null, null); -INSERT INTO `cms_history_log` VALUES ('2', '0', null, '127.0.0.2', '2', '0', null, null, null, null); -INSERT INTO `cms_history_log` VALUES ('3', '0', null, '127.0.0.1', '2', '0', null, null, null, null); -INSERT INTO `cms_history_log` VALUES ('4', '0', null, '127.0.0.1', '8', '0', null, null, null, null); -INSERT INTO `cms_history_log` VALUES ('5', '0', null, '127.0.0.1', '7', '0', null, null, null, null); - --- ---------------------------- --- Table structure for file --- ---------------------------- DROP TABLE IF EXISTS `file`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `file` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '文件编号', `category_id` int(11) DEFAULT NULL COMMENT '文件分类编号', @@ -303,15 +211,24 @@ CREATE TABLE `file` ( `del` int(1) DEFAULT NULL COMMENT '删除标记', PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='基础文件表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `file` +-- + +LOCK TABLES `file` WRITE; +/*!40000 ALTER TABLE `file` DISABLE KEYS */; +/*!40000 ALTER TABLE `file` ENABLE KEYS */; +UNLOCK TABLES; --- ---------------------------- --- Records of file --- ---------------------------- +-- +-- Table structure for table `manager` +-- --- ---------------------------- --- Table structure for manager --- ---------------------------- DROP TABLE IF EXISTS `manager`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `manager` ( `manager_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '管理员id(主键)', `manager_name` varchar(15) DEFAULT NULL COMMENT '管理员用户名', @@ -326,16 +243,25 @@ CREATE TABLE `manager` ( KEY `fk_manager_role_1` (`manager_roleid`) USING BTREE, CONSTRAINT `manager_ibfk_1` FOREIGN KEY (`manager_roleid`) REFERENCES `role` (`role_id`) ON DELETE SET NULL ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=58 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='管理员表'; +/*!40101 SET character_set_client = @saved_cs_client */; --- ---------------------------- --- Records of manager --- ---------------------------- -INSERT INTO `manager` VALUES ('57', 'msopen', 'msopen', '9d8622060de5f24937b60585c3f4d66b', '48', '0', null, '0', 'super'); +-- +-- Dumping data for table `manager` +-- + +LOCK TABLES `manager` WRITE; +/*!40000 ALTER TABLE `manager` DISABLE KEYS */; +INSERT INTO `manager` VALUES (57,'msopen','msopen','9d8622060de5f24937b60585c3f4d66b',48,0,NULL,0,'super'); +/*!40000 ALTER TABLE `manager` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `mdiy_dict` +-- --- ---------------------------- --- Table structure for mdiy_dict --- ---------------------------- DROP TABLE IF EXISTS `mdiy_dict`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `mdiy_dict` ( `dict_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', `app_id` int(11) DEFAULT NULL COMMENT '应用编号', @@ -358,26 +284,25 @@ CREATE TABLE `mdiy_dict` ( KEY `dict_label` (`dict_label`) USING BTREE, CONSTRAINT `mdiy_dict_ibfk_1` FOREIGN KEY (`app_id`) REFERENCES `app` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=644 DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC COMMENT='字典表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `mdiy_dict` +-- + +LOCK TABLES `mdiy_dict` WRITE; +/*!40000 ALTER TABLE `mdiy_dict` DISABLE KEYS */; +INSERT INTO `mdiy_dict` VALUES (1,1,'f','幻灯','文章属性',NULL,NULL,3,'0',NULL,0,NULL,0,NULL,0),(2,1,'p','图片','文章属性',NULL,NULL,1,'0',NULL,0,NULL,0,NULL,0),(3,1,'c','推荐','文章属性',NULL,NULL,4,'0',NULL,0,NULL,0,NULL,0),(4,1,'h','头条','文章属性',NULL,NULL,2,'0',NULL,0,NULL,0,NULL,0),(621,1,'zdymx_wz','文章','自定义模型',NULL,'0',0,NULL,NULL,0,NULL,0,NULL,0),(638,1,'3','逻辑表','标签类型',NULL,'0',0,NULL,NULL,0,NULL,0,NULL,3),(639,1,'0','单条记录标签','标签类型',NULL,'0',0,NULL,NULL,0,NULL,0,NULL,3),(640,1,'1','多记录标签','标签类型',NULL,'0',0,NULL,NULL,0,NULL,0,NULL,3),(641,1,'2','功能标签','标签类型',NULL,'0',0,NULL,NULL,0,NULL,0,NULL,3),(642,1,'cms','文章','自定义页面类型',NULL,NULL,0,'0',NULL,0,'2019-12-28 14:32:46',0,NULL,0),(643,1,'t','推荐','栏目属性',NULL,NULL,0,'0',NULL,0,'2020-01-09 10:38:26',0,NULL,0); +/*!40000 ALTER TABLE `mdiy_dict` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `mdiy_form` +-- --- ---------------------------- --- Records of mdiy_dict --- ---------------------------- -INSERT INTO `mdiy_dict` VALUES ('1', '1', 'f', '幻灯', '文章属性', null, null, '3', '0', null, '0', null, '0', null, '0'); -INSERT INTO `mdiy_dict` VALUES ('2', '1', 'p', '图片', '文章属性', null, null, '1', '0', null, '0', null, '0', null, '0'); -INSERT INTO `mdiy_dict` VALUES ('3', '1', 'c', '推荐', '文章属性', null, null, '4', '0', null, '0', null, '0', null, '0'); -INSERT INTO `mdiy_dict` VALUES ('4', '1', 'h', '头条', '文章属性', null, null, '2', '0', null, '0', null, '0', null, '0'); -INSERT INTO `mdiy_dict` VALUES ('621', '1', 'zdymx_wz', '文章', '自定义模型', null, '0', '0', null, null, '0', null, '0', null, '0'); -INSERT INTO `mdiy_dict` VALUES ('638', '1', '3', '逻辑表', '标签类型', null, '0', '0', null, null, '0', null, '0', null, '3'); -INSERT INTO `mdiy_dict` VALUES ('639', '1', '0', '单条记录标签', '标签类型', null, '0', '0', null, null, '0', null, '0', null, '3'); -INSERT INTO `mdiy_dict` VALUES ('640', '1', '1', '多记录标签', '标签类型', null, '0', '0', null, null, '0', null, '0', null, '3'); -INSERT INTO `mdiy_dict` VALUES ('641', '1', '2', '功能标签', '标签类型', null, '0', '0', null, null, '0', null, '0', null, '3'); -INSERT INTO `mdiy_dict` VALUES ('642', '1', 'cms', '文章', '自定义页面类型', null, null, '0', '0', null, '0', '2019-12-28 14:32:46', '0', null, '0'); -INSERT INTO `mdiy_dict` VALUES ('643', '1', 't', '推荐', '栏目属性', null, null, '0', '0', null, '0', '2020-01-09 10:38:26', '0', null, '0'); - --- ---------------------------- --- Table structure for mdiy_form --- ---------------------------- DROP TABLE IF EXISTS `mdiy_form`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `mdiy_form` ( `form_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增长id', `form_tips_name` varchar(30) NOT NULL COMMENT '自定义表单提示文字', @@ -391,15 +316,24 @@ CREATE TABLE `mdiy_form` ( KEY `fk_mdiy_form` (`form_app_id`) USING BTREE, CONSTRAINT `mdiy_form_ibfk_1` FOREIGN KEY (`form_app_id`) REFERENCES `app` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='自定义表单表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `mdiy_form` +-- --- ---------------------------- --- Records of mdiy_form --- ---------------------------- +LOCK TABLES `mdiy_form` WRITE; +/*!40000 ALTER TABLE `mdiy_form` DISABLE KEYS */; +/*!40000 ALTER TABLE `mdiy_form` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `mdiy_model` +-- --- ---------------------------- --- Table structure for mdiy_model --- ---------------------------- DROP TABLE IF EXISTS `mdiy_model`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `mdiy_model` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `model_json` text COMMENT 'json', @@ -416,16 +350,25 @@ CREATE TABLE `mdiy_model` ( `model_custom_type` varchar(255) DEFAULT NULL COMMENT '类型', PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='自定义模型'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `mdiy_model` +-- + +LOCK TABLES `mdiy_model` WRITE; +/*!40000 ALTER TABLE `mdiy_model` DISABLE KEYS */; +INSERT INTO `mdiy_model` VALUES (41,'{\"html\":\"\\r\\n\",\"script\":\" var custom_model = Vue.component(\\\"custom-model\\\",{\\r\\n el: \'#custom-model\',\\r\\n data() {\\r\\n return {\\r\\n modelId:0,\\r\\n //表单数据\\r\\n form: {\\r\\n linkId:0,\\r\\n // 姓名\\r\\n name:\'\',\\r\\n // 手机\\r\\n phone:\'\',\\r\\n // 留言\\r\\n words:\'\',\\r\\n },\\r\\n rules:{\\r\\n },\\r\\n\\r\\n }\\r\\n },\\r\\n watch:{\\r\\n },\\r\\n computed:{\\r\\n },\\r\\n methods: {\\r\\n validate(){\\r\\n var b = false\\r\\n this.$refs.form.validate((valid) => {\\r\\n b = valid;\\r\\n });\\r\\n return b;\\r\\n },\\r\\n save() {\\r\\n var that = this;\\r\\n var success = false;\\r\\n var url = ms.manager + \\\"/mdiy/model/data/save.do\\\"\\r\\n if (that.form.id > 0) {\\r\\n url = ms.manager + \\\"/mdiy/model/data/update.do\\\";\\r\\n }\\r\\n this.$refs.form.validate((valid) => {\\r\\n if (valid) {\\r\\n var data = JSON.parse(JSON.stringify(that.form));\\r\\n data.modelId = that.modelId;\\r\\n ms.http.post(url, data).then(function (res) {\\r\\n if (res.data.id > 0) {\\r\\n success = true;\\r\\n }\\r\\n });\\r\\n } else {\\r\\n return false;\\r\\n }\\r\\n })\\r\\n return success;\\r\\n },\\r\\n //获取当前意见反馈\\r\\n get(id) {\\r\\n var that = this;\\r\\n ms.http.get(ms.manager + \\\"/mdiy/model/data.do\\\", {modelId:this.modelId,linkId:id}).then(function (res) {\\r\\n if(res.result&&res.data){\\r\\n that.form = res.data;\\r\\n }\\r\\n }).catch(function (err) {\\r\\n console.log(err);\\r\\n });\\r\\n },\\r\\n },\\r\\n created() {\\r\\n this.get(this.form.linkId);\\r\\n }\\r\\n });\\r\\n\\r\\n\"}',1,'mdiy_post_feedback','意见反馈',NULL,0,NULL,0,NULL,0,'[\r\n{\r\n \"model\":\"name\",\r\n \"key\":\"name\",\r\n \"javaType\":\"String\",\r\n \"jdbcType\":\"VARCHAR\",\r\n \"name\":\"姓名\",\r\n \"type\":\"input\"\r\n }\r\n ,{\r\n \"model\":\"phone\",\r\n \"key\":\"phone\",\r\n \"javaType\":\"String\",\r\n \"jdbcType\":\"VARCHAR\",\r\n \"name\":\"手机\",\r\n \"type\":\"input\"\r\n }\r\n ,{\r\n \"model\":\"words\",\r\n \"key\":\"words\",\r\n \"javaType\":\"String\",\r\n \"jdbcType\":\"VARCHAR\",\r\n \"name\":\"留言\",\r\n \"type\":\"textarea\"\r\n }\r\n]','post'); +/*!40000 ALTER TABLE `mdiy_model` ENABLE KEYS */; +UNLOCK TABLES; --- ---------------------------- --- Records of mdiy_model --- ---------------------------- -INSERT INTO `mdiy_model` VALUES ('41', '{\"html\":\"\\r\\n\",\"script\":\" var custom_model = Vue.component(\\\"custom-model\\\",{\\r\\n el: \'#custom-model\',\\r\\n data() {\\r\\n return {\\r\\n modelId:0,\\r\\n //表单数据\\r\\n form: {\\r\\n linkId:0,\\r\\n // 姓名\\r\\n name:\'\',\\r\\n // 手机\\r\\n phone:\'\',\\r\\n // 留言\\r\\n words:\'\',\\r\\n },\\r\\n rules:{\\r\\n },\\r\\n\\r\\n }\\r\\n },\\r\\n watch:{\\r\\n },\\r\\n computed:{\\r\\n },\\r\\n methods: {\\r\\n validate(){\\r\\n var b = false\\r\\n this.$refs.form.validate((valid) => {\\r\\n b = valid;\\r\\n });\\r\\n return b;\\r\\n },\\r\\n save() {\\r\\n var that = this;\\r\\n var success = false;\\r\\n var url = ms.manager + \\\"/mdiy/model/data/save.do\\\"\\r\\n if (that.form.id > 0) {\\r\\n url = ms.manager + \\\"/mdiy/model/data/update.do\\\";\\r\\n }\\r\\n this.$refs.form.validate((valid) => {\\r\\n if (valid) {\\r\\n var data = JSON.parse(JSON.stringify(that.form));\\r\\n data.modelId = that.modelId;\\r\\n ms.http.post(url, data).then(function (res) {\\r\\n if (res.data.id > 0) {\\r\\n success = true;\\r\\n }\\r\\n });\\r\\n } else {\\r\\n return false;\\r\\n }\\r\\n })\\r\\n return success;\\r\\n },\\r\\n //获取当前意见反馈\\r\\n get(id) {\\r\\n var that = this;\\r\\n ms.http.get(ms.manager + \\\"/mdiy/model/data.do\\\", {modelId:this.modelId,linkId:id}).then(function (res) {\\r\\n if(res.result&&res.data){\\r\\n that.form = res.data;\\r\\n }\\r\\n }).catch(function (err) {\\r\\n console.log(err);\\r\\n });\\r\\n },\\r\\n },\\r\\n created() {\\r\\n this.get(this.form.linkId);\\r\\n }\\r\\n });\\r\\n\\r\\n\"}', '1', 'mdiy_post_feedback', '意见反馈', null, '0', null, '0', null, '0', '[\r\n{\r\n \"model\":\"name\",\r\n \"key\":\"name\",\r\n \"javaType\":\"String\",\r\n \"jdbcType\":\"VARCHAR\",\r\n \"name\":\"姓名\",\r\n \"type\":\"input\"\r\n }\r\n ,{\r\n \"model\":\"phone\",\r\n \"key\":\"phone\",\r\n \"javaType\":\"String\",\r\n \"jdbcType\":\"VARCHAR\",\r\n \"name\":\"手机\",\r\n \"type\":\"input\"\r\n }\r\n ,{\r\n \"model\":\"words\",\r\n \"key\":\"words\",\r\n \"javaType\":\"String\",\r\n \"jdbcType\":\"VARCHAR\",\r\n \"name\":\"留言\",\r\n \"type\":\"textarea\"\r\n }\r\n]', 'post'); +-- +-- Table structure for table `mdiy_page` +-- --- ---------------------------- --- Table structure for mdiy_page --- ---------------------------- DROP TABLE IF EXISTS `mdiy_page`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `mdiy_page` ( `page_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增长id', `page_app_id` int(11) NOT NULL COMMENT '应用id', @@ -445,19 +388,25 @@ CREATE TABLE `mdiy_page` ( KEY `index_page_model_id` (`page_model_id`) USING BTREE, CONSTRAINT `mdiy_page_ibfk_1` FOREIGN KEY (`page_app_id`) REFERENCES `app` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='自定义页面表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `mdiy_page` +-- + +LOCK TABLES `mdiy_page` WRITE; +/*!40000 ALTER TABLE `mdiy_page` DISABLE KEYS */; +INSERT INTO `mdiy_page` VALUES (1,1,0,'people/register.htm','注册','cms','register',NULL,NULL,NULL,'2020-01-09 19:56:45',0),(2,1,0,'people/login.htm','登入','cms','login',NULL,NULL,NULL,'2020-01-09 19:56:40',0),(3,1,0,'people/center.htm','个人中心','cms','people/center',NULL,NULL,NULL,'2020-01-09 19:56:29',0),(4,1,0,'people/passworld-change.htm','修改密码','cms','people/password-change',NULL,NULL,NULL,'2020-01-09 14:46:52',0); +/*!40000 ALTER TABLE `mdiy_page` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `mdiy_post_feedback` +-- --- ---------------------------- --- Records of mdiy_page --- ---------------------------- -INSERT INTO `mdiy_page` VALUES ('1', '1', '0', 'people/register.htm', '注册', 'cms', 'register', null, null, null, '2020-01-09 19:56:45', '0'); -INSERT INTO `mdiy_page` VALUES ('2', '1', '0', 'people/login.htm', '登入', 'cms', 'login', null, null, null, '2020-01-09 19:56:40', '0'); -INSERT INTO `mdiy_page` VALUES ('3', '1', '0', 'people/center.htm', '个人中心', 'cms', 'people/center', null, null, null, '2020-01-09 19:56:29', '0'); -INSERT INTO `mdiy_page` VALUES ('4', '1', '0', 'people/passworld-change.htm', '修改密码', 'cms', 'people/password-change', null, null, null, '2020-01-09 14:46:52', '0'); - --- ---------------------------- --- Table structure for mdiy_post_feedback --- ---------------------------- DROP TABLE IF EXISTS `mdiy_post_feedback`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `mdiy_post_feedback` ( `name` varchar(255) DEFAULT NULL COMMENT '姓名', `phone` varchar(255) DEFAULT NULL COMMENT '手机', @@ -465,15 +414,24 @@ CREATE TABLE `mdiy_post_feedback` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='意见反馈'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `mdiy_post_feedback` +-- --- ---------------------------- --- Records of mdiy_post_feedback --- ---------------------------- +LOCK TABLES `mdiy_post_feedback` WRITE; +/*!40000 ALTER TABLE `mdiy_post_feedback` DISABLE KEYS */; +/*!40000 ALTER TABLE `mdiy_post_feedback` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `mdiy_tag` +-- --- ---------------------------- --- Table structure for mdiy_tag --- ---------------------------- DROP TABLE IF EXISTS `mdiy_tag`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `mdiy_tag` ( `id` int(11) NOT NULL AUTO_INCREMENT, `tag_name` varchar(255) DEFAULT NULL COMMENT '标签名称', @@ -481,22 +439,25 @@ CREATE TABLE `mdiy_tag` ( `tag_description` varchar(255) DEFAULT NULL COMMENT '描述', PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='标签'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `mdiy_tag` +-- + +LOCK TABLES `mdiy_tag` WRITE; +/*!40000 ALTER TABLE `mdiy_tag` DISABLE KEYS */; +INSERT INTO `mdiy_tag` VALUES (3,'arclist','page','文章列表'),(4,'channel','list','通用栏目'),(5,'global','single','全局'),(7,'field','single','文章内容'),(8,'pre','single','文章上一篇'),(9,'page','single','通用分页'),(10,'next','single','文章下一篇'); +/*!40000 ALTER TABLE `mdiy_tag` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `mdiy_tag_sql` +-- --- ---------------------------- --- Records of mdiy_tag --- ---------------------------- -INSERT INTO `mdiy_tag` VALUES ('3', 'arclist', 'page', '文章列表'); -INSERT INTO `mdiy_tag` VALUES ('4', 'channel', 'list', '通用栏目'); -INSERT INTO `mdiy_tag` VALUES ('5', 'global', 'single', '全局'); -INSERT INTO `mdiy_tag` VALUES ('7', 'field', 'single', '文章内容'); -INSERT INTO `mdiy_tag` VALUES ('8', 'pre', 'single', '文章上一篇'); -INSERT INTO `mdiy_tag` VALUES ('9', 'page', 'single', '通用分页'); -INSERT INTO `mdiy_tag` VALUES ('10', 'next', 'single', '文章下一篇'); - --- ---------------------------- --- Table structure for mdiy_tag_sql --- ---------------------------- DROP TABLE IF EXISTS `mdiy_tag_sql`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `mdiy_tag_sql` ( `id` int(11) NOT NULL AUTO_INCREMENT, `tag_id` int(11) NOT NULL COMMENT '自定义标签编号', @@ -506,21 +467,25 @@ CREATE TABLE `mdiy_tag_sql` ( KEY `fk_mdiy_tag_id` (`tag_id`) USING BTREE, CONSTRAINT `mdiy_tag_sql_ibfk_1` FOREIGN KEY (`tag_id`) REFERENCES `mdiy_tag` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='标签对应多个sql语句'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `mdiy_tag_sql` +-- + +LOCK TABLES `mdiy_tag_sql` WRITE; +/*!40000 ALTER TABLE `mdiy_tag_sql` DISABLE KEYS */; +INSERT INTO `mdiy_tag_sql` VALUES (5,3,'<#assign _typeid=\"\"/>\r\n<#assign _size=\"20\"/>\r\n<#if column?? && column.id?? && column.id?number gt 0>\r\n <#assign _typeid=\"${column.id}\">\r\n\r\n<#if typeid??>\r\n <#assign _typeid=\"${typeid}\">\r\n\r\n<#if size??>\r\n <#assign _size=\"${size}\">\r\n\r\n<#if orderby?? >\r\n <#if orderby==\"date\"> \r\n <#assign _orderby=\"content_datetime\">\r\n <#elseif orderby==\"updatedate\">\r\n <#assign _orderby=\"content_updatetime\">\r\n <#elseif orderby==\"hit\"> \r\n <#assign _orderby=\"content_hit\">\r\n <#elseif orderby==\"sort\">\r\n <#assign _orderby=\"content_sort\">\r\n <#else><#assign _orderby=\"cms_content.id\">\r\n <#else>\r\n <#assign _orderby=\"cms_content.id\">\r\n \r\nSELECT\r\n cms_content.id AS id,\r\n @rownum := @rownum + 1 AS `index`,\r\n LEFT (content_title, ${titlelen ?default(40)}) AS title,\r\n content_title AS fulltitle,\r\n content_author AS author,\r\n content_source AS source,\r\n content_details AS content,\r\n category.category_title AS typename,\r\n category.id AS typeid,\r\n ( CASE category.category_img WHEN \'\' THEN category.category_img ELSE CONVERT ( JSON_UNQUOTE( JSON_EXTRACT( category.category_img -> \'$[0]\', \'$.path\' ) ) USING utf8 ) END ) AS typelitpic,\r\n <#--列表页动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\"/${modelName}/list.do?typeid=\", category.category_id) as typelink,\r\n <#else>\r\n (SELECT \"index.html\") AS typelink,\r\n \r\n ( CASE content_img WHEN \'\' THEN content_img ELSE CONVERT ( JSON_UNQUOTE( JSON_EXTRACT( content_img -> \'$[0]\', \'$.path\' ) ) USING utf8 ) END ) AS litpic,\r\n <#--内容页动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\"/${modelName}/view.do?id=\", cms_content.id,\"&orderby=${_orderby}\",\"&order=${order!\'ASC\'}\",\"&typeid=${typeid}\") as link,\r\n <#else>\r\n\r\n CONCAT(category.category_path,\"/\",cms_content.id,\".html\") AS link,\r\n \r\n content_datetime AS date,<#if tableName??>${tableName}.*,\r\n content_description AS descrip,\r\n content_hit AS hit,\r\n content_type AS flag,\r\n category_title AS typetitle,\r\n cms_content.content_keyword AS keyword \r\nFROM\r\n (SELECT @rownum := 0) r,\r\n cms_content\r\n LEFT JOIN cms_category as category ON content_category_id = category.id\r\n <#--判断是否有自定义模型表-->\r\n <#if tableName??>LEFT JOIN ${tableName} ON ${tableName}.link_id=cms_content.id \r\nWHERE \r\n content_display=0 \r\n and cms_content.del=0 \r\n <#--根据站点编号查询-->\r\n <#if appId?? >\r\n and cms_content.app_id=${appId}\r\n and cms_content.id>0\r\n \r\n <#--判断是否有搜索分类集合-->\r\n <#if search??>\r\n <#if search.categoryIds??>and FIND_IN_SET(category.id,\'${search.categoryIds}\')\r\n <#--标题-->\r\n <#if search.content_title??> and content_title like CONCAT(\"%\",\'${search.content_title}\',\"%\")\r\n <#--作者-->\r\n <#if search.content_author??> and content_author like CONCAT(\"%\",\'${search.content_author}\',\"%\")\r\n <#--来源-->\r\n <#if search.content_source??> and content_source like CONCAT(\"%\",\'${search.content_source}\',\"%\")\r\n <#--属性-->\r\n <#if search.content_type??> and (\r\n <#list search.content_type?split(\',\') as item>\r\n <#if item?index gt 0> or\r\n FIND_IN_SET(\'${item}\',cms_content.content_type)\r\n )\r\n <#--描述-->\r\n <#if search.content_description??> and content_description like CONCAT(\"%\",\'${search.content_description}\',\"%\")\r\n <#--关键字-->\r\n <#if search.content_keyword??> and content_keyword like CONCAT(\"%\",\'${search.content_keyword}\',\"%\")\r\n <#--内容-->\r\n <#if search.content_details??> and content_details like CONCAT(\"%\",\'${search.content_details}\',\"%\")\r\n \r\n<#--自定义顺序-->\r\n <#if search.content_sort??> and content_sort=${search.content_sort} \r\n<#--时间范围-->\r\n <#if search.content_datetime_start??&&search.content_datetime_end??> and content_datetime between \'${search.content_datetime_start}\' and \'${search.content_datetime_end}\'\r\n <#else><#--查询栏目-->\r\n <#if _typeid?has_content> and (content_category_id=${_typeid} or content_category_id in \r\n (select id FROM cms_category where cms_category.del=0 and find_in_set(${_typeid},CATEGORY_PARENT_ID))) \r\n \r\n <#--标题-->\r\n <#if content_title??> and content_title like CONCAT(\"%\",\'${content_title}\',\"%\")\r\n <#--作者-->\r\n <#if content_author??> and content_author like CONCAT(\"%\",\'${content_author}\',\"%\")\r\n <#--来源-->\r\n <#if content_source??> and content_source like CONCAT(\"%\",\'${content_source}\',\"%\")\r\n <#--属性-->\r\n <#if content_type??> and content_type like CONCAT(\"%\",\'${content_type}\',\"%\")\r\n <#--描述-->\r\n <#if content_description??> and content_description like CONCAT(\"%\",\'${content_description}\',\"%\")\r\n <#--关键字-->\r\n <#if content_keyword??> and content_keyword like CONCAT(\"%\",\'${content_keyword}\',\"%\")\r\n <#--内容-->\r\n <#if content_details??> and content_details like CONCAT(\"%\",\'${content_details}\',\"%\")\r\n <#--自定义顺序-->\r\n <#if content_sort??> and content_sort=${content_sort}\r\n <#--自定义模型-->\r\n <#if diyModel??> \r\n <#list diyModel as dm>\r\n and ${tableName}.${dm.key} like CONCAT(\"%\",\'${dm.value}\',\"%\") \r\n \r\n \r\n <#--文章属性-->\r\n <#if flag?? >\r\n and(\r\n <#list flag?split(\',\') as item>\r\n <#if item?index gt 0> or\r\n FIND_IN_SET(\'${item}\',cms_content.content_type)\r\n )\r\n \r\n <#if noflag??>\r\n and(\r\n <#list noflag?split(\',\') as item>\r\n <#if item?index gt 0> and\r\n FIND_IN_SET(\'${item}\',cms_content.content_type)=0\r\n or cms_content.content_type is null)\r\n \r\n <#--字段排序-->\r\n <#if orderby?? >\r\n ORDER BY \r\n <#if orderby==\"date\"> content_datetime\r\n <#elseif orderby==\"updatedate\"> content_updatetime\r\n <#elseif orderby==\"hit\"> content_hit\r\n <#elseif orderby==\"sort\"> content_sort\r\n <#else>cms_content.id\r\n <#else>\r\n ORDER BY cms_content.id\r\n \r\n <#if order?? >\r\n <#if order==\"desc\"> desc\r\n <#if order==\"asc\"> asc\r\n \r\n LIMIT \r\n <#--判断是否分页-->\r\n <#if ispaging?? && (pageTag.pageNo)??>${((pageTag.pageNo-1)*_size?eval)?c},${_size?default(20)}\r\n <#else>${_size?default(20)}',1),(6,4,'<#assign _typeid=\"0\"/>\r\n<#if column?? && column.id?? && column.id?number gt 0>\r\n <#assign _typeid=\"${column.id}\">\r\n <#assign selfid=\"${column.id}\">\r\n\r\n<#if typeid??>\r\n <#assign _typeid=\"${typeid}\">\r\n\r\nselect \r\n @rownum := @rownum + 1 AS typeindex,\r\n id,\r\n id as typeid,\r\n category_title as typetitle,\r\n <#--返回父id集合-->\r\n category_parent_id as pids,\r\n <#--栏目选中的样式-->\r\n IF(<#if selfid?has_content>${selfid}<#else>${_typeid} = id ,\"${class!\'\'}\",\"\") as class,\r\n <#--动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\"/${modelName}/list.do?typeid=\", id) as typelink,\r\n <#else>\r\n <#--栏目类型为链接-->\r\n IF(\"3\" = category_type,category_diy_url,CONCAT(category_path,\"/index.html\")) as typelink,\r\n \r\n category_keyword as typekeyword,\r\n category_diy_url as typeurl,\r\n category_flag as flag,\r\n category_parent_id as parentid,\r\ncategory_descrip as typedescrip,\r\n ( CASE category_img WHEN \'\' THEN category_img ELSE CONVERT ( JSON_UNQUOTE( JSON_EXTRACT( category_img -> \'$[0]\', \'$.path\' ) ) USING utf8 ) END ) as typelitpic ,\r\n(select count(*) from cms_category c where c.category_id=typeid and c.del=0) as childsize\r\n from (SELECT @rownum := 0) r,cms_category \r\n where \r\n cms_category.del=0 \r\n <#--根据站点编号查询-->\r\n <#if appId?? >\r\n and cms_category.app_id=${appId}\r\n \r\n <#--栏目属性-->\r\n <#if flag?? >\r\n and\r\n ( <#list flag?split(\',\') as item>\r\n <#if item?index gt 0> or\r\n FIND_IN_SET(\'${item}\',category_flag)\r\n )\r\n \r\n\r\n <#if noflag?? >\r\n and\r\n (\r\n <#list noflag?split(\',\') as item>\r\n <#if item?index gt 0> and\r\n FIND_IN_SET(\'${item}\',category_flag)=0\r\n or category_flag is null)\r\n \r\n <#--type默认son-->\r\n<#if !type??||!type?has_content>\r\n<#assign type=\"son\"/>\r\n\r\n<#if type?has_content>\r\n <#--顶级栏目(单个)-->\r\n <#if type==\"top\">\r\n <#if _typeid != \"0\">\r\n and id=(SELECT IF(IF(LEFT ( category_parent_id, LOCATE( \",\", category_parent_id ) - 1 ),LEFT ( category_parent_id, LOCATE( \",\", category_parent_id ) - 1 ),category_parent_id),IF(LEFT ( category_parent_id, LOCATE( \",\", category_parent_id ) - 1 ),LEFT ( category_parent_id, LOCATE( \",\", category_parent_id ) - 1 ),category_parent_id),id)FROM cms_category WHERE id = ${_typeid})\r\n \r\n <#elseif type==\"nav\">\r\n and(category_id=0 or category_id is null)\r\n <#--同级栏目(多个)-->\r\n <#elseif type==\"level\">\r\n and\r\n <#if _typeid?has_content>\r\n category_id=(select category_id from cms_category where id=${_typeid})\r\n <#else>\r\n 1=1\r\n \r\n <#--当前栏目(单个)-->\r\n <#elseif type==\"self\">\r\n and \r\n <#if _typeid?has_content>\r\n id=${_typeid}\r\n <#else>\r\n 1=1\r\n \r\n <#--当前栏目的所属栏目(多个)-->\r\n <#elseif type==\"path\">\r\n and \r\n <#if _typeid?has_content>\r\n id in (<#if column?? && column.categoryParentId??>${column.categoryParentId},${_typeid})\r\n <#else>\r\n 1=1\r\n \r\n <#--子栏目(多个)-->\r\n <#elseif type==\"son\">\r\n and \r\n <#if _typeid?has_content>\r\n category_id=${_typeid}\r\n <#else>\r\n 1=1\r\n \r\n <#--上一级栏目没有则取当前栏目(单个)-->\r\n <#elseif type==\"parent\">\r\n and \r\n <#if _typeid?has_content>\r\n <#if column?? && column.categoryId??>\r\n id=${column.categoryId}\r\n <#else>\r\n id=${_typeid}\r\n \r\n <#else>\r\n 1=1\r\n \r\n <#--子栏目或同级栏目(多个)-->\r\n <#elseif type==\"sonOrLevel\">\r\n and \r\n <#if _typeid?has_content>\r\n category_id= if((SELECT count(*) FROM cms_category\r\n WHERE category_id=${_typeid})>0,${_typeid},(select category_id from cms_category where id=${_typeid}))\r\n <#else>\r\n 1=1\r\n \r\n \r\n<#else> <#--默认顶级栏目-->\r\n and\r\n <#if _typeid?has_content>\r\n id=${_typeid}\r\n <#else>\r\n (category_id=0 or category_id is null)\r\n \r\n\r\n<#--字段排序-->\r\n <#if orderby?? >\r\n ORDER BY \r\n <#if orderby==\"date\"> category_datetime\r\n <#elseif orderby==\"sort\"> category_sort\r\n <#else>cms_content.id\r\n <#else>\r\n ORDER BY id\r\n \r\n <#if order?? >\r\n <#if order==\"desc\"> desc\r\n <#if order==\"asc\"> asc\r\n ',1),(7,5,'select \r\nAPP_NAME as name,\r\n( CASE app_logo WHEN \'\' THEN app_logo ELSE CONVERT ( JSON_UNQUOTE( JSON_EXTRACT( app_logo -> \'$[0]\', \'$.path\' ) ) USING utf8 ) END ) as logo ,\r\napp_keyword as keyword,\r\napp_description as descrip,\r\napp_copyright as copyright,\r\n<#--动态解析 -->\r\n<#if isDo?? && isDo>\r\nCONCAT(\"${url}\",\"/${html}/\",id) as url,\r\n\"${url}\" as host,\r\n<#--使用地址栏的域名 -->\r\n<#elseif url??>\r\nCONCAT(\"${url}\",\"/${html}/\",id,\"/<#if m??>${m}\") as url,\r\n\"${url}\" as host,\r\n<#else>\r\nCONCAT(REPLACE(REPLACE(TRIM(substring_index(app_url,\"\\n\",1)), CHAR(10),\'\'), CHAR(13),\'\'),\"/html/\",id,\"/<#if m??>${m}\") as url,\r\nREPLACE(REPLACE(TRIM(substring_index(app_url,\"\\n\",1)), CHAR(10),\'\'), CHAR(13),\'\') as host,\r\n\r\nCONCAT(\"templets/\",id,\"/\",<#if m??>CONCAT(app_style,\"/${m}\")<#else>app_style) as style <#-- 判断是否为手机端 -->\r\nfrom app where id = ${appId} limit 1',1),(8,7,'SELECT \r\ncms_content.id as id,\r\nleft(content_title,${titlelen?default(40)}) as title,\r\ncontent_title as fulltitle,\r\ncontent_author as author, \r\ncontent_source as source, \r\ncontent_details as content,\r\ncategory_title as typetitle,\r\ncms_category.id as typeid,\r\n ( CASE cms_category.category_img WHEN \'\' THEN cms_category.category_img ELSE CONVERT ( JSON_UNQUOTE( JSON_EXTRACT( cms_category.category_img -> \'$[0]\', \'$.path\' ) ) USING utf8 ) END ) AS typelitpic,\r\n<#--动态链接-->\r\n<#if isDo?? && isDo>\r\nCONCAT(\"/${modelName}/list.do?typeid=\", cms_category.id) as typelink,\r\n<#else>\r\n(SELECT \"index.html\") as typelink,\r\n\r\n( CASE cms_content.content_img WHEN \'\' THEN cms_content.content_img ELSE CONVERT ( JSON_UNQUOTE( JSON_EXTRACT( cms_content.content_img -> \'$[0]\', \'$.path\' ) ) USING utf8 ) END ) AS litpic,\r\n<#--内容页动态链接-->\r\n<#if isDo?? && isDo>\r\nCONCAT(\"/mcms/view.do?id=\", cms_content.id) as link,\r\n<#else>\r\ncontent_url AS link,\r\n\r\ncontent_datetime as date,\r\ncontent_description as descrip,\r\nCONCAT(\"\") as hit,\r\ncontent_type as flag,\r\ncategory_title as typetitle,\r\n<#if tableName??>${tableName}.*,\r\ncontent_keyword as keyword\r\nFROM cms_content\r\nLEFT JOIN cms_category ON \r\n<#--如果是栏目列表页没有文章id所以只取栏目id-->\r\n<#if column??&&column.id??&&!id??> \r\n cms_category.id=${column.id}\r\n<#else>\r\ncms_category.id = content_category_id\r\n\r\n<#--判断是否有自定义模型表-->\r\n<#if tableName??>left join ${tableName} on ${tableName}.link_id=cms_content.id\r\nWHERE \r\n cms_content.del=0\r\n<#if id??> and cms_content.id=${id}',1),(9,8,'<#assign select=\"(SELECT \'\')\"/>\r\n<#if orderby?? >\r\n <#if orderby==\"date\"> \r\n <#assign _orderby=\"content_datetime\">\r\n <#elseif orderby==\"updatedate\">\r\n <#assign _orderby=\"content_updatetime\">\r\n <#elseif orderby==\"hit\"> \r\n <#assign _orderby=\"content_hit\">\r\n <#elseif orderby==\"sort\">\r\n <#assign _orderby=\"content_sort\">\r\n <#else><#assign _orderby=\"cms_content.id\">\r\n <#else>\r\n <#assign _orderby=\"cms_content.id\">\r\n \r\n<#if (pageTag.preId) gt 0>\r\nSELECT \r\ncms_content.id as id,\r\nleft(content_title,${titlelen?default(40)}) as title,\r\ncontent_title as fulltitle,\r\ncontent_author as author, \r\ncontent_source as source, \r\ncontent_details as content,\r\ncategory.category_title as typename,\r\ncategory.category_id as typeid,\r\n(SELECT \"index.html\") as typelink,\r\ncontent_img as litpic,\r\n<#--内容页动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\"/${modelName}/view.do?id=\", cms_content.id,\"&orderby=${_orderby}\",\"&order=${order!\'ASC\'}\",\"&typeid=${typeid}\") as link,\r\n <#else>\r\n CONCAT(category_path,\"/\",cms_content.id,\".html\") AS link,\r\n \r\ncontent_datetime as date,\r\ncontent_description as descrip,\r\ncontent_hit as hit,\r\ncontent_type as flag,\r\ncontent_keyword as keyword \r\nFROM cms_content \r\nLEFT JOIN cms_category as category ON content_category_id=category.id \r\nWHERE cms_content.id=${pageTag.preId}\r\n<#else>\r\nSELECT \r\n${select} as id,\r\n${select} as title,\r\n${select} as fulltitle,\r\n${select} as author, \r\n${select} as source, \r\n${select} as content,\r\n${select} as typename,\r\n${select} as typeid,\r\n${select} as typelink,\r\n${select} as litpic,\r\n${select} as link,\r\n${select} as date,\r\n${select} as descrip,\r\n${select} as hit,\r\n${select} as flag,\r\n${select} as keyword FROM cms_content\r\n',NULL),(10,9,' select\r\n <#if !(pageTag.indexUrl??)>\r\n <#--判断是否有栏目对象,用于搜索不传栏目-->\r\n <#if column??>\r\n <#assign path=column.categoryPath/>\r\n <#else>\r\n <#assign path=\"\"/>\r\n \r\n <#--总记录数、总页数-->\r\n (SELECT ${pageTag.total}) as total,\r\n <#--记录总数-->\r\n (SELECT ${pageTag.size}) as rcount,\r\n <#--当前页码-->\r\n (SELECT ${pageTag.pageNo}) as cur,\r\n <#--首页-->\r\n CONCAT(\"${path}\", \"/index.html\") as `index`,\r\n <#--上一页-->\r\n <#if (pageTag.pageNo?eval-1) gt 1>\r\n CONCAT(\"${path}\",\"/list-${pageTag.pageNo?eval-1}.html\") as pre,\r\n <#else>\r\n CONCAT(\"${path}\",\"/index.html\") as pre,\r\n \r\n <#--下一页-->\r\n <#if pageTag.total==1>\r\n CONCAT(\"${path}\", \"/index.html\") as `next`,\r\n CONCAT(\"${path}\", \"/index.html\") as `last`\r\n <#else>\r\n <#if pageTag.pageNo?eval gte pageTag.total>\r\n CONCAT(\"${path}\",\"/list-${pageTag.total}.html\") as next,\r\n <#else>\r\n CONCAT(\"${path}\",\"/list-${pageTag.pageNo?eval+1}.html\") as next,\r\n \r\n <#--最后一页-->\r\n CONCAT(\"${path}\",\"/list-${pageTag.total}.html\") as last\r\n \r\n<#else><#--判断是否是搜索页面-->\r\n \"${pageTag.indexUrl}\" as `index`,\"${pageTag.lastUrl}\" as `last`,\"${pageTag.preUrl}\" as `pre`,\"${pageTag.nextUrl}\" as `next`,\'${pageTag.total}\' as total,\'${pageTag.size}\' as rcount,\'${pageTag.pageNo}\' as cur\r\n',NULL),(11,10,'<#assign select=\"(SELECT \'\')\"/>\r\n<#if orderby?? >\r\n <#if orderby==\"date\"> \r\n <#assign _orderby=\"content_datetime\">\r\n <#elseif orderby==\"updatedate\">\r\n <#assign _orderby=\"content_updatetime\">\r\n <#elseif orderby==\"hit\"> \r\n <#assign _orderby=\"content_hit\">\r\n <#elseif orderby==\"sort\">\r\n <#assign _orderby=\"content_sort\">\r\n <#else><#assign _orderby=\"cms_content.id\">\r\n <#else>\r\n <#assign _orderby=\"cms_content.id\">\r\n \r\n<#if (pageTag.nextId) gt 0>\r\nSELECT \r\ncms_content.id as id,\r\nleft(content_title,${titlelen?default(40)}) as title,\r\ncontent_title as fulltitle,\r\ncontent_author as author, \r\ncontent_source as source, \r\ncontent_details as content,\r\ncategory.category_title as typename,\r\ncategory.category_id as typeid,\r\n(SELECT \"index.html\") as typelink,\r\ncontent_img as litpic,\r\n<#--内容页动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\"/${modelName}/view.do?id=\", cms_content.id,\"&orderby=${_orderby}\",\"&order=${order!\'ASC\'}\",\"&typeid=${typeid}\") as link,\r\n <#else>\r\n CONCAT(category_path,\"/\",cms_content.id,\".html\") AS link,\r\n \r\ncontent_datetime as date,\r\ncontent_description as descrip,\r\ncontent_hit as hit,\r\ncontent_type as flag,\r\ncontent_keyword as keyword \r\nFROM cms_content \r\nLEFT JOIN cms_category as category ON content_category_id=category.id \r\nWHERE cms_content.id=${pageTag.nextId}\r\n<#else>\r\nSELECT \r\n${select} as id,\r\n${select} as title,\r\n${select} as fulltitle,\r\n${select} as author, \r\n${select} as source, \r\n${select} as content,\r\n${select} as typename,\r\n${select} as typeid,\r\n${select} as typelink,\r\n${select} as litpic,\r\n${select} as link,\r\n${select} as date,\r\n${select} as descrip,\r\n${select} as hit,\r\n${select} as flag,\r\n${select} as keyword FROM cms_content\r\n',NULL); +/*!40000 ALTER TABLE `mdiy_tag_sql` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `model` +-- --- ---------------------------- --- Records of mdiy_tag_sql --- ---------------------------- -INSERT INTO `mdiy_tag_sql` VALUES ('5', '3', '<#assign _typeid=\"\"/>\r\n<#assign _size=\"20\"/>\r\n<#if column?? && column.id?? && column.id?number gt 0>\r\n <#assign _typeid=\"${column.id}\">\r\n\r\n<#if typeid??>\r\n <#assign _typeid=\"${typeid}\">\r\n\r\n<#if size??>\r\n <#assign _size=\"${size}\">\r\n\r\n<#if orderby?? >\r\n <#if orderby==\"date\"> \r\n <#assign _orderby=\"content_datetime\">\r\n <#elseif orderby==\"updatedate\">\r\n <#assign _orderby=\"content_updatetime\">\r\n <#elseif orderby==\"hit\"> \r\n <#assign _orderby=\"content_hit\">\r\n <#elseif orderby==\"sort\">\r\n <#assign _orderby=\"content_sort\">\r\n <#else><#assign _orderby=\"cms_content.id\">\r\n <#else>\r\n <#assign _orderby=\"cms_content.id\">\r\n \r\nSELECT\r\n cms_content.id AS id,\r\n @rownum := @rownum + 1 AS `index`,\r\n LEFT (content_title, ${titlelen ?default(40)}) AS title,\r\n content_title AS fulltitle,\r\n content_author AS author,\r\n content_source AS source,\r\n content_details AS content,\r\n category.category_title AS typename,\r\n category.id AS typeid,\r\n ( CASE category.category_img WHEN \'\' THEN category.category_img ELSE CONVERT ( JSON_UNQUOTE( JSON_EXTRACT( category.category_img -> \'$[0]\', \'$.path\' ) ) USING utf8 ) END ) AS typelitpic,\r\n <#--列表页动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\"/${modelName}/list.do?typeid=\", category.category_id) as typelink,\r\n <#else>\r\n (SELECT \"index.html\") AS typelink,\r\n \r\n ( CASE content_img WHEN \'\' THEN content_img ELSE CONVERT ( JSON_UNQUOTE( JSON_EXTRACT( content_img -> \'$[0]\', \'$.path\' ) ) USING utf8 ) END ) AS litpic,\r\n <#--内容页动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\"/${modelName}/view.do?id=\", cms_content.id,\"&orderby=${_orderby}\",\"&order=${order!\'ASC\'}\",\"&typeid=${typeid}\") as link,\r\n <#else>\r\n\r\n CONCAT(category.category_path,\"/\",cms_content.id,\".html\") AS link,\r\n \r\n content_datetime AS date,<#if tableName??>${tableName}.*,\r\n content_description AS descrip,\r\n content_hit AS hit,\r\n content_type AS flag,\r\n category_title AS typetitle,\r\n cms_content.content_keyword AS keyword \r\nFROM\r\n (SELECT @rownum := 0) r,\r\n cms_content\r\n LEFT JOIN cms_category as category ON content_category_id = category.id\r\n <#--判断是否有自定义模型表-->\r\n <#if tableName??>LEFT JOIN ${tableName} ON ${tableName}.link_id=cms_content.id \r\nWHERE \r\n content_display=0 \r\n and cms_content.del=0 \r\n <#--根据站点编号查询-->\r\n <#if appId?? >\r\n and cms_content.app_id=${appId}\r\n and cms_content.id>0\r\n \r\n <#--判断是否有搜索分类集合-->\r\n <#if search??>\r\n <#if search.categoryIds??>and FIND_IN_SET(category.id,\'${search.categoryIds}\')\r\n <#--标题-->\r\n <#if search.content_title??> and content_title like CONCAT(\"%\",\'${search.content_title}\',\"%\")\r\n <#--作者-->\r\n <#if search.content_author??> and content_author like CONCAT(\"%\",\'${search.content_author}\',\"%\")\r\n <#--来源-->\r\n <#if search.content_source??> and content_source like CONCAT(\"%\",\'${search.content_source}\',\"%\")\r\n <#--属性-->\r\n <#if search.content_type??> and (\r\n <#list search.content_type?split(\',\') as item>\r\n <#if item?index gt 0> or\r\n FIND_IN_SET(\'${item}\',cms_content.content_type)\r\n )\r\n <#--描述-->\r\n <#if search.content_description??> and content_description like CONCAT(\"%\",\'${search.content_description}\',\"%\")\r\n <#--关键字-->\r\n <#if search.content_keyword??> and content_keyword like CONCAT(\"%\",\'${search.content_keyword}\',\"%\")\r\n <#--内容-->\r\n <#if search.content_details??> and content_details like CONCAT(\"%\",\'${search.content_details}\',\"%\")\r\n \r\n<#--自定义顺序-->\r\n <#if search.content_sort??> and content_sort=${search.content_sort} \r\n<#--时间范围-->\r\n <#if search.content_datetime_start??&&search.content_datetime_end??> and content_datetime between \'${search.content_datetime_start}\' and \'${search.content_datetime_end}\'\r\n <#else><#--查询栏目-->\r\n <#if _typeid?has_content> and (content_category_id=${_typeid} or content_category_id in \r\n (select id FROM cms_category where cms_category.del=0 and find_in_set(${_typeid},CATEGORY_PARENT_ID))) \r\n \r\n <#--标题-->\r\n <#if content_title??> and content_title like CONCAT(\"%\",\'${content_title}\',\"%\")\r\n <#--作者-->\r\n <#if content_author??> and content_author like CONCAT(\"%\",\'${content_author}\',\"%\")\r\n <#--来源-->\r\n <#if content_source??> and content_source like CONCAT(\"%\",\'${content_source}\',\"%\")\r\n <#--属性-->\r\n <#if content_type??> and content_type like CONCAT(\"%\",\'${content_type}\',\"%\")\r\n <#--描述-->\r\n <#if content_description??> and content_description like CONCAT(\"%\",\'${content_description}\',\"%\")\r\n <#--关键字-->\r\n <#if content_keyword??> and content_keyword like CONCAT(\"%\",\'${content_keyword}\',\"%\")\r\n <#--内容-->\r\n <#if content_details??> and content_details like CONCAT(\"%\",\'${content_details}\',\"%\")\r\n <#--自定义顺序-->\r\n <#if content_sort??> and content_sort=${content_sort}\r\n <#--自定义模型-->\r\n <#if diyModel??> \r\n <#list diyModel as dm>\r\n and ${tableName}.${dm.key} like CONCAT(\"%\",\'${dm.value}\',\"%\") \r\n \r\n \r\n <#--文章属性-->\r\n <#if flag?? >\r\n and(\r\n <#list flag?split(\',\') as item>\r\n <#if item?index gt 0> or\r\n FIND_IN_SET(\'${item}\',cms_content.content_type)\r\n )\r\n \r\n <#if noflag??>\r\n and(\r\n <#list noflag?split(\',\') as item>\r\n <#if item?index gt 0> and\r\n FIND_IN_SET(\'${item}\',cms_content.content_type)=0\r\n or cms_content.content_type is null)\r\n \r\n <#--字段排序-->\r\n <#if orderby?? >\r\n ORDER BY \r\n <#if orderby==\"date\"> content_datetime\r\n <#elseif orderby==\"updatedate\"> content_updatetime\r\n <#elseif orderby==\"hit\"> content_hit\r\n <#elseif orderby==\"sort\"> content_sort\r\n <#else>cms_content.id\r\n <#else>\r\n ORDER BY cms_content.id\r\n \r\n <#if order?? >\r\n <#if order==\"desc\"> desc\r\n <#if order==\"asc\"> asc\r\n \r\n LIMIT \r\n <#--判断是否分页-->\r\n <#if ispaging?? && (pageTag.pageNo)??>${((pageTag.pageNo-1)*_size?eval)?c},${_size?default(20)}\r\n <#else>${_size?default(20)}', '1'); -INSERT INTO `mdiy_tag_sql` VALUES ('6', '4', '<#assign _typeid=\"0\"/>\r\n<#if column?? && column.id?? && column.id?number gt 0>\r\n <#assign _typeid=\"${column.id}\">\r\n <#assign selfid=\"${column.id}\">\r\n\r\n<#if typeid??>\r\n <#assign _typeid=\"${typeid}\">\r\n\r\nselect \r\n @rownum := @rownum + 1 AS typeindex,\r\n id,\r\n id as typeid,\r\n category_title as typetitle,\r\n <#--返回父id集合-->\r\n category_parent_id as pids,\r\n <#--栏目选中的样式-->\r\n IF(<#if selfid?has_content>${selfid}<#else>${_typeid} = id ,\"${class!\'\'}\",\"\") as class,\r\n <#--动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\"/${modelName}/list.do?typeid=\", id) as typelink,\r\n <#else>\r\n <#--栏目类型为链接-->\r\n IF(\"3\" = category_type,category_diy_url,CONCAT(category_path,\"/index.html\")) as typelink,\r\n \r\n category_keyword as typekeyword,\r\n category_diy_url as typeurl,\r\n category_flag as flag,\r\n category_parent_id as parentid,\r\ncategory_descrip as typedescrip,\r\n ( CASE category_img WHEN \'\' THEN category_img ELSE CONVERT ( JSON_UNQUOTE( JSON_EXTRACT( category_img -> \'$[0]\', \'$.path\' ) ) USING utf8 ) END ) as typelitpic ,\r\n(select count(*) from cms_category c where c.category_id=typeid and c.del=0) as childsize\r\n from (SELECT @rownum := 0) r,cms_category \r\n where \r\n cms_category.del=0 \r\n <#--根据站点编号查询-->\r\n <#if appId?? >\r\n and cms_category.app_id=${appId}\r\n \r\n <#--栏目属性-->\r\n <#if flag?? >\r\n and\r\n ( <#list flag?split(\',\') as item>\r\n <#if item?index gt 0> or\r\n FIND_IN_SET(\'${item}\',category_flag)\r\n )\r\n \r\n\r\n <#if noflag?? >\r\n and\r\n (\r\n <#list noflag?split(\',\') as item>\r\n <#if item?index gt 0> and\r\n FIND_IN_SET(\'${item}\',category_flag)=0\r\n or category_flag is null)\r\n \r\n <#--type默认son-->\r\n<#if !type??||!type?has_content>\r\n<#assign type=\"son\"/>\r\n\r\n<#if type?has_content>\r\n <#--顶级栏目(单个)-->\r\n <#if type==\"top\">\r\n and id=(select left(category_parent_id,LOCATE(\",\",category_parent_id)-1) from cms_category where category_id = ${_typeid})\r\n <#elseif type==\"nav\">\r\n and(category_id=0 or category_id is null)\r\n <#--同级栏目(多个)-->\r\n <#elseif type==\"level\">\r\n and\r\n <#if _typeid?has_content>\r\n category_id=(select category_id from cms_category where id=${_typeid})\r\n <#else>\r\n 1=1\r\n \r\n <#--当前栏目(单个)-->\r\n <#elseif type==\"self\">\r\n and \r\n <#if _typeid?has_content>\r\n id=${_typeid}\r\n <#else>\r\n 1=1\r\n \r\n <#--当前栏目的所属栏目(多个)-->\r\n <#elseif type==\"path\">\r\n and \r\n <#if _typeid?has_content>\r\n id in (<#if column?? && column.categoryParentId??>${column.categoryParentId},${_typeid})\r\n <#else>\r\n 1=1\r\n \r\n <#--子栏目(多个)-->\r\n <#elseif type==\"son\">\r\n and \r\n <#if _typeid?has_content>\r\n category_id=${_typeid}\r\n <#else>\r\n 1=1\r\n \r\n <#--上一级栏目没有则取当前栏目(单个)-->\r\n <#elseif type==\"parent\">\r\n and \r\n <#if _typeid?has_content>\r\n <#if column?? && column.categoryId??>\r\n id=${column.categoryId}\r\n <#else>\r\n id=${_typeid}\r\n \r\n <#else>\r\n 1=1\r\n \r\n <#--子栏目或同级栏目(多个)-->\r\n <#elseif type==\"sonOrLevel\">\r\n and \r\n <#if _typeid?has_content>\r\n category_id= if((SELECT count(*) FROM cms_category\r\n WHERE id=${_typeid})>0,${_typeid},(select id from cms_category where id=${_typeid}))\r\n <#else>\r\n 1=1\r\n \r\n \r\n<#else> <#--默认顶级栏目-->\r\n and\r\n <#if _typeid?has_content>\r\n id=${_typeid}\r\n <#else>\r\n (category_id=0 or category_id is null)\r\n \r\n\r\n<#--字段排序-->\r\n <#if orderby?? >\r\n ORDER BY \r\n <#if orderby==\"date\"> category_datetime\r\n <#elseif orderby==\"sort\"> category_sort\r\n <#else>cms_content.id\r\n <#else>\r\n ORDER BY id\r\n \r\n <#if order?? >\r\n <#if order==\"desc\"> desc\r\n <#if order==\"asc\"> asc\r\n ', '1'); -INSERT INTO `mdiy_tag_sql` VALUES ('7', '5', 'select \r\nAPP_NAME as name,\r\n( CASE app_logo WHEN \'\' THEN app_logo ELSE CONVERT ( JSON_UNQUOTE( JSON_EXTRACT( app_logo -> \'$[0]\', \'$.path\' ) ) USING utf8 ) END ) as logo ,\r\napp_keyword as keyword,\r\napp_description as descrip,\r\napp_copyright as copyright,\r\n<#--动态解析 -->\r\n<#if isDo?? && isDo>\r\nCONCAT(\"${url}\",\"/${html}/\",id) as url,\r\n\"${url}\" as host,\r\n<#--使用地址栏的域名 -->\r\n<#elseif url??>\r\nCONCAT(\"${url}\",\"/${html}/\",id,\"/<#if m??>${m}\") as url,\r\n\"${url}\" as host,\r\n<#else>\r\nCONCAT(REPLACE(REPLACE(TRIM(substring_index(app_url,\"\\n\",1)), CHAR(10),\'\'), CHAR(13),\'\'),\"/html/\",id,\"/<#if m??>${m}\") as url,\r\nREPLACE(REPLACE(TRIM(substring_index(app_url,\"\\n\",1)), CHAR(10),\'\'), CHAR(13),\'\') as host,\r\n\r\nCONCAT(\"templets/\",id,\"/\",<#if m??>CONCAT(app_style,\"/${m}\")<#else>app_style) as style <#-- 判断是否为手机端 -->\r\nfrom app where id = ${appId} limit 1', '1'); -INSERT INTO `mdiy_tag_sql` VALUES ('8', '7', 'SELECT \r\ncms_content.id as id,\r\nleft(content_title,${titlelen?default(40)}) as title,\r\ncontent_title as fulltitle,\r\ncontent_author as author, \r\ncontent_source as source, \r\ncontent_details as content,\r\ncategory_title as typetitle,\r\ncms_category.id as typeid,\r\n ( CASE cms_category.category_img WHEN \'\' THEN cms_category.category_img ELSE CONVERT ( JSON_UNQUOTE( JSON_EXTRACT( cms_category.category_img -> \'$[0]\', \'$.path\' ) ) USING utf8 ) END ) AS typelitpic,\r\n<#--动态链接-->\r\n<#if isDo?? && isDo>\r\nCONCAT(\"/${modelName}/list.do?typeid=\", cms_category.id) as typelink,\r\n<#else>\r\n(SELECT \"index.html\") as typelink,\r\n\r\n( CASE cms_content.content_img WHEN \'\' THEN cms_content.content_img ELSE CONVERT ( JSON_UNQUOTE( JSON_EXTRACT( cms_content.content_img -> \'$[0]\', \'$.path\' ) ) USING utf8 ) END ) AS litpic,\r\n<#--内容页动态链接-->\r\n<#if isDo?? && isDo>\r\nCONCAT(\"/mcms/view.do?id=\", cms_content.id) as link,\r\n<#else>\r\ncontent_url AS link,\r\n\r\ncontent_datetime as date,\r\ncontent_description as descrip,\r\nCONCAT(\"\") as hit,\r\ncontent_type as flag,\r\ncategory_title as typetitle,\r\n<#if tableName??>${tableName}.*,\r\ncontent_keyword as keyword\r\nFROM cms_content\r\nLEFT JOIN cms_category ON \r\n<#--如果是栏目列表页没有文章id所以只取栏目id-->\r\n<#if column??&&column.id??&&!id??> \r\n cms_category.id=${column.id}\r\n<#else>\r\ncms_category.id = content_category_id\r\n\r\n<#--判断是否有自定义模型表-->\r\n<#if tableName??>left join ${tableName} on ${tableName}.link_id=cms_content.id\r\nWHERE \r\n cms_content.del=0\r\n<#if id??> and cms_content.id=${id}', '1'); -INSERT INTO `mdiy_tag_sql` VALUES ('9', '8', '<#assign select=\"(SELECT \'\')\"/>\r\n<#if orderby?? >\r\n <#if orderby==\"date\"> \r\n <#assign _orderby=\"content_datetime\">\r\n <#elseif orderby==\"updatedate\">\r\n <#assign _orderby=\"content_updatetime\">\r\n <#elseif orderby==\"hit\"> \r\n <#assign _orderby=\"content_hit\">\r\n <#elseif orderby==\"sort\">\r\n <#assign _orderby=\"content_sort\">\r\n <#else><#assign _orderby=\"cms_content.id\">\r\n <#else>\r\n <#assign _orderby=\"cms_content.id\">\r\n \r\n<#if (pageTag.preId) gt 0>\r\nSELECT \r\ncms_content.id as id,\r\nleft(content_title,${titlelen?default(40)}) as title,\r\ncontent_title as fulltitle,\r\ncontent_author as author, \r\ncontent_source as source, \r\ncontent_details as content,\r\ncategory.category_title as typename,\r\ncategory.category_id as typeid,\r\n(SELECT \"index.html\") as typelink,\r\ncontent_img as litpic,\r\n<#--内容页动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\"/${modelName}/view.do?id=\", cms_content.id,\"&orderby=${_orderby}\",\"&order=${order!\'ASC\'}\",\"&typeid=${typeid}\") as link,\r\n <#else>\r\n CONCAT(category_path,\"/\",cms_content.id,\".html\") AS link,\r\n \r\ncontent_datetime as date,\r\ncontent_description as descrip,\r\ncontent_hit as hit,\r\ncontent_type as flag,\r\ncontent_keyword as keyword \r\nFROM cms_content \r\nLEFT JOIN cms_category as category ON content_category_id=category.id \r\nWHERE cms_content.id=${pageTag.preId}\r\n<#else>\r\nSELECT \r\n${select} as id,\r\n${select} as title,\r\n${select} as fulltitle,\r\n${select} as author, \r\n${select} as source, \r\n${select} as content,\r\n${select} as typename,\r\n${select} as typeid,\r\n${select} as typelink,\r\n${select} as litpic,\r\n${select} as link,\r\n${select} as date,\r\n${select} as descrip,\r\n${select} as hit,\r\n${select} as flag,\r\n${select} as keyword FROM cms_content\r\n', null); -INSERT INTO `mdiy_tag_sql` VALUES ('10', '9', ' select\r\n <#if !(pageTag.indexUrl??)>\r\n <#--判断是否有栏目对象,用于搜索不传栏目-->\r\n <#if column??>\r\n <#assign path=column.categoryPath/>\r\n <#else>\r\n <#assign path=\"\"/>\r\n \r\n <#--总记录数、总页数-->\r\n (SELECT ${pageTag.total}) as total,\r\n <#--记录总数-->\r\n (SELECT ${pageTag.size}) as rcount,\r\n <#--当前页码-->\r\n (SELECT ${pageTag.pageNo}) as cur,\r\n <#--首页-->\r\n CONCAT(\"${path}\", \"/index.html\") as `index`,\r\n <#--上一页-->\r\n <#if (pageTag.pageNo?eval-1) gt 1>\r\n CONCAT(\"${path}\",\"/list-${pageTag.pageNo?eval-1}.html\") as pre,\r\n <#else>\r\n CONCAT(\"${path}\",\"/index.html\") as pre,\r\n \r\n <#--下一页-->\r\n <#if pageTag.total==1>\r\n CONCAT(\"${path}\", \"/index.html\") as `next`,\r\n CONCAT(\"${path}\", \"/index.html\") as `last`\r\n <#else>\r\n <#if pageTag.pageNo?eval gte pageTag.total>\r\n CONCAT(\"${path}\",\"/list-${pageTag.total}.html\") as next,\r\n <#else>\r\n CONCAT(\"${path}\",\"/list-${pageTag.pageNo?eval+1}.html\") as next,\r\n \r\n <#--最后一页-->\r\n CONCAT(\"${path}\",\"/list-${pageTag.total}.html\") as last\r\n \r\n<#else><#--判断是否是搜索页面-->\r\n \"${pageTag.indexUrl}\" as `index`,\"${pageTag.lastUrl}\" as `last`,\"${pageTag.preUrl}\" as `pre`,\"${pageTag.nextUrl}\" as `next`,\'${pageTag.total}\' as total,\'${pageTag.size}\' as rcount,\'${pageTag.pageNo}\' as cur\r\n', null); -INSERT INTO `mdiy_tag_sql` VALUES ('11', '10', '<#assign select=\"(SELECT \'\')\"/>\r\n<#if orderby?? >\r\n <#if orderby==\"date\"> \r\n <#assign _orderby=\"content_datetime\">\r\n <#elseif orderby==\"updatedate\">\r\n <#assign _orderby=\"content_updatetime\">\r\n <#elseif orderby==\"hit\"> \r\n <#assign _orderby=\"content_hit\">\r\n <#elseif orderby==\"sort\">\r\n <#assign _orderby=\"content_sort\">\r\n <#else><#assign _orderby=\"cms_content.id\">\r\n <#else>\r\n <#assign _orderby=\"cms_content.id\">\r\n \r\n<#if (pageTag.nextId) gt 0>\r\nSELECT \r\ncms_content.id as id,\r\nleft(content_title,${titlelen?default(40)}) as title,\r\ncontent_title as fulltitle,\r\ncontent_author as author, \r\ncontent_source as source, \r\ncontent_details as content,\r\ncategory.category_title as typename,\r\ncategory.category_id as typeid,\r\n(SELECT \"index.html\") as typelink,\r\ncontent_img as litpic,\r\n<#--内容页动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\"/${modelName}/view.do?id=\", cms_content.id,\"&orderby=${_orderby}\",\"&order=${order!\'ASC\'}\",\"&typeid=${typeid}\") as link,\r\n <#else>\r\n CONCAT(category_path,\"/\",cms_content.id,\".html\") AS link,\r\n \r\ncontent_datetime as date,\r\ncontent_description as descrip,\r\ncontent_hit as hit,\r\ncontent_type as flag,\r\ncontent_keyword as keyword \r\nFROM cms_content \r\nLEFT JOIN cms_category as category ON content_category_id=category.id \r\nWHERE cms_content.id=${pageTag.nextId}\r\n<#else>\r\nSELECT \r\n${select} as id,\r\n${select} as title,\r\n${select} as fulltitle,\r\n${select} as author, \r\n${select} as source, \r\n${select} as content,\r\n${select} as typename,\r\n${select} as typeid,\r\n${select} as typelink,\r\n${select} as litpic,\r\n${select} as link,\r\n${select} as date,\r\n${select} as descrip,\r\n${select} as hit,\r\n${select} as flag,\r\n${select} as keyword FROM cms_content\r\n', null); --- ---------------------------- --- Table structure for model --- ---------------------------- DROP TABLE IF EXISTS `model`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `model` ( `model_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '模块自增长id', `model_title` varchar(150) DEFAULT NULL COMMENT '模块标题', @@ -540,82 +505,25 @@ CREATE TABLE `model` ( KEY `model_code` (`model_code`) USING BTREE, CONSTRAINT `model_ibfk_1` FOREIGN KEY (`model_modelid`) REFERENCES `model` (`model_id`) ON DELETE CASCADE ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=858 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='模块表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `model` +-- + +LOCK TABLES `model` WRITE; +/*!40000 ALTER TABLE `model` DISABLE KEYS */; +INSERT INTO `model` VALUES (23,'权限管理','01000000',NULL,'','2014-09-08 08:12:22','icon-quanxianguanli',0,5,1,NULL,NULL),(84,'系统设置','12000000',NULL,'','2014-12-18 18:30:24','icon-xitongguanli',0,3,1,NULL,NULL),(86,'应用设置','12010000',84,'app/-1/edit.do','2014-12-18 18:31:59','',0,0,1,'84',NULL),(87,'模版管理','12020000',84,'template/index.do','2014-12-18 18:32:50','',0,0,1,'84',NULL),(182,'修改','12010004',86,'app:update','2017-09-04 14:14:42','',0,0,0,'84,86',NULL),(183,'菜单管理','01030000',23,'model/index.do','2017-09-04 11:09:26','',0,0,1,'23',NULL),(184,'查看','01030001',183,'model:view','2017-09-04 11:10:43','',0,0,0,'23,183',NULL),(201,'新增','01030002',183,'model:save','2019-12-27 10:26:29',NULL,0,0,0,'23,183',NULL),(202,'修改','01030004',183,'model:update','2019-12-27 10:26:33',NULL,0,0,0,'23,183',NULL),(204,'上传','12020002',87,'template:upload','2019-12-27 10:26:37','',0,0,0,'84,87',NULL),(217,'会员中心','07000000',NULL,'','2018-10-28 19:30:44','icon-huiyuanzhongxin',0,0,1,NULL,NULL),(218,'用户管理','07020100',217,'people/peopleUser/index.do','2018-10-28 19:30:44',NULL,0,0,1,'217',NULL),(219,'修改','07020104',218,'people:user:update','2018-10-28 19:30:44','',0,0,0,'217,218',NULL),(220,'删除','07020103',218,'people:user:del','2018-10-28 19:30:44','',0,0,0,'217,218',NULL),(221,'新增','07020102',218,'people:user:save','2018-10-28 19:30:44','',0,0,0,'217,218',NULL),(222,'查看','07020101',218,'people:view','2018-10-28 19:30:45',NULL,0,0,0,'217,218',NULL),(264,'自定义管理','20000000',NULL,'','2018-09-06 09:38:51','icon-zidingyiguanli',0,0,1,'264',NULL),(265,'自定义页面','20010000',264,'mdiy/page/index.do','2018-09-06 09:38:51',NULL,0,0,1,'264',NULL),(266,'修改','20010004',269,'mdiy:form:update','2018-09-06 09:38:51',NULL,0,0,0,'264,269',NULL),(267,'新增','20010002',269,'mdiy:form:save','2018-09-06 09:38:51',NULL,0,0,0,'264,269',NULL),(268,'查看','20010001',269,'mdiy:form:view','2018-09-06 09:38:51',NULL,0,0,0,'264,269',NULL),(269,'自定义表单','20020000',264,'mdiy/post/index.do','2018-09-06 09:38:51',NULL,0,0,1,'264',NULL),(280,'自定义字典','20050000',264,'mdiy/dict/index.do','2018-09-06 09:38:53',NULL,0,0,1,'264',NULL),(281,'删除','20050003',280,'mdiy:dict:del','2018-09-06 09:38:53',NULL,0,0,0,'264,280',NULL),(282,'修改','20050004',280,'mdiy:dict:update','2018-09-06 09:38:53',NULL,0,0,0,'264,280',NULL),(283,'新增','20050002',280,'mdiy:dict:save','2018-09-06 09:38:53',NULL,0,0,0,'264,280',NULL),(284,'查看','20050001',280,'mdiy:dict:view','2018-09-06 09:38:53',NULL,0,0,0,'264,280',NULL),(299,'新增','299',265,'mdiy:page:save','2019-05-27 16:04:32','',0,0,0,'264,265',NULL),(300,'修改','300',265,'mdiy:page:update','2019-05-27 16:05:11','',0,0,0,'264,265',NULL),(301,'删除','301',265,'mdiy:page:del','2019-05-27 16:42:10','',0,0,0,'264,265',NULL),(406,'角色管理','406',23,'basic/role/index.do','2019-08-02 17:18:47','',0,0,1,'23',NULL),(407,'新增','407',406,'role:save','2019-08-02 17:19:10','',0,0,0,'23,406',NULL),(408,'修改','408',406,'role:update','2019-08-02 17:19:34','',0,0,0,'23,406',NULL),(409,'删除','409',406,'role:del','2019-08-02 17:19:59','',0,0,0,'23,406',NULL),(411,'管理员管理','411',23,'basic/manager/index.do','2019-08-03 10:54:38','',0,0,1,'23',NULL),(412,'查看','412',411,'manager:view','2019-08-03 10:56:13','',0,0,0,'23,411',NULL),(538,'自定义模型','15730944491834300',264,'mdiy/model/index.do','2019-11-07 10:36:46','',0,0,1,'264,264',NULL),(540,'删除','15730944491833822',538,'mdiy:model:del','2019-11-07 10:36:47',NULL,0,0,0,'264,538',NULL),(542,'查看','15730944491832459',538,'mdiy:model:view','2019-11-07 10:36:47',NULL,0,0,0,'264,538',NULL),(553,'导入','importJson',538,'mdiy:model:importJson','2019-11-07 13:46:53','',0,0,0,'264,538',NULL),(554,'删除','mdiy:form:del',269,'mdiy:form:del','2019-11-07 15:14:40','',0,0,0,'264,269',NULL),(661,'审核','543434354',218,'people:user:check','2019-11-16 15:38:17','',0,0,0,'217,218',NULL),(663,'删除','15737980803547570',411,'manager:del','2019-11-18 14:19:35','',0,0,0,'23,411',NULL),(664,'更新','15737980853527702',411,'manager:update','2019-11-18 14:21:08','',0,0,0,'23,411',NULL),(665,'新增','15735981803267702',411,'manager:save','2019-11-18 14:21:42','',0,0,0,'23,411',NULL),(668,'删除','668',183,'model:del','2019-11-18 14:35:49','',0,0,0,'23,183',NULL),(672,'删除','5434345',87,'template:del','2019-11-18 15:05:09','',0,0,0,'84,87',NULL),(673,'更新','452435345',87,'template:update','2019-11-18 15:05:35','',0,0,0,'84,87',NULL),(685,'系统日志','65123656532',84,'basic/systemLog/index.do','2019-11-21 17:13:50','',0,0,1,'84',NULL),(686,'查看','351463145634',685,'basic:systemlog:view','2019-11-21 17:14:24','',0,0,0,'84,685',NULL),(706,'内容管理','02000000',NULL,'','2019-11-22 16:14:59','icon-neirongguanli',0,5,1,NULL,NULL),(707,'文章管理','02980000',706,'cms/content/index.do','2019-11-22 16:16:25','',0,3,1,'706',NULL),(708,'栏目管理','02990000',706,'cms/category/index.do','2019-11-22 16:16:50','',0,2,1,'706',NULL),(709,'静态化','02020000',706,'cms/generate/index.do','2019-11-22 16:17:15','',0,1,1,'706',NULL),(710,'生成文章','02020004',709,'cms:generate:article','2019-11-22 16:17:39','',0,0,0,'706,709',NULL),(711,'生成栏目','02020003',709,'cms:generate:column','2019-11-22 16:18:05','',0,0,0,'706,709',NULL),(713,'查看','02020001',709,'cms:generate:view','2019-11-22 16:18:48','',0,0,0,'706,709',NULL),(714,'生成主页','56454656',709,'cms:generate:index','2019-11-22 16:20:10','',0,0,0,'706,709',NULL),(715,'新增','02990004',708,'cms:category:save','2019-11-22 16:20:42','',0,0,0,'706,708',NULL),(716,'修改','02990003',708,'cms:category:update','2019-11-22 16:21:36','',0,0,0,'706,708',NULL),(717,'查看','02990001',708,'cms:category:view','2019-11-22 16:22:05','',0,0,0,'706,708',NULL),(718,'新增','02980002',707,'cms:content:save','2019-11-22 16:22:35','',0,0,0,'706,707',NULL),(719,'修改','02980004',707,'cms:content:update','2019-11-22 16:22:57','',0,0,0,'706,707',NULL),(720,'查看','02980001',707,'cms:content:view','2019-11-22 16:23:15','',0,0,0,'706,707',NULL),(721,'删除','721',707,'cms:content:del','2019-11-22 17:02:28','',0,0,0,'706,707',NULL),(722,'导入','722',269,'mdiy:form:importJson','2019-12-27 12:07:24','',0,0,0,'264,269',NULL),(857,'删除','857',708,'cms:category:del','2019-12-27 17:33:06','',0,0,1,'706,708',NULL); +/*!40000 ALTER TABLE `model` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `people` +-- --- ---------------------------- --- Records of model --- ---------------------------- -INSERT INTO `model` VALUES ('23', '权限管理', '01000000', null, '', '2014-09-08 08:12:22', 'icon-quanxianguanli', '0', '5', '1', null, null); -INSERT INTO `model` VALUES ('84', '系统设置', '12000000', null, '', '2014-12-18 18:30:24', 'icon-xitongguanli', '0', '3', '1', null, null); -INSERT INTO `model` VALUES ('86', '应用设置', '12010000', '84', 'app/-1/edit.do', '2014-12-18 18:31:59', '', '0', '0', '1', '84', null); -INSERT INTO `model` VALUES ('87', '模版管理', '12020000', '84', 'template/index.do', '2014-12-18 18:32:50', '', '0', '0', '1', '84', null); -INSERT INTO `model` VALUES ('182', '修改', '12010004', '86', 'app:update', '2017-09-04 14:14:42', '', '0', '0', '0', '84,86', null); -INSERT INTO `model` VALUES ('183', '菜单管理', '01030000', '23', 'model/index.do', '2017-09-04 11:09:26', '', '0', '0', '1', '23', null); -INSERT INTO `model` VALUES ('184', '查看', '01030001', '183', 'model:view', '2017-09-04 11:10:43', '', '0', '0', '0', '23,183', null); -INSERT INTO `model` VALUES ('201', '新增', '01030002', '183', 'model:save', '2019-12-27 10:26:29', null, '0', '0', '0', '23,183', null); -INSERT INTO `model` VALUES ('202', '修改', '01030004', '183', 'model:update', '2019-12-27 10:26:33', null, '0', '0', '0', '23,183', null); -INSERT INTO `model` VALUES ('204', '上传', '12020002', '87', 'template:upload', '2019-12-27 10:26:37', '', '0', '0', '0', '84,87', null); -INSERT INTO `model` VALUES ('217', '会员中心', '07000000', null, '', '2018-10-28 19:30:44', 'icon-huiyuanzhongxin', '0', '0', '1', null, null); -INSERT INTO `model` VALUES ('218', '用户管理', '07020100', '217', 'people/peopleUser/index.do', '2018-10-28 19:30:44', null, '0', '0', '1', '217', null); -INSERT INTO `model` VALUES ('219', '修改', '07020104', '218', 'people:user:update', '2018-10-28 19:30:44', '', '0', '0', '0', '217,218', null); -INSERT INTO `model` VALUES ('220', '删除', '07020103', '218', 'people:user:del', '2018-10-28 19:30:44', '', '0', '0', '0', '217,218', null); -INSERT INTO `model` VALUES ('221', '新增', '07020102', '218', 'people:user:save', '2018-10-28 19:30:44', '', '0', '0', '0', '217,218', null); -INSERT INTO `model` VALUES ('222', '查看', '07020101', '218', 'people:view', '2018-10-28 19:30:45', null, '0', '0', '0', '217,218', null); -INSERT INTO `model` VALUES ('264', '自定义管理', '20000000', null, '', '2018-09-06 09:38:51', 'icon-zidingyiguanli', '0', '0', '1', '264', null); -INSERT INTO `model` VALUES ('265', '自定义页面', '20010000', '264', 'mdiy/page/index.do', '2018-09-06 09:38:51', null, '0', '0', '1', '264', null); -INSERT INTO `model` VALUES ('266', '修改', '20010004', '269', 'mdiy:form:update', '2018-09-06 09:38:51', null, '0', '0', '0', '264,269', null); -INSERT INTO `model` VALUES ('267', '新增', '20010002', '269', 'mdiy:form:save', '2018-09-06 09:38:51', null, '0', '0', '0', '264,269', null); -INSERT INTO `model` VALUES ('268', '查看', '20010001', '269', 'mdiy:form:view', '2018-09-06 09:38:51', null, '0', '0', '0', '264,269', null); -INSERT INTO `model` VALUES ('269', '自定义表单', '20020000', '264', 'mdiy/post/index.do', '2018-09-06 09:38:51', null, '0', '0', '1', '264', null); -INSERT INTO `model` VALUES ('280', '自定义字典', '20050000', '264', 'mdiy/dict/index.do', '2018-09-06 09:38:53', null, '0', '0', '1', '264', null); -INSERT INTO `model` VALUES ('281', '删除', '20050003', '280', 'mdiy:dict:del', '2018-09-06 09:38:53', null, '0', '0', '0', '264,280', null); -INSERT INTO `model` VALUES ('282', '修改', '20050004', '280', 'mdiy:dict:update', '2018-09-06 09:38:53', null, '0', '0', '0', '264,280', null); -INSERT INTO `model` VALUES ('283', '新增', '20050002', '280', 'mdiy:dict:save', '2018-09-06 09:38:53', null, '0', '0', '0', '264,280', null); -INSERT INTO `model` VALUES ('284', '查看', '20050001', '280', 'mdiy:dict:view', '2018-09-06 09:38:53', null, '0', '0', '0', '264,280', null); -INSERT INTO `model` VALUES ('299', '新增', '299', '265', 'mdiy:page:save', '2019-05-27 16:04:32', '', '0', '0', '0', '264,265', null); -INSERT INTO `model` VALUES ('300', '修改', '300', '265', 'mdiy:page:update', '2019-05-27 16:05:11', '', '0', '0', '0', '264,265', null); -INSERT INTO `model` VALUES ('301', '删除', '301', '265', 'mdiy:page:del', '2019-05-27 16:42:10', '', '0', '0', '0', '264,265', null); -INSERT INTO `model` VALUES ('406', '角色管理', '406', '23', 'basic/role/index.do', '2019-08-02 17:18:47', '', '0', '0', '1', '23', null); -INSERT INTO `model` VALUES ('407', '新增', '407', '406', 'role:save', '2019-08-02 17:19:10', '', '0', '0', '0', '23,406', null); -INSERT INTO `model` VALUES ('408', '修改', '408', '406', 'role:update', '2019-08-02 17:19:34', '', '0', '0', '0', '23,406', null); -INSERT INTO `model` VALUES ('409', '删除', '409', '406', 'role:del', '2019-08-02 17:19:59', '', '0', '0', '0', '23,406', null); -INSERT INTO `model` VALUES ('411', '管理员管理', '411', '23', 'basic/manager/index.do', '2019-08-03 10:54:38', '', '0', '0', '1', '23', null); -INSERT INTO `model` VALUES ('412', '查看', '412', '411', 'manager:view', '2019-08-03 10:56:13', '', '0', '0', '0', '23,411', null); -INSERT INTO `model` VALUES ('538', '自定义模型', '15730944491834300', '264', 'mdiy/model/index.do', '2019-11-07 10:36:46', '', '0', '0', '1', '264,264', null); -INSERT INTO `model` VALUES ('540', '删除', '15730944491833822', '538', 'mdiy:model:del', '2019-11-07 10:36:47', null, '0', '0', '0', '264,538', null); -INSERT INTO `model` VALUES ('542', '查看', '15730944491832459', '538', 'mdiy:model:view', '2019-11-07 10:36:47', null, '0', '0', '0', '264,538', null); -INSERT INTO `model` VALUES ('553', '导入', 'importJson', '538', 'mdiy:model:importJson', '2019-11-07 13:46:53', '', '0', '0', '0', '264,538', null); -INSERT INTO `model` VALUES ('554', '删除', 'mdiy:form:del', '269', 'mdiy:form:del', '2019-11-07 15:14:40', '', '0', '0', '0', '264,269', null); -INSERT INTO `model` VALUES ('661', '审核', '543434354', '218', 'people:user:check', '2019-11-16 15:38:17', '', '0', '0', '0', '217,218', null); -INSERT INTO `model` VALUES ('663', '删除', '15737980803547570', '411', 'manager:del', '2019-11-18 14:19:35', '', '0', '0', '0', '23,411', null); -INSERT INTO `model` VALUES ('664', '更新', '15737980853527702', '411', 'manager:update', '2019-11-18 14:21:08', '', '0', '0', '0', '23,411', null); -INSERT INTO `model` VALUES ('665', '新增', '15735981803267702', '411', 'manager:save', '2019-11-18 14:21:42', '', '0', '0', '0', '23,411', null); -INSERT INTO `model` VALUES ('668', '删除', '668', '183', 'model:del', '2019-11-18 14:35:49', '', '0', '0', '0', '23,183', null); -INSERT INTO `model` VALUES ('672', '删除', '5434345', '87', 'template:del', '2019-11-18 15:05:09', '', '0', '0', '0', '84,87', null); -INSERT INTO `model` VALUES ('673', '更新', '452435345', '87', 'template:update', '2019-11-18 15:05:35', '', '0', '0', '0', '84,87', null); -INSERT INTO `model` VALUES ('685', '系统日志', '65123656532', '84', 'basic/systemLog/index.do', '2019-11-21 17:13:50', '', '0', '0', '1', '84', null); -INSERT INTO `model` VALUES ('686', '查看', '351463145634', '685', 'basic:systemlog:view', '2019-11-21 17:14:24', '', '0', '0', '0', '84,685', null); -INSERT INTO `model` VALUES ('706', '内容管理', '02000000', null, '', '2019-11-22 16:14:59', 'icon-neirongguanli', '0', '5', '1', null, null); -INSERT INTO `model` VALUES ('707', '文章管理', '02980000', '706', 'cms/content/index.do', '2019-11-22 16:16:25', '', '0', '3', '1', '706', null); -INSERT INTO `model` VALUES ('708', '栏目管理', '02990000', '706', 'cms/category/index.do', '2019-11-22 16:16:50', '', '0', '2', '1', '706', null); -INSERT INTO `model` VALUES ('709', '静态化', '02020000', '706', 'cms/generate/index.do', '2019-11-22 16:17:15', '', '0', '1', '1', '706', null); -INSERT INTO `model` VALUES ('710', '生成文章', '02020004', '709', 'cms:generate:article', '2019-11-22 16:17:39', '', '0', '0', '0', '706,709', null); -INSERT INTO `model` VALUES ('711', '生成栏目', '02020003', '709', 'cms:generate:column', '2019-11-22 16:18:05', '', '0', '0', '0', '706,709', null); -INSERT INTO `model` VALUES ('713', '查看', '02020001', '709', 'cms:generate:view', '2019-11-22 16:18:48', '', '0', '0', '0', '706,709', null); -INSERT INTO `model` VALUES ('714', '生成主页', '56454656', '709', 'cms:generate:index', '2019-11-22 16:20:10', '', '0', '0', '0', '706,709', null); -INSERT INTO `model` VALUES ('715', '新增', '02990004', '708', 'cms:category:save', '2019-11-22 16:20:42', '', '0', '0', '0', '706,708', null); -INSERT INTO `model` VALUES ('716', '修改', '02990003', '708', 'cms:category:update', '2019-11-22 16:21:36', '', '0', '0', '0', '706,708', null); -INSERT INTO `model` VALUES ('717', '查看', '02990001', '708', 'cms:category:view', '2019-11-22 16:22:05', '', '0', '0', '0', '706,708', null); -INSERT INTO `model` VALUES ('718', '新增', '02980002', '707', 'cms:content:save', '2019-11-22 16:22:35', '', '0', '0', '0', '706,707', null); -INSERT INTO `model` VALUES ('719', '修改', '02980004', '707', 'cms:content:update', '2019-11-22 16:22:57', '', '0', '0', '0', '706,707', null); -INSERT INTO `model` VALUES ('720', '查看', '02980001', '707', 'cms:content:view', '2019-11-22 16:23:15', '', '0', '0', '0', '706,707', null); -INSERT INTO `model` VALUES ('721', '删除', '721', '707', 'cms:content:del', '2019-11-22 17:02:28', '', '0', '0', '0', '706,707', null); -INSERT INTO `model` VALUES ('722', '导入', '722', '269', 'mdiy:form:importJson', '2019-12-27 12:07:24', '', '0', '0', '0', '264,269', null); -INSERT INTO `model` VALUES ('857', '删除', '857', '708', 'cms:category:del', '2019-12-27 17:33:06', '', '0', '0', '1', '706,708', null); - --- ---------------------------- --- Table structure for people --- ---------------------------- DROP TABLE IF EXISTS `people`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `people` ( `people_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '增长自id', `people_phone` varchar(30) DEFAULT NULL COMMENT '手机号码', @@ -634,16 +542,25 @@ CREATE TABLE `people` ( KEY `fk_people` (`people_app_id`) USING BTREE, CONSTRAINT `people_ibfk_1` FOREIGN KEY (`people_app_id`) REFERENCES `app` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='户用基础表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `people` +-- --- ---------------------------- --- Records of people --- ---------------------------- -INSERT INTO `people` VALUES ('1', '18179860960', 'msopen', '9d8622060de5f24937b60585c3f4d66b', '2019-12-30 18:28:28', '1', '1027418825@qq.com', '0', null, null, '0', '0', '127.0.0.1'); +LOCK TABLES `people` WRITE; +/*!40000 ALTER TABLE `people` DISABLE KEYS */; +INSERT INTO `people` VALUES (1,'18179860960','msopen','9d8622060de5f24937b60585c3f4d66b','2019-12-30 10:28:28',1,'1027418825@qq.com',0,NULL,NULL,0,0,'127.0.0.1'); +/*!40000 ALTER TABLE `people` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `people_address` +-- --- ---------------------------- --- Table structure for people_address --- ---------------------------- DROP TABLE IF EXISTS `people_address`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `people_address` ( `PA_ID` int(11) NOT NULL AUTO_INCREMENT COMMENT '用户收货地址自增长Id', `PA_PEOPLE_ID` int(11) NOT NULL COMMENT '对应用户基础信息拓展表的id', @@ -666,15 +583,24 @@ CREATE TABLE `people_address` ( KEY `PA_PEOPLE_ID` (`PA_PEOPLE_ID`) USING BTREE, CONSTRAINT `people_address_ibfk_1` FOREIGN KEY (`PA_PEOPLE_ID`) REFERENCES `people` (`people_id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户地址'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `people_address` +-- --- ---------------------------- --- Records of people_address --- ---------------------------- +LOCK TABLES `people_address` WRITE; +/*!40000 ALTER TABLE `people_address` DISABLE KEYS */; +/*!40000 ALTER TABLE `people_address` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `people_user` +-- --- ---------------------------- --- Table structure for people_user --- ---------------------------- DROP TABLE IF EXISTS `people_user`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `people_user` ( `pu_people_id` int(11) NOT NULL COMMENT '用户id关联people表的(people_id)', `pu_real_name` varchar(50) DEFAULT NULL COMMENT '用户真实名称', @@ -696,16 +622,25 @@ CREATE TABLE `people_user` ( KEY `pu_people_id` (`pu_people_id`) USING BTREE, CONSTRAINT `people_user_ibfk_1` FOREIGN KEY (`pu_people_id`) REFERENCES `people` (`people_id`) ON DELETE CASCADE ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户基础信息表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `people_user` +-- + +LOCK TABLES `people_user` WRITE; +/*!40000 ALTER TABLE `people_user` DISABLE KEYS */; +INSERT INTO `people_user` VALUES (1,NULL,NULL,NULL,NULL,'/upload/1577701863298.jpg','111',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); +/*!40000 ALTER TABLE `people_user` ENABLE KEYS */; +UNLOCK TABLES; --- ---------------------------- --- Records of people_user --- ---------------------------- -INSERT INTO `people_user` VALUES ('1', null, null, null, null, '/upload/1577701863298.jpg', '111', null, null, null, null, null, null, null, null, null); +-- +-- Table structure for table `role` +-- --- ---------------------------- --- Table structure for role --- ---------------------------- DROP TABLE IF EXISTS `role`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `role` ( `role_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '角色id,自增长', `role_name` varchar(30) DEFAULT NULL COMMENT '角色名', @@ -716,16 +651,25 @@ CREATE TABLE `role` ( KEY `fk_role_app_id` (`app_id`) USING BTREE, CONSTRAINT `role_ibfk_1` FOREIGN KEY (`app_id`) REFERENCES `app` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='角色表'; +/*!40101 SET character_set_client = @saved_cs_client */; --- ---------------------------- --- Records of role --- ---------------------------- -INSERT INTO `role` VALUES ('48', 'msopen', '57', '1'); +-- +-- Dumping data for table `role` +-- + +LOCK TABLES `role` WRITE; +/*!40000 ALTER TABLE `role` DISABLE KEYS */; +INSERT INTO `role` VALUES (48,'msopen',57,1); +/*!40000 ALTER TABLE `role` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `role_model` +-- --- ---------------------------- --- Table structure for role_model --- ---------------------------- DROP TABLE IF EXISTS `role_model`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `role_model` ( `rm_modelid` int(22) DEFAULT NULL COMMENT '模块编号', `rm_roleid` int(22) DEFAULT NULL COMMENT '角色编号', @@ -735,82 +679,25 @@ CREATE TABLE `role_model` ( CONSTRAINT `role_model_ibfk_1` FOREIGN KEY (`rm_roleid`) REFERENCES `role` (`role_id`) ON DELETE CASCADE ON UPDATE NO ACTION, CONSTRAINT `role_model_ibfk_2` FOREIGN KEY (`rm_modelid`) REFERENCES `model` (`model_id`) ON DELETE CASCADE ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='角色模块关联表'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `role_model` +-- + +LOCK TABLES `role_model` WRITE; +/*!40000 ALTER TABLE `role_model` DISABLE KEYS */; +INSERT INTO `role_model` VALUES (23,48),(84,48),(86,48),(87,48),(182,48),(183,48),(184,48),(201,48),(202,48),(204,48),(217,48),(218,48),(219,48),(220,48),(221,48),(222,48),(264,48),(265,48),(266,48),(267,48),(268,48),(269,48),(280,48),(281,48),(282,48),(283,48),(284,48),(299,48),(300,48),(301,48),(406,48),(407,48),(408,48),(409,48),(411,48),(412,48),(538,48),(540,48),(542,48),(553,48),(554,48),(661,48),(663,48),(664,48),(665,48),(668,48),(672,48),(673,48),(685,48),(686,48),(706,48),(707,48),(708,48),(709,48),(710,48),(711,48),(713,48),(714,48),(715,48),(716,48),(717,48),(718,48),(719,48),(720,48),(721,48),(722,48),(857,48); +/*!40000 ALTER TABLE `role_model` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `system_log` +-- --- ---------------------------- --- Records of role_model --- ---------------------------- -INSERT INTO `role_model` VALUES ('23', '48'); -INSERT INTO `role_model` VALUES ('84', '48'); -INSERT INTO `role_model` VALUES ('86', '48'); -INSERT INTO `role_model` VALUES ('87', '48'); -INSERT INTO `role_model` VALUES ('182', '48'); -INSERT INTO `role_model` VALUES ('183', '48'); -INSERT INTO `role_model` VALUES ('184', '48'); -INSERT INTO `role_model` VALUES ('201', '48'); -INSERT INTO `role_model` VALUES ('202', '48'); -INSERT INTO `role_model` VALUES ('204', '48'); -INSERT INTO `role_model` VALUES ('217', '48'); -INSERT INTO `role_model` VALUES ('218', '48'); -INSERT INTO `role_model` VALUES ('219', '48'); -INSERT INTO `role_model` VALUES ('220', '48'); -INSERT INTO `role_model` VALUES ('221', '48'); -INSERT INTO `role_model` VALUES ('222', '48'); -INSERT INTO `role_model` VALUES ('264', '48'); -INSERT INTO `role_model` VALUES ('265', '48'); -INSERT INTO `role_model` VALUES ('266', '48'); -INSERT INTO `role_model` VALUES ('267', '48'); -INSERT INTO `role_model` VALUES ('268', '48'); -INSERT INTO `role_model` VALUES ('269', '48'); -INSERT INTO `role_model` VALUES ('280', '48'); -INSERT INTO `role_model` VALUES ('281', '48'); -INSERT INTO `role_model` VALUES ('282', '48'); -INSERT INTO `role_model` VALUES ('283', '48'); -INSERT INTO `role_model` VALUES ('284', '48'); -INSERT INTO `role_model` VALUES ('299', '48'); -INSERT INTO `role_model` VALUES ('300', '48'); -INSERT INTO `role_model` VALUES ('301', '48'); -INSERT INTO `role_model` VALUES ('406', '48'); -INSERT INTO `role_model` VALUES ('407', '48'); -INSERT INTO `role_model` VALUES ('408', '48'); -INSERT INTO `role_model` VALUES ('409', '48'); -INSERT INTO `role_model` VALUES ('411', '48'); -INSERT INTO `role_model` VALUES ('412', '48'); -INSERT INTO `role_model` VALUES ('538', '48'); -INSERT INTO `role_model` VALUES ('540', '48'); -INSERT INTO `role_model` VALUES ('542', '48'); -INSERT INTO `role_model` VALUES ('553', '48'); -INSERT INTO `role_model` VALUES ('554', '48'); -INSERT INTO `role_model` VALUES ('661', '48'); -INSERT INTO `role_model` VALUES ('663', '48'); -INSERT INTO `role_model` VALUES ('664', '48'); -INSERT INTO `role_model` VALUES ('665', '48'); -INSERT INTO `role_model` VALUES ('668', '48'); -INSERT INTO `role_model` VALUES ('672', '48'); -INSERT INTO `role_model` VALUES ('673', '48'); -INSERT INTO `role_model` VALUES ('685', '48'); -INSERT INTO `role_model` VALUES ('686', '48'); -INSERT INTO `role_model` VALUES ('706', '48'); -INSERT INTO `role_model` VALUES ('707', '48'); -INSERT INTO `role_model` VALUES ('708', '48'); -INSERT INTO `role_model` VALUES ('709', '48'); -INSERT INTO `role_model` VALUES ('710', '48'); -INSERT INTO `role_model` VALUES ('711', '48'); -INSERT INTO `role_model` VALUES ('713', '48'); -INSERT INTO `role_model` VALUES ('714', '48'); -INSERT INTO `role_model` VALUES ('715', '48'); -INSERT INTO `role_model` VALUES ('716', '48'); -INSERT INTO `role_model` VALUES ('717', '48'); -INSERT INTO `role_model` VALUES ('718', '48'); -INSERT INTO `role_model` VALUES ('719', '48'); -INSERT INTO `role_model` VALUES ('720', '48'); -INSERT INTO `role_model` VALUES ('721', '48'); -INSERT INTO `role_model` VALUES ('722', '48'); -INSERT INTO `role_model` VALUES ('857', '48'); - --- ---------------------------- --- Table structure for system_log --- ---------------------------- DROP TABLE IF EXISTS `system_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `system_log` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `error_msg` varchar(4000) DEFAULT NULL COMMENT '错误消息', @@ -834,4 +721,24 @@ CREATE TABLE `system_log` ( `app_id` int(11) DEFAULT NULL COMMENT '站点id', PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='系统日志'; - +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `system_log` +-- + +LOCK TABLES `system_log` WRITE; +/*!40000 ALTER TABLE `system_log` DISABLE KEYS */; +/*!40000 ALTER TABLE `system_log` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2020-10-10 16:46:37 diff --git a/pom-bin.xml b/pom-bin.xml deleted file mode 100644 index 1ddc8e89..00000000 --- a/pom-bin.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - org.springframework.boot - spring-boot-starter-parent - 2.2.2.RELEASE - - 4.0.0 - net.mingsoft - ms-mcms - 5.1 - ms-mcms - - 1.8 - - - - - net.mingsoft - ms-mpeople - 1.0.28 - - - - net.mingsoft - store-client - 5.1 - - - - ms-mcms - - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - ${java.version} - ${java.version} - - - - org.springframework.boot - spring-boot-maven-plugin - - - - repackage - - - - - - true - - - - - - - org.apache.maven.plugins - maven-assembly-plugin - 3.1.0 - - - ./bin/assembly.xml - - - - - make-assembly - package - - single - - - - - - - - - src/main/java - - **/*.java - - - - src/main/webapp - - - static/** - html/** - upload/** - templets/** - WEB-INF/** - - - - compile - - \ No newline at end of file diff --git a/pom-war.xml b/pom-war.xml deleted file mode 100644 index b6cdbb45..00000000 --- a/pom-war.xml +++ /dev/null @@ -1,117 +0,0 @@ - - - - org.springframework.boot - spring-boot-starter-parent - 2.2.2.RELEASE - - 4.0.0 - net.mingsoft - ms-mcms - 5.1 - ms-mcms - war - - 1.8 - 3.1.1 - - - - - net.mingsoft - ms-mpeople - 1.0.28 - - - - net.mingsoft - store-client - 5.1 - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-tomcat - - - - - org.springframework.boot - spring-boot-starter-tomcat - provided - - - org.apache.tomcat - tomcat-servlet-api - 7.0.42 - provided - - - org.springframework.boot - spring-boot-starter - - - org.springframework.boot - spring-boot-starter-logging - - - - - - - - ms-mcms - - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - ${java.version} - ${java.version} - - - - org.springframework.boot - spring-boot-maven-plugin - - - - repackage - - - - - true - - - - org.apache.maven.plugins - maven-war-plugin - - src/main/resources/** - mcms - - - - - - - true - src/main/webapp - - - src/main/resources - - - src/main/java - - - compile - - \ No newline at end of file diff --git a/pom.xml b/pom.xml index 27c1005d..432baaec 100644 --- a/pom.xml +++ b/pom.xml @@ -2,17 +2,16 @@ - - org.springframework.boot - spring-boot-starter-parent - 2.2.2.RELEASE - + 4.0.0 net.mingsoft ms-mcms 5.1 ms-mcms + jar + + 1.8 @@ -47,6 +46,7 @@ org.springframework.boot spring-boot-starter + 2.2.2.RELEASE org.springframework.boot @@ -81,11 +81,29 @@ true + + + + org.apache.maven.plugins + maven-war-plugin + + src/main/resources/** + mcms + + + true src/main/webapp + + + + + + + src/main/resources diff --git a/src/main/webapp/static/plugins/pako/1.0.11/pako.js b/src/main/webapp/static/plugins/pako/1.0.11/pako.js new file mode 100644 index 00000000..9ab7c686 --- /dev/null +++ b/src/main/webapp/static/plugins/pako/1.0.11/pako.js @@ -0,0 +1,6818 @@ +/* pako 1.0.11 nodeca/pako */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.pako = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i Array + * + * Chunks of output data, if [[Deflate#onData]] not overridden. + **/ + +/** + * Deflate.result -> Uint8Array|Array + * + * Compressed result, generated by default [[Deflate#onData]] + * and [[Deflate#onEnd]] handlers. Filled after you push last chunk + * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you + * push a chunk with explicit flush (call [[Deflate#push]] with + * `Z_SYNC_FLUSH` param). + **/ + +/** + * Deflate.err -> Number + * + * Error code after deflate finished. 0 (Z_OK) on success. + * You will not need it in real life, because deflate errors + * are possible only on wrong options or bad `onData` / `onEnd` + * custom handlers. + **/ + +/** + * Deflate.msg -> String + * + * Error message, if [[Deflate.err]] != 0 + **/ + + +/** + * new Deflate(options) + * - options (Object): zlib deflate options. + * + * Creates new deflator instance with specified params. Throws exception + * on bad params. Supported options: + * + * - `level` + * - `windowBits` + * - `memLevel` + * - `strategy` + * - `dictionary` + * + * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) + * for more information on these. + * + * Additional options, for internal needs: + * + * - `chunkSize` - size of generated data chunks (16K by default) + * - `raw` (Boolean) - do raw deflate + * - `gzip` (Boolean) - create gzip wrapper + * - `to` (String) - if equal to 'string', then result will be "binary string" + * (each char code [0..255]) + * - `header` (Object) - custom header for gzip + * - `text` (Boolean) - true if compressed data believed to be text + * - `time` (Number) - modification time, unix timestamp + * - `os` (Number) - operation system code + * - `extra` (Array) - array of bytes with extra data (max 65536) + * - `name` (String) - file name (binary string) + * - `comment` (String) - comment (binary string) + * - `hcrc` (Boolean) - true if header crc should be added + * + * ##### Example: + * + * ```javascript + * var pako = require('pako') + * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) + * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); + * + * var deflate = new pako.Deflate({ level: 3}); + * + * deflate.push(chunk1, false); + * deflate.push(chunk2, true); // true -> last chunk + * + * if (deflate.err) { throw new Error(deflate.err); } + * + * console.log(deflate.result); + * ``` + **/ +function Deflate(options) { + if (!(this instanceof Deflate)) return new Deflate(options); + + this.options = utils.assign({ + level: Z_DEFAULT_COMPRESSION, + method: Z_DEFLATED, + chunkSize: 16384, + windowBits: 15, + memLevel: 8, + strategy: Z_DEFAULT_STRATEGY, + to: '' + }, options || {}); + + var opt = this.options; + + if (opt.raw && (opt.windowBits > 0)) { + opt.windowBits = -opt.windowBits; + } + + else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) { + opt.windowBits += 16; + } + + this.err = 0; // error code, if happens (0 = Z_OK) + this.msg = ''; // error message + this.ended = false; // used to avoid multiple onEnd() calls + this.chunks = []; // chunks of compressed data + + this.strm = new ZStream(); + this.strm.avail_out = 0; + + var status = zlib_deflate.deflateInit2( + this.strm, + opt.level, + opt.method, + opt.windowBits, + opt.memLevel, + opt.strategy + ); + + if (status !== Z_OK) { + throw new Error(msg[status]); + } + + if (opt.header) { + zlib_deflate.deflateSetHeader(this.strm, opt.header); + } + + if (opt.dictionary) { + var dict; + // Convert data if needed + if (typeof opt.dictionary === 'string') { + // If we need to compress text, change encoding to utf8. + dict = strings.string2buf(opt.dictionary); + } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') { + dict = new Uint8Array(opt.dictionary); + } else { + dict = opt.dictionary; + } + + status = zlib_deflate.deflateSetDictionary(this.strm, dict); + + if (status !== Z_OK) { + throw new Error(msg[status]); + } + + this._dict_set = true; + } +} + +/** + * Deflate#push(data[, mode]) -> Boolean + * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be + * converted to utf8 byte sequence. + * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. + * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH. + * + * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with + * new compressed chunks. Returns `true` on success. The last data block must have + * mode Z_FINISH (or `true`). That will flush internal pending buffers and call + * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you + * can use mode Z_SYNC_FLUSH, keeping the compression context. + * + * On fail call [[Deflate#onEnd]] with error code and return false. + * + * We strongly recommend to use `Uint8Array` on input for best speed (output + * array format is detected automatically). Also, don't skip last param and always + * use the same type in your code (boolean or number). That will improve JS speed. + * + * For regular `Array`-s make sure all elements are [0..255]. + * + * ##### Example + * + * ```javascript + * push(chunk, false); // push one of data chunks + * ... + * push(chunk, true); // push last chunk + * ``` + **/ +Deflate.prototype.push = function (data, mode) { + var strm = this.strm; + var chunkSize = this.options.chunkSize; + var status, _mode; + + if (this.ended) { return false; } + + _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH); + + // Convert data if needed + if (typeof data === 'string') { + // If we need to compress text, change encoding to utf8. + strm.input = strings.string2buf(data); + } else if (toString.call(data) === '[object ArrayBuffer]') { + strm.input = new Uint8Array(data); + } else { + strm.input = data; + } + + strm.next_in = 0; + strm.avail_in = strm.input.length; + + do { + if (strm.avail_out === 0) { + strm.output = new utils.Buf8(chunkSize); + strm.next_out = 0; + strm.avail_out = chunkSize; + } + status = zlib_deflate.deflate(strm, _mode); /* no bad return value */ + + if (status !== Z_STREAM_END && status !== Z_OK) { + this.onEnd(status); + this.ended = true; + return false; + } + if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) { + if (this.options.to === 'string') { + this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out))); + } else { + this.onData(utils.shrinkBuf(strm.output, strm.next_out)); + } + } + } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END); + + // Finalize on the last chunk. + if (_mode === Z_FINISH) { + status = zlib_deflate.deflateEnd(this.strm); + this.onEnd(status); + this.ended = true; + return status === Z_OK; + } + + // callback interim results if Z_SYNC_FLUSH. + if (_mode === Z_SYNC_FLUSH) { + this.onEnd(Z_OK); + strm.avail_out = 0; + return true; + } + + return true; +}; + + +/** + * Deflate#onData(chunk) -> Void + * - chunk (Uint8Array|Array|String): output data. Type of array depends + * on js engine support. When string output requested, each chunk + * will be string. + * + * By default, stores data blocks in `chunks[]` property and glue + * those in `onEnd`. Override this handler, if you need another behaviour. + **/ +Deflate.prototype.onData = function (chunk) { + this.chunks.push(chunk); +}; + + +/** + * Deflate#onEnd(status) -> Void + * - status (Number): deflate status. 0 (Z_OK) on success, + * other if not. + * + * Called once after you tell deflate that the input stream is + * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) + * or if an error happened. By default - join collected chunks, + * free memory and fill `results` / `err` properties. + **/ +Deflate.prototype.onEnd = function (status) { + // On success - join + if (status === Z_OK) { + if (this.options.to === 'string') { + this.result = this.chunks.join(''); + } else { + this.result = utils.flattenChunks(this.chunks); + } + } + this.chunks = []; + this.err = status; + this.msg = this.strm.msg; +}; + + +/** + * deflate(data[, options]) -> Uint8Array|Array|String + * - data (Uint8Array|Array|String): input data to compress. + * - options (Object): zlib deflate options. + * + * Compress `data` with deflate algorithm and `options`. + * + * Supported options are: + * + * - level + * - windowBits + * - memLevel + * - strategy + * - dictionary + * + * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) + * for more information on these. + * + * Sugar (options): + * + * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify + * negative windowBits implicitly. + * - `to` (String) - if equal to 'string', then result will be "binary string" + * (each char code [0..255]) + * + * ##### Example: + * + * ```javascript + * var pako = require('pako') + * , data = Uint8Array([1,2,3,4,5,6,7,8,9]); + * + * console.log(pako.deflate(data)); + * ``` + **/ +function deflate(input, options) { + var deflator = new Deflate(options); + + deflator.push(input, true); + + // That will never happens, if you don't cheat with options :) + if (deflator.err) { throw deflator.msg || msg[deflator.err]; } + + return deflator.result; +} + + +/** + * deflateRaw(data[, options]) -> Uint8Array|Array|String + * - data (Uint8Array|Array|String): input data to compress. + * - options (Object): zlib deflate options. + * + * The same as [[deflate]], but creates raw data, without wrapper + * (header and adler32 crc). + **/ +function deflateRaw(input, options) { + options = options || {}; + options.raw = true; + return deflate(input, options); +} + + +/** + * gzip(data[, options]) -> Uint8Array|Array|String + * - data (Uint8Array|Array|String): input data to compress. + * - options (Object): zlib deflate options. + * + * The same as [[deflate]], but create gzip wrapper instead of + * deflate one. + **/ +function gzip(input, options) { + options = options || {}; + options.gzip = true; + return deflate(input, options); +} + + +exports.Deflate = Deflate; +exports.deflate = deflate; +exports.deflateRaw = deflateRaw; +exports.gzip = gzip; + +},{"./utils/common":3,"./utils/strings":4,"./zlib/deflate":8,"./zlib/messages":13,"./zlib/zstream":15}],2:[function(require,module,exports){ +'use strict'; + + +var zlib_inflate = require('./zlib/inflate'); +var utils = require('./utils/common'); +var strings = require('./utils/strings'); +var c = require('./zlib/constants'); +var msg = require('./zlib/messages'); +var ZStream = require('./zlib/zstream'); +var GZheader = require('./zlib/gzheader'); + +var toString = Object.prototype.toString; + +/** + * class Inflate + * + * Generic JS-style wrapper for zlib calls. If you don't need + * streaming behaviour - use more simple functions: [[inflate]] + * and [[inflateRaw]]. + **/ + +/* internal + * inflate.chunks -> Array + * + * Chunks of output data, if [[Inflate#onData]] not overridden. + **/ + +/** + * Inflate.result -> Uint8Array|Array|String + * + * Uncompressed result, generated by default [[Inflate#onData]] + * and [[Inflate#onEnd]] handlers. Filled after you push last chunk + * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you + * push a chunk with explicit flush (call [[Inflate#push]] with + * `Z_SYNC_FLUSH` param). + **/ + +/** + * Inflate.err -> Number + * + * Error code after inflate finished. 0 (Z_OK) on success. + * Should be checked if broken data possible. + **/ + +/** + * Inflate.msg -> String + * + * Error message, if [[Inflate.err]] != 0 + **/ + + +/** + * new Inflate(options) + * - options (Object): zlib inflate options. + * + * Creates new inflator instance with specified params. Throws exception + * on bad params. Supported options: + * + * - `windowBits` + * - `dictionary` + * + * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) + * for more information on these. + * + * Additional options, for internal needs: + * + * - `chunkSize` - size of generated data chunks (16K by default) + * - `raw` (Boolean) - do raw inflate + * - `to` (String) - if equal to 'string', then result will be converted + * from utf8 to utf16 (javascript) string. When string output requested, + * chunk length can differ from `chunkSize`, depending on content. + * + * By default, when no options set, autodetect deflate/gzip data format via + * wrapper header. + * + * ##### Example: + * + * ```javascript + * var pako = require('pako') + * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) + * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); + * + * var inflate = new pako.Inflate({ level: 3}); + * + * inflate.push(chunk1, false); + * inflate.push(chunk2, true); // true -> last chunk + * + * if (inflate.err) { throw new Error(inflate.err); } + * + * console.log(inflate.result); + * ``` + **/ +function Inflate(options) { + if (!(this instanceof Inflate)) return new Inflate(options); + + this.options = utils.assign({ + chunkSize: 16384, + windowBits: 0, + to: '' + }, options || {}); + + var opt = this.options; + + // Force window size for `raw` data, if not set directly, + // because we have no header for autodetect. + if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) { + opt.windowBits = -opt.windowBits; + if (opt.windowBits === 0) { opt.windowBits = -15; } + } + + // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate + if ((opt.windowBits >= 0) && (opt.windowBits < 16) && + !(options && options.windowBits)) { + opt.windowBits += 32; + } + + // Gzip header has no info about windows size, we can do autodetect only + // for deflate. So, if window size not set, force it to max when gzip possible + if ((opt.windowBits > 15) && (opt.windowBits < 48)) { + // bit 3 (16) -> gzipped data + // bit 4 (32) -> autodetect gzip/deflate + if ((opt.windowBits & 15) === 0) { + opt.windowBits |= 15; + } + } + + this.err = 0; // error code, if happens (0 = Z_OK) + this.msg = ''; // error message + this.ended = false; // used to avoid multiple onEnd() calls + this.chunks = []; // chunks of compressed data + + this.strm = new ZStream(); + this.strm.avail_out = 0; + + var status = zlib_inflate.inflateInit2( + this.strm, + opt.windowBits + ); + + if (status !== c.Z_OK) { + throw new Error(msg[status]); + } + + this.header = new GZheader(); + + zlib_inflate.inflateGetHeader(this.strm, this.header); + + // Setup dictionary + if (opt.dictionary) { + // Convert data if needed + if (typeof opt.dictionary === 'string') { + opt.dictionary = strings.string2buf(opt.dictionary); + } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') { + opt.dictionary = new Uint8Array(opt.dictionary); + } + if (opt.raw) { //In raw mode we need to set the dictionary early + status = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary); + if (status !== c.Z_OK) { + throw new Error(msg[status]); + } + } + } +} + +/** + * Inflate#push(data[, mode]) -> Boolean + * - data (Uint8Array|Array|ArrayBuffer|String): input data + * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. + * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH. + * + * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with + * new output chunks. Returns `true` on success. The last data block must have + * mode Z_FINISH (or `true`). That will flush internal pending buffers and call + * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you + * can use mode Z_SYNC_FLUSH, keeping the decompression context. + * + * On fail call [[Inflate#onEnd]] with error code and return false. + * + * We strongly recommend to use `Uint8Array` on input for best speed (output + * format is detected automatically). Also, don't skip last param and always + * use the same type in your code (boolean or number). That will improve JS speed. + * + * For regular `Array`-s make sure all elements are [0..255]. + * + * ##### Example + * + * ```javascript + * push(chunk, false); // push one of data chunks + * ... + * push(chunk, true); // push last chunk + * ``` + **/ +Inflate.prototype.push = function (data, mode) { + var strm = this.strm; + var chunkSize = this.options.chunkSize; + var dictionary = this.options.dictionary; + var status, _mode; + var next_out_utf8, tail, utf8str; + + // Flag to properly process Z_BUF_ERROR on testing inflate call + // when we check that all output data was flushed. + var allowBufError = false; + + if (this.ended) { return false; } + _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH); + + // Convert data if needed + if (typeof data === 'string') { + // Only binary strings can be decompressed on practice + strm.input = strings.binstring2buf(data); + } else if (toString.call(data) === '[object ArrayBuffer]') { + strm.input = new Uint8Array(data); + } else { + strm.input = data; + } + + strm.next_in = 0; + strm.avail_in = strm.input.length; + + do { + if (strm.avail_out === 0) { + strm.output = new utils.Buf8(chunkSize); + strm.next_out = 0; + strm.avail_out = chunkSize; + } + + status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */ + + if (status === c.Z_NEED_DICT && dictionary) { + status = zlib_inflate.inflateSetDictionary(this.strm, dictionary); + } + + if (status === c.Z_BUF_ERROR && allowBufError === true) { + status = c.Z_OK; + allowBufError = false; + } + + if (status !== c.Z_STREAM_END && status !== c.Z_OK) { + this.onEnd(status); + this.ended = true; + return false; + } + + if (strm.next_out) { + if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) { + + if (this.options.to === 'string') { + + next_out_utf8 = strings.utf8border(strm.output, strm.next_out); + + tail = strm.next_out - next_out_utf8; + utf8str = strings.buf2string(strm.output, next_out_utf8); + + // move tail + strm.next_out = tail; + strm.avail_out = chunkSize - tail; + if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); } + + this.onData(utf8str); + + } else { + this.onData(utils.shrinkBuf(strm.output, strm.next_out)); + } + } + } + + // When no more input data, we should check that internal inflate buffers + // are flushed. The only way to do it when avail_out = 0 - run one more + // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR. + // Here we set flag to process this error properly. + // + // NOTE. Deflate does not return error in this case and does not needs such + // logic. + if (strm.avail_in === 0 && strm.avail_out === 0) { + allowBufError = true; + } + + } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END); + + if (status === c.Z_STREAM_END) { + _mode = c.Z_FINISH; + } + + // Finalize on the last chunk. + if (_mode === c.Z_FINISH) { + status = zlib_inflate.inflateEnd(this.strm); + this.onEnd(status); + this.ended = true; + return status === c.Z_OK; + } + + // callback interim results if Z_SYNC_FLUSH. + if (_mode === c.Z_SYNC_FLUSH) { + this.onEnd(c.Z_OK); + strm.avail_out = 0; + return true; + } + + return true; +}; + + +/** + * Inflate#onData(chunk) -> Void + * - chunk (Uint8Array|Array|String): output data. Type of array depends + * on js engine support. When string output requested, each chunk + * will be string. + * + * By default, stores data blocks in `chunks[]` property and glue + * those in `onEnd`. Override this handler, if you need another behaviour. + **/ +Inflate.prototype.onData = function (chunk) { + this.chunks.push(chunk); +}; + + +/** + * Inflate#onEnd(status) -> Void + * - status (Number): inflate status. 0 (Z_OK) on success, + * other if not. + * + * Called either after you tell inflate that the input stream is + * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) + * or if an error happened. By default - join collected chunks, + * free memory and fill `results` / `err` properties. + **/ +Inflate.prototype.onEnd = function (status) { + // On success - join + if (status === c.Z_OK) { + if (this.options.to === 'string') { + // Glue & convert here, until we teach pako to send + // utf8 aligned strings to onData + this.result = this.chunks.join(''); + } else { + this.result = utils.flattenChunks(this.chunks); + } + } + this.chunks = []; + this.err = status; + this.msg = this.strm.msg; +}; + + +/** + * inflate(data[, options]) -> Uint8Array|Array|String + * - data (Uint8Array|Array|String): input data to decompress. + * - options (Object): zlib inflate options. + * + * Decompress `data` with inflate/ungzip and `options`. Autodetect + * format via wrapper header by default. That's why we don't provide + * separate `ungzip` method. + * + * Supported options are: + * + * - windowBits + * + * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) + * for more information. + * + * Sugar (options): + * + * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify + * negative windowBits implicitly. + * - `to` (String) - if equal to 'string', then result will be converted + * from utf8 to utf16 (javascript) string. When string output requested, + * chunk length can differ from `chunkSize`, depending on content. + * + * + * ##### Example: + * + * ```javascript + * var pako = require('pako') + * , input = pako.deflate([1,2,3,4,5,6,7,8,9]) + * , output; + * + * try { + * output = pako.inflate(input); + * } catch (err) + * console.log(err); + * } + * ``` + **/ +function inflate(input, options) { + var inflator = new Inflate(options); + + inflator.push(input, true); + + // That will never happens, if you don't cheat with options :) + if (inflator.err) { throw inflator.msg || msg[inflator.err]; } + + return inflator.result; +} + + +/** + * inflateRaw(data[, options]) -> Uint8Array|Array|String + * - data (Uint8Array|Array|String): input data to decompress. + * - options (Object): zlib inflate options. + * + * The same as [[inflate]], but creates raw data, without wrapper + * (header and adler32 crc). + **/ +function inflateRaw(input, options) { + options = options || {}; + options.raw = true; + return inflate(input, options); +} + + +/** + * ungzip(data[, options]) -> Uint8Array|Array|String + * - data (Uint8Array|Array|String): input data to decompress. + * - options (Object): zlib inflate options. + * + * Just shortcut to [[inflate]], because it autodetects format + * by header.content. Done for convenience. + **/ + + +exports.Inflate = Inflate; +exports.inflate = inflate; +exports.inflateRaw = inflateRaw; +exports.ungzip = inflate; + +},{"./utils/common":3,"./utils/strings":4,"./zlib/constants":6,"./zlib/gzheader":9,"./zlib/inflate":11,"./zlib/messages":13,"./zlib/zstream":15}],3:[function(require,module,exports){ +'use strict'; + + +var TYPED_OK = (typeof Uint8Array !== 'undefined') && + (typeof Uint16Array !== 'undefined') && + (typeof Int32Array !== 'undefined'); + +function _has(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} + +exports.assign = function (obj /*from1, from2, from3, ...*/) { + var sources = Array.prototype.slice.call(arguments, 1); + while (sources.length) { + var source = sources.shift(); + if (!source) { continue; } + + if (typeof source !== 'object') { + throw new TypeError(source + 'must be non-object'); + } + + for (var p in source) { + if (_has(source, p)) { + obj[p] = source[p]; + } + } + } + + return obj; +}; + + +// reduce buffer size, avoiding mem copy +exports.shrinkBuf = function (buf, size) { + if (buf.length === size) { return buf; } + if (buf.subarray) { return buf.subarray(0, size); } + buf.length = size; + return buf; +}; + + +var fnTyped = { + arraySet: function (dest, src, src_offs, len, dest_offs) { + if (src.subarray && dest.subarray) { + dest.set(src.subarray(src_offs, src_offs + len), dest_offs); + return; + } + // Fallback to ordinary array + for (var i = 0; i < len; i++) { + dest[dest_offs + i] = src[src_offs + i]; + } + }, + // Join array of chunks to single array. + flattenChunks: function (chunks) { + var i, l, len, pos, chunk, result; + + // calculate data length + len = 0; + for (i = 0, l = chunks.length; i < l; i++) { + len += chunks[i].length; + } + + // join chunks + result = new Uint8Array(len); + pos = 0; + for (i = 0, l = chunks.length; i < l; i++) { + chunk = chunks[i]; + result.set(chunk, pos); + pos += chunk.length; + } + + return result; + } +}; + +var fnUntyped = { + arraySet: function (dest, src, src_offs, len, dest_offs) { + for (var i = 0; i < len; i++) { + dest[dest_offs + i] = src[src_offs + i]; + } + }, + // Join array of chunks to single array. + flattenChunks: function (chunks) { + return [].concat.apply([], chunks); + } +}; + + +// Enable/Disable typed arrays use, for testing +// +exports.setTyped = function (on) { + if (on) { + exports.Buf8 = Uint8Array; + exports.Buf16 = Uint16Array; + exports.Buf32 = Int32Array; + exports.assign(exports, fnTyped); + } else { + exports.Buf8 = Array; + exports.Buf16 = Array; + exports.Buf32 = Array; + exports.assign(exports, fnUntyped); + } +}; + +exports.setTyped(TYPED_OK); + +},{}],4:[function(require,module,exports){ +// String encode/decode helpers +'use strict'; + + +var utils = require('./common'); + + +// Quick check if we can use fast array to bin string conversion +// +// - apply(Array) can fail on Android 2.2 +// - apply(Uint8Array) can fail on iOS 5.1 Safari +// +var STR_APPLY_OK = true; +var STR_APPLY_UIA_OK = true; + +try { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; } +try { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; } + + +// Table with utf8 lengths (calculated by first byte of sequence) +// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS, +// because max possible codepoint is 0x10ffff +var _utf8len = new utils.Buf8(256); +for (var q = 0; q < 256; q++) { + _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1); +} +_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start + + +// convert string to array (typed, when possible) +exports.string2buf = function (str) { + var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; + + // count binary size + for (m_pos = 0; m_pos < str_len; m_pos++) { + c = str.charCodeAt(m_pos); + if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { + c2 = str.charCodeAt(m_pos + 1); + if ((c2 & 0xfc00) === 0xdc00) { + c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); + m_pos++; + } + } + buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; + } + + // allocate buffer + buf = new utils.Buf8(buf_len); + + // convert + for (i = 0, m_pos = 0; i < buf_len; m_pos++) { + c = str.charCodeAt(m_pos); + if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { + c2 = str.charCodeAt(m_pos + 1); + if ((c2 & 0xfc00) === 0xdc00) { + c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); + m_pos++; + } + } + if (c < 0x80) { + /* one byte */ + buf[i++] = c; + } else if (c < 0x800) { + /* two bytes */ + buf[i++] = 0xC0 | (c >>> 6); + buf[i++] = 0x80 | (c & 0x3f); + } else if (c < 0x10000) { + /* three bytes */ + buf[i++] = 0xE0 | (c >>> 12); + buf[i++] = 0x80 | (c >>> 6 & 0x3f); + buf[i++] = 0x80 | (c & 0x3f); + } else { + /* four bytes */ + buf[i++] = 0xf0 | (c >>> 18); + buf[i++] = 0x80 | (c >>> 12 & 0x3f); + buf[i++] = 0x80 | (c >>> 6 & 0x3f); + buf[i++] = 0x80 | (c & 0x3f); + } + } + + return buf; +}; + +// Helper (used in 2 places) +function buf2binstring(buf, len) { + // On Chrome, the arguments in a function call that are allowed is `65534`. + // If the length of the buffer is smaller than that, we can use this optimization, + // otherwise we will take a slower path. + if (len < 65534) { + if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) { + return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); + } + } + + var result = ''; + for (var i = 0; i < len; i++) { + result += String.fromCharCode(buf[i]); + } + return result; +} + + +// Convert byte array to binary string +exports.buf2binstring = function (buf) { + return buf2binstring(buf, buf.length); +}; + + +// Convert binary string (typed, when possible) +exports.binstring2buf = function (str) { + var buf = new utils.Buf8(str.length); + for (var i = 0, len = buf.length; i < len; i++) { + buf[i] = str.charCodeAt(i); + } + return buf; +}; + + +// convert array to string +exports.buf2string = function (buf, max) { + var i, out, c, c_len; + var len = max || buf.length; + + // Reserve max possible length (2 words per char) + // NB: by unknown reasons, Array is significantly faster for + // String.fromCharCode.apply than Uint16Array. + var utf16buf = new Array(len * 2); + + for (out = 0, i = 0; i < len;) { + c = buf[i++]; + // quick process ascii + if (c < 0x80) { utf16buf[out++] = c; continue; } + + c_len = _utf8len[c]; + // skip 5 & 6 byte codes + if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; } + + // apply mask on first byte + c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; + // join the rest + while (c_len > 1 && i < len) { + c = (c << 6) | (buf[i++] & 0x3f); + c_len--; + } + + // terminated by end of string? + if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } + + if (c < 0x10000) { + utf16buf[out++] = c; + } else { + c -= 0x10000; + utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); + utf16buf[out++] = 0xdc00 | (c & 0x3ff); + } + } + + return buf2binstring(utf16buf, out); +}; + + +// Calculate max possible position in utf8 buffer, +// that will not break sequence. If that's not possible +// - (very small limits) return max size as is. +// +// buf[] - utf8 bytes array +// max - length limit (mandatory); +exports.utf8border = function (buf, max) { + var pos; + + max = max || buf.length; + if (max > buf.length) { max = buf.length; } + + // go back from last position, until start of sequence found + pos = max - 1; + while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } + + // Very small and broken sequence, + // return max, because we should return something anyway. + if (pos < 0) { return max; } + + // If we came to start of buffer - that means buffer is too small, + // return max too. + if (pos === 0) { return max; } + + return (pos + _utf8len[buf[pos]] > max) ? pos : max; +}; + +},{"./common":3}],5:[function(require,module,exports){ +'use strict'; + +// Note: adler32 takes 12% for level 0 and 2% for level 6. +// It isn't worth it to make additional optimizations as in original. +// Small size is preferable. + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +function adler32(adler, buf, len, pos) { + var s1 = (adler & 0xffff) |0, + s2 = ((adler >>> 16) & 0xffff) |0, + n = 0; + + while (len !== 0) { + // Set limit ~ twice less than 5552, to keep + // s2 in 31-bits, because we force signed ints. + // in other case %= will fail. + n = len > 2000 ? 2000 : len; + len -= n; + + do { + s1 = (s1 + buf[pos++]) |0; + s2 = (s2 + s1) |0; + } while (--n); + + s1 %= 65521; + s2 %= 65521; + } + + return (s1 | (s2 << 16)) |0; +} + + +module.exports = adler32; + +},{}],6:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +module.exports = { + + /* Allowed flush values; see deflate() and inflate() below for details */ + Z_NO_FLUSH: 0, + Z_PARTIAL_FLUSH: 1, + Z_SYNC_FLUSH: 2, + Z_FULL_FLUSH: 3, + Z_FINISH: 4, + Z_BLOCK: 5, + Z_TREES: 6, + + /* Return codes for the compression/decompression functions. Negative values + * are errors, positive values are used for special but normal events. + */ + Z_OK: 0, + Z_STREAM_END: 1, + Z_NEED_DICT: 2, + Z_ERRNO: -1, + Z_STREAM_ERROR: -2, + Z_DATA_ERROR: -3, + //Z_MEM_ERROR: -4, + Z_BUF_ERROR: -5, + //Z_VERSION_ERROR: -6, + + /* compression levels */ + Z_NO_COMPRESSION: 0, + Z_BEST_SPEED: 1, + Z_BEST_COMPRESSION: 9, + Z_DEFAULT_COMPRESSION: -1, + + + Z_FILTERED: 1, + Z_HUFFMAN_ONLY: 2, + Z_RLE: 3, + Z_FIXED: 4, + Z_DEFAULT_STRATEGY: 0, + + /* Possible values of the data_type field (though see inflate()) */ + Z_BINARY: 0, + Z_TEXT: 1, + //Z_ASCII: 1, // = Z_TEXT (deprecated) + Z_UNKNOWN: 2, + + /* The deflate compression method */ + Z_DEFLATED: 8 + //Z_NULL: null // Use -1 or null inline, depending on var type +}; + +},{}],7:[function(require,module,exports){ +'use strict'; + +// Note: we can't get significant speed boost here. +// So write code to minimize size - no pregenerated tables +// and array tools dependencies. + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +// Use ordinary array, since untyped makes no boost here +function makeTable() { + var c, table = []; + + for (var n = 0; n < 256; n++) { + c = n; + for (var k = 0; k < 8; k++) { + c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); + } + table[n] = c; + } + + return table; +} + +// Create table on load. Just 255 signed longs. Not a problem. +var crcTable = makeTable(); + + +function crc32(crc, buf, len, pos) { + var t = crcTable, + end = pos + len; + + crc ^= -1; + + for (var i = pos; i < end; i++) { + crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; + } + + return (crc ^ (-1)); // >>> 0; +} + + +module.exports = crc32; + +},{}],8:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +var utils = require('../utils/common'); +var trees = require('./trees'); +var adler32 = require('./adler32'); +var crc32 = require('./crc32'); +var msg = require('./messages'); + +/* Public constants ==========================================================*/ +/* ===========================================================================*/ + + +/* Allowed flush values; see deflate() and inflate() below for details */ +var Z_NO_FLUSH = 0; +var Z_PARTIAL_FLUSH = 1; +//var Z_SYNC_FLUSH = 2; +var Z_FULL_FLUSH = 3; +var Z_FINISH = 4; +var Z_BLOCK = 5; +//var Z_TREES = 6; + + +/* Return codes for the compression/decompression functions. Negative values + * are errors, positive values are used for special but normal events. + */ +var Z_OK = 0; +var Z_STREAM_END = 1; +//var Z_NEED_DICT = 2; +//var Z_ERRNO = -1; +var Z_STREAM_ERROR = -2; +var Z_DATA_ERROR = -3; +//var Z_MEM_ERROR = -4; +var Z_BUF_ERROR = -5; +//var Z_VERSION_ERROR = -6; + + +/* compression levels */ +//var Z_NO_COMPRESSION = 0; +//var Z_BEST_SPEED = 1; +//var Z_BEST_COMPRESSION = 9; +var Z_DEFAULT_COMPRESSION = -1; + + +var Z_FILTERED = 1; +var Z_HUFFMAN_ONLY = 2; +var Z_RLE = 3; +var Z_FIXED = 4; +var Z_DEFAULT_STRATEGY = 0; + +/* Possible values of the data_type field (though see inflate()) */ +//var Z_BINARY = 0; +//var Z_TEXT = 1; +//var Z_ASCII = 1; // = Z_TEXT +var Z_UNKNOWN = 2; + + +/* The deflate compression method */ +var Z_DEFLATED = 8; + +/*============================================================================*/ + + +var MAX_MEM_LEVEL = 9; +/* Maximum value for memLevel in deflateInit2 */ +var MAX_WBITS = 15; +/* 32K LZ77 window */ +var DEF_MEM_LEVEL = 8; + + +var LENGTH_CODES = 29; +/* number of length codes, not counting the special END_BLOCK code */ +var LITERALS = 256; +/* number of literal bytes 0..255 */ +var L_CODES = LITERALS + 1 + LENGTH_CODES; +/* number of Literal or Length codes, including the END_BLOCK code */ +var D_CODES = 30; +/* number of distance codes */ +var BL_CODES = 19; +/* number of codes used to transfer the bit lengths */ +var HEAP_SIZE = 2 * L_CODES + 1; +/* maximum heap size */ +var MAX_BITS = 15; +/* All codes must not exceed MAX_BITS bits */ + +var MIN_MATCH = 3; +var MAX_MATCH = 258; +var MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1); + +var PRESET_DICT = 0x20; + +var INIT_STATE = 42; +var EXTRA_STATE = 69; +var NAME_STATE = 73; +var COMMENT_STATE = 91; +var HCRC_STATE = 103; +var BUSY_STATE = 113; +var FINISH_STATE = 666; + +var BS_NEED_MORE = 1; /* block not completed, need more input or more output */ +var BS_BLOCK_DONE = 2; /* block flush performed */ +var BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */ +var BS_FINISH_DONE = 4; /* finish done, accept no more input or output */ + +var OS_CODE = 0x03; // Unix :) . Don't detect, use this default. + +function err(strm, errorCode) { + strm.msg = msg[errorCode]; + return errorCode; +} + +function rank(f) { + return ((f) << 1) - ((f) > 4 ? 9 : 0); +} + +function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } + + +/* ========================================================================= + * Flush as much pending output as possible. All deflate() output goes + * through this function so some applications may wish to modify it + * to avoid allocating a large strm->output buffer and copying into it. + * (See also read_buf()). + */ +function flush_pending(strm) { + var s = strm.state; + + //_tr_flush_bits(s); + var len = s.pending; + if (len > strm.avail_out) { + len = strm.avail_out; + } + if (len === 0) { return; } + + utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out); + strm.next_out += len; + s.pending_out += len; + strm.total_out += len; + strm.avail_out -= len; + s.pending -= len; + if (s.pending === 0) { + s.pending_out = 0; + } +} + + +function flush_block_only(s, last) { + trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last); + s.block_start = s.strstart; + flush_pending(s.strm); +} + + +function put_byte(s, b) { + s.pending_buf[s.pending++] = b; +} + + +/* ========================================================================= + * Put a short in the pending buffer. The 16-bit value is put in MSB order. + * IN assertion: the stream state is correct and there is enough room in + * pending_buf. + */ +function putShortMSB(s, b) { +// put_byte(s, (Byte)(b >> 8)); +// put_byte(s, (Byte)(b & 0xff)); + s.pending_buf[s.pending++] = (b >>> 8) & 0xff; + s.pending_buf[s.pending++] = b & 0xff; +} + + +/* =========================================================================== + * Read a new buffer from the current input stream, update the adler32 + * and total number of bytes read. All deflate() input goes through + * this function so some applications may wish to modify it to avoid + * allocating a large strm->input buffer and copying from it. + * (See also flush_pending()). + */ +function read_buf(strm, buf, start, size) { + var len = strm.avail_in; + + if (len > size) { len = size; } + if (len === 0) { return 0; } + + strm.avail_in -= len; + + // zmemcpy(buf, strm->next_in, len); + utils.arraySet(buf, strm.input, strm.next_in, len, start); + if (strm.state.wrap === 1) { + strm.adler = adler32(strm.adler, buf, len, start); + } + + else if (strm.state.wrap === 2) { + strm.adler = crc32(strm.adler, buf, len, start); + } + + strm.next_in += len; + strm.total_in += len; + + return len; +} + + +/* =========================================================================== + * Set match_start to the longest match starting at the given string and + * return its length. Matches shorter or equal to prev_length are discarded, + * in which case the result is equal to prev_length and match_start is + * garbage. + * IN assertions: cur_match is the head of the hash chain for the current + * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 + * OUT assertion: the match length is not greater than s->lookahead. + */ +function longest_match(s, cur_match) { + var chain_length = s.max_chain_length; /* max hash chain length */ + var scan = s.strstart; /* current string */ + var match; /* matched string */ + var len; /* length of current match */ + var best_len = s.prev_length; /* best match length so far */ + var nice_match = s.nice_match; /* stop if match long enough */ + var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ? + s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/; + + var _win = s.window; // shortcut + + var wmask = s.w_mask; + var prev = s.prev; + + /* Stop when cur_match becomes <= limit. To simplify the code, + * we prevent matches with the string of window index 0. + */ + + var strend = s.strstart + MAX_MATCH; + var scan_end1 = _win[scan + best_len - 1]; + var scan_end = _win[scan + best_len]; + + /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. + * It is easy to get rid of this optimization if necessary. + */ + // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); + + /* Do not waste too much time if we already have a good match: */ + if (s.prev_length >= s.good_match) { + chain_length >>= 2; + } + /* Do not look for matches beyond the end of the input. This is necessary + * to make deflate deterministic. + */ + if (nice_match > s.lookahead) { nice_match = s.lookahead; } + + // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); + + do { + // Assert(cur_match < s->strstart, "no future"); + match = cur_match; + + /* Skip to next match if the match length cannot increase + * or if the match length is less than 2. Note that the checks below + * for insufficient lookahead only occur occasionally for performance + * reasons. Therefore uninitialized memory will be accessed, and + * conditional jumps will be made that depend on those values. + * However the length of the match is limited to the lookahead, so + * the output of deflate is not affected by the uninitialized values. + */ + + if (_win[match + best_len] !== scan_end || + _win[match + best_len - 1] !== scan_end1 || + _win[match] !== _win[scan] || + _win[++match] !== _win[scan + 1]) { + continue; + } + + /* The check at best_len-1 can be removed because it will be made + * again later. (This heuristic is not always a win.) + * It is not necessary to compare scan[2] and match[2] since they + * are always equal when the other bytes match, given that + * the hash keys are equal and that HASH_BITS >= 8. + */ + scan += 2; + match++; + // Assert(*scan == *match, "match[2]?"); + + /* We check for insufficient lookahead only every 8th comparison; + * the 256th check will be made at strstart+258. + */ + do { + /*jshint noempty:false*/ + } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && + _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && + _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && + _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && + scan < strend); + + // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); + + len = MAX_MATCH - (strend - scan); + scan = strend - MAX_MATCH; + + if (len > best_len) { + s.match_start = cur_match; + best_len = len; + if (len >= nice_match) { + break; + } + scan_end1 = _win[scan + best_len - 1]; + scan_end = _win[scan + best_len]; + } + } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0); + + if (best_len <= s.lookahead) { + return best_len; + } + return s.lookahead; +} + + +/* =========================================================================== + * Fill the window when the lookahead becomes insufficient. + * Updates strstart and lookahead. + * + * IN assertion: lookahead < MIN_LOOKAHEAD + * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD + * At least one byte has been read, or avail_in == 0; reads are + * performed for at least two bytes (required for the zip translate_eol + * option -- not supported here). + */ +function fill_window(s) { + var _w_size = s.w_size; + var p, n, m, more, str; + + //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); + + do { + more = s.window_size - s.lookahead - s.strstart; + + // JS ints have 32 bit, block below not needed + /* Deal with !@#$% 64K limit: */ + //if (sizeof(int) <= 2) { + // if (more == 0 && s->strstart == 0 && s->lookahead == 0) { + // more = wsize; + // + // } else if (more == (unsigned)(-1)) { + // /* Very unlikely, but possible on 16 bit machine if + // * strstart == 0 && lookahead == 1 (input done a byte at time) + // */ + // more--; + // } + //} + + + /* If the window is almost full and there is insufficient lookahead, + * move the upper half to the lower one to make room in the upper half. + */ + if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) { + + utils.arraySet(s.window, s.window, _w_size, _w_size, 0); + s.match_start -= _w_size; + s.strstart -= _w_size; + /* we now have strstart >= MAX_DIST */ + s.block_start -= _w_size; + + /* Slide the hash table (could be avoided with 32 bit values + at the expense of memory usage). We slide even when level == 0 + to keep the hash table consistent if we switch back to level > 0 + later. (Using level 0 permanently is not an optimal usage of + zlib, so we don't care about this pathological case.) + */ + + n = s.hash_size; + p = n; + do { + m = s.head[--p]; + s.head[p] = (m >= _w_size ? m - _w_size : 0); + } while (--n); + + n = _w_size; + p = n; + do { + m = s.prev[--p]; + s.prev[p] = (m >= _w_size ? m - _w_size : 0); + /* If n is not on any hash chain, prev[n] is garbage but + * its value will never be used. + */ + } while (--n); + + more += _w_size; + } + if (s.strm.avail_in === 0) { + break; + } + + /* If there was no sliding: + * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && + * more == window_size - lookahead - strstart + * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) + * => more >= window_size - 2*WSIZE + 2 + * In the BIG_MEM or MMAP case (not yet supported), + * window_size == input_size + MIN_LOOKAHEAD && + * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. + * Otherwise, window_size == 2*WSIZE so more >= 2. + * If there was sliding, more >= WSIZE. So in all cases, more >= 2. + */ + //Assert(more >= 2, "more < 2"); + n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more); + s.lookahead += n; + + /* Initialize the hash value now that we have some input: */ + if (s.lookahead + s.insert >= MIN_MATCH) { + str = s.strstart - s.insert; + s.ins_h = s.window[str]; + + /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask; +//#if MIN_MATCH != 3 +// Call update_hash() MIN_MATCH-3 more times +//#endif + while (s.insert) { + /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; + + s.prev[str & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = str; + str++; + s.insert--; + if (s.lookahead + s.insert < MIN_MATCH) { + break; + } + } + } + /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, + * but this is not important since only literal bytes will be emitted. + */ + + } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0); + + /* If the WIN_INIT bytes after the end of the current data have never been + * written, then zero those bytes in order to avoid memory check reports of + * the use of uninitialized (or uninitialised as Julian writes) bytes by + * the longest match routines. Update the high water mark for the next + * time through here. WIN_INIT is set to MAX_MATCH since the longest match + * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. + */ +// if (s.high_water < s.window_size) { +// var curr = s.strstart + s.lookahead; +// var init = 0; +// +// if (s.high_water < curr) { +// /* Previous high water mark below current data -- zero WIN_INIT +// * bytes or up to end of window, whichever is less. +// */ +// init = s.window_size - curr; +// if (init > WIN_INIT) +// init = WIN_INIT; +// zmemzero(s->window + curr, (unsigned)init); +// s->high_water = curr + init; +// } +// else if (s->high_water < (ulg)curr + WIN_INIT) { +// /* High water mark at or above current data, but below current data +// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up +// * to end of window, whichever is less. +// */ +// init = (ulg)curr + WIN_INIT - s->high_water; +// if (init > s->window_size - s->high_water) +// init = s->window_size - s->high_water; +// zmemzero(s->window + s->high_water, (unsigned)init); +// s->high_water += init; +// } +// } +// +// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, +// "not enough room for search"); +} + +/* =========================================================================== + * Copy without compression as much as possible from the input stream, return + * the current block state. + * This function does not insert new strings in the dictionary since + * uncompressible data is probably not useful. This function is used + * only for the level=0 compression option. + * NOTE: this function should be optimized to avoid extra copying from + * window to pending_buf. + */ +function deflate_stored(s, flush) { + /* Stored blocks are limited to 0xffff bytes, pending_buf is limited + * to pending_buf_size, and each stored block has a 5 byte header: + */ + var max_block_size = 0xffff; + + if (max_block_size > s.pending_buf_size - 5) { + max_block_size = s.pending_buf_size - 5; + } + + /* Copy as much as possible from input to output: */ + for (;;) { + /* Fill the window as much as possible: */ + if (s.lookahead <= 1) { + + //Assert(s->strstart < s->w_size+MAX_DIST(s) || + // s->block_start >= (long)s->w_size, "slide too late"); +// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) || +// s.block_start >= s.w_size)) { +// throw new Error("slide too late"); +// } + + fill_window(s); + if (s.lookahead === 0 && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + + if (s.lookahead === 0) { + break; + } + /* flush the current block */ + } + //Assert(s->block_start >= 0L, "block gone"); +// if (s.block_start < 0) throw new Error("block gone"); + + s.strstart += s.lookahead; + s.lookahead = 0; + + /* Emit a stored block if pending_buf will be full: */ + var max_start = s.block_start + max_block_size; + + if (s.strstart === 0 || s.strstart >= max_start) { + /* strstart == 0 is possible when wraparound on 16-bit machine */ + s.lookahead = s.strstart - max_start; + s.strstart = max_start; + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + + + } + /* Flush if we may have to slide, otherwise block_start may become + * negative and the data will be gone: + */ + if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + } + + s.insert = 0; + + if (flush === Z_FINISH) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + + if (s.strstart > s.block_start) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + + return BS_NEED_MORE; +} + +/* =========================================================================== + * Compress as much as possible from the input stream, return the current + * block state. + * This function does not perform lazy evaluation of matches and inserts + * new strings in the dictionary only for unmatched strings or for short + * matches. It is used only for the fast compression options. + */ +function deflate_fast(s, flush) { + var hash_head; /* head of the hash chain */ + var bflush; /* set if current block must be flushed */ + + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the next match, plus MIN_MATCH bytes to insert the + * string following the next match. + */ + if (s.lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { + break; /* flush the current block */ + } + } + + /* Insert the string window[strstart .. strstart+2] in the + * dictionary, and set hash_head to the head of the hash chain: + */ + hash_head = 0/*NIL*/; + if (s.lookahead >= MIN_MATCH) { + /*** INSERT_STRING(s, s.strstart, hash_head); ***/ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + /***/ + } + + /* Find the longest match, discarding those <= prev_length. + * At this point we have always match_length < MIN_MATCH + */ + if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) { + /* To simplify the code, we prevent matches with the string + * of window index 0 (in particular we have to avoid a match + * of the string with itself at the start of the input file). + */ + s.match_length = longest_match(s, hash_head); + /* longest_match() sets match_start */ + } + if (s.match_length >= MIN_MATCH) { + // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only + + /*** _tr_tally_dist(s, s.strstart - s.match_start, + s.match_length - MIN_MATCH, bflush); ***/ + bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH); + + s.lookahead -= s.match_length; + + /* Insert new strings in the hash table only if the match length + * is not too large. This saves time but degrades compression. + */ + if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) { + s.match_length--; /* string at strstart already in table */ + do { + s.strstart++; + /*** INSERT_STRING(s, s.strstart, hash_head); ***/ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + /***/ + /* strstart never exceeds WSIZE-MAX_MATCH, so there are + * always MIN_MATCH bytes ahead. + */ + } while (--s.match_length !== 0); + s.strstart++; + } else + { + s.strstart += s.match_length; + s.match_length = 0; + s.ins_h = s.window[s.strstart]; + /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask; + +//#if MIN_MATCH != 3 +// Call UPDATE_HASH() MIN_MATCH-3 more times +//#endif + /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not + * matter since it will be recomputed at next deflate call. + */ + } + } else { + /* No match, output a literal byte */ + //Tracevv((stderr,"%c", s.window[s.strstart])); + /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ + bflush = trees._tr_tally(s, 0, s.window[s.strstart]); + + s.lookahead--; + s.strstart++; + } + if (bflush) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + } + s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1); + if (flush === Z_FINISH) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + if (s.last_lit) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + return BS_BLOCK_DONE; +} + +/* =========================================================================== + * Same as above, but achieves better compression. We use a lazy + * evaluation for matches: a match is finally adopted only if there is + * no better match at the next window position. + */ +function deflate_slow(s, flush) { + var hash_head; /* head of hash chain */ + var bflush; /* set if current block must be flushed */ + + var max_insert; + + /* Process the input block. */ + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the next match, plus MIN_MATCH bytes to insert the + * string following the next match. + */ + if (s.lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { break; } /* flush the current block */ + } + + /* Insert the string window[strstart .. strstart+2] in the + * dictionary, and set hash_head to the head of the hash chain: + */ + hash_head = 0/*NIL*/; + if (s.lookahead >= MIN_MATCH) { + /*** INSERT_STRING(s, s.strstart, hash_head); ***/ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + /***/ + } + + /* Find the longest match, discarding those <= prev_length. + */ + s.prev_length = s.match_length; + s.prev_match = s.match_start; + s.match_length = MIN_MATCH - 1; + + if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match && + s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) { + /* To simplify the code, we prevent matches with the string + * of window index 0 (in particular we have to avoid a match + * of the string with itself at the start of the input file). + */ + s.match_length = longest_match(s, hash_head); + /* longest_match() sets match_start */ + + if (s.match_length <= 5 && + (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) { + + /* If prev_match is also MIN_MATCH, match_start is garbage + * but we will ignore the current match anyway. + */ + s.match_length = MIN_MATCH - 1; + } + } + /* If there was a match at the previous step and the current + * match is not better, output the previous match: + */ + if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) { + max_insert = s.strstart + s.lookahead - MIN_MATCH; + /* Do not insert strings in hash table beyond this. */ + + //check_match(s, s.strstart-1, s.prev_match, s.prev_length); + + /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match, + s.prev_length - MIN_MATCH, bflush);***/ + bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH); + /* Insert in hash table all strings up to the end of the match. + * strstart-1 and strstart are already inserted. If there is not + * enough lookahead, the last two strings are not inserted in + * the hash table. + */ + s.lookahead -= s.prev_length - 1; + s.prev_length -= 2; + do { + if (++s.strstart <= max_insert) { + /*** INSERT_STRING(s, s.strstart, hash_head); ***/ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + /***/ + } + } while (--s.prev_length !== 0); + s.match_available = 0; + s.match_length = MIN_MATCH - 1; + s.strstart++; + + if (bflush) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + + } else if (s.match_available) { + /* If there was no match at the previous position, output a + * single literal. If there was a match but the current match + * is longer, truncate the previous match to a single literal. + */ + //Tracevv((stderr,"%c", s->window[s->strstart-1])); + /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ + bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); + + if (bflush) { + /*** FLUSH_BLOCK_ONLY(s, 0) ***/ + flush_block_only(s, false); + /***/ + } + s.strstart++; + s.lookahead--; + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } else { + /* There is no previous match to compare with, wait for + * the next step to decide. + */ + s.match_available = 1; + s.strstart++; + s.lookahead--; + } + } + //Assert (flush != Z_NO_FLUSH, "no flush?"); + if (s.match_available) { + //Tracevv((stderr,"%c", s->window[s->strstart-1])); + /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ + bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); + + s.match_available = 0; + } + s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1; + if (flush === Z_FINISH) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + if (s.last_lit) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + + return BS_BLOCK_DONE; +} + + +/* =========================================================================== + * For Z_RLE, simply look for runs of bytes, generate matches only of distance + * one. Do not maintain a hash table. (It will be regenerated if this run of + * deflate switches away from Z_RLE.) + */ +function deflate_rle(s, flush) { + var bflush; /* set if current block must be flushed */ + var prev; /* byte at distance one to match */ + var scan, strend; /* scan goes up to strend for length of run */ + + var _win = s.window; + + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the longest run, plus one for the unrolled loop. + */ + if (s.lookahead <= MAX_MATCH) { + fill_window(s); + if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { break; } /* flush the current block */ + } + + /* See how many times the previous byte repeats */ + s.match_length = 0; + if (s.lookahead >= MIN_MATCH && s.strstart > 0) { + scan = s.strstart - 1; + prev = _win[scan]; + if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) { + strend = s.strstart + MAX_MATCH; + do { + /*jshint noempty:false*/ + } while (prev === _win[++scan] && prev === _win[++scan] && + prev === _win[++scan] && prev === _win[++scan] && + prev === _win[++scan] && prev === _win[++scan] && + prev === _win[++scan] && prev === _win[++scan] && + scan < strend); + s.match_length = MAX_MATCH - (strend - scan); + if (s.match_length > s.lookahead) { + s.match_length = s.lookahead; + } + } + //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan"); + } + + /* Emit match if have run of MIN_MATCH or longer, else emit literal */ + if (s.match_length >= MIN_MATCH) { + //check_match(s, s.strstart, s.strstart - 1, s.match_length); + + /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/ + bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH); + + s.lookahead -= s.match_length; + s.strstart += s.match_length; + s.match_length = 0; + } else { + /* No match, output a literal byte */ + //Tracevv((stderr,"%c", s->window[s->strstart])); + /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ + bflush = trees._tr_tally(s, 0, s.window[s.strstart]); + + s.lookahead--; + s.strstart++; + } + if (bflush) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + } + s.insert = 0; + if (flush === Z_FINISH) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + if (s.last_lit) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + return BS_BLOCK_DONE; +} + +/* =========================================================================== + * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. + * (It will be regenerated if this run of deflate switches away from Huffman.) + */ +function deflate_huff(s, flush) { + var bflush; /* set if current block must be flushed */ + + for (;;) { + /* Make sure that we have a literal to write. */ + if (s.lookahead === 0) { + fill_window(s); + if (s.lookahead === 0) { + if (flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + break; /* flush the current block */ + } + } + + /* Output a literal byte */ + s.match_length = 0; + //Tracevv((stderr,"%c", s->window[s->strstart])); + /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ + bflush = trees._tr_tally(s, 0, s.window[s.strstart]); + s.lookahead--; + s.strstart++; + if (bflush) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + } + s.insert = 0; + if (flush === Z_FINISH) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + if (s.last_lit) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + return BS_BLOCK_DONE; +} + +/* Values for max_lazy_match, good_match and max_chain_length, depending on + * the desired pack level (0..9). The values given below have been tuned to + * exclude worst case performance for pathological files. Better values may be + * found for specific files. + */ +function Config(good_length, max_lazy, nice_length, max_chain, func) { + this.good_length = good_length; + this.max_lazy = max_lazy; + this.nice_length = nice_length; + this.max_chain = max_chain; + this.func = func; +} + +var configuration_table; + +configuration_table = [ + /* good lazy nice chain */ + new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */ + new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */ + new Config(4, 5, 16, 8, deflate_fast), /* 2 */ + new Config(4, 6, 32, 32, deflate_fast), /* 3 */ + + new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */ + new Config(8, 16, 32, 32, deflate_slow), /* 5 */ + new Config(8, 16, 128, 128, deflate_slow), /* 6 */ + new Config(8, 32, 128, 256, deflate_slow), /* 7 */ + new Config(32, 128, 258, 1024, deflate_slow), /* 8 */ + new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */ +]; + + +/* =========================================================================== + * Initialize the "longest match" routines for a new zlib stream + */ +function lm_init(s) { + s.window_size = 2 * s.w_size; + + /*** CLEAR_HASH(s); ***/ + zero(s.head); // Fill with NIL (= 0); + + /* Set the default configuration parameters: + */ + s.max_lazy_match = configuration_table[s.level].max_lazy; + s.good_match = configuration_table[s.level].good_length; + s.nice_match = configuration_table[s.level].nice_length; + s.max_chain_length = configuration_table[s.level].max_chain; + + s.strstart = 0; + s.block_start = 0; + s.lookahead = 0; + s.insert = 0; + s.match_length = s.prev_length = MIN_MATCH - 1; + s.match_available = 0; + s.ins_h = 0; +} + + +function DeflateState() { + this.strm = null; /* pointer back to this zlib stream */ + this.status = 0; /* as the name implies */ + this.pending_buf = null; /* output still pending */ + this.pending_buf_size = 0; /* size of pending_buf */ + this.pending_out = 0; /* next pending byte to output to the stream */ + this.pending = 0; /* nb of bytes in the pending buffer */ + this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ + this.gzhead = null; /* gzip header information to write */ + this.gzindex = 0; /* where in extra, name, or comment */ + this.method = Z_DEFLATED; /* can only be DEFLATED */ + this.last_flush = -1; /* value of flush param for previous deflate call */ + + this.w_size = 0; /* LZ77 window size (32K by default) */ + this.w_bits = 0; /* log2(w_size) (8..16) */ + this.w_mask = 0; /* w_size - 1 */ + + this.window = null; + /* Sliding window. Input bytes are read into the second half of the window, + * and move to the first half later to keep a dictionary of at least wSize + * bytes. With this organization, matches are limited to a distance of + * wSize-MAX_MATCH bytes, but this ensures that IO is always + * performed with a length multiple of the block size. + */ + + this.window_size = 0; + /* Actual size of window: 2*wSize, except when the user input buffer + * is directly used as sliding window. + */ + + this.prev = null; + /* Link to older string with same hash index. To limit the size of this + * array to 64K, this link is maintained only for the last 32K strings. + * An index in this array is thus a window index modulo 32K. + */ + + this.head = null; /* Heads of the hash chains or NIL. */ + + this.ins_h = 0; /* hash index of string to be inserted */ + this.hash_size = 0; /* number of elements in hash table */ + this.hash_bits = 0; /* log2(hash_size) */ + this.hash_mask = 0; /* hash_size-1 */ + + this.hash_shift = 0; + /* Number of bits by which ins_h must be shifted at each input + * step. It must be such that after MIN_MATCH steps, the oldest + * byte no longer takes part in the hash key, that is: + * hash_shift * MIN_MATCH >= hash_bits + */ + + this.block_start = 0; + /* Window position at the beginning of the current output block. Gets + * negative when the window is moved backwards. + */ + + this.match_length = 0; /* length of best match */ + this.prev_match = 0; /* previous match */ + this.match_available = 0; /* set if previous match exists */ + this.strstart = 0; /* start of string to insert */ + this.match_start = 0; /* start of matching string */ + this.lookahead = 0; /* number of valid bytes ahead in window */ + + this.prev_length = 0; + /* Length of the best match at previous step. Matches not greater than this + * are discarded. This is used in the lazy match evaluation. + */ + + this.max_chain_length = 0; + /* To speed up deflation, hash chains are never searched beyond this + * length. A higher limit improves compression ratio but degrades the + * speed. + */ + + this.max_lazy_match = 0; + /* Attempt to find a better match only when the current match is strictly + * smaller than this value. This mechanism is used only for compression + * levels >= 4. + */ + // That's alias to max_lazy_match, don't use directly + //this.max_insert_length = 0; + /* Insert new strings in the hash table only if the match length is not + * greater than this length. This saves time but degrades compression. + * max_insert_length is used only for compression levels <= 3. + */ + + this.level = 0; /* compression level (1..9) */ + this.strategy = 0; /* favor or force Huffman coding*/ + + this.good_match = 0; + /* Use a faster search when the previous match is longer than this */ + + this.nice_match = 0; /* Stop searching when current match exceeds this */ + + /* used by trees.c: */ + + /* Didn't use ct_data typedef below to suppress compiler warning */ + + // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ + // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ + // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ + + // Use flat array of DOUBLE size, with interleaved fata, + // because JS does not support effective + this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2); + this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2); + this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2); + zero(this.dyn_ltree); + zero(this.dyn_dtree); + zero(this.bl_tree); + + this.l_desc = null; /* desc. for literal tree */ + this.d_desc = null; /* desc. for distance tree */ + this.bl_desc = null; /* desc. for bit length tree */ + + //ush bl_count[MAX_BITS+1]; + this.bl_count = new utils.Buf16(MAX_BITS + 1); + /* number of codes at each bit length for an optimal tree */ + + //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ + this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */ + zero(this.heap); + + this.heap_len = 0; /* number of elements in the heap */ + this.heap_max = 0; /* element of largest frequency */ + /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. + * The same heap array is used to build all trees. + */ + + this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1]; + zero(this.depth); + /* Depth of each subtree used as tie breaker for trees of equal frequency + */ + + this.l_buf = 0; /* buffer index for literals or lengths */ + + this.lit_bufsize = 0; + /* Size of match buffer for literals/lengths. There are 4 reasons for + * limiting lit_bufsize to 64K: + * - frequencies can be kept in 16 bit counters + * - if compression is not successful for the first block, all input + * data is still in the window so we can still emit a stored block even + * when input comes from standard input. (This can also be done for + * all blocks if lit_bufsize is not greater than 32K.) + * - if compression is not successful for a file smaller than 64K, we can + * even emit a stored file instead of a stored block (saving 5 bytes). + * This is applicable only for zip (not gzip or zlib). + * - creating new Huffman trees less frequently may not provide fast + * adaptation to changes in the input data statistics. (Take for + * example a binary file with poorly compressible code followed by + * a highly compressible string table.) Smaller buffer sizes give + * fast adaptation but have of course the overhead of transmitting + * trees more frequently. + * - I can't count above 4 + */ + + this.last_lit = 0; /* running index in l_buf */ + + this.d_buf = 0; + /* Buffer index for distances. To simplify the code, d_buf and l_buf have + * the same number of elements. To use different lengths, an extra flag + * array would be necessary. + */ + + this.opt_len = 0; /* bit length of current block with optimal trees */ + this.static_len = 0; /* bit length of current block with static trees */ + this.matches = 0; /* number of string matches in current block */ + this.insert = 0; /* bytes at end of window left to insert */ + + + this.bi_buf = 0; + /* Output buffer. bits are inserted starting at the bottom (least + * significant bits). + */ + this.bi_valid = 0; + /* Number of valid bits in bi_buf. All bits above the last valid bit + * are always zero. + */ + + // Used for window memory init. We safely ignore it for JS. That makes + // sense only for pointers and memory check tools. + //this.high_water = 0; + /* High water mark offset in window for initialized bytes -- bytes above + * this are set to zero in order to avoid memory check warnings when + * longest match routines access bytes past the input. This is then + * updated to the new high water mark. + */ +} + + +function deflateResetKeep(strm) { + var s; + + if (!strm || !strm.state) { + return err(strm, Z_STREAM_ERROR); + } + + strm.total_in = strm.total_out = 0; + strm.data_type = Z_UNKNOWN; + + s = strm.state; + s.pending = 0; + s.pending_out = 0; + + if (s.wrap < 0) { + s.wrap = -s.wrap; + /* was made negative by deflate(..., Z_FINISH); */ + } + s.status = (s.wrap ? INIT_STATE : BUSY_STATE); + strm.adler = (s.wrap === 2) ? + 0 // crc32(0, Z_NULL, 0) + : + 1; // adler32(0, Z_NULL, 0) + s.last_flush = Z_NO_FLUSH; + trees._tr_init(s); + return Z_OK; +} + + +function deflateReset(strm) { + var ret = deflateResetKeep(strm); + if (ret === Z_OK) { + lm_init(strm.state); + } + return ret; +} + + +function deflateSetHeader(strm, head) { + if (!strm || !strm.state) { return Z_STREAM_ERROR; } + if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; } + strm.state.gzhead = head; + return Z_OK; +} + + +function deflateInit2(strm, level, method, windowBits, memLevel, strategy) { + if (!strm) { // === Z_NULL + return Z_STREAM_ERROR; + } + var wrap = 1; + + if (level === Z_DEFAULT_COMPRESSION) { + level = 6; + } + + if (windowBits < 0) { /* suppress zlib wrapper */ + wrap = 0; + windowBits = -windowBits; + } + + else if (windowBits > 15) { + wrap = 2; /* write gzip wrapper instead */ + windowBits -= 16; + } + + + if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || + windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || + strategy < 0 || strategy > Z_FIXED) { + return err(strm, Z_STREAM_ERROR); + } + + + if (windowBits === 8) { + windowBits = 9; + } + /* until 256-byte window bug fixed */ + + var s = new DeflateState(); + + strm.state = s; + s.strm = strm; + + s.wrap = wrap; + s.gzhead = null; + s.w_bits = windowBits; + s.w_size = 1 << s.w_bits; + s.w_mask = s.w_size - 1; + + s.hash_bits = memLevel + 7; + s.hash_size = 1 << s.hash_bits; + s.hash_mask = s.hash_size - 1; + s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH); + + s.window = new utils.Buf8(s.w_size * 2); + s.head = new utils.Buf16(s.hash_size); + s.prev = new utils.Buf16(s.w_size); + + // Don't need mem init magic for JS. + //s.high_water = 0; /* nothing written to s->window yet */ + + s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ + + s.pending_buf_size = s.lit_bufsize * 4; + + //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); + //s->pending_buf = (uchf *) overlay; + s.pending_buf = new utils.Buf8(s.pending_buf_size); + + // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`) + //s->d_buf = overlay + s->lit_bufsize/sizeof(ush); + s.d_buf = 1 * s.lit_bufsize; + + //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; + s.l_buf = (1 + 2) * s.lit_bufsize; + + s.level = level; + s.strategy = strategy; + s.method = method; + + return deflateReset(strm); +} + +function deflateInit(strm, level) { + return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY); +} + + +function deflate(strm, flush) { + var old_flush, s; + var beg, val; // for gzip header write only + + if (!strm || !strm.state || + flush > Z_BLOCK || flush < 0) { + return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR; + } + + s = strm.state; + + if (!strm.output || + (!strm.input && strm.avail_in !== 0) || + (s.status === FINISH_STATE && flush !== Z_FINISH)) { + return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR); + } + + s.strm = strm; /* just in case */ + old_flush = s.last_flush; + s.last_flush = flush; + + /* Write the header */ + if (s.status === INIT_STATE) { + + if (s.wrap === 2) { // GZIP header + strm.adler = 0; //crc32(0L, Z_NULL, 0); + put_byte(s, 31); + put_byte(s, 139); + put_byte(s, 8); + if (!s.gzhead) { // s->gzhead == Z_NULL + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, s.level === 9 ? 2 : + (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? + 4 : 0)); + put_byte(s, OS_CODE); + s.status = BUSY_STATE; + } + else { + put_byte(s, (s.gzhead.text ? 1 : 0) + + (s.gzhead.hcrc ? 2 : 0) + + (!s.gzhead.extra ? 0 : 4) + + (!s.gzhead.name ? 0 : 8) + + (!s.gzhead.comment ? 0 : 16) + ); + put_byte(s, s.gzhead.time & 0xff); + put_byte(s, (s.gzhead.time >> 8) & 0xff); + put_byte(s, (s.gzhead.time >> 16) & 0xff); + put_byte(s, (s.gzhead.time >> 24) & 0xff); + put_byte(s, s.level === 9 ? 2 : + (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? + 4 : 0)); + put_byte(s, s.gzhead.os & 0xff); + if (s.gzhead.extra && s.gzhead.extra.length) { + put_byte(s, s.gzhead.extra.length & 0xff); + put_byte(s, (s.gzhead.extra.length >> 8) & 0xff); + } + if (s.gzhead.hcrc) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0); + } + s.gzindex = 0; + s.status = EXTRA_STATE; + } + } + else // DEFLATE header + { + var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8; + var level_flags = -1; + + if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) { + level_flags = 0; + } else if (s.level < 6) { + level_flags = 1; + } else if (s.level === 6) { + level_flags = 2; + } else { + level_flags = 3; + } + header |= (level_flags << 6); + if (s.strstart !== 0) { header |= PRESET_DICT; } + header += 31 - (header % 31); + + s.status = BUSY_STATE; + putShortMSB(s, header); + + /* Save the adler32 of the preset dictionary: */ + if (s.strstart !== 0) { + putShortMSB(s, strm.adler >>> 16); + putShortMSB(s, strm.adler & 0xffff); + } + strm.adler = 1; // adler32(0L, Z_NULL, 0); + } + } + +//#ifdef GZIP + if (s.status === EXTRA_STATE) { + if (s.gzhead.extra/* != Z_NULL*/) { + beg = s.pending; /* start of bytes to update crc */ + + while (s.gzindex < (s.gzhead.extra.length & 0xffff)) { + if (s.pending === s.pending_buf_size) { + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + flush_pending(strm); + beg = s.pending; + if (s.pending === s.pending_buf_size) { + break; + } + } + put_byte(s, s.gzhead.extra[s.gzindex] & 0xff); + s.gzindex++; + } + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + if (s.gzindex === s.gzhead.extra.length) { + s.gzindex = 0; + s.status = NAME_STATE; + } + } + else { + s.status = NAME_STATE; + } + } + if (s.status === NAME_STATE) { + if (s.gzhead.name/* != Z_NULL*/) { + beg = s.pending; /* start of bytes to update crc */ + //int val; + + do { + if (s.pending === s.pending_buf_size) { + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + flush_pending(strm); + beg = s.pending; + if (s.pending === s.pending_buf_size) { + val = 1; + break; + } + } + // JS specific: little magic to add zero terminator to end of string + if (s.gzindex < s.gzhead.name.length) { + val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff; + } else { + val = 0; + } + put_byte(s, val); + } while (val !== 0); + + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + if (val === 0) { + s.gzindex = 0; + s.status = COMMENT_STATE; + } + } + else { + s.status = COMMENT_STATE; + } + } + if (s.status === COMMENT_STATE) { + if (s.gzhead.comment/* != Z_NULL*/) { + beg = s.pending; /* start of bytes to update crc */ + //int val; + + do { + if (s.pending === s.pending_buf_size) { + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + flush_pending(strm); + beg = s.pending; + if (s.pending === s.pending_buf_size) { + val = 1; + break; + } + } + // JS specific: little magic to add zero terminator to end of string + if (s.gzindex < s.gzhead.comment.length) { + val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff; + } else { + val = 0; + } + put_byte(s, val); + } while (val !== 0); + + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + if (val === 0) { + s.status = HCRC_STATE; + } + } + else { + s.status = HCRC_STATE; + } + } + if (s.status === HCRC_STATE) { + if (s.gzhead.hcrc) { + if (s.pending + 2 > s.pending_buf_size) { + flush_pending(strm); + } + if (s.pending + 2 <= s.pending_buf_size) { + put_byte(s, strm.adler & 0xff); + put_byte(s, (strm.adler >> 8) & 0xff); + strm.adler = 0; //crc32(0L, Z_NULL, 0); + s.status = BUSY_STATE; + } + } + else { + s.status = BUSY_STATE; + } + } +//#endif + + /* Flush as much pending output as possible */ + if (s.pending !== 0) { + flush_pending(strm); + if (strm.avail_out === 0) { + /* Since avail_out is 0, deflate will be called again with + * more output space, but possibly with both pending and + * avail_in equal to zero. There won't be anything to do, + * but this is not an error situation so make sure we + * return OK instead of BUF_ERROR at next call of deflate: + */ + s.last_flush = -1; + return Z_OK; + } + + /* Make sure there is something to do and avoid duplicate consecutive + * flushes. For repeated and useless calls with Z_FINISH, we keep + * returning Z_STREAM_END instead of Z_BUF_ERROR. + */ + } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && + flush !== Z_FINISH) { + return err(strm, Z_BUF_ERROR); + } + + /* User must not provide more input after the first FINISH: */ + if (s.status === FINISH_STATE && strm.avail_in !== 0) { + return err(strm, Z_BUF_ERROR); + } + + /* Start a new block or continue the current one. + */ + if (strm.avail_in !== 0 || s.lookahead !== 0 || + (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) { + var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) : + (s.strategy === Z_RLE ? deflate_rle(s, flush) : + configuration_table[s.level].func(s, flush)); + + if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) { + s.status = FINISH_STATE; + } + if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) { + if (strm.avail_out === 0) { + s.last_flush = -1; + /* avoid BUF_ERROR next call, see above */ + } + return Z_OK; + /* If flush != Z_NO_FLUSH && avail_out == 0, the next call + * of deflate should use the same flush parameter to make sure + * that the flush is complete. So we don't have to output an + * empty block here, this will be done at next call. This also + * ensures that for a very small output buffer, we emit at most + * one empty block. + */ + } + if (bstate === BS_BLOCK_DONE) { + if (flush === Z_PARTIAL_FLUSH) { + trees._tr_align(s); + } + else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */ + + trees._tr_stored_block(s, 0, 0, false); + /* For a full flush, this empty block will be recognized + * as a special marker by inflate_sync(). + */ + if (flush === Z_FULL_FLUSH) { + /*** CLEAR_HASH(s); ***/ /* forget history */ + zero(s.head); // Fill with NIL (= 0); + + if (s.lookahead === 0) { + s.strstart = 0; + s.block_start = 0; + s.insert = 0; + } + } + } + flush_pending(strm); + if (strm.avail_out === 0) { + s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */ + return Z_OK; + } + } + } + //Assert(strm->avail_out > 0, "bug2"); + //if (strm.avail_out <= 0) { throw new Error("bug2");} + + if (flush !== Z_FINISH) { return Z_OK; } + if (s.wrap <= 0) { return Z_STREAM_END; } + + /* Write the trailer */ + if (s.wrap === 2) { + put_byte(s, strm.adler & 0xff); + put_byte(s, (strm.adler >> 8) & 0xff); + put_byte(s, (strm.adler >> 16) & 0xff); + put_byte(s, (strm.adler >> 24) & 0xff); + put_byte(s, strm.total_in & 0xff); + put_byte(s, (strm.total_in >> 8) & 0xff); + put_byte(s, (strm.total_in >> 16) & 0xff); + put_byte(s, (strm.total_in >> 24) & 0xff); + } + else + { + putShortMSB(s, strm.adler >>> 16); + putShortMSB(s, strm.adler & 0xffff); + } + + flush_pending(strm); + /* If avail_out is zero, the application will call deflate again + * to flush the rest. + */ + if (s.wrap > 0) { s.wrap = -s.wrap; } + /* write the trailer only once! */ + return s.pending !== 0 ? Z_OK : Z_STREAM_END; +} + +function deflateEnd(strm) { + var status; + + if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { + return Z_STREAM_ERROR; + } + + status = strm.state.status; + if (status !== INIT_STATE && + status !== EXTRA_STATE && + status !== NAME_STATE && + status !== COMMENT_STATE && + status !== HCRC_STATE && + status !== BUSY_STATE && + status !== FINISH_STATE + ) { + return err(strm, Z_STREAM_ERROR); + } + + strm.state = null; + + return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK; +} + + +/* ========================================================================= + * Initializes the compression dictionary from the given byte + * sequence without producing any compressed output. + */ +function deflateSetDictionary(strm, dictionary) { + var dictLength = dictionary.length; + + var s; + var str, n; + var wrap; + var avail; + var next; + var input; + var tmpDict; + + if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { + return Z_STREAM_ERROR; + } + + s = strm.state; + wrap = s.wrap; + + if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) { + return Z_STREAM_ERROR; + } + + /* when using zlib wrappers, compute Adler-32 for provided dictionary */ + if (wrap === 1) { + /* adler32(strm->adler, dictionary, dictLength); */ + strm.adler = adler32(strm.adler, dictionary, dictLength, 0); + } + + s.wrap = 0; /* avoid computing Adler-32 in read_buf */ + + /* if dictionary would fill window, just replace the history */ + if (dictLength >= s.w_size) { + if (wrap === 0) { /* already empty otherwise */ + /*** CLEAR_HASH(s); ***/ + zero(s.head); // Fill with NIL (= 0); + s.strstart = 0; + s.block_start = 0; + s.insert = 0; + } + /* use the tail */ + // dictionary = dictionary.slice(dictLength - s.w_size); + tmpDict = new utils.Buf8(s.w_size); + utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0); + dictionary = tmpDict; + dictLength = s.w_size; + } + /* insert dictionary into window and hash */ + avail = strm.avail_in; + next = strm.next_in; + input = strm.input; + strm.avail_in = dictLength; + strm.next_in = 0; + strm.input = dictionary; + fill_window(s); + while (s.lookahead >= MIN_MATCH) { + str = s.strstart; + n = s.lookahead - (MIN_MATCH - 1); + do { + /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; + + s.prev[str & s.w_mask] = s.head[s.ins_h]; + + s.head[s.ins_h] = str; + str++; + } while (--n); + s.strstart = str; + s.lookahead = MIN_MATCH - 1; + fill_window(s); + } + s.strstart += s.lookahead; + s.block_start = s.strstart; + s.insert = s.lookahead; + s.lookahead = 0; + s.match_length = s.prev_length = MIN_MATCH - 1; + s.match_available = 0; + strm.next_in = next; + strm.input = input; + strm.avail_in = avail; + s.wrap = wrap; + return Z_OK; +} + + +exports.deflateInit = deflateInit; +exports.deflateInit2 = deflateInit2; +exports.deflateReset = deflateReset; +exports.deflateResetKeep = deflateResetKeep; +exports.deflateSetHeader = deflateSetHeader; +exports.deflate = deflate; +exports.deflateEnd = deflateEnd; +exports.deflateSetDictionary = deflateSetDictionary; +exports.deflateInfo = 'pako deflate (from Nodeca project)'; + +/* Not implemented +exports.deflateBound = deflateBound; +exports.deflateCopy = deflateCopy; +exports.deflateParams = deflateParams; +exports.deflatePending = deflatePending; +exports.deflatePrime = deflatePrime; +exports.deflateTune = deflateTune; +*/ + +},{"../utils/common":3,"./adler32":5,"./crc32":7,"./messages":13,"./trees":14}],9:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +function GZheader() { + /* true if compressed data believed to be text */ + this.text = 0; + /* modification time */ + this.time = 0; + /* extra flags (not used when writing a gzip file) */ + this.xflags = 0; + /* operating system */ + this.os = 0; + /* pointer to extra field or Z_NULL if none */ + this.extra = null; + /* extra field length (valid if extra != Z_NULL) */ + this.extra_len = 0; // Actually, we don't need it in JS, + // but leave for few code modifications + + // + // Setup limits is not necessary because in js we should not preallocate memory + // for inflate use constant limit in 65536 bytes + // + + /* space at extra (only when reading header) */ + // this.extra_max = 0; + /* pointer to zero-terminated file name or Z_NULL */ + this.name = ''; + /* space at name (only when reading header) */ + // this.name_max = 0; + /* pointer to zero-terminated comment or Z_NULL */ + this.comment = ''; + /* space at comment (only when reading header) */ + // this.comm_max = 0; + /* true if there was or will be a header crc */ + this.hcrc = 0; + /* true when done reading gzip header (not used when writing a gzip file) */ + this.done = false; +} + +module.exports = GZheader; + +},{}],10:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +// See state defs from inflate.js +var BAD = 30; /* got a data error -- remain here until reset */ +var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ + +/* + Decode literal, length, and distance codes and write out the resulting + literal and match bytes until either not enough input or output is + available, an end-of-block is encountered, or a data error is encountered. + When large enough input and output buffers are supplied to inflate(), for + example, a 16K input buffer and a 64K output buffer, more than 95% of the + inflate execution time is spent in this routine. + + Entry assumptions: + + state.mode === LEN + strm.avail_in >= 6 + strm.avail_out >= 258 + start >= strm.avail_out + state.bits < 8 + + On return, state.mode is one of: + + LEN -- ran out of enough output space or enough available input + TYPE -- reached end of block code, inflate() to interpret next block + BAD -- error in block data + + Notes: + + - The maximum input bits used by a length/distance pair is 15 bits for the + length code, 5 bits for the length extra, 15 bits for the distance code, + and 13 bits for the distance extra. This totals 48 bits, or six bytes. + Therefore if strm.avail_in >= 6, then there is enough input to avoid + checking for available input while decoding. + + - The maximum bytes that a single length/distance pair can output is 258 + bytes, which is the maximum length that can be coded. inflate_fast() + requires strm.avail_out >= 258 for each loop to avoid checking for + output space. + */ +module.exports = function inflate_fast(strm, start) { + var state; + var _in; /* local strm.input */ + var last; /* have enough input while in < last */ + var _out; /* local strm.output */ + var beg; /* inflate()'s initial strm.output */ + var end; /* while out < end, enough space available */ +//#ifdef INFLATE_STRICT + var dmax; /* maximum distance from zlib header */ +//#endif + var wsize; /* window size or zero if not using window */ + var whave; /* valid bytes in the window */ + var wnext; /* window write index */ + // Use `s_window` instead `window`, avoid conflict with instrumentation tools + var s_window; /* allocated sliding window, if wsize != 0 */ + var hold; /* local strm.hold */ + var bits; /* local strm.bits */ + var lcode; /* local strm.lencode */ + var dcode; /* local strm.distcode */ + var lmask; /* mask for first level of length codes */ + var dmask; /* mask for first level of distance codes */ + var here; /* retrieved table entry */ + var op; /* code bits, operation, extra bits, or */ + /* window position, window bytes to copy */ + var len; /* match length, unused bytes */ + var dist; /* match distance */ + var from; /* where to copy match from */ + var from_source; + + + var input, output; // JS specific, because we have no pointers + + /* copy state to local variables */ + state = strm.state; + //here = state.here; + _in = strm.next_in; + input = strm.input; + last = _in + (strm.avail_in - 5); + _out = strm.next_out; + output = strm.output; + beg = _out - (start - strm.avail_out); + end = _out + (strm.avail_out - 257); +//#ifdef INFLATE_STRICT + dmax = state.dmax; +//#endif + wsize = state.wsize; + whave = state.whave; + wnext = state.wnext; + s_window = state.window; + hold = state.hold; + bits = state.bits; + lcode = state.lencode; + dcode = state.distcode; + lmask = (1 << state.lenbits) - 1; + dmask = (1 << state.distbits) - 1; + + + /* decode literals and length/distances until end-of-block or not enough + input data or output space */ + + top: + do { + if (bits < 15) { + hold += input[_in++] << bits; + bits += 8; + hold += input[_in++] << bits; + bits += 8; + } + + here = lcode[hold & lmask]; + + dolen: + for (;;) { // Goto emulation + op = here >>> 24/*here.bits*/; + hold >>>= op; + bits -= op; + op = (here >>> 16) & 0xff/*here.op*/; + if (op === 0) { /* literal */ + //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? + // "inflate: literal '%c'\n" : + // "inflate: literal 0x%02x\n", here.val)); + output[_out++] = here & 0xffff/*here.val*/; + } + else if (op & 16) { /* length base */ + len = here & 0xffff/*here.val*/; + op &= 15; /* number of extra bits */ + if (op) { + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + } + len += hold & ((1 << op) - 1); + hold >>>= op; + bits -= op; + } + //Tracevv((stderr, "inflate: length %u\n", len)); + if (bits < 15) { + hold += input[_in++] << bits; + bits += 8; + hold += input[_in++] << bits; + bits += 8; + } + here = dcode[hold & dmask]; + + dodist: + for (;;) { // goto emulation + op = here >>> 24/*here.bits*/; + hold >>>= op; + bits -= op; + op = (here >>> 16) & 0xff/*here.op*/; + + if (op & 16) { /* distance base */ + dist = here & 0xffff/*here.val*/; + op &= 15; /* number of extra bits */ + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + } + } + dist += hold & ((1 << op) - 1); +//#ifdef INFLATE_STRICT + if (dist > dmax) { + strm.msg = 'invalid distance too far back'; + state.mode = BAD; + break top; + } +//#endif + hold >>>= op; + bits -= op; + //Tracevv((stderr, "inflate: distance %u\n", dist)); + op = _out - beg; /* max distance in output */ + if (dist > op) { /* see if copy from window */ + op = dist - op; /* distance back in window */ + if (op > whave) { + if (state.sane) { + strm.msg = 'invalid distance too far back'; + state.mode = BAD; + break top; + } + +// (!) This block is disabled in zlib defaults, +// don't enable it for binary compatibility +//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR +// if (len <= op - whave) { +// do { +// output[_out++] = 0; +// } while (--len); +// continue top; +// } +// len -= op - whave; +// do { +// output[_out++] = 0; +// } while (--op > whave); +// if (op === 0) { +// from = _out - dist; +// do { +// output[_out++] = output[from++]; +// } while (--len); +// continue top; +// } +//#endif + } + from = 0; // window index + from_source = s_window; + if (wnext === 0) { /* very common case */ + from += wsize - op; + if (op < len) { /* some from window */ + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; /* rest from output */ + from_source = output; + } + } + else if (wnext < op) { /* wrap around window */ + from += wsize + wnext - op; + op -= wnext; + if (op < len) { /* some from end of window */ + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = 0; + if (wnext < len) { /* some from start of window */ + op = wnext; + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; /* rest from output */ + from_source = output; + } + } + } + else { /* contiguous in window */ + from += wnext - op; + if (op < len) { /* some from window */ + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; /* rest from output */ + from_source = output; + } + } + while (len > 2) { + output[_out++] = from_source[from++]; + output[_out++] = from_source[from++]; + output[_out++] = from_source[from++]; + len -= 3; + } + if (len) { + output[_out++] = from_source[from++]; + if (len > 1) { + output[_out++] = from_source[from++]; + } + } + } + else { + from = _out - dist; /* copy direct from output */ + do { /* minimum length is three */ + output[_out++] = output[from++]; + output[_out++] = output[from++]; + output[_out++] = output[from++]; + len -= 3; + } while (len > 2); + if (len) { + output[_out++] = output[from++]; + if (len > 1) { + output[_out++] = output[from++]; + } + } + } + } + else if ((op & 64) === 0) { /* 2nd level distance code */ + here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; + continue dodist; + } + else { + strm.msg = 'invalid distance code'; + state.mode = BAD; + break top; + } + + break; // need to emulate goto via "continue" + } + } + else if ((op & 64) === 0) { /* 2nd level length code */ + here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; + continue dolen; + } + else if (op & 32) { /* end-of-block */ + //Tracevv((stderr, "inflate: end of block\n")); + state.mode = TYPE; + break top; + } + else { + strm.msg = 'invalid literal/length code'; + state.mode = BAD; + break top; + } + + break; // need to emulate goto via "continue" + } + } while (_in < last && _out < end); + + /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ + len = bits >> 3; + _in -= len; + bits -= len << 3; + hold &= (1 << bits) - 1; + + /* update state and return */ + strm.next_in = _in; + strm.next_out = _out; + strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last)); + strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end)); + state.hold = hold; + state.bits = bits; + return; +}; + +},{}],11:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +var utils = require('../utils/common'); +var adler32 = require('./adler32'); +var crc32 = require('./crc32'); +var inflate_fast = require('./inffast'); +var inflate_table = require('./inftrees'); + +var CODES = 0; +var LENS = 1; +var DISTS = 2; + +/* Public constants ==========================================================*/ +/* ===========================================================================*/ + + +/* Allowed flush values; see deflate() and inflate() below for details */ +//var Z_NO_FLUSH = 0; +//var Z_PARTIAL_FLUSH = 1; +//var Z_SYNC_FLUSH = 2; +//var Z_FULL_FLUSH = 3; +var Z_FINISH = 4; +var Z_BLOCK = 5; +var Z_TREES = 6; + + +/* Return codes for the compression/decompression functions. Negative values + * are errors, positive values are used for special but normal events. + */ +var Z_OK = 0; +var Z_STREAM_END = 1; +var Z_NEED_DICT = 2; +//var Z_ERRNO = -1; +var Z_STREAM_ERROR = -2; +var Z_DATA_ERROR = -3; +var Z_MEM_ERROR = -4; +var Z_BUF_ERROR = -5; +//var Z_VERSION_ERROR = -6; + +/* The deflate compression method */ +var Z_DEFLATED = 8; + + +/* STATES ====================================================================*/ +/* ===========================================================================*/ + + +var HEAD = 1; /* i: waiting for magic header */ +var FLAGS = 2; /* i: waiting for method and flags (gzip) */ +var TIME = 3; /* i: waiting for modification time (gzip) */ +var OS = 4; /* i: waiting for extra flags and operating system (gzip) */ +var EXLEN = 5; /* i: waiting for extra length (gzip) */ +var EXTRA = 6; /* i: waiting for extra bytes (gzip) */ +var NAME = 7; /* i: waiting for end of file name (gzip) */ +var COMMENT = 8; /* i: waiting for end of comment (gzip) */ +var HCRC = 9; /* i: waiting for header crc (gzip) */ +var DICTID = 10; /* i: waiting for dictionary check value */ +var DICT = 11; /* waiting for inflateSetDictionary() call */ +var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ +var TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */ +var STORED = 14; /* i: waiting for stored size (length and complement) */ +var COPY_ = 15; /* i/o: same as COPY below, but only first time in */ +var COPY = 16; /* i/o: waiting for input or output to copy stored block */ +var TABLE = 17; /* i: waiting for dynamic block table lengths */ +var LENLENS = 18; /* i: waiting for code length code lengths */ +var CODELENS = 19; /* i: waiting for length/lit and distance code lengths */ +var LEN_ = 20; /* i: same as LEN below, but only first time in */ +var LEN = 21; /* i: waiting for length/lit/eob code */ +var LENEXT = 22; /* i: waiting for length extra bits */ +var DIST = 23; /* i: waiting for distance code */ +var DISTEXT = 24; /* i: waiting for distance extra bits */ +var MATCH = 25; /* o: waiting for output space to copy string */ +var LIT = 26; /* o: waiting for output space to write literal */ +var CHECK = 27; /* i: waiting for 32-bit check value */ +var LENGTH = 28; /* i: waiting for 32-bit length (gzip) */ +var DONE = 29; /* finished check, done -- remain here until reset */ +var BAD = 30; /* got a data error -- remain here until reset */ +var MEM = 31; /* got an inflate() memory error -- remain here until reset */ +var SYNC = 32; /* looking for synchronization bytes to restart inflate() */ + +/* ===========================================================================*/ + + + +var ENOUGH_LENS = 852; +var ENOUGH_DISTS = 592; +//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); + +var MAX_WBITS = 15; +/* 32K LZ77 window */ +var DEF_WBITS = MAX_WBITS; + + +function zswap32(q) { + return (((q >>> 24) & 0xff) + + ((q >>> 8) & 0xff00) + + ((q & 0xff00) << 8) + + ((q & 0xff) << 24)); +} + + +function InflateState() { + this.mode = 0; /* current inflate mode */ + this.last = false; /* true if processing last block */ + this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ + this.havedict = false; /* true if dictionary provided */ + this.flags = 0; /* gzip header method and flags (0 if zlib) */ + this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */ + this.check = 0; /* protected copy of check value */ + this.total = 0; /* protected copy of output count */ + // TODO: may be {} + this.head = null; /* where to save gzip header information */ + + /* sliding window */ + this.wbits = 0; /* log base 2 of requested window size */ + this.wsize = 0; /* window size or zero if not using window */ + this.whave = 0; /* valid bytes in the window */ + this.wnext = 0; /* window write index */ + this.window = null; /* allocated sliding window, if needed */ + + /* bit accumulator */ + this.hold = 0; /* input bit accumulator */ + this.bits = 0; /* number of bits in "in" */ + + /* for string and stored block copying */ + this.length = 0; /* literal or length of data to copy */ + this.offset = 0; /* distance back to copy string from */ + + /* for table and code decoding */ + this.extra = 0; /* extra bits needed */ + + /* fixed and dynamic code tables */ + this.lencode = null; /* starting table for length/literal codes */ + this.distcode = null; /* starting table for distance codes */ + this.lenbits = 0; /* index bits for lencode */ + this.distbits = 0; /* index bits for distcode */ + + /* dynamic table building */ + this.ncode = 0; /* number of code length code lengths */ + this.nlen = 0; /* number of length code lengths */ + this.ndist = 0; /* number of distance code lengths */ + this.have = 0; /* number of code lengths in lens[] */ + this.next = null; /* next available space in codes[] */ + + this.lens = new utils.Buf16(320); /* temporary storage for code lengths */ + this.work = new utils.Buf16(288); /* work area for code table building */ + + /* + because we don't have pointers in js, we use lencode and distcode directly + as buffers so we don't need codes + */ + //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */ + this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */ + this.distdyn = null; /* dynamic table for distance codes (JS specific) */ + this.sane = 0; /* if false, allow invalid distance too far */ + this.back = 0; /* bits back of last unprocessed length/lit */ + this.was = 0; /* initial length of match */ +} + +function inflateResetKeep(strm) { + var state; + + if (!strm || !strm.state) { return Z_STREAM_ERROR; } + state = strm.state; + strm.total_in = strm.total_out = state.total = 0; + strm.msg = ''; /*Z_NULL*/ + if (state.wrap) { /* to support ill-conceived Java test suite */ + strm.adler = state.wrap & 1; + } + state.mode = HEAD; + state.last = 0; + state.havedict = 0; + state.dmax = 32768; + state.head = null/*Z_NULL*/; + state.hold = 0; + state.bits = 0; + //state.lencode = state.distcode = state.next = state.codes; + state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS); + state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS); + + state.sane = 1; + state.back = -1; + //Tracev((stderr, "inflate: reset\n")); + return Z_OK; +} + +function inflateReset(strm) { + var state; + + if (!strm || !strm.state) { return Z_STREAM_ERROR; } + state = strm.state; + state.wsize = 0; + state.whave = 0; + state.wnext = 0; + return inflateResetKeep(strm); + +} + +function inflateReset2(strm, windowBits) { + var wrap; + var state; + + /* get the state */ + if (!strm || !strm.state) { return Z_STREAM_ERROR; } + state = strm.state; + + /* extract wrap request from windowBits parameter */ + if (windowBits < 0) { + wrap = 0; + windowBits = -windowBits; + } + else { + wrap = (windowBits >> 4) + 1; + if (windowBits < 48) { + windowBits &= 15; + } + } + + /* set number of window bits, free window if different */ + if (windowBits && (windowBits < 8 || windowBits > 15)) { + return Z_STREAM_ERROR; + } + if (state.window !== null && state.wbits !== windowBits) { + state.window = null; + } + + /* update state and reset the rest of it */ + state.wrap = wrap; + state.wbits = windowBits; + return inflateReset(strm); +} + +function inflateInit2(strm, windowBits) { + var ret; + var state; + + if (!strm) { return Z_STREAM_ERROR; } + //strm.msg = Z_NULL; /* in case we return an error */ + + state = new InflateState(); + + //if (state === Z_NULL) return Z_MEM_ERROR; + //Tracev((stderr, "inflate: allocated\n")); + strm.state = state; + state.window = null/*Z_NULL*/; + ret = inflateReset2(strm, windowBits); + if (ret !== Z_OK) { + strm.state = null/*Z_NULL*/; + } + return ret; +} + +function inflateInit(strm) { + return inflateInit2(strm, DEF_WBITS); +} + + +/* + Return state with length and distance decoding tables and index sizes set to + fixed code decoding. Normally this returns fixed tables from inffixed.h. + If BUILDFIXED is defined, then instead this routine builds the tables the + first time it's called, and returns those tables the first time and + thereafter. This reduces the size of the code by about 2K bytes, in + exchange for a little execution time. However, BUILDFIXED should not be + used for threaded applications, since the rewriting of the tables and virgin + may not be thread-safe. + */ +var virgin = true; + +var lenfix, distfix; // We have no pointers in JS, so keep tables separate + +function fixedtables(state) { + /* build fixed huffman tables if first call (may not be thread safe) */ + if (virgin) { + var sym; + + lenfix = new utils.Buf32(512); + distfix = new utils.Buf32(32); + + /* literal/length table */ + sym = 0; + while (sym < 144) { state.lens[sym++] = 8; } + while (sym < 256) { state.lens[sym++] = 9; } + while (sym < 280) { state.lens[sym++] = 7; } + while (sym < 288) { state.lens[sym++] = 8; } + + inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 }); + + /* distance table */ + sym = 0; + while (sym < 32) { state.lens[sym++] = 5; } + + inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 }); + + /* do this just once */ + virgin = false; + } + + state.lencode = lenfix; + state.lenbits = 9; + state.distcode = distfix; + state.distbits = 5; +} + + +/* + Update the window with the last wsize (normally 32K) bytes written before + returning. If window does not exist yet, create it. This is only called + when a window is already in use, or when output has been written during this + inflate call, but the end of the deflate stream has not been reached yet. + It is also called to create a window for dictionary data when a dictionary + is loaded. + + Providing output buffers larger than 32K to inflate() should provide a speed + advantage, since only the last 32K of output is copied to the sliding window + upon return from inflate(), and since all distances after the first 32K of + output will fall in the output data, making match copies simpler and faster. + The advantage may be dependent on the size of the processor's data caches. + */ +function updatewindow(strm, src, end, copy) { + var dist; + var state = strm.state; + + /* if it hasn't been done already, allocate space for the window */ + if (state.window === null) { + state.wsize = 1 << state.wbits; + state.wnext = 0; + state.whave = 0; + + state.window = new utils.Buf8(state.wsize); + } + + /* copy state->wsize or less output bytes into the circular window */ + if (copy >= state.wsize) { + utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0); + state.wnext = 0; + state.whave = state.wsize; + } + else { + dist = state.wsize - state.wnext; + if (dist > copy) { + dist = copy; + } + //zmemcpy(state->window + state->wnext, end - copy, dist); + utils.arraySet(state.window, src, end - copy, dist, state.wnext); + copy -= dist; + if (copy) { + //zmemcpy(state->window, end - copy, copy); + utils.arraySet(state.window, src, end - copy, copy, 0); + state.wnext = copy; + state.whave = state.wsize; + } + else { + state.wnext += dist; + if (state.wnext === state.wsize) { state.wnext = 0; } + if (state.whave < state.wsize) { state.whave += dist; } + } + } + return 0; +} + +function inflate(strm, flush) { + var state; + var input, output; // input/output buffers + var next; /* next input INDEX */ + var put; /* next output INDEX */ + var have, left; /* available input and output */ + var hold; /* bit buffer */ + var bits; /* bits in bit buffer */ + var _in, _out; /* save starting available input and output */ + var copy; /* number of stored or match bytes to copy */ + var from; /* where to copy match bytes from */ + var from_source; + var here = 0; /* current decoding table entry */ + var here_bits, here_op, here_val; // paked "here" denormalized (JS specific) + //var last; /* parent table entry */ + var last_bits, last_op, last_val; // paked "last" denormalized (JS specific) + var len; /* length to copy for repeats, bits to drop */ + var ret; /* return code */ + var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */ + var opts; + + var n; // temporary var for NEED_BITS + + var order = /* permutation of code lengths */ + [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]; + + + if (!strm || !strm.state || !strm.output || + (!strm.input && strm.avail_in !== 0)) { + return Z_STREAM_ERROR; + } + + state = strm.state; + if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */ + + + //--- LOAD() --- + put = strm.next_out; + output = strm.output; + left = strm.avail_out; + next = strm.next_in; + input = strm.input; + have = strm.avail_in; + hold = state.hold; + bits = state.bits; + //--- + + _in = have; + _out = left; + ret = Z_OK; + + inf_leave: // goto emulation + for (;;) { + switch (state.mode) { + case HEAD: + if (state.wrap === 0) { + state.mode = TYPEDO; + break; + } + //=== NEEDBITS(16); + while (bits < 16) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */ + state.check = 0/*crc32(0L, Z_NULL, 0)*/; + //=== CRC2(state.check, hold); + hbuf[0] = hold & 0xff; + hbuf[1] = (hold >>> 8) & 0xff; + state.check = crc32(state.check, hbuf, 2, 0); + //===// + + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = FLAGS; + break; + } + state.flags = 0; /* expect zlib header */ + if (state.head) { + state.head.done = false; + } + if (!(state.wrap & 1) || /* check if zlib header allowed */ + (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) { + strm.msg = 'incorrect header check'; + state.mode = BAD; + break; + } + if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) { + strm.msg = 'unknown compression method'; + state.mode = BAD; + break; + } + //--- DROPBITS(4) ---// + hold >>>= 4; + bits -= 4; + //---// + len = (hold & 0x0f)/*BITS(4)*/ + 8; + if (state.wbits === 0) { + state.wbits = len; + } + else if (len > state.wbits) { + strm.msg = 'invalid window size'; + state.mode = BAD; + break; + } + state.dmax = 1 << len; + //Tracev((stderr, "inflate: zlib header ok\n")); + strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; + state.mode = hold & 0x200 ? DICTID : TYPE; + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + break; + case FLAGS: + //=== NEEDBITS(16); */ + while (bits < 16) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.flags = hold; + if ((state.flags & 0xff) !== Z_DEFLATED) { + strm.msg = 'unknown compression method'; + state.mode = BAD; + break; + } + if (state.flags & 0xe000) { + strm.msg = 'unknown header flags set'; + state.mode = BAD; + break; + } + if (state.head) { + state.head.text = ((hold >> 8) & 1); + } + if (state.flags & 0x0200) { + //=== CRC2(state.check, hold); + hbuf[0] = hold & 0xff; + hbuf[1] = (hold >>> 8) & 0xff; + state.check = crc32(state.check, hbuf, 2, 0); + //===// + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = TIME; + /* falls through */ + case TIME: + //=== NEEDBITS(32); */ + while (bits < 32) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if (state.head) { + state.head.time = hold; + } + if (state.flags & 0x0200) { + //=== CRC4(state.check, hold) + hbuf[0] = hold & 0xff; + hbuf[1] = (hold >>> 8) & 0xff; + hbuf[2] = (hold >>> 16) & 0xff; + hbuf[3] = (hold >>> 24) & 0xff; + state.check = crc32(state.check, hbuf, 4, 0); + //=== + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = OS; + /* falls through */ + case OS: + //=== NEEDBITS(16); */ + while (bits < 16) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if (state.head) { + state.head.xflags = (hold & 0xff); + state.head.os = (hold >> 8); + } + if (state.flags & 0x0200) { + //=== CRC2(state.check, hold); + hbuf[0] = hold & 0xff; + hbuf[1] = (hold >>> 8) & 0xff; + state.check = crc32(state.check, hbuf, 2, 0); + //===// + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = EXLEN; + /* falls through */ + case EXLEN: + if (state.flags & 0x0400) { + //=== NEEDBITS(16); */ + while (bits < 16) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.length = hold; + if (state.head) { + state.head.extra_len = hold; + } + if (state.flags & 0x0200) { + //=== CRC2(state.check, hold); + hbuf[0] = hold & 0xff; + hbuf[1] = (hold >>> 8) & 0xff; + state.check = crc32(state.check, hbuf, 2, 0); + //===// + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + } + else if (state.head) { + state.head.extra = null/*Z_NULL*/; + } + state.mode = EXTRA; + /* falls through */ + case EXTRA: + if (state.flags & 0x0400) { + copy = state.length; + if (copy > have) { copy = have; } + if (copy) { + if (state.head) { + len = state.head.extra_len - state.length; + if (!state.head.extra) { + // Use untyped array for more convenient processing later + state.head.extra = new Array(state.head.extra_len); + } + utils.arraySet( + state.head.extra, + input, + next, + // extra field is limited to 65536 bytes + // - no need for additional size check + copy, + /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/ + len + ); + //zmemcpy(state.head.extra + len, next, + // len + copy > state.head.extra_max ? + // state.head.extra_max - len : copy); + } + if (state.flags & 0x0200) { + state.check = crc32(state.check, input, copy, next); + } + have -= copy; + next += copy; + state.length -= copy; + } + if (state.length) { break inf_leave; } + } + state.length = 0; + state.mode = NAME; + /* falls through */ + case NAME: + if (state.flags & 0x0800) { + if (have === 0) { break inf_leave; } + copy = 0; + do { + // TODO: 2 or 1 bytes? + len = input[next + copy++]; + /* use constant limit because in js we should not preallocate memory */ + if (state.head && len && + (state.length < 65536 /*state.head.name_max*/)) { + state.head.name += String.fromCharCode(len); + } + } while (len && copy < have); + + if (state.flags & 0x0200) { + state.check = crc32(state.check, input, copy, next); + } + have -= copy; + next += copy; + if (len) { break inf_leave; } + } + else if (state.head) { + state.head.name = null; + } + state.length = 0; + state.mode = COMMENT; + /* falls through */ + case COMMENT: + if (state.flags & 0x1000) { + if (have === 0) { break inf_leave; } + copy = 0; + do { + len = input[next + copy++]; + /* use constant limit because in js we should not preallocate memory */ + if (state.head && len && + (state.length < 65536 /*state.head.comm_max*/)) { + state.head.comment += String.fromCharCode(len); + } + } while (len && copy < have); + if (state.flags & 0x0200) { + state.check = crc32(state.check, input, copy, next); + } + have -= copy; + next += copy; + if (len) { break inf_leave; } + } + else if (state.head) { + state.head.comment = null; + } + state.mode = HCRC; + /* falls through */ + case HCRC: + if (state.flags & 0x0200) { + //=== NEEDBITS(16); */ + while (bits < 16) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if (hold !== (state.check & 0xffff)) { + strm.msg = 'header crc mismatch'; + state.mode = BAD; + break; + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + } + if (state.head) { + state.head.hcrc = ((state.flags >> 9) & 1); + state.head.done = true; + } + strm.adler = state.check = 0; + state.mode = TYPE; + break; + case DICTID: + //=== NEEDBITS(32); */ + while (bits < 32) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + strm.adler = state.check = zswap32(hold); + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = DICT; + /* falls through */ + case DICT: + if (state.havedict === 0) { + //--- RESTORE() --- + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + //--- + return Z_NEED_DICT; + } + strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; + state.mode = TYPE; + /* falls through */ + case TYPE: + if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; } + /* falls through */ + case TYPEDO: + if (state.last) { + //--- BYTEBITS() ---// + hold >>>= bits & 7; + bits -= bits & 7; + //---// + state.mode = CHECK; + break; + } + //=== NEEDBITS(3); */ + while (bits < 3) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.last = (hold & 0x01)/*BITS(1)*/; + //--- DROPBITS(1) ---// + hold >>>= 1; + bits -= 1; + //---// + + switch ((hold & 0x03)/*BITS(2)*/) { + case 0: /* stored block */ + //Tracev((stderr, "inflate: stored block%s\n", + // state.last ? " (last)" : "")); + state.mode = STORED; + break; + case 1: /* fixed block */ + fixedtables(state); + //Tracev((stderr, "inflate: fixed codes block%s\n", + // state.last ? " (last)" : "")); + state.mode = LEN_; /* decode codes */ + if (flush === Z_TREES) { + //--- DROPBITS(2) ---// + hold >>>= 2; + bits -= 2; + //---// + break inf_leave; + } + break; + case 2: /* dynamic block */ + //Tracev((stderr, "inflate: dynamic codes block%s\n", + // state.last ? " (last)" : "")); + state.mode = TABLE; + break; + case 3: + strm.msg = 'invalid block type'; + state.mode = BAD; + } + //--- DROPBITS(2) ---// + hold >>>= 2; + bits -= 2; + //---// + break; + case STORED: + //--- BYTEBITS() ---// /* go to byte boundary */ + hold >>>= bits & 7; + bits -= bits & 7; + //---// + //=== NEEDBITS(32); */ + while (bits < 32) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) { + strm.msg = 'invalid stored block lengths'; + state.mode = BAD; + break; + } + state.length = hold & 0xffff; + //Tracev((stderr, "inflate: stored length %u\n", + // state.length)); + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = COPY_; + if (flush === Z_TREES) { break inf_leave; } + /* falls through */ + case COPY_: + state.mode = COPY; + /* falls through */ + case COPY: + copy = state.length; + if (copy) { + if (copy > have) { copy = have; } + if (copy > left) { copy = left; } + if (copy === 0) { break inf_leave; } + //--- zmemcpy(put, next, copy); --- + utils.arraySet(output, input, next, copy, put); + //---// + have -= copy; + next += copy; + left -= copy; + put += copy; + state.length -= copy; + break; + } + //Tracev((stderr, "inflate: stored end\n")); + state.mode = TYPE; + break; + case TABLE: + //=== NEEDBITS(14); */ + while (bits < 14) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257; + //--- DROPBITS(5) ---// + hold >>>= 5; + bits -= 5; + //---// + state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1; + //--- DROPBITS(5) ---// + hold >>>= 5; + bits -= 5; + //---// + state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4; + //--- DROPBITS(4) ---// + hold >>>= 4; + bits -= 4; + //---// +//#ifndef PKZIP_BUG_WORKAROUND + if (state.nlen > 286 || state.ndist > 30) { + strm.msg = 'too many length or distance symbols'; + state.mode = BAD; + break; + } +//#endif + //Tracev((stderr, "inflate: table sizes ok\n")); + state.have = 0; + state.mode = LENLENS; + /* falls through */ + case LENLENS: + while (state.have < state.ncode) { + //=== NEEDBITS(3); + while (bits < 3) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.lens[order[state.have++]] = (hold & 0x07);//BITS(3); + //--- DROPBITS(3) ---// + hold >>>= 3; + bits -= 3; + //---// + } + while (state.have < 19) { + state.lens[order[state.have++]] = 0; + } + // We have separate tables & no pointers. 2 commented lines below not needed. + //state.next = state.codes; + //state.lencode = state.next; + // Switch to use dynamic table + state.lencode = state.lendyn; + state.lenbits = 7; + + opts = { bits: state.lenbits }; + ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts); + state.lenbits = opts.bits; + + if (ret) { + strm.msg = 'invalid code lengths set'; + state.mode = BAD; + break; + } + //Tracev((stderr, "inflate: code lengths ok\n")); + state.have = 0; + state.mode = CODELENS; + /* falls through */ + case CODELENS: + while (state.have < state.nlen + state.ndist) { + for (;;) { + here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/ + here_bits = here >>> 24; + here_op = (here >>> 16) & 0xff; + here_val = here & 0xffff; + + if ((here_bits) <= bits) { break; } + //--- PULLBYTE() ---// + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + if (here_val < 16) { + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + state.lens[state.have++] = here_val; + } + else { + if (here_val === 16) { + //=== NEEDBITS(here.bits + 2); + n = here_bits + 2; + while (bits < n) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + if (state.have === 0) { + strm.msg = 'invalid bit length repeat'; + state.mode = BAD; + break; + } + len = state.lens[state.have - 1]; + copy = 3 + (hold & 0x03);//BITS(2); + //--- DROPBITS(2) ---// + hold >>>= 2; + bits -= 2; + //---// + } + else if (here_val === 17) { + //=== NEEDBITS(here.bits + 3); + n = here_bits + 3; + while (bits < n) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + len = 0; + copy = 3 + (hold & 0x07);//BITS(3); + //--- DROPBITS(3) ---// + hold >>>= 3; + bits -= 3; + //---// + } + else { + //=== NEEDBITS(here.bits + 7); + n = here_bits + 7; + while (bits < n) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + len = 0; + copy = 11 + (hold & 0x7f);//BITS(7); + //--- DROPBITS(7) ---// + hold >>>= 7; + bits -= 7; + //---// + } + if (state.have + copy > state.nlen + state.ndist) { + strm.msg = 'invalid bit length repeat'; + state.mode = BAD; + break; + } + while (copy--) { + state.lens[state.have++] = len; + } + } + } + + /* handle error breaks in while */ + if (state.mode === BAD) { break; } + + /* check for end-of-block code (better have one) */ + if (state.lens[256] === 0) { + strm.msg = 'invalid code -- missing end-of-block'; + state.mode = BAD; + break; + } + + /* build code tables -- note: do not change the lenbits or distbits + values here (9 and 6) without reading the comments in inftrees.h + concerning the ENOUGH constants, which depend on those values */ + state.lenbits = 9; + + opts = { bits: state.lenbits }; + ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts); + // We have separate tables & no pointers. 2 commented lines below not needed. + // state.next_index = opts.table_index; + state.lenbits = opts.bits; + // state.lencode = state.next; + + if (ret) { + strm.msg = 'invalid literal/lengths set'; + state.mode = BAD; + break; + } + + state.distbits = 6; + //state.distcode.copy(state.codes); + // Switch to use dynamic table + state.distcode = state.distdyn; + opts = { bits: state.distbits }; + ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts); + // We have separate tables & no pointers. 2 commented lines below not needed. + // state.next_index = opts.table_index; + state.distbits = opts.bits; + // state.distcode = state.next; + + if (ret) { + strm.msg = 'invalid distances set'; + state.mode = BAD; + break; + } + //Tracev((stderr, 'inflate: codes ok\n')); + state.mode = LEN_; + if (flush === Z_TREES) { break inf_leave; } + /* falls through */ + case LEN_: + state.mode = LEN; + /* falls through */ + case LEN: + if (have >= 6 && left >= 258) { + //--- RESTORE() --- + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + //--- + inflate_fast(strm, _out); + //--- LOAD() --- + put = strm.next_out; + output = strm.output; + left = strm.avail_out; + next = strm.next_in; + input = strm.input; + have = strm.avail_in; + hold = state.hold; + bits = state.bits; + //--- + + if (state.mode === TYPE) { + state.back = -1; + } + break; + } + state.back = 0; + for (;;) { + here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/ + here_bits = here >>> 24; + here_op = (here >>> 16) & 0xff; + here_val = here & 0xffff; + + if (here_bits <= bits) { break; } + //--- PULLBYTE() ---// + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + if (here_op && (here_op & 0xf0) === 0) { + last_bits = here_bits; + last_op = here_op; + last_val = here_val; + for (;;) { + here = state.lencode[last_val + + ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; + here_bits = here >>> 24; + here_op = (here >>> 16) & 0xff; + here_val = here & 0xffff; + + if ((last_bits + here_bits) <= bits) { break; } + //--- PULLBYTE() ---// + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + //--- DROPBITS(last.bits) ---// + hold >>>= last_bits; + bits -= last_bits; + //---// + state.back += last_bits; + } + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + state.back += here_bits; + state.length = here_val; + if (here_op === 0) { + //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? + // "inflate: literal '%c'\n" : + // "inflate: literal 0x%02x\n", here.val)); + state.mode = LIT; + break; + } + if (here_op & 32) { + //Tracevv((stderr, "inflate: end of block\n")); + state.back = -1; + state.mode = TYPE; + break; + } + if (here_op & 64) { + strm.msg = 'invalid literal/length code'; + state.mode = BAD; + break; + } + state.extra = here_op & 15; + state.mode = LENEXT; + /* falls through */ + case LENEXT: + if (state.extra) { + //=== NEEDBITS(state.extra); + n = state.extra; + while (bits < n) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; + //--- DROPBITS(state.extra) ---// + hold >>>= state.extra; + bits -= state.extra; + //---// + state.back += state.extra; + } + //Tracevv((stderr, "inflate: length %u\n", state.length)); + state.was = state.length; + state.mode = DIST; + /* falls through */ + case DIST: + for (;;) { + here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/ + here_bits = here >>> 24; + here_op = (here >>> 16) & 0xff; + here_val = here & 0xffff; + + if ((here_bits) <= bits) { break; } + //--- PULLBYTE() ---// + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + if ((here_op & 0xf0) === 0) { + last_bits = here_bits; + last_op = here_op; + last_val = here_val; + for (;;) { + here = state.distcode[last_val + + ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; + here_bits = here >>> 24; + here_op = (here >>> 16) & 0xff; + here_val = here & 0xffff; + + if ((last_bits + here_bits) <= bits) { break; } + //--- PULLBYTE() ---// + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + //--- DROPBITS(last.bits) ---// + hold >>>= last_bits; + bits -= last_bits; + //---// + state.back += last_bits; + } + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + state.back += here_bits; + if (here_op & 64) { + strm.msg = 'invalid distance code'; + state.mode = BAD; + break; + } + state.offset = here_val; + state.extra = (here_op) & 15; + state.mode = DISTEXT; + /* falls through */ + case DISTEXT: + if (state.extra) { + //=== NEEDBITS(state.extra); + n = state.extra; + while (bits < n) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; + //--- DROPBITS(state.extra) ---// + hold >>>= state.extra; + bits -= state.extra; + //---// + state.back += state.extra; + } +//#ifdef INFLATE_STRICT + if (state.offset > state.dmax) { + strm.msg = 'invalid distance too far back'; + state.mode = BAD; + break; + } +//#endif + //Tracevv((stderr, "inflate: distance %u\n", state.offset)); + state.mode = MATCH; + /* falls through */ + case MATCH: + if (left === 0) { break inf_leave; } + copy = _out - left; + if (state.offset > copy) { /* copy from window */ + copy = state.offset - copy; + if (copy > state.whave) { + if (state.sane) { + strm.msg = 'invalid distance too far back'; + state.mode = BAD; + break; + } +// (!) This block is disabled in zlib defaults, +// don't enable it for binary compatibility +//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR +// Trace((stderr, "inflate.c too far\n")); +// copy -= state.whave; +// if (copy > state.length) { copy = state.length; } +// if (copy > left) { copy = left; } +// left -= copy; +// state.length -= copy; +// do { +// output[put++] = 0; +// } while (--copy); +// if (state.length === 0) { state.mode = LEN; } +// break; +//#endif + } + if (copy > state.wnext) { + copy -= state.wnext; + from = state.wsize - copy; + } + else { + from = state.wnext - copy; + } + if (copy > state.length) { copy = state.length; } + from_source = state.window; + } + else { /* copy from output */ + from_source = output; + from = put - state.offset; + copy = state.length; + } + if (copy > left) { copy = left; } + left -= copy; + state.length -= copy; + do { + output[put++] = from_source[from++]; + } while (--copy); + if (state.length === 0) { state.mode = LEN; } + break; + case LIT: + if (left === 0) { break inf_leave; } + output[put++] = state.length; + left--; + state.mode = LEN; + break; + case CHECK: + if (state.wrap) { + //=== NEEDBITS(32); + while (bits < 32) { + if (have === 0) { break inf_leave; } + have--; + // Use '|' instead of '+' to make sure that result is signed + hold |= input[next++] << bits; + bits += 8; + } + //===// + _out -= left; + strm.total_out += _out; + state.total += _out; + if (_out) { + strm.adler = state.check = + /*UPDATE(state.check, put - _out, _out);*/ + (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out)); + + } + _out = left; + // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too + if ((state.flags ? hold : zswap32(hold)) !== state.check) { + strm.msg = 'incorrect data check'; + state.mode = BAD; + break; + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + //Tracev((stderr, "inflate: check matches trailer\n")); + } + state.mode = LENGTH; + /* falls through */ + case LENGTH: + if (state.wrap && state.flags) { + //=== NEEDBITS(32); + while (bits < 32) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if (hold !== (state.total & 0xffffffff)) { + strm.msg = 'incorrect length check'; + state.mode = BAD; + break; + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + //Tracev((stderr, "inflate: length matches trailer\n")); + } + state.mode = DONE; + /* falls through */ + case DONE: + ret = Z_STREAM_END; + break inf_leave; + case BAD: + ret = Z_DATA_ERROR; + break inf_leave; + case MEM: + return Z_MEM_ERROR; + case SYNC: + /* falls through */ + default: + return Z_STREAM_ERROR; + } + } + + // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave" + + /* + Return from inflate(), updating the total counts and the check value. + If there was no progress during the inflate() call, return a buffer + error. Call updatewindow() to create and/or update the window state. + Note: a memory error from inflate() is non-recoverable. + */ + + //--- RESTORE() --- + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + //--- + + if (state.wsize || (_out !== strm.avail_out && state.mode < BAD && + (state.mode < CHECK || flush !== Z_FINISH))) { + if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) { + state.mode = MEM; + return Z_MEM_ERROR; + } + } + _in -= strm.avail_in; + _out -= strm.avail_out; + strm.total_in += _in; + strm.total_out += _out; + state.total += _out; + if (state.wrap && _out) { + strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/ + (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out)); + } + strm.data_type = state.bits + (state.last ? 64 : 0) + + (state.mode === TYPE ? 128 : 0) + + (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0); + if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) { + ret = Z_BUF_ERROR; + } + return ret; +} + +function inflateEnd(strm) { + + if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) { + return Z_STREAM_ERROR; + } + + var state = strm.state; + if (state.window) { + state.window = null; + } + strm.state = null; + return Z_OK; +} + +function inflateGetHeader(strm, head) { + var state; + + /* check state */ + if (!strm || !strm.state) { return Z_STREAM_ERROR; } + state = strm.state; + if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; } + + /* save header structure */ + state.head = head; + head.done = false; + return Z_OK; +} + +function inflateSetDictionary(strm, dictionary) { + var dictLength = dictionary.length; + + var state; + var dictid; + var ret; + + /* check state */ + if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; } + state = strm.state; + + if (state.wrap !== 0 && state.mode !== DICT) { + return Z_STREAM_ERROR; + } + + /* check for correct dictionary identifier */ + if (state.mode === DICT) { + dictid = 1; /* adler32(0, null, 0)*/ + /* dictid = adler32(dictid, dictionary, dictLength); */ + dictid = adler32(dictid, dictionary, dictLength, 0); + if (dictid !== state.check) { + return Z_DATA_ERROR; + } + } + /* copy dictionary to window using updatewindow(), which will amend the + existing dictionary if appropriate */ + ret = updatewindow(strm, dictionary, dictLength, dictLength); + if (ret) { + state.mode = MEM; + return Z_MEM_ERROR; + } + state.havedict = 1; + // Tracev((stderr, "inflate: dictionary set\n")); + return Z_OK; +} + +exports.inflateReset = inflateReset; +exports.inflateReset2 = inflateReset2; +exports.inflateResetKeep = inflateResetKeep; +exports.inflateInit = inflateInit; +exports.inflateInit2 = inflateInit2; +exports.inflate = inflate; +exports.inflateEnd = inflateEnd; +exports.inflateGetHeader = inflateGetHeader; +exports.inflateSetDictionary = inflateSetDictionary; +exports.inflateInfo = 'pako inflate (from Nodeca project)'; + +/* Not implemented +exports.inflateCopy = inflateCopy; +exports.inflateGetDictionary = inflateGetDictionary; +exports.inflateMark = inflateMark; +exports.inflatePrime = inflatePrime; +exports.inflateSync = inflateSync; +exports.inflateSyncPoint = inflateSyncPoint; +exports.inflateUndermine = inflateUndermine; +*/ + +},{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +var utils = require('../utils/common'); + +var MAXBITS = 15; +var ENOUGH_LENS = 852; +var ENOUGH_DISTS = 592; +//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); + +var CODES = 0; +var LENS = 1; +var DISTS = 2; + +var lbase = [ /* Length codes 257..285 base */ + 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, + 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 +]; + +var lext = [ /* Length codes 257..285 extra */ + 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78 +]; + +var dbase = [ /* Distance codes 0..29 base */ + 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, + 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, + 8193, 12289, 16385, 24577, 0, 0 +]; + +var dext = [ /* Distance codes 0..29 extra */ + 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, + 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, + 28, 28, 29, 29, 64, 64 +]; + +module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) +{ + var bits = opts.bits; + //here = opts.here; /* table entry for duplication */ + + var len = 0; /* a code's length in bits */ + var sym = 0; /* index of code symbols */ + var min = 0, max = 0; /* minimum and maximum code lengths */ + var root = 0; /* number of index bits for root table */ + var curr = 0; /* number of index bits for current table */ + var drop = 0; /* code bits to drop for sub-table */ + var left = 0; /* number of prefix codes available */ + var used = 0; /* code entries in table used */ + var huff = 0; /* Huffman code */ + var incr; /* for incrementing code, index */ + var fill; /* index for replicating entries */ + var low; /* low bits for current root entry */ + var mask; /* mask for low root bits */ + var next; /* next available space in table */ + var base = null; /* base value table to use */ + var base_index = 0; +// var shoextra; /* extra bits table to use */ + var end; /* use base and extra for symbol > end */ + var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */ + var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */ + var extra = null; + var extra_index = 0; + + var here_bits, here_op, here_val; + + /* + Process a set of code lengths to create a canonical Huffman code. The + code lengths are lens[0..codes-1]. Each length corresponds to the + symbols 0..codes-1. The Huffman code is generated by first sorting the + symbols by length from short to long, and retaining the symbol order + for codes with equal lengths. Then the code starts with all zero bits + for the first code of the shortest length, and the codes are integer + increments for the same length, and zeros are appended as the length + increases. For the deflate format, these bits are stored backwards + from their more natural integer increment ordering, and so when the + decoding tables are built in the large loop below, the integer codes + are incremented backwards. + + This routine assumes, but does not check, that all of the entries in + lens[] are in the range 0..MAXBITS. The caller must assure this. + 1..MAXBITS is interpreted as that code length. zero means that that + symbol does not occur in this code. + + The codes are sorted by computing a count of codes for each length, + creating from that a table of starting indices for each length in the + sorted table, and then entering the symbols in order in the sorted + table. The sorted table is work[], with that space being provided by + the caller. + + The length counts are used for other purposes as well, i.e. finding + the minimum and maximum length codes, determining if there are any + codes at all, checking for a valid set of lengths, and looking ahead + at length counts to determine sub-table sizes when building the + decoding tables. + */ + + /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ + for (len = 0; len <= MAXBITS; len++) { + count[len] = 0; + } + for (sym = 0; sym < codes; sym++) { + count[lens[lens_index + sym]]++; + } + + /* bound code lengths, force root to be within code lengths */ + root = bits; + for (max = MAXBITS; max >= 1; max--) { + if (count[max] !== 0) { break; } + } + if (root > max) { + root = max; + } + if (max === 0) { /* no symbols to code at all */ + //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */ + //table.bits[opts.table_index] = 1; //here.bits = (var char)1; + //table.val[opts.table_index++] = 0; //here.val = (var short)0; + table[table_index++] = (1 << 24) | (64 << 16) | 0; + + + //table.op[opts.table_index] = 64; + //table.bits[opts.table_index] = 1; + //table.val[opts.table_index++] = 0; + table[table_index++] = (1 << 24) | (64 << 16) | 0; + + opts.bits = 1; + return 0; /* no symbols, but wait for decoding to report error */ + } + for (min = 1; min < max; min++) { + if (count[min] !== 0) { break; } + } + if (root < min) { + root = min; + } + + /* check for an over-subscribed or incomplete set of lengths */ + left = 1; + for (len = 1; len <= MAXBITS; len++) { + left <<= 1; + left -= count[len]; + if (left < 0) { + return -1; + } /* over-subscribed */ + } + if (left > 0 && (type === CODES || max !== 1)) { + return -1; /* incomplete set */ + } + + /* generate offsets into symbol table for each length for sorting */ + offs[1] = 0; + for (len = 1; len < MAXBITS; len++) { + offs[len + 1] = offs[len] + count[len]; + } + + /* sort symbols by length, by symbol order within each length */ + for (sym = 0; sym < codes; sym++) { + if (lens[lens_index + sym] !== 0) { + work[offs[lens[lens_index + sym]]++] = sym; + } + } + + /* + Create and fill in decoding tables. In this loop, the table being + filled is at next and has curr index bits. The code being used is huff + with length len. That code is converted to an index by dropping drop + bits off of the bottom. For codes where len is less than drop + curr, + those top drop + curr - len bits are incremented through all values to + fill the table with replicated entries. + + root is the number of index bits for the root table. When len exceeds + root, sub-tables are created pointed to by the root entry with an index + of the low root bits of huff. This is saved in low to check for when a + new sub-table should be started. drop is zero when the root table is + being filled, and drop is root when sub-tables are being filled. + + When a new sub-table is needed, it is necessary to look ahead in the + code lengths to determine what size sub-table is needed. The length + counts are used for this, and so count[] is decremented as codes are + entered in the tables. + + used keeps track of how many table entries have been allocated from the + provided *table space. It is checked for LENS and DIST tables against + the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in + the initial root table size constants. See the comments in inftrees.h + for more information. + + sym increments through all symbols, and the loop terminates when + all codes of length max, i.e. all codes, have been processed. This + routine permits incomplete codes, so another loop after this one fills + in the rest of the decoding tables with invalid code markers. + */ + + /* set up for code type */ + // poor man optimization - use if-else instead of switch, + // to avoid deopts in old v8 + if (type === CODES) { + base = extra = work; /* dummy value--not used */ + end = 19; + + } else if (type === LENS) { + base = lbase; + base_index -= 257; + extra = lext; + extra_index -= 257; + end = 256; + + } else { /* DISTS */ + base = dbase; + extra = dext; + end = -1; + } + + /* initialize opts for loop */ + huff = 0; /* starting code */ + sym = 0; /* starting code symbol */ + len = min; /* starting code length */ + next = table_index; /* current table to fill in */ + curr = root; /* current table index bits */ + drop = 0; /* current bits to drop from code for index */ + low = -1; /* trigger new sub-table when len > root */ + used = 1 << root; /* use root table entries */ + mask = used - 1; /* mask for comparing low */ + + /* check available table space */ + if ((type === LENS && used > ENOUGH_LENS) || + (type === DISTS && used > ENOUGH_DISTS)) { + return 1; + } + + /* process all codes and make table entries */ + for (;;) { + /* create table entry */ + here_bits = len - drop; + if (work[sym] < end) { + here_op = 0; + here_val = work[sym]; + } + else if (work[sym] > end) { + here_op = extra[extra_index + work[sym]]; + here_val = base[base_index + work[sym]]; + } + else { + here_op = 32 + 64; /* end of block */ + here_val = 0; + } + + /* replicate for those indices with low len bits equal to huff */ + incr = 1 << (len - drop); + fill = 1 << curr; + min = fill; /* save offset to next table */ + do { + fill -= incr; + table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0; + } while (fill !== 0); + + /* backwards increment the len-bit code huff */ + incr = 1 << (len - 1); + while (huff & incr) { + incr >>= 1; + } + if (incr !== 0) { + huff &= incr - 1; + huff += incr; + } else { + huff = 0; + } + + /* go to next symbol, update count, len */ + sym++; + if (--count[len] === 0) { + if (len === max) { break; } + len = lens[lens_index + work[sym]]; + } + + /* create new sub-table if needed */ + if (len > root && (huff & mask) !== low) { + /* if first time, transition to sub-tables */ + if (drop === 0) { + drop = root; + } + + /* increment past last table */ + next += min; /* here min is 1 << curr */ + + /* determine length of next table */ + curr = len - drop; + left = 1 << curr; + while (curr + drop < max) { + left -= count[curr + drop]; + if (left <= 0) { break; } + curr++; + left <<= 1; + } + + /* check for enough space */ + used += 1 << curr; + if ((type === LENS && used > ENOUGH_LENS) || + (type === DISTS && used > ENOUGH_DISTS)) { + return 1; + } + + /* point entry in root table to sub-table */ + low = huff & mask; + /*table.op[low] = curr; + table.bits[low] = root; + table.val[low] = next - opts.table_index;*/ + table[low] = (root << 24) | (curr << 16) | (next - table_index) |0; + } + } + + /* fill in remaining table entry if code is incomplete (guaranteed to have + at most one remaining entry, since if the code is incomplete, the + maximum code length that was allowed to get this far is one bit) */ + if (huff !== 0) { + //table.op[next + huff] = 64; /* invalid code marker */ + //table.bits[next + huff] = len - drop; + //table.val[next + huff] = 0; + table[next + huff] = ((len - drop) << 24) | (64 << 16) |0; + } + + /* set return parameters */ + //opts.table_index += used; + opts.bits = root; + return 0; +}; + +},{"../utils/common":3}],13:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +module.exports = { + 2: 'need dictionary', /* Z_NEED_DICT 2 */ + 1: 'stream end', /* Z_STREAM_END 1 */ + 0: '', /* Z_OK 0 */ + '-1': 'file error', /* Z_ERRNO (-1) */ + '-2': 'stream error', /* Z_STREAM_ERROR (-2) */ + '-3': 'data error', /* Z_DATA_ERROR (-3) */ + '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */ + '-5': 'buffer error', /* Z_BUF_ERROR (-5) */ + '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ +}; + +},{}],14:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +/* eslint-disable space-unary-ops */ + +var utils = require('../utils/common'); + +/* Public constants ==========================================================*/ +/* ===========================================================================*/ + + +//var Z_FILTERED = 1; +//var Z_HUFFMAN_ONLY = 2; +//var Z_RLE = 3; +var Z_FIXED = 4; +//var Z_DEFAULT_STRATEGY = 0; + +/* Possible values of the data_type field (though see inflate()) */ +var Z_BINARY = 0; +var Z_TEXT = 1; +//var Z_ASCII = 1; // = Z_TEXT +var Z_UNKNOWN = 2; + +/*============================================================================*/ + + +function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } + +// From zutil.h + +var STORED_BLOCK = 0; +var STATIC_TREES = 1; +var DYN_TREES = 2; +/* The three kinds of block type */ + +var MIN_MATCH = 3; +var MAX_MATCH = 258; +/* The minimum and maximum match lengths */ + +// From deflate.h +/* =========================================================================== + * Internal compression state. + */ + +var LENGTH_CODES = 29; +/* number of length codes, not counting the special END_BLOCK code */ + +var LITERALS = 256; +/* number of literal bytes 0..255 */ + +var L_CODES = LITERALS + 1 + LENGTH_CODES; +/* number of Literal or Length codes, including the END_BLOCK code */ + +var D_CODES = 30; +/* number of distance codes */ + +var BL_CODES = 19; +/* number of codes used to transfer the bit lengths */ + +var HEAP_SIZE = 2 * L_CODES + 1; +/* maximum heap size */ + +var MAX_BITS = 15; +/* All codes must not exceed MAX_BITS bits */ + +var Buf_size = 16; +/* size of bit buffer in bi_buf */ + + +/* =========================================================================== + * Constants + */ + +var MAX_BL_BITS = 7; +/* Bit length codes must not exceed MAX_BL_BITS bits */ + +var END_BLOCK = 256; +/* end of block literal code */ + +var REP_3_6 = 16; +/* repeat previous bit length 3-6 times (2 bits of repeat count) */ + +var REPZ_3_10 = 17; +/* repeat a zero length 3-10 times (3 bits of repeat count) */ + +var REPZ_11_138 = 18; +/* repeat a zero length 11-138 times (7 bits of repeat count) */ + +/* eslint-disable comma-spacing,array-bracket-spacing */ +var extra_lbits = /* extra bits for each length code */ + [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]; + +var extra_dbits = /* extra bits for each distance code */ + [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]; + +var extra_blbits = /* extra bits for each bit length code */ + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]; + +var bl_order = + [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]; +/* eslint-enable comma-spacing,array-bracket-spacing */ + +/* The lengths of the bit length codes are sent in order of decreasing + * probability, to avoid transmitting the lengths for unused bit length codes. + */ + +/* =========================================================================== + * Local data. These are initialized only once. + */ + +// We pre-fill arrays with 0 to avoid uninitialized gaps + +var DIST_CODE_LEN = 512; /* see definition of array dist_code below */ + +// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1 +var static_ltree = new Array((L_CODES + 2) * 2); +zero(static_ltree); +/* The static literal tree. Since the bit lengths are imposed, there is no + * need for the L_CODES extra codes used during heap construction. However + * The codes 286 and 287 are needed to build a canonical tree (see _tr_init + * below). + */ + +var static_dtree = new Array(D_CODES * 2); +zero(static_dtree); +/* The static distance tree. (Actually a trivial tree since all codes use + * 5 bits.) + */ + +var _dist_code = new Array(DIST_CODE_LEN); +zero(_dist_code); +/* Distance codes. The first 256 values correspond to the distances + * 3 .. 258, the last 256 values correspond to the top 8 bits of + * the 15 bit distances. + */ + +var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1); +zero(_length_code); +/* length code for each normalized match length (0 == MIN_MATCH) */ + +var base_length = new Array(LENGTH_CODES); +zero(base_length); +/* First normalized length for each code (0 = MIN_MATCH) */ + +var base_dist = new Array(D_CODES); +zero(base_dist); +/* First normalized distance for each code (0 = distance of 1) */ + + +function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) { + + this.static_tree = static_tree; /* static tree or NULL */ + this.extra_bits = extra_bits; /* extra bits for each code or NULL */ + this.extra_base = extra_base; /* base index for extra_bits */ + this.elems = elems; /* max number of elements in the tree */ + this.max_length = max_length; /* max bit length for the codes */ + + // show if `static_tree` has data or dummy - needed for monomorphic objects + this.has_stree = static_tree && static_tree.length; +} + + +var static_l_desc; +var static_d_desc; +var static_bl_desc; + + +function TreeDesc(dyn_tree, stat_desc) { + this.dyn_tree = dyn_tree; /* the dynamic tree */ + this.max_code = 0; /* largest code with non zero frequency */ + this.stat_desc = stat_desc; /* the corresponding static tree */ +} + + + +function d_code(dist) { + return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)]; +} + + +/* =========================================================================== + * Output a short LSB first on the stream. + * IN assertion: there is enough room in pendingBuf. + */ +function put_short(s, w) { +// put_byte(s, (uch)((w) & 0xff)); +// put_byte(s, (uch)((ush)(w) >> 8)); + s.pending_buf[s.pending++] = (w) & 0xff; + s.pending_buf[s.pending++] = (w >>> 8) & 0xff; +} + + +/* =========================================================================== + * Send a value on a given number of bits. + * IN assertion: length <= 16 and value fits in length bits. + */ +function send_bits(s, value, length) { + if (s.bi_valid > (Buf_size - length)) { + s.bi_buf |= (value << s.bi_valid) & 0xffff; + put_short(s, s.bi_buf); + s.bi_buf = value >> (Buf_size - s.bi_valid); + s.bi_valid += length - Buf_size; + } else { + s.bi_buf |= (value << s.bi_valid) & 0xffff; + s.bi_valid += length; + } +} + + +function send_code(s, c, tree) { + send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/); +} + + +/* =========================================================================== + * Reverse the first len bits of a code, using straightforward code (a faster + * method would use a table) + * IN assertion: 1 <= len <= 15 + */ +function bi_reverse(code, len) { + var res = 0; + do { + res |= code & 1; + code >>>= 1; + res <<= 1; + } while (--len > 0); + return res >>> 1; +} + + +/* =========================================================================== + * Flush the bit buffer, keeping at most 7 bits in it. + */ +function bi_flush(s) { + if (s.bi_valid === 16) { + put_short(s, s.bi_buf); + s.bi_buf = 0; + s.bi_valid = 0; + + } else if (s.bi_valid >= 8) { + s.pending_buf[s.pending++] = s.bi_buf & 0xff; + s.bi_buf >>= 8; + s.bi_valid -= 8; + } +} + + +/* =========================================================================== + * Compute the optimal bit lengths for a tree and update the total bit length + * for the current block. + * IN assertion: the fields freq and dad are set, heap[heap_max] and + * above are the tree nodes sorted by increasing frequency. + * OUT assertions: the field len is set to the optimal bit length, the + * array bl_count contains the frequencies for each bit length. + * The length opt_len is updated; static_len is also updated if stree is + * not null. + */ +function gen_bitlen(s, desc) +// deflate_state *s; +// tree_desc *desc; /* the tree descriptor */ +{ + var tree = desc.dyn_tree; + var max_code = desc.max_code; + var stree = desc.stat_desc.static_tree; + var has_stree = desc.stat_desc.has_stree; + var extra = desc.stat_desc.extra_bits; + var base = desc.stat_desc.extra_base; + var max_length = desc.stat_desc.max_length; + var h; /* heap index */ + var n, m; /* iterate over the tree elements */ + var bits; /* bit length */ + var xbits; /* extra bits */ + var f; /* frequency */ + var overflow = 0; /* number of elements with bit length too large */ + + for (bits = 0; bits <= MAX_BITS; bits++) { + s.bl_count[bits] = 0; + } + + /* In a first pass, compute the optimal bit lengths (which may + * overflow in the case of the bit length tree). + */ + tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */ + + for (h = s.heap_max + 1; h < HEAP_SIZE; h++) { + n = s.heap[h]; + bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1; + if (bits > max_length) { + bits = max_length; + overflow++; + } + tree[n * 2 + 1]/*.Len*/ = bits; + /* We overwrite tree[n].Dad which is no longer needed */ + + if (n > max_code) { continue; } /* not a leaf node */ + + s.bl_count[bits]++; + xbits = 0; + if (n >= base) { + xbits = extra[n - base]; + } + f = tree[n * 2]/*.Freq*/; + s.opt_len += f * (bits + xbits); + if (has_stree) { + s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits); + } + } + if (overflow === 0) { return; } + + // Trace((stderr,"\nbit length overflow\n")); + /* This happens for example on obj2 and pic of the Calgary corpus */ + + /* Find the first bit length which could increase: */ + do { + bits = max_length - 1; + while (s.bl_count[bits] === 0) { bits--; } + s.bl_count[bits]--; /* move one leaf down the tree */ + s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */ + s.bl_count[max_length]--; + /* The brother of the overflow item also moves one step up, + * but this does not affect bl_count[max_length] + */ + overflow -= 2; + } while (overflow > 0); + + /* Now recompute all bit lengths, scanning in increasing frequency. + * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all + * lengths instead of fixing only the wrong ones. This idea is taken + * from 'ar' written by Haruhiko Okumura.) + */ + for (bits = max_length; bits !== 0; bits--) { + n = s.bl_count[bits]; + while (n !== 0) { + m = s.heap[--h]; + if (m > max_code) { continue; } + if (tree[m * 2 + 1]/*.Len*/ !== bits) { + // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); + s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/; + tree[m * 2 + 1]/*.Len*/ = bits; + } + n--; + } + } +} + + +/* =========================================================================== + * Generate the codes for a given tree and bit counts (which need not be + * optimal). + * IN assertion: the array bl_count contains the bit length statistics for + * the given tree and the field len is set for all tree elements. + * OUT assertion: the field code is set for all tree elements of non + * zero code length. + */ +function gen_codes(tree, max_code, bl_count) +// ct_data *tree; /* the tree to decorate */ +// int max_code; /* largest code with non zero frequency */ +// ushf *bl_count; /* number of codes at each bit length */ +{ + var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */ + var code = 0; /* running code value */ + var bits; /* bit index */ + var n; /* code index */ + + /* The distribution counts are first used to generate the code values + * without bit reversal. + */ + for (bits = 1; bits <= MAX_BITS; bits++) { + next_code[bits] = code = (code + bl_count[bits - 1]) << 1; + } + /* Check that the bit counts in bl_count are consistent. The last code + * must be all ones. + */ + //Assert (code + bl_count[MAX_BITS]-1 == (1< length code (0..28) */ + length = 0; + for (code = 0; code < LENGTH_CODES - 1; code++) { + base_length[code] = length; + for (n = 0; n < (1 << extra_lbits[code]); n++) { + _length_code[length++] = code; + } + } + //Assert (length == 256, "tr_static_init: length != 256"); + /* Note that the length 255 (match length 258) can be represented + * in two different ways: code 284 + 5 bits or code 285, so we + * overwrite length_code[255] to use the best encoding: + */ + _length_code[length - 1] = code; + + /* Initialize the mapping dist (0..32K) -> dist code (0..29) */ + dist = 0; + for (code = 0; code < 16; code++) { + base_dist[code] = dist; + for (n = 0; n < (1 << extra_dbits[code]); n++) { + _dist_code[dist++] = code; + } + } + //Assert (dist == 256, "tr_static_init: dist != 256"); + dist >>= 7; /* from now on, all distances are divided by 128 */ + for (; code < D_CODES; code++) { + base_dist[code] = dist << 7; + for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) { + _dist_code[256 + dist++] = code; + } + } + //Assert (dist == 256, "tr_static_init: 256+dist != 512"); + + /* Construct the codes of the static literal tree */ + for (bits = 0; bits <= MAX_BITS; bits++) { + bl_count[bits] = 0; + } + + n = 0; + while (n <= 143) { + static_ltree[n * 2 + 1]/*.Len*/ = 8; + n++; + bl_count[8]++; + } + while (n <= 255) { + static_ltree[n * 2 + 1]/*.Len*/ = 9; + n++; + bl_count[9]++; + } + while (n <= 279) { + static_ltree[n * 2 + 1]/*.Len*/ = 7; + n++; + bl_count[7]++; + } + while (n <= 287) { + static_ltree[n * 2 + 1]/*.Len*/ = 8; + n++; + bl_count[8]++; + } + /* Codes 286 and 287 do not exist, but we must include them in the + * tree construction to get a canonical Huffman tree (longest code + * all ones) + */ + gen_codes(static_ltree, L_CODES + 1, bl_count); + + /* The static distance tree is trivial: */ + for (n = 0; n < D_CODES; n++) { + static_dtree[n * 2 + 1]/*.Len*/ = 5; + static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5); + } + + // Now data ready and we can init static trees + static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS); + static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS); + static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS); + + //static_init_done = true; +} + + +/* =========================================================================== + * Initialize a new block. + */ +function init_block(s) { + var n; /* iterates over tree elements */ + + /* Initialize the trees. */ + for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; } + for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; } + for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; } + + s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1; + s.opt_len = s.static_len = 0; + s.last_lit = s.matches = 0; +} + + +/* =========================================================================== + * Flush the bit buffer and align the output on a byte boundary + */ +function bi_windup(s) +{ + if (s.bi_valid > 8) { + put_short(s, s.bi_buf); + } else if (s.bi_valid > 0) { + //put_byte(s, (Byte)s->bi_buf); + s.pending_buf[s.pending++] = s.bi_buf; + } + s.bi_buf = 0; + s.bi_valid = 0; +} + +/* =========================================================================== + * Copy a stored block, storing first the length and its + * one's complement if requested. + */ +function copy_block(s, buf, len, header) +//DeflateState *s; +//charf *buf; /* the input data */ +//unsigned len; /* its length */ +//int header; /* true if block header must be written */ +{ + bi_windup(s); /* align on byte boundary */ + + if (header) { + put_short(s, len); + put_short(s, ~len); + } +// while (len--) { +// put_byte(s, *buf++); +// } + utils.arraySet(s.pending_buf, s.window, buf, len, s.pending); + s.pending += len; +} + +/* =========================================================================== + * Compares to subtrees, using the tree depth as tie breaker when + * the subtrees have equal frequency. This minimizes the worst case length. + */ +function smaller(tree, n, m, depth) { + var _n2 = n * 2; + var _m2 = m * 2; + return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ || + (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m])); +} + +/* =========================================================================== + * Restore the heap property by moving down the tree starting at node k, + * exchanging a node with the smallest of its two sons if necessary, stopping + * when the heap property is re-established (each father smaller than its + * two sons). + */ +function pqdownheap(s, tree, k) +// deflate_state *s; +// ct_data *tree; /* the tree to restore */ +// int k; /* node to move down */ +{ + var v = s.heap[k]; + var j = k << 1; /* left son of k */ + while (j <= s.heap_len) { + /* Set j to the smallest of the two sons: */ + if (j < s.heap_len && + smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) { + j++; + } + /* Exit if v is smaller than both sons */ + if (smaller(tree, v, s.heap[j], s.depth)) { break; } + + /* Exchange v with the smallest son */ + s.heap[k] = s.heap[j]; + k = j; + + /* And continue down the tree, setting j to the left son of k */ + j <<= 1; + } + s.heap[k] = v; +} + + +// inlined manually +// var SMALLEST = 1; + +/* =========================================================================== + * Send the block data compressed using the given Huffman trees + */ +function compress_block(s, ltree, dtree) +// deflate_state *s; +// const ct_data *ltree; /* literal tree */ +// const ct_data *dtree; /* distance tree */ +{ + var dist; /* distance of matched string */ + var lc; /* match length or unmatched char (if dist == 0) */ + var lx = 0; /* running index in l_buf */ + var code; /* the code to send */ + var extra; /* number of extra bits to send */ + + if (s.last_lit !== 0) { + do { + dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]); + lc = s.pending_buf[s.l_buf + lx]; + lx++; + + if (dist === 0) { + send_code(s, lc, ltree); /* send a literal byte */ + //Tracecv(isgraph(lc), (stderr," '%c' ", lc)); + } else { + /* Here, lc is the match length - MIN_MATCH */ + code = _length_code[lc]; + send_code(s, code + LITERALS + 1, ltree); /* send the length code */ + extra = extra_lbits[code]; + if (extra !== 0) { + lc -= base_length[code]; + send_bits(s, lc, extra); /* send the extra length bits */ + } + dist--; /* dist is now the match distance - 1 */ + code = d_code(dist); + //Assert (code < D_CODES, "bad d_code"); + + send_code(s, code, dtree); /* send the distance code */ + extra = extra_dbits[code]; + if (extra !== 0) { + dist -= base_dist[code]; + send_bits(s, dist, extra); /* send the extra distance bits */ + } + } /* literal or match pair ? */ + + /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ + //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx, + // "pendingBuf overflow"); + + } while (lx < s.last_lit); + } + + send_code(s, END_BLOCK, ltree); +} + + +/* =========================================================================== + * Construct one Huffman tree and assigns the code bit strings and lengths. + * Update the total bit length for the current block. + * IN assertion: the field freq is set for all tree elements. + * OUT assertions: the fields len and code are set to the optimal bit length + * and corresponding code. The length opt_len is updated; static_len is + * also updated if stree is not null. The field max_code is set. + */ +function build_tree(s, desc) +// deflate_state *s; +// tree_desc *desc; /* the tree descriptor */ +{ + var tree = desc.dyn_tree; + var stree = desc.stat_desc.static_tree; + var has_stree = desc.stat_desc.has_stree; + var elems = desc.stat_desc.elems; + var n, m; /* iterate over heap elements */ + var max_code = -1; /* largest code with non zero frequency */ + var node; /* new node being created */ + + /* Construct the initial heap, with least frequent element in + * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. + * heap[0] is not used. + */ + s.heap_len = 0; + s.heap_max = HEAP_SIZE; + + for (n = 0; n < elems; n++) { + if (tree[n * 2]/*.Freq*/ !== 0) { + s.heap[++s.heap_len] = max_code = n; + s.depth[n] = 0; + + } else { + tree[n * 2 + 1]/*.Len*/ = 0; + } + } + + /* The pkzip format requires that at least one distance code exists, + * and that at least one bit should be sent even if there is only one + * possible code. So to avoid special checks later on we force at least + * two codes of non zero frequency. + */ + while (s.heap_len < 2) { + node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0); + tree[node * 2]/*.Freq*/ = 1; + s.depth[node] = 0; + s.opt_len--; + + if (has_stree) { + s.static_len -= stree[node * 2 + 1]/*.Len*/; + } + /* node is 0 or 1 so it does not have extra bits */ + } + desc.max_code = max_code; + + /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, + * establish sub-heaps of increasing lengths: + */ + for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); } + + /* Construct the Huffman tree by repeatedly combining the least two + * frequent nodes. + */ + node = elems; /* next internal node of the tree */ + do { + //pqremove(s, tree, n); /* n = node of least frequency */ + /*** pqremove ***/ + n = s.heap[1/*SMALLEST*/]; + s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--]; + pqdownheap(s, tree, 1/*SMALLEST*/); + /***/ + + m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */ + + s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */ + s.heap[--s.heap_max] = m; + + /* Create a new node father of n and m */ + tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/; + s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1; + tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node; + + /* and insert the new node in the heap */ + s.heap[1/*SMALLEST*/] = node++; + pqdownheap(s, tree, 1/*SMALLEST*/); + + } while (s.heap_len >= 2); + + s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/]; + + /* At this point, the fields freq and dad are set. We can now + * generate the bit lengths. + */ + gen_bitlen(s, desc); + + /* The field len is now set, we can generate the bit codes */ + gen_codes(tree, max_code, s.bl_count); +} + + +/* =========================================================================== + * Scan a literal or distance tree to determine the frequencies of the codes + * in the bit length tree. + */ +function scan_tree(s, tree, max_code) +// deflate_state *s; +// ct_data *tree; /* the tree to be scanned */ +// int max_code; /* and its largest code of non zero frequency */ +{ + var n; /* iterates over all tree elements */ + var prevlen = -1; /* last emitted length */ + var curlen; /* length of current code */ + + var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ + + var count = 0; /* repeat count of the current code */ + var max_count = 7; /* max repeat count */ + var min_count = 4; /* min repeat count */ + + if (nextlen === 0) { + max_count = 138; + min_count = 3; + } + tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */ + + for (n = 0; n <= max_code; n++) { + curlen = nextlen; + nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; + + if (++count < max_count && curlen === nextlen) { + continue; + + } else if (count < min_count) { + s.bl_tree[curlen * 2]/*.Freq*/ += count; + + } else if (curlen !== 0) { + + if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; } + s.bl_tree[REP_3_6 * 2]/*.Freq*/++; + + } else if (count <= 10) { + s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++; + + } else { + s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++; + } + + count = 0; + prevlen = curlen; + + if (nextlen === 0) { + max_count = 138; + min_count = 3; + + } else if (curlen === nextlen) { + max_count = 6; + min_count = 3; + + } else { + max_count = 7; + min_count = 4; + } + } +} + + +/* =========================================================================== + * Send a literal or distance tree in compressed form, using the codes in + * bl_tree. + */ +function send_tree(s, tree, max_code) +// deflate_state *s; +// ct_data *tree; /* the tree to be scanned */ +// int max_code; /* and its largest code of non zero frequency */ +{ + var n; /* iterates over all tree elements */ + var prevlen = -1; /* last emitted length */ + var curlen; /* length of current code */ + + var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ + + var count = 0; /* repeat count of the current code */ + var max_count = 7; /* max repeat count */ + var min_count = 4; /* min repeat count */ + + /* tree[max_code+1].Len = -1; */ /* guard already set */ + if (nextlen === 0) { + max_count = 138; + min_count = 3; + } + + for (n = 0; n <= max_code; n++) { + curlen = nextlen; + nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; + + if (++count < max_count && curlen === nextlen) { + continue; + + } else if (count < min_count) { + do { send_code(s, curlen, s.bl_tree); } while (--count !== 0); + + } else if (curlen !== 0) { + if (curlen !== prevlen) { + send_code(s, curlen, s.bl_tree); + count--; + } + //Assert(count >= 3 && count <= 6, " 3_6?"); + send_code(s, REP_3_6, s.bl_tree); + send_bits(s, count - 3, 2); + + } else if (count <= 10) { + send_code(s, REPZ_3_10, s.bl_tree); + send_bits(s, count - 3, 3); + + } else { + send_code(s, REPZ_11_138, s.bl_tree); + send_bits(s, count - 11, 7); + } + + count = 0; + prevlen = curlen; + if (nextlen === 0) { + max_count = 138; + min_count = 3; + + } else if (curlen === nextlen) { + max_count = 6; + min_count = 3; + + } else { + max_count = 7; + min_count = 4; + } + } +} + + +/* =========================================================================== + * Construct the Huffman tree for the bit lengths and return the index in + * bl_order of the last bit length code to send. + */ +function build_bl_tree(s) { + var max_blindex; /* index of last bit length code of non zero freq */ + + /* Determine the bit length frequencies for literal and distance trees */ + scan_tree(s, s.dyn_ltree, s.l_desc.max_code); + scan_tree(s, s.dyn_dtree, s.d_desc.max_code); + + /* Build the bit length tree: */ + build_tree(s, s.bl_desc); + /* opt_len now includes the length of the tree representations, except + * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. + */ + + /* Determine the number of bit length codes to send. The pkzip format + * requires that at least 4 bit length codes be sent. (appnote.txt says + * 3 but the actual value used is 4.) + */ + for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) { + if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) { + break; + } + } + /* Update opt_len to include the bit length tree and counts */ + s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; + //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", + // s->opt_len, s->static_len)); + + return max_blindex; +} + + +/* =========================================================================== + * Send the header for a block using dynamic Huffman trees: the counts, the + * lengths of the bit length codes, the literal tree and the distance tree. + * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. + */ +function send_all_trees(s, lcodes, dcodes, blcodes) +// deflate_state *s; +// int lcodes, dcodes, blcodes; /* number of codes for each tree */ +{ + var rank; /* index in bl_order */ + + //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); + //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, + // "too many codes"); + //Tracev((stderr, "\nbl counts: ")); + send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */ + send_bits(s, dcodes - 1, 5); + send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */ + for (rank = 0; rank < blcodes; rank++) { + //Tracev((stderr, "\nbl code %2d ", bl_order[rank])); + send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3); + } + //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); + + send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */ + //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); + + send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */ + //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); +} + + +/* =========================================================================== + * Check if the data type is TEXT or BINARY, using the following algorithm: + * - TEXT if the two conditions below are satisfied: + * a) There are no non-portable control characters belonging to the + * "black list" (0..6, 14..25, 28..31). + * b) There is at least one printable character belonging to the + * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). + * - BINARY otherwise. + * - The following partially-portable control characters form a + * "gray list" that is ignored in this detection algorithm: + * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). + * IN assertion: the fields Freq of dyn_ltree are set. + */ +function detect_data_type(s) { + /* black_mask is the bit mask of black-listed bytes + * set bits 0..6, 14..25, and 28..31 + * 0xf3ffc07f = binary 11110011111111111100000001111111 + */ + var black_mask = 0xf3ffc07f; + var n; + + /* Check for non-textual ("black-listed") bytes. */ + for (n = 0; n <= 31; n++, black_mask >>>= 1) { + if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) { + return Z_BINARY; + } + } + + /* Check for textual ("white-listed") bytes. */ + if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 || + s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) { + return Z_TEXT; + } + for (n = 32; n < LITERALS; n++) { + if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) { + return Z_TEXT; + } + } + + /* There are no "black-listed" or "white-listed" bytes: + * this stream either is empty or has tolerated ("gray-listed") bytes only. + */ + return Z_BINARY; +} + + +var static_init_done = false; + +/* =========================================================================== + * Initialize the tree data structures for a new zlib stream. + */ +function _tr_init(s) +{ + + if (!static_init_done) { + tr_static_init(); + static_init_done = true; + } + + s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc); + s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc); + s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc); + + s.bi_buf = 0; + s.bi_valid = 0; + + /* Initialize the first block of the first file: */ + init_block(s); +} + + +/* =========================================================================== + * Send a stored block + */ +function _tr_stored_block(s, buf, stored_len, last) +//DeflateState *s; +//charf *buf; /* input block */ +//ulg stored_len; /* length of input block */ +//int last; /* one if this is the last block for a file */ +{ + send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */ + copy_block(s, buf, stored_len, true); /* with header */ +} + + +/* =========================================================================== + * Send one empty static block to give enough lookahead for inflate. + * This takes 10 bits, of which 7 may remain in the bit buffer. + */ +function _tr_align(s) { + send_bits(s, STATIC_TREES << 1, 3); + send_code(s, END_BLOCK, static_ltree); + bi_flush(s); +} + + +/* =========================================================================== + * Determine the best encoding for the current block: dynamic trees, static + * trees or store, and output the encoded block to the zip file. + */ +function _tr_flush_block(s, buf, stored_len, last) +//DeflateState *s; +//charf *buf; /* input block, or NULL if too old */ +//ulg stored_len; /* length of input block */ +//int last; /* one if this is the last block for a file */ +{ + var opt_lenb, static_lenb; /* opt_len and static_len in bytes */ + var max_blindex = 0; /* index of last bit length code of non zero freq */ + + /* Build the Huffman trees unless a stored block is forced */ + if (s.level > 0) { + + /* Check if the file is binary or text */ + if (s.strm.data_type === Z_UNKNOWN) { + s.strm.data_type = detect_data_type(s); + } + + /* Construct the literal and distance trees */ + build_tree(s, s.l_desc); + // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, + // s->static_len)); + + build_tree(s, s.d_desc); + // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, + // s->static_len)); + /* At this point, opt_len and static_len are the total bit lengths of + * the compressed block data, excluding the tree representations. + */ + + /* Build the bit length tree for the above two trees, and get the index + * in bl_order of the last bit length code to send. + */ + max_blindex = build_bl_tree(s); + + /* Determine the best encoding. Compute the block lengths in bytes. */ + opt_lenb = (s.opt_len + 3 + 7) >>> 3; + static_lenb = (s.static_len + 3 + 7) >>> 3; + + // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", + // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, + // s->last_lit)); + + if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; } + + } else { + // Assert(buf != (char*)0, "lost buf"); + opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ + } + + if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) { + /* 4: two words for the lengths */ + + /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. + * Otherwise we can't have processed more than WSIZE input bytes since + * the last block flush, because compression would have been + * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to + * transform a block into a stored block. + */ + _tr_stored_block(s, buf, stored_len, last); + + } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) { + + send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3); + compress_block(s, static_ltree, static_dtree); + + } else { + send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3); + send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1); + compress_block(s, s.dyn_ltree, s.dyn_dtree); + } + // Assert (s->compressed_len == s->bits_sent, "bad compressed size"); + /* The above check is made mod 2^32, for files larger than 512 MB + * and uLong implemented on 32 bits. + */ + init_block(s); + + if (last) { + bi_windup(s); + } + // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, + // s->compressed_len-7*last)); +} + +/* =========================================================================== + * Save the match info and tally the frequency counts. Return true if + * the current block must be flushed. + */ +function _tr_tally(s, dist, lc) +// deflate_state *s; +// unsigned dist; /* distance of matched string */ +// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ +{ + //var out_length, in_length, dcode; + + s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff; + s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff; + + s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff; + s.last_lit++; + + if (dist === 0) { + /* lc is the unmatched char */ + s.dyn_ltree[lc * 2]/*.Freq*/++; + } else { + s.matches++; + /* Here, lc is the match length - MIN_MATCH */ + dist--; /* dist = match distance - 1 */ + //Assert((ush)dist < (ush)MAX_DIST(s) && + // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && + // (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); + + s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++; + s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++; + } + +// (!) This block is disabled in zlib defaults, +// don't enable it for binary compatibility + +//#ifdef TRUNCATE_BLOCK +// /* Try to guess if it is profitable to stop the current block here */ +// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) { +// /* Compute an upper bound for the compressed length */ +// out_length = s.last_lit*8; +// in_length = s.strstart - s.block_start; +// +// for (dcode = 0; dcode < D_CODES; dcode++) { +// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]); +// } +// out_length >>>= 3; +// //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", +// // s->last_lit, in_length, out_length, +// // 100L - out_length*100L/in_length)); +// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) { +// return true; +// } +// } +//#endif + + return (s.last_lit === s.lit_bufsize - 1); + /* We avoid equality with lit_bufsize because of wraparound at 64K + * on 16 bit machines and because stored blocks are restricted to + * 64K-1 bytes. + */ +} + +exports._tr_init = _tr_init; +exports._tr_stored_block = _tr_stored_block; +exports._tr_flush_block = _tr_flush_block; +exports._tr_tally = _tr_tally; +exports._tr_align = _tr_align; + +},{"../utils/common":3}],15:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +function ZStream() { + /* next input byte */ + this.input = null; // JS specific, because we have no pointers + this.next_in = 0; + /* number of bytes available at input */ + this.avail_in = 0; + /* total number of input bytes read so far */ + this.total_in = 0; + /* next output byte should be put there */ + this.output = null; // JS specific, because we have no pointers + this.next_out = 0; + /* remaining free space at output */ + this.avail_out = 0; + /* total number of bytes output so far */ + this.total_out = 0; + /* last error message, NULL if no error */ + this.msg = ''/*Z_NULL*/; + /* not visible by applications */ + this.state = null; + /* best guess about the data type: binary or text */ + this.data_type = 2/*Z_UNKNOWN*/; + /* adler32 value of the uncompressed data */ + this.adler = 0; +} + +module.exports = ZStream; + +},{}],"/":[function(require,module,exports){ +// Top level file is just a mixin of submodules & constants +'use strict'; + +var assign = require('./lib/utils/common').assign; + +var deflate = require('./lib/deflate'); +var inflate = require('./lib/inflate'); +var constants = require('./lib/zlib/constants'); + +var pako = {}; + +assign(pako, deflate, inflate, constants); + +module.exports = pako; + +},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/") +}); diff --git a/src/main/webapp/static/plugins/pako/1.0.11/pako.min.js b/src/main/webapp/static/plugins/pako/1.0.11/pako.min.js new file mode 100644 index 00000000..ba397319 --- /dev/null +++ b/src/main/webapp/static/plugins/pako/1.0.11/pako.min.js @@ -0,0 +1 @@ +!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=t()}}(function(){return function r(s,o,l){function h(e,t){if(!o[e]){if(!s[e]){var a="function"==typeof require&&require;if(!t&&a)return a(e,!0);if(d)return d(e,!0);var i=new Error("Cannot find module '"+e+"'");throw i.code="MODULE_NOT_FOUND",i}var n=o[e]={exports:{}};s[e][0].call(n.exports,function(t){return h(s[e][1][t]||t)},n,n.exports,r,s,o,l)}return o[e].exports}for(var d="function"==typeof require&&require,t=0;t>>6:(a<65536?e[r++]=224|a>>>12:(e[r++]=240|a>>>18,e[r++]=128|a>>>12&63),e[r++]=128|a>>>6&63),e[r++]=128|63&a);return e},a.buf2binstring=function(t){return d(t,t.length)},a.binstring2buf=function(t){for(var e=new l.Buf8(t.length),a=0,i=e.length;a>10&1023,o[i++]=56320|1023&n)}return d(o,i)},a.utf8border=function(t,e){var a;for((e=e||t.length)>t.length&&(e=t.length),a=e-1;0<=a&&128==(192&t[a]);)a--;return a<0?e:0===a?e:a+h[t[a]]>e?a:e}},{"./common":3}],5:[function(t,e,a){"use strict";e.exports=function(t,e,a,i){for(var n=65535&t|0,r=t>>>16&65535|0,s=0;0!==a;){for(a-=s=2e3>>1:t>>>1;e[a]=t}return e}();e.exports=function(t,e,a,i){var n=o,r=i+a;t^=-1;for(var s=i;s>>8^n[255&(t^e[s])];return-1^t}},{}],8:[function(t,e,a){"use strict";var l,_=t("../utils/common"),h=t("./trees"),u=t("./adler32"),c=t("./crc32"),i=t("./messages"),d=0,f=4,b=0,g=-2,m=-1,w=4,n=2,p=8,v=9,r=286,s=30,o=19,k=2*r+1,y=15,x=3,z=258,B=z+x+1,S=42,E=113,A=1,Z=2,R=3,C=4;function N(t,e){return t.msg=i[e],e}function O(t){return(t<<1)-(4t.avail_out&&(a=t.avail_out),0!==a&&(_.arraySet(t.output,e.pending_buf,e.pending_out,a,t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))}function U(t,e){h._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,I(t.strm)}function T(t,e){t.pending_buf[t.pending++]=e}function F(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function L(t,e){var a,i,n=t.max_chain_length,r=t.strstart,s=t.prev_length,o=t.nice_match,l=t.strstart>t.w_size-B?t.strstart-(t.w_size-B):0,h=t.window,d=t.w_mask,f=t.prev,_=t.strstart+z,u=h[r+s-1],c=h[r+s];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do{if(h[(a=e)+s]===c&&h[a+s-1]===u&&h[a]===h[r]&&h[++a]===h[r+1]){r+=2,a++;do{}while(h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&r<_);if(i=z-(_-r),r=_-z,sl&&0!=--n);return s<=t.lookahead?s:t.lookahead}function H(t){var e,a,i,n,r,s,o,l,h,d,f=t.w_size;do{if(n=t.window_size-t.lookahead-t.strstart,t.strstart>=f+(f-B)){for(_.arraySet(t.window,t.window,f,f,0),t.match_start-=f,t.strstart-=f,t.block_start-=f,e=a=t.hash_size;i=t.head[--e],t.head[e]=f<=i?i-f:0,--a;);for(e=a=f;i=t.prev[--e],t.prev[e]=f<=i?i-f:0,--a;);n+=f}if(0===t.strm.avail_in)break;if(s=t.strm,o=t.window,l=t.strstart+t.lookahead,h=n,d=void 0,d=s.avail_in,h=x)for(r=t.strstart-t.insert,t.ins_h=t.window[r],t.ins_h=(t.ins_h<=x&&(t.ins_h=(t.ins_h<=x)if(i=h._tr_tally(t,t.strstart-t.match_start,t.match_length-x),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=x){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<=x&&(t.ins_h=(t.ins_h<=x&&t.match_length<=t.prev_length){for(n=t.strstart+t.lookahead-x,i=h._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-x),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=n&&(t.ins_h=(t.ins_h<t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(H(t),0===t.lookahead&&e===d)return A;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+a;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,U(t,!1),0===t.strm.avail_out))return A;if(t.strstart-t.block_start>=t.w_size-B&&(U(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(U(t,!0),0===t.strm.avail_out?R:C):(t.strstart>t.block_start&&(U(t,!1),t.strm.avail_out),A)}),new M(4,4,8,4,j),new M(4,5,16,8,j),new M(4,6,32,32,j),new M(4,4,16,16,K),new M(8,16,32,32,K),new M(8,16,128,128,K),new M(8,32,128,256,K),new M(32,128,258,1024,K),new M(32,258,258,4096,K)],a.deflateInit=function(t,e){return G(t,e,p,15,8,0)},a.deflateInit2=G,a.deflateReset=q,a.deflateResetKeep=Y,a.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?g:(t.state.gzhead=e,b):g},a.deflate=function(t,e){var a,i,n,r;if(!t||!t.state||5>8&255),T(i,i.gzhead.time>>16&255),T(i,i.gzhead.time>>24&255),T(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),T(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(T(i,255&i.gzhead.extra.length),T(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=c(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(T(i,0),T(i,0),T(i,0),T(i,0),T(i,0),T(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),T(i,3),i.status=E);else{var s=p+(i.w_bits-8<<4)<<8;s|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(s|=32),s+=31-s%31,i.status=E,F(i,s),0!==i.strstart&&(F(i,t.adler>>>16),F(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>n&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),I(t),n=i.pending,i.pending!==i.pending_buf_size));)T(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),I(t),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}T(i,r=i.gzindexn&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),0===r&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),I(t),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}T(i,r=i.gzindexn&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),0===r&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&I(t),i.pending+2<=i.pending_buf_size&&(T(i,255&t.adler),T(i,t.adler>>8&255),t.adler=0,i.status=E)):i.status=E),0!==i.pending){if(I(t),0===t.avail_out)return i.last_flush=-1,b}else if(0===t.avail_in&&O(e)<=O(a)&&e!==f)return N(t,-5);if(666===i.status&&0!==t.avail_in)return N(t,-5);if(0!==t.avail_in||0!==i.lookahead||e!==d&&666!==i.status){var o=2===i.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(H(t),0===t.lookahead)){if(e===d)return A;break}if(t.match_length=0,a=h._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(U(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(U(t,!0),0===t.strm.avail_out?R:C):t.last_lit&&(U(t,!1),0===t.strm.avail_out)?A:Z}(i,e):3===i.strategy?function(t,e){for(var a,i,n,r,s=t.window;;){if(t.lookahead<=z){if(H(t),t.lookahead<=z&&e===d)return A;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=x&&0t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=x?(a=h._tr_tally(t,1,t.match_length-x),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=h._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(U(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(U(t,!0),0===t.strm.avail_out?R:C):t.last_lit&&(U(t,!1),0===t.strm.avail_out)?A:Z}(i,e):l[i.level].func(i,e);if(o!==R&&o!==C||(i.status=666),o===A||o===R)return 0===t.avail_out&&(i.last_flush=-1),b;if(o===Z&&(1===e?h._tr_align(i):5!==e&&(h._tr_stored_block(i,0,0,!1),3===e&&(D(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),I(t),0===t.avail_out))return i.last_flush=-1,b}return e!==f?b:i.wrap<=0?1:(2===i.wrap?(T(i,255&t.adler),T(i,t.adler>>8&255),T(i,t.adler>>16&255),T(i,t.adler>>24&255),T(i,255&t.total_in),T(i,t.total_in>>8&255),T(i,t.total_in>>16&255),T(i,t.total_in>>24&255)):(F(i,t.adler>>>16),F(i,65535&t.adler)),I(t),0=a.w_size&&(0===r&&(D(a.head),a.strstart=0,a.block_start=0,a.insert=0),h=new _.Buf8(a.w_size),_.arraySet(h,e,d-a.w_size,a.w_size,0),e=h,d=a.w_size),s=t.avail_in,o=t.next_in,l=t.input,t.avail_in=d,t.next_in=0,t.input=e,H(a);a.lookahead>=x;){for(i=a.strstart,n=a.lookahead-(x-1);a.ins_h=(a.ins_h<>>=v=p>>>24,c-=v,0===(v=p>>>16&255))S[r++]=65535&p;else{if(!(16&v)){if(0==(64&v)){p=b[(65535&p)+(u&(1<>>=v,c-=v),c<15&&(u+=B[i++]<>>=v=p>>>24,c-=v,!(16&(v=p>>>16&255))){if(0==(64&v)){p=g[(65535&p)+(u&(1<>>=v,c-=v,(v=r-s)>3,u&=(1<<(c-=k<<3))-1,t.next_in=i,t.next_out=r,t.avail_in=i>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function r(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Z.Buf16(320),this.work=new Z.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function s(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=F,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Z.Buf32(i),e.distcode=e.distdyn=new Z.Buf32(n),e.sane=1,e.back=-1,U):T}function o(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,s(t)):T}function l(t,e){var a,i;return t&&t.state?(i=t.state,e<0?(a=0,e=-e):(a=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15=r.wsize?(Z.arraySet(r.window,e,a-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):(i<(n=r.wsize-r.wnext)&&(n=i),Z.arraySet(r.window,e,a-i,n,r.wnext),(i-=n)?(Z.arraySet(r.window,e,a-i,i,0),r.wnext=i,r.whave=r.wsize):(r.wnext+=n,r.wnext===r.wsize&&(r.wnext=0),r.whave>>8&255,a.check=C(a.check,E,2,0),d=h=0,a.mode=2;break}if(a.flags=0,a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",a.mode=30;break}if(8!=(15&h)){t.msg="unknown compression method",a.mode=30;break}if(d-=4,y=8+(15&(h>>>=4)),0===a.wbits)a.wbits=y;else if(y>a.wbits){t.msg="invalid window size",a.mode=30;break}a.dmax=1<>8&1),512&a.flags&&(E[0]=255&h,E[1]=h>>>8&255,a.check=C(a.check,E,2,0)),d=h=0,a.mode=3;case 3:for(;d<32;){if(0===o)break t;o--,h+=i[r++]<>>8&255,E[2]=h>>>16&255,E[3]=h>>>24&255,a.check=C(a.check,E,4,0)),d=h=0,a.mode=4;case 4:for(;d<16;){if(0===o)break t;o--,h+=i[r++]<>8),512&a.flags&&(E[0]=255&h,E[1]=h>>>8&255,a.check=C(a.check,E,2,0)),d=h=0,a.mode=5;case 5:if(1024&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[r++]<>>8&255,a.check=C(a.check,E,2,0)),d=h=0}else a.head&&(a.head.extra=null);a.mode=6;case 6:if(1024&a.flags&&(o<(u=a.length)&&(u=o),u&&(a.head&&(y=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Array(a.head.extra_len)),Z.arraySet(a.head.extra,i,r,u,y)),512&a.flags&&(a.check=C(a.check,i,u,r)),o-=u,r+=u,a.length-=u),a.length))break t;a.length=0,a.mode=7;case 7:if(2048&a.flags){if(0===o)break t;for(u=0;y=i[r+u++],a.head&&y&&a.length<65536&&(a.head.name+=String.fromCharCode(y)),y&&u>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=12;break;case 10:for(;d<32;){if(0===o)break t;o--,h+=i[r++]<>>=7&d,d-=7&d,a.mode=27;break}for(;d<3;){if(0===o)break t;o--,h+=i[r++]<>>=1)){case 0:a.mode=14;break;case 1:if(H(a),a.mode=20,6!==e)break;h>>>=2,d-=2;break t;case 2:a.mode=17;break;case 3:t.msg="invalid block type",a.mode=30}h>>>=2,d-=2;break;case 14:for(h>>>=7&d,d-=7&d;d<32;){if(0===o)break t;o--,h+=i[r++]<>>16^65535)){t.msg="invalid stored block lengths",a.mode=30;break}if(a.length=65535&h,d=h=0,a.mode=15,6===e)break t;case 15:a.mode=16;case 16:if(u=a.length){if(o>>=5,d-=5,a.ndist=1+(31&h),h>>>=5,d-=5,a.ncode=4+(15&h),h>>>=4,d-=4,286>>=3,d-=3}for(;a.have<19;)a.lens[A[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,z={bits:a.lenbits},x=O(0,a.lens,0,19,a.lencode,0,a.work,z),a.lenbits=z.bits,x){t.msg="invalid code lengths set",a.mode=30;break}a.have=0,a.mode=19;case 19:for(;a.have>>16&255,w=65535&S,!((g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<>>=g,d-=g,a.lens[a.have++]=w;else{if(16===w){for(B=g+2;d>>=g,d-=g,0===a.have){t.msg="invalid bit length repeat",a.mode=30;break}y=a.lens[a.have-1],u=3+(3&h),h>>>=2,d-=2}else if(17===w){for(B=g+3;d>>=g)),h>>>=3,d-=3}else{for(B=g+7;d>>=g)),h>>>=7,d-=7}if(a.have+u>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=30;break}for(;u--;)a.lens[a.have++]=y}}if(30===a.mode)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=30;break}if(a.lenbits=9,z={bits:a.lenbits},x=O(D,a.lens,0,a.nlen,a.lencode,0,a.work,z),a.lenbits=z.bits,x){t.msg="invalid literal/lengths set",a.mode=30;break}if(a.distbits=6,a.distcode=a.distdyn,z={bits:a.distbits},x=O(I,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,z),a.distbits=z.bits,x){t.msg="invalid distances set",a.mode=30;break}if(a.mode=20,6===e)break t;case 20:a.mode=21;case 21:if(6<=o&&258<=l){t.next_out=s,t.avail_out=l,t.next_in=r,t.avail_in=o,a.hold=h,a.bits=d,N(t,_),s=t.next_out,n=t.output,l=t.avail_out,r=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,12===a.mode&&(a.back=-1);break}for(a.back=0;m=(S=a.lencode[h&(1<>>16&255,w=65535&S,!((g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<>p)])>>>16&255,w=65535&S,!(p+(g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<>>=p,d-=p,a.back+=p}if(h>>>=g,d-=g,a.back+=g,a.length=w,0===m){a.mode=26;break}if(32&m){a.back=-1,a.mode=12;break}if(64&m){t.msg="invalid literal/length code",a.mode=30;break}a.extra=15&m,a.mode=22;case 22:if(a.extra){for(B=a.extra;d>>=a.extra,d-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=23;case 23:for(;m=(S=a.distcode[h&(1<>>16&255,w=65535&S,!((g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<>p)])>>>16&255,w=65535&S,!(p+(g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<>>=p,d-=p,a.back+=p}if(h>>>=g,d-=g,a.back+=g,64&m){t.msg="invalid distance code",a.mode=30;break}a.offset=w,a.extra=15&m,a.mode=24;case 24:if(a.extra){for(B=a.extra;d>>=a.extra,d-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=30;break}a.mode=25;case 25:if(0===l)break t;if(u=_-l,a.offset>u){if((u=a.offset-u)>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=30;break}u>a.wnext?(u-=a.wnext,c=a.wsize-u):c=a.wnext-u,u>a.length&&(u=a.length),b=a.window}else b=n,c=s-a.offset,u=a.length;for(lu?(b=N[O+s[p]],g=A[Z+s[p]]):(b=96,g=0),l=1<>z)+(h-=l)]=c<<24|b<<16|g|0,0!==h;);for(l=1<>=1;if(0!==l?(E&=l-1,E+=l):E=0,p++,0==--R[w]){if(w===k)break;w=e[a+s[p]]}if(y>>7)]}function T(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function F(t,e,a){t.bi_valid>n-a?(t.bi_buf|=e<>n-t.bi_valid,t.bi_valid+=a-n):(t.bi_buf|=e<>>=1,a<<=1,0<--e;);return a>>>1}function j(t,e,a){var i,n,r=new Array(m+1),s=0;for(i=1;i<=m;i++)r[i]=s=s+a[i-1]<<1;for(n=0;n<=e;n++){var o=t[2*n+1];0!==o&&(t[2*n]=H(r[o]++,o))}}function K(t){var e;for(e=0;e<_;e++)t.dyn_ltree[2*e]=0;for(e=0;e>1;1<=a;a--)Y(t,r,a);for(n=l;a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],Y(t,r,1),i=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=i,r[2*n]=r[2*a]+r[2*i],t.depth[n]=(t.depth[a]>=t.depth[i]?t.depth[a]:t.depth[i])+1,r[2*a+1]=r[2*i+1]=n,t.heap[1]=n++,Y(t,r,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,i,n,r,s,o,l=e.dyn_tree,h=e.max_code,d=e.stat_desc.static_tree,f=e.stat_desc.has_stree,_=e.stat_desc.extra_bits,u=e.stat_desc.extra_base,c=e.stat_desc.max_length,b=0;for(r=0;r<=m;r++)t.bl_count[r]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a>=7;i>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return o;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return h;for(e=32;e>>3,(r=t.static_len+3+7>>>3)<=n&&(n=r)):n=r=a+5,a+4<=n&&-1!==e?Q(t,e,a,i):4===t.strategy||r===n?(F(t,2+(i?1:0),3),q(t,S,E)):(F(t,4+(i?1:0),3),function(t,e,a,i){var n;for(F(t,e-257,5),F(t,a-1,5),F(t,i-4,4),n=0;n>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(Z[a]+f+1)]++,t.dyn_dtree[2*U(e)]++),t.last_lit===t.lit_bufsize-1},a._tr_align=function(t){var e;F(t,2,3),L(t,w,S),16===(e=t).bi_valid?(T(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}},{"../utils/common":3}],15:[function(t,e,a){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],"/":[function(t,e,a){"use strict";var i={};(0,t("./lib/utils/common").assign)(i,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),e.exports=i},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")}); diff --git a/src/main/webapp/static/plugins/pako/1.0.11/pako_deflate.js b/src/main/webapp/static/plugins/pako/1.0.11/pako_deflate.js new file mode 100644 index 00000000..d6bbaa15 --- /dev/null +++ b/src/main/webapp/static/plugins/pako/1.0.11/pako_deflate.js @@ -0,0 +1,3997 @@ +/* pako 1.0.11 nodeca/pako */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.pako = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1); +} +_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start + + +// convert string to array (typed, when possible) +exports.string2buf = function (str) { + var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; + + // count binary size + for (m_pos = 0; m_pos < str_len; m_pos++) { + c = str.charCodeAt(m_pos); + if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { + c2 = str.charCodeAt(m_pos + 1); + if ((c2 & 0xfc00) === 0xdc00) { + c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); + m_pos++; + } + } + buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; + } + + // allocate buffer + buf = new utils.Buf8(buf_len); + + // convert + for (i = 0, m_pos = 0; i < buf_len; m_pos++) { + c = str.charCodeAt(m_pos); + if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { + c2 = str.charCodeAt(m_pos + 1); + if ((c2 & 0xfc00) === 0xdc00) { + c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); + m_pos++; + } + } + if (c < 0x80) { + /* one byte */ + buf[i++] = c; + } else if (c < 0x800) { + /* two bytes */ + buf[i++] = 0xC0 | (c >>> 6); + buf[i++] = 0x80 | (c & 0x3f); + } else if (c < 0x10000) { + /* three bytes */ + buf[i++] = 0xE0 | (c >>> 12); + buf[i++] = 0x80 | (c >>> 6 & 0x3f); + buf[i++] = 0x80 | (c & 0x3f); + } else { + /* four bytes */ + buf[i++] = 0xf0 | (c >>> 18); + buf[i++] = 0x80 | (c >>> 12 & 0x3f); + buf[i++] = 0x80 | (c >>> 6 & 0x3f); + buf[i++] = 0x80 | (c & 0x3f); + } + } + + return buf; +}; + +// Helper (used in 2 places) +function buf2binstring(buf, len) { + // On Chrome, the arguments in a function call that are allowed is `65534`. + // If the length of the buffer is smaller than that, we can use this optimization, + // otherwise we will take a slower path. + if (len < 65534) { + if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) { + return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); + } + } + + var result = ''; + for (var i = 0; i < len; i++) { + result += String.fromCharCode(buf[i]); + } + return result; +} + + +// Convert byte array to binary string +exports.buf2binstring = function (buf) { + return buf2binstring(buf, buf.length); +}; + + +// Convert binary string (typed, when possible) +exports.binstring2buf = function (str) { + var buf = new utils.Buf8(str.length); + for (var i = 0, len = buf.length; i < len; i++) { + buf[i] = str.charCodeAt(i); + } + return buf; +}; + + +// convert array to string +exports.buf2string = function (buf, max) { + var i, out, c, c_len; + var len = max || buf.length; + + // Reserve max possible length (2 words per char) + // NB: by unknown reasons, Array is significantly faster for + // String.fromCharCode.apply than Uint16Array. + var utf16buf = new Array(len * 2); + + for (out = 0, i = 0; i < len;) { + c = buf[i++]; + // quick process ascii + if (c < 0x80) { utf16buf[out++] = c; continue; } + + c_len = _utf8len[c]; + // skip 5 & 6 byte codes + if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; } + + // apply mask on first byte + c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; + // join the rest + while (c_len > 1 && i < len) { + c = (c << 6) | (buf[i++] & 0x3f); + c_len--; + } + + // terminated by end of string? + if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } + + if (c < 0x10000) { + utf16buf[out++] = c; + } else { + c -= 0x10000; + utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); + utf16buf[out++] = 0xdc00 | (c & 0x3ff); + } + } + + return buf2binstring(utf16buf, out); +}; + + +// Calculate max possible position in utf8 buffer, +// that will not break sequence. If that's not possible +// - (very small limits) return max size as is. +// +// buf[] - utf8 bytes array +// max - length limit (mandatory); +exports.utf8border = function (buf, max) { + var pos; + + max = max || buf.length; + if (max > buf.length) { max = buf.length; } + + // go back from last position, until start of sequence found + pos = max - 1; + while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } + + // Very small and broken sequence, + // return max, because we should return something anyway. + if (pos < 0) { return max; } + + // If we came to start of buffer - that means buffer is too small, + // return max too. + if (pos === 0) { return max; } + + return (pos + _utf8len[buf[pos]] > max) ? pos : max; +}; + +},{"./common":1}],3:[function(require,module,exports){ +'use strict'; + +// Note: adler32 takes 12% for level 0 and 2% for level 6. +// It isn't worth it to make additional optimizations as in original. +// Small size is preferable. + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +function adler32(adler, buf, len, pos) { + var s1 = (adler & 0xffff) |0, + s2 = ((adler >>> 16) & 0xffff) |0, + n = 0; + + while (len !== 0) { + // Set limit ~ twice less than 5552, to keep + // s2 in 31-bits, because we force signed ints. + // in other case %= will fail. + n = len > 2000 ? 2000 : len; + len -= n; + + do { + s1 = (s1 + buf[pos++]) |0; + s2 = (s2 + s1) |0; + } while (--n); + + s1 %= 65521; + s2 %= 65521; + } + + return (s1 | (s2 << 16)) |0; +} + + +module.exports = adler32; + +},{}],4:[function(require,module,exports){ +'use strict'; + +// Note: we can't get significant speed boost here. +// So write code to minimize size - no pregenerated tables +// and array tools dependencies. + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +// Use ordinary array, since untyped makes no boost here +function makeTable() { + var c, table = []; + + for (var n = 0; n < 256; n++) { + c = n; + for (var k = 0; k < 8; k++) { + c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); + } + table[n] = c; + } + + return table; +} + +// Create table on load. Just 255 signed longs. Not a problem. +var crcTable = makeTable(); + + +function crc32(crc, buf, len, pos) { + var t = crcTable, + end = pos + len; + + crc ^= -1; + + for (var i = pos; i < end; i++) { + crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; + } + + return (crc ^ (-1)); // >>> 0; +} + + +module.exports = crc32; + +},{}],5:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +var utils = require('../utils/common'); +var trees = require('./trees'); +var adler32 = require('./adler32'); +var crc32 = require('./crc32'); +var msg = require('./messages'); + +/* Public constants ==========================================================*/ +/* ===========================================================================*/ + + +/* Allowed flush values; see deflate() and inflate() below for details */ +var Z_NO_FLUSH = 0; +var Z_PARTIAL_FLUSH = 1; +//var Z_SYNC_FLUSH = 2; +var Z_FULL_FLUSH = 3; +var Z_FINISH = 4; +var Z_BLOCK = 5; +//var Z_TREES = 6; + + +/* Return codes for the compression/decompression functions. Negative values + * are errors, positive values are used for special but normal events. + */ +var Z_OK = 0; +var Z_STREAM_END = 1; +//var Z_NEED_DICT = 2; +//var Z_ERRNO = -1; +var Z_STREAM_ERROR = -2; +var Z_DATA_ERROR = -3; +//var Z_MEM_ERROR = -4; +var Z_BUF_ERROR = -5; +//var Z_VERSION_ERROR = -6; + + +/* compression levels */ +//var Z_NO_COMPRESSION = 0; +//var Z_BEST_SPEED = 1; +//var Z_BEST_COMPRESSION = 9; +var Z_DEFAULT_COMPRESSION = -1; + + +var Z_FILTERED = 1; +var Z_HUFFMAN_ONLY = 2; +var Z_RLE = 3; +var Z_FIXED = 4; +var Z_DEFAULT_STRATEGY = 0; + +/* Possible values of the data_type field (though see inflate()) */ +//var Z_BINARY = 0; +//var Z_TEXT = 1; +//var Z_ASCII = 1; // = Z_TEXT +var Z_UNKNOWN = 2; + + +/* The deflate compression method */ +var Z_DEFLATED = 8; + +/*============================================================================*/ + + +var MAX_MEM_LEVEL = 9; +/* Maximum value for memLevel in deflateInit2 */ +var MAX_WBITS = 15; +/* 32K LZ77 window */ +var DEF_MEM_LEVEL = 8; + + +var LENGTH_CODES = 29; +/* number of length codes, not counting the special END_BLOCK code */ +var LITERALS = 256; +/* number of literal bytes 0..255 */ +var L_CODES = LITERALS + 1 + LENGTH_CODES; +/* number of Literal or Length codes, including the END_BLOCK code */ +var D_CODES = 30; +/* number of distance codes */ +var BL_CODES = 19; +/* number of codes used to transfer the bit lengths */ +var HEAP_SIZE = 2 * L_CODES + 1; +/* maximum heap size */ +var MAX_BITS = 15; +/* All codes must not exceed MAX_BITS bits */ + +var MIN_MATCH = 3; +var MAX_MATCH = 258; +var MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1); + +var PRESET_DICT = 0x20; + +var INIT_STATE = 42; +var EXTRA_STATE = 69; +var NAME_STATE = 73; +var COMMENT_STATE = 91; +var HCRC_STATE = 103; +var BUSY_STATE = 113; +var FINISH_STATE = 666; + +var BS_NEED_MORE = 1; /* block not completed, need more input or more output */ +var BS_BLOCK_DONE = 2; /* block flush performed */ +var BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */ +var BS_FINISH_DONE = 4; /* finish done, accept no more input or output */ + +var OS_CODE = 0x03; // Unix :) . Don't detect, use this default. + +function err(strm, errorCode) { + strm.msg = msg[errorCode]; + return errorCode; +} + +function rank(f) { + return ((f) << 1) - ((f) > 4 ? 9 : 0); +} + +function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } + + +/* ========================================================================= + * Flush as much pending output as possible. All deflate() output goes + * through this function so some applications may wish to modify it + * to avoid allocating a large strm->output buffer and copying into it. + * (See also read_buf()). + */ +function flush_pending(strm) { + var s = strm.state; + + //_tr_flush_bits(s); + var len = s.pending; + if (len > strm.avail_out) { + len = strm.avail_out; + } + if (len === 0) { return; } + + utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out); + strm.next_out += len; + s.pending_out += len; + strm.total_out += len; + strm.avail_out -= len; + s.pending -= len; + if (s.pending === 0) { + s.pending_out = 0; + } +} + + +function flush_block_only(s, last) { + trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last); + s.block_start = s.strstart; + flush_pending(s.strm); +} + + +function put_byte(s, b) { + s.pending_buf[s.pending++] = b; +} + + +/* ========================================================================= + * Put a short in the pending buffer. The 16-bit value is put in MSB order. + * IN assertion: the stream state is correct and there is enough room in + * pending_buf. + */ +function putShortMSB(s, b) { +// put_byte(s, (Byte)(b >> 8)); +// put_byte(s, (Byte)(b & 0xff)); + s.pending_buf[s.pending++] = (b >>> 8) & 0xff; + s.pending_buf[s.pending++] = b & 0xff; +} + + +/* =========================================================================== + * Read a new buffer from the current input stream, update the adler32 + * and total number of bytes read. All deflate() input goes through + * this function so some applications may wish to modify it to avoid + * allocating a large strm->input buffer and copying from it. + * (See also flush_pending()). + */ +function read_buf(strm, buf, start, size) { + var len = strm.avail_in; + + if (len > size) { len = size; } + if (len === 0) { return 0; } + + strm.avail_in -= len; + + // zmemcpy(buf, strm->next_in, len); + utils.arraySet(buf, strm.input, strm.next_in, len, start); + if (strm.state.wrap === 1) { + strm.adler = adler32(strm.adler, buf, len, start); + } + + else if (strm.state.wrap === 2) { + strm.adler = crc32(strm.adler, buf, len, start); + } + + strm.next_in += len; + strm.total_in += len; + + return len; +} + + +/* =========================================================================== + * Set match_start to the longest match starting at the given string and + * return its length. Matches shorter or equal to prev_length are discarded, + * in which case the result is equal to prev_length and match_start is + * garbage. + * IN assertions: cur_match is the head of the hash chain for the current + * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 + * OUT assertion: the match length is not greater than s->lookahead. + */ +function longest_match(s, cur_match) { + var chain_length = s.max_chain_length; /* max hash chain length */ + var scan = s.strstart; /* current string */ + var match; /* matched string */ + var len; /* length of current match */ + var best_len = s.prev_length; /* best match length so far */ + var nice_match = s.nice_match; /* stop if match long enough */ + var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ? + s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/; + + var _win = s.window; // shortcut + + var wmask = s.w_mask; + var prev = s.prev; + + /* Stop when cur_match becomes <= limit. To simplify the code, + * we prevent matches with the string of window index 0. + */ + + var strend = s.strstart + MAX_MATCH; + var scan_end1 = _win[scan + best_len - 1]; + var scan_end = _win[scan + best_len]; + + /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. + * It is easy to get rid of this optimization if necessary. + */ + // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); + + /* Do not waste too much time if we already have a good match: */ + if (s.prev_length >= s.good_match) { + chain_length >>= 2; + } + /* Do not look for matches beyond the end of the input. This is necessary + * to make deflate deterministic. + */ + if (nice_match > s.lookahead) { nice_match = s.lookahead; } + + // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); + + do { + // Assert(cur_match < s->strstart, "no future"); + match = cur_match; + + /* Skip to next match if the match length cannot increase + * or if the match length is less than 2. Note that the checks below + * for insufficient lookahead only occur occasionally for performance + * reasons. Therefore uninitialized memory will be accessed, and + * conditional jumps will be made that depend on those values. + * However the length of the match is limited to the lookahead, so + * the output of deflate is not affected by the uninitialized values. + */ + + if (_win[match + best_len] !== scan_end || + _win[match + best_len - 1] !== scan_end1 || + _win[match] !== _win[scan] || + _win[++match] !== _win[scan + 1]) { + continue; + } + + /* The check at best_len-1 can be removed because it will be made + * again later. (This heuristic is not always a win.) + * It is not necessary to compare scan[2] and match[2] since they + * are always equal when the other bytes match, given that + * the hash keys are equal and that HASH_BITS >= 8. + */ + scan += 2; + match++; + // Assert(*scan == *match, "match[2]?"); + + /* We check for insufficient lookahead only every 8th comparison; + * the 256th check will be made at strstart+258. + */ + do { + /*jshint noempty:false*/ + } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && + _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && + _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && + _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && + scan < strend); + + // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); + + len = MAX_MATCH - (strend - scan); + scan = strend - MAX_MATCH; + + if (len > best_len) { + s.match_start = cur_match; + best_len = len; + if (len >= nice_match) { + break; + } + scan_end1 = _win[scan + best_len - 1]; + scan_end = _win[scan + best_len]; + } + } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0); + + if (best_len <= s.lookahead) { + return best_len; + } + return s.lookahead; +} + + +/* =========================================================================== + * Fill the window when the lookahead becomes insufficient. + * Updates strstart and lookahead. + * + * IN assertion: lookahead < MIN_LOOKAHEAD + * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD + * At least one byte has been read, or avail_in == 0; reads are + * performed for at least two bytes (required for the zip translate_eol + * option -- not supported here). + */ +function fill_window(s) { + var _w_size = s.w_size; + var p, n, m, more, str; + + //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); + + do { + more = s.window_size - s.lookahead - s.strstart; + + // JS ints have 32 bit, block below not needed + /* Deal with !@#$% 64K limit: */ + //if (sizeof(int) <= 2) { + // if (more == 0 && s->strstart == 0 && s->lookahead == 0) { + // more = wsize; + // + // } else if (more == (unsigned)(-1)) { + // /* Very unlikely, but possible on 16 bit machine if + // * strstart == 0 && lookahead == 1 (input done a byte at time) + // */ + // more--; + // } + //} + + + /* If the window is almost full and there is insufficient lookahead, + * move the upper half to the lower one to make room in the upper half. + */ + if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) { + + utils.arraySet(s.window, s.window, _w_size, _w_size, 0); + s.match_start -= _w_size; + s.strstart -= _w_size; + /* we now have strstart >= MAX_DIST */ + s.block_start -= _w_size; + + /* Slide the hash table (could be avoided with 32 bit values + at the expense of memory usage). We slide even when level == 0 + to keep the hash table consistent if we switch back to level > 0 + later. (Using level 0 permanently is not an optimal usage of + zlib, so we don't care about this pathological case.) + */ + + n = s.hash_size; + p = n; + do { + m = s.head[--p]; + s.head[p] = (m >= _w_size ? m - _w_size : 0); + } while (--n); + + n = _w_size; + p = n; + do { + m = s.prev[--p]; + s.prev[p] = (m >= _w_size ? m - _w_size : 0); + /* If n is not on any hash chain, prev[n] is garbage but + * its value will never be used. + */ + } while (--n); + + more += _w_size; + } + if (s.strm.avail_in === 0) { + break; + } + + /* If there was no sliding: + * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && + * more == window_size - lookahead - strstart + * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) + * => more >= window_size - 2*WSIZE + 2 + * In the BIG_MEM or MMAP case (not yet supported), + * window_size == input_size + MIN_LOOKAHEAD && + * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. + * Otherwise, window_size == 2*WSIZE so more >= 2. + * If there was sliding, more >= WSIZE. So in all cases, more >= 2. + */ + //Assert(more >= 2, "more < 2"); + n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more); + s.lookahead += n; + + /* Initialize the hash value now that we have some input: */ + if (s.lookahead + s.insert >= MIN_MATCH) { + str = s.strstart - s.insert; + s.ins_h = s.window[str]; + + /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask; +//#if MIN_MATCH != 3 +// Call update_hash() MIN_MATCH-3 more times +//#endif + while (s.insert) { + /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; + + s.prev[str & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = str; + str++; + s.insert--; + if (s.lookahead + s.insert < MIN_MATCH) { + break; + } + } + } + /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, + * but this is not important since only literal bytes will be emitted. + */ + + } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0); + + /* If the WIN_INIT bytes after the end of the current data have never been + * written, then zero those bytes in order to avoid memory check reports of + * the use of uninitialized (or uninitialised as Julian writes) bytes by + * the longest match routines. Update the high water mark for the next + * time through here. WIN_INIT is set to MAX_MATCH since the longest match + * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. + */ +// if (s.high_water < s.window_size) { +// var curr = s.strstart + s.lookahead; +// var init = 0; +// +// if (s.high_water < curr) { +// /* Previous high water mark below current data -- zero WIN_INIT +// * bytes or up to end of window, whichever is less. +// */ +// init = s.window_size - curr; +// if (init > WIN_INIT) +// init = WIN_INIT; +// zmemzero(s->window + curr, (unsigned)init); +// s->high_water = curr + init; +// } +// else if (s->high_water < (ulg)curr + WIN_INIT) { +// /* High water mark at or above current data, but below current data +// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up +// * to end of window, whichever is less. +// */ +// init = (ulg)curr + WIN_INIT - s->high_water; +// if (init > s->window_size - s->high_water) +// init = s->window_size - s->high_water; +// zmemzero(s->window + s->high_water, (unsigned)init); +// s->high_water += init; +// } +// } +// +// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, +// "not enough room for search"); +} + +/* =========================================================================== + * Copy without compression as much as possible from the input stream, return + * the current block state. + * This function does not insert new strings in the dictionary since + * uncompressible data is probably not useful. This function is used + * only for the level=0 compression option. + * NOTE: this function should be optimized to avoid extra copying from + * window to pending_buf. + */ +function deflate_stored(s, flush) { + /* Stored blocks are limited to 0xffff bytes, pending_buf is limited + * to pending_buf_size, and each stored block has a 5 byte header: + */ + var max_block_size = 0xffff; + + if (max_block_size > s.pending_buf_size - 5) { + max_block_size = s.pending_buf_size - 5; + } + + /* Copy as much as possible from input to output: */ + for (;;) { + /* Fill the window as much as possible: */ + if (s.lookahead <= 1) { + + //Assert(s->strstart < s->w_size+MAX_DIST(s) || + // s->block_start >= (long)s->w_size, "slide too late"); +// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) || +// s.block_start >= s.w_size)) { +// throw new Error("slide too late"); +// } + + fill_window(s); + if (s.lookahead === 0 && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + + if (s.lookahead === 0) { + break; + } + /* flush the current block */ + } + //Assert(s->block_start >= 0L, "block gone"); +// if (s.block_start < 0) throw new Error("block gone"); + + s.strstart += s.lookahead; + s.lookahead = 0; + + /* Emit a stored block if pending_buf will be full: */ + var max_start = s.block_start + max_block_size; + + if (s.strstart === 0 || s.strstart >= max_start) { + /* strstart == 0 is possible when wraparound on 16-bit machine */ + s.lookahead = s.strstart - max_start; + s.strstart = max_start; + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + + + } + /* Flush if we may have to slide, otherwise block_start may become + * negative and the data will be gone: + */ + if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + } + + s.insert = 0; + + if (flush === Z_FINISH) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + + if (s.strstart > s.block_start) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + + return BS_NEED_MORE; +} + +/* =========================================================================== + * Compress as much as possible from the input stream, return the current + * block state. + * This function does not perform lazy evaluation of matches and inserts + * new strings in the dictionary only for unmatched strings or for short + * matches. It is used only for the fast compression options. + */ +function deflate_fast(s, flush) { + var hash_head; /* head of the hash chain */ + var bflush; /* set if current block must be flushed */ + + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the next match, plus MIN_MATCH bytes to insert the + * string following the next match. + */ + if (s.lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { + break; /* flush the current block */ + } + } + + /* Insert the string window[strstart .. strstart+2] in the + * dictionary, and set hash_head to the head of the hash chain: + */ + hash_head = 0/*NIL*/; + if (s.lookahead >= MIN_MATCH) { + /*** INSERT_STRING(s, s.strstart, hash_head); ***/ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + /***/ + } + + /* Find the longest match, discarding those <= prev_length. + * At this point we have always match_length < MIN_MATCH + */ + if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) { + /* To simplify the code, we prevent matches with the string + * of window index 0 (in particular we have to avoid a match + * of the string with itself at the start of the input file). + */ + s.match_length = longest_match(s, hash_head); + /* longest_match() sets match_start */ + } + if (s.match_length >= MIN_MATCH) { + // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only + + /*** _tr_tally_dist(s, s.strstart - s.match_start, + s.match_length - MIN_MATCH, bflush); ***/ + bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH); + + s.lookahead -= s.match_length; + + /* Insert new strings in the hash table only if the match length + * is not too large. This saves time but degrades compression. + */ + if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) { + s.match_length--; /* string at strstart already in table */ + do { + s.strstart++; + /*** INSERT_STRING(s, s.strstart, hash_head); ***/ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + /***/ + /* strstart never exceeds WSIZE-MAX_MATCH, so there are + * always MIN_MATCH bytes ahead. + */ + } while (--s.match_length !== 0); + s.strstart++; + } else + { + s.strstart += s.match_length; + s.match_length = 0; + s.ins_h = s.window[s.strstart]; + /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask; + +//#if MIN_MATCH != 3 +// Call UPDATE_HASH() MIN_MATCH-3 more times +//#endif + /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not + * matter since it will be recomputed at next deflate call. + */ + } + } else { + /* No match, output a literal byte */ + //Tracevv((stderr,"%c", s.window[s.strstart])); + /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ + bflush = trees._tr_tally(s, 0, s.window[s.strstart]); + + s.lookahead--; + s.strstart++; + } + if (bflush) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + } + s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1); + if (flush === Z_FINISH) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + if (s.last_lit) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + return BS_BLOCK_DONE; +} + +/* =========================================================================== + * Same as above, but achieves better compression. We use a lazy + * evaluation for matches: a match is finally adopted only if there is + * no better match at the next window position. + */ +function deflate_slow(s, flush) { + var hash_head; /* head of hash chain */ + var bflush; /* set if current block must be flushed */ + + var max_insert; + + /* Process the input block. */ + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the next match, plus MIN_MATCH bytes to insert the + * string following the next match. + */ + if (s.lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { break; } /* flush the current block */ + } + + /* Insert the string window[strstart .. strstart+2] in the + * dictionary, and set hash_head to the head of the hash chain: + */ + hash_head = 0/*NIL*/; + if (s.lookahead >= MIN_MATCH) { + /*** INSERT_STRING(s, s.strstart, hash_head); ***/ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + /***/ + } + + /* Find the longest match, discarding those <= prev_length. + */ + s.prev_length = s.match_length; + s.prev_match = s.match_start; + s.match_length = MIN_MATCH - 1; + + if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match && + s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) { + /* To simplify the code, we prevent matches with the string + * of window index 0 (in particular we have to avoid a match + * of the string with itself at the start of the input file). + */ + s.match_length = longest_match(s, hash_head); + /* longest_match() sets match_start */ + + if (s.match_length <= 5 && + (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) { + + /* If prev_match is also MIN_MATCH, match_start is garbage + * but we will ignore the current match anyway. + */ + s.match_length = MIN_MATCH - 1; + } + } + /* If there was a match at the previous step and the current + * match is not better, output the previous match: + */ + if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) { + max_insert = s.strstart + s.lookahead - MIN_MATCH; + /* Do not insert strings in hash table beyond this. */ + + //check_match(s, s.strstart-1, s.prev_match, s.prev_length); + + /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match, + s.prev_length - MIN_MATCH, bflush);***/ + bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH); + /* Insert in hash table all strings up to the end of the match. + * strstart-1 and strstart are already inserted. If there is not + * enough lookahead, the last two strings are not inserted in + * the hash table. + */ + s.lookahead -= s.prev_length - 1; + s.prev_length -= 2; + do { + if (++s.strstart <= max_insert) { + /*** INSERT_STRING(s, s.strstart, hash_head); ***/ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + /***/ + } + } while (--s.prev_length !== 0); + s.match_available = 0; + s.match_length = MIN_MATCH - 1; + s.strstart++; + + if (bflush) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + + } else if (s.match_available) { + /* If there was no match at the previous position, output a + * single literal. If there was a match but the current match + * is longer, truncate the previous match to a single literal. + */ + //Tracevv((stderr,"%c", s->window[s->strstart-1])); + /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ + bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); + + if (bflush) { + /*** FLUSH_BLOCK_ONLY(s, 0) ***/ + flush_block_only(s, false); + /***/ + } + s.strstart++; + s.lookahead--; + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } else { + /* There is no previous match to compare with, wait for + * the next step to decide. + */ + s.match_available = 1; + s.strstart++; + s.lookahead--; + } + } + //Assert (flush != Z_NO_FLUSH, "no flush?"); + if (s.match_available) { + //Tracevv((stderr,"%c", s->window[s->strstart-1])); + /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ + bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); + + s.match_available = 0; + } + s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1; + if (flush === Z_FINISH) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + if (s.last_lit) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + + return BS_BLOCK_DONE; +} + + +/* =========================================================================== + * For Z_RLE, simply look for runs of bytes, generate matches only of distance + * one. Do not maintain a hash table. (It will be regenerated if this run of + * deflate switches away from Z_RLE.) + */ +function deflate_rle(s, flush) { + var bflush; /* set if current block must be flushed */ + var prev; /* byte at distance one to match */ + var scan, strend; /* scan goes up to strend for length of run */ + + var _win = s.window; + + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the longest run, plus one for the unrolled loop. + */ + if (s.lookahead <= MAX_MATCH) { + fill_window(s); + if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { break; } /* flush the current block */ + } + + /* See how many times the previous byte repeats */ + s.match_length = 0; + if (s.lookahead >= MIN_MATCH && s.strstart > 0) { + scan = s.strstart - 1; + prev = _win[scan]; + if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) { + strend = s.strstart + MAX_MATCH; + do { + /*jshint noempty:false*/ + } while (prev === _win[++scan] && prev === _win[++scan] && + prev === _win[++scan] && prev === _win[++scan] && + prev === _win[++scan] && prev === _win[++scan] && + prev === _win[++scan] && prev === _win[++scan] && + scan < strend); + s.match_length = MAX_MATCH - (strend - scan); + if (s.match_length > s.lookahead) { + s.match_length = s.lookahead; + } + } + //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan"); + } + + /* Emit match if have run of MIN_MATCH or longer, else emit literal */ + if (s.match_length >= MIN_MATCH) { + //check_match(s, s.strstart, s.strstart - 1, s.match_length); + + /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/ + bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH); + + s.lookahead -= s.match_length; + s.strstart += s.match_length; + s.match_length = 0; + } else { + /* No match, output a literal byte */ + //Tracevv((stderr,"%c", s->window[s->strstart])); + /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ + bflush = trees._tr_tally(s, 0, s.window[s.strstart]); + + s.lookahead--; + s.strstart++; + } + if (bflush) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + } + s.insert = 0; + if (flush === Z_FINISH) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + if (s.last_lit) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + return BS_BLOCK_DONE; +} + +/* =========================================================================== + * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. + * (It will be regenerated if this run of deflate switches away from Huffman.) + */ +function deflate_huff(s, flush) { + var bflush; /* set if current block must be flushed */ + + for (;;) { + /* Make sure that we have a literal to write. */ + if (s.lookahead === 0) { + fill_window(s); + if (s.lookahead === 0) { + if (flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + break; /* flush the current block */ + } + } + + /* Output a literal byte */ + s.match_length = 0; + //Tracevv((stderr,"%c", s->window[s->strstart])); + /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ + bflush = trees._tr_tally(s, 0, s.window[s.strstart]); + s.lookahead--; + s.strstart++; + if (bflush) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + } + s.insert = 0; + if (flush === Z_FINISH) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + if (s.last_lit) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + return BS_BLOCK_DONE; +} + +/* Values for max_lazy_match, good_match and max_chain_length, depending on + * the desired pack level (0..9). The values given below have been tuned to + * exclude worst case performance for pathological files. Better values may be + * found for specific files. + */ +function Config(good_length, max_lazy, nice_length, max_chain, func) { + this.good_length = good_length; + this.max_lazy = max_lazy; + this.nice_length = nice_length; + this.max_chain = max_chain; + this.func = func; +} + +var configuration_table; + +configuration_table = [ + /* good lazy nice chain */ + new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */ + new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */ + new Config(4, 5, 16, 8, deflate_fast), /* 2 */ + new Config(4, 6, 32, 32, deflate_fast), /* 3 */ + + new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */ + new Config(8, 16, 32, 32, deflate_slow), /* 5 */ + new Config(8, 16, 128, 128, deflate_slow), /* 6 */ + new Config(8, 32, 128, 256, deflate_slow), /* 7 */ + new Config(32, 128, 258, 1024, deflate_slow), /* 8 */ + new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */ +]; + + +/* =========================================================================== + * Initialize the "longest match" routines for a new zlib stream + */ +function lm_init(s) { + s.window_size = 2 * s.w_size; + + /*** CLEAR_HASH(s); ***/ + zero(s.head); // Fill with NIL (= 0); + + /* Set the default configuration parameters: + */ + s.max_lazy_match = configuration_table[s.level].max_lazy; + s.good_match = configuration_table[s.level].good_length; + s.nice_match = configuration_table[s.level].nice_length; + s.max_chain_length = configuration_table[s.level].max_chain; + + s.strstart = 0; + s.block_start = 0; + s.lookahead = 0; + s.insert = 0; + s.match_length = s.prev_length = MIN_MATCH - 1; + s.match_available = 0; + s.ins_h = 0; +} + + +function DeflateState() { + this.strm = null; /* pointer back to this zlib stream */ + this.status = 0; /* as the name implies */ + this.pending_buf = null; /* output still pending */ + this.pending_buf_size = 0; /* size of pending_buf */ + this.pending_out = 0; /* next pending byte to output to the stream */ + this.pending = 0; /* nb of bytes in the pending buffer */ + this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ + this.gzhead = null; /* gzip header information to write */ + this.gzindex = 0; /* where in extra, name, or comment */ + this.method = Z_DEFLATED; /* can only be DEFLATED */ + this.last_flush = -1; /* value of flush param for previous deflate call */ + + this.w_size = 0; /* LZ77 window size (32K by default) */ + this.w_bits = 0; /* log2(w_size) (8..16) */ + this.w_mask = 0; /* w_size - 1 */ + + this.window = null; + /* Sliding window. Input bytes are read into the second half of the window, + * and move to the first half later to keep a dictionary of at least wSize + * bytes. With this organization, matches are limited to a distance of + * wSize-MAX_MATCH bytes, but this ensures that IO is always + * performed with a length multiple of the block size. + */ + + this.window_size = 0; + /* Actual size of window: 2*wSize, except when the user input buffer + * is directly used as sliding window. + */ + + this.prev = null; + /* Link to older string with same hash index. To limit the size of this + * array to 64K, this link is maintained only for the last 32K strings. + * An index in this array is thus a window index modulo 32K. + */ + + this.head = null; /* Heads of the hash chains or NIL. */ + + this.ins_h = 0; /* hash index of string to be inserted */ + this.hash_size = 0; /* number of elements in hash table */ + this.hash_bits = 0; /* log2(hash_size) */ + this.hash_mask = 0; /* hash_size-1 */ + + this.hash_shift = 0; + /* Number of bits by which ins_h must be shifted at each input + * step. It must be such that after MIN_MATCH steps, the oldest + * byte no longer takes part in the hash key, that is: + * hash_shift * MIN_MATCH >= hash_bits + */ + + this.block_start = 0; + /* Window position at the beginning of the current output block. Gets + * negative when the window is moved backwards. + */ + + this.match_length = 0; /* length of best match */ + this.prev_match = 0; /* previous match */ + this.match_available = 0; /* set if previous match exists */ + this.strstart = 0; /* start of string to insert */ + this.match_start = 0; /* start of matching string */ + this.lookahead = 0; /* number of valid bytes ahead in window */ + + this.prev_length = 0; + /* Length of the best match at previous step. Matches not greater than this + * are discarded. This is used in the lazy match evaluation. + */ + + this.max_chain_length = 0; + /* To speed up deflation, hash chains are never searched beyond this + * length. A higher limit improves compression ratio but degrades the + * speed. + */ + + this.max_lazy_match = 0; + /* Attempt to find a better match only when the current match is strictly + * smaller than this value. This mechanism is used only for compression + * levels >= 4. + */ + // That's alias to max_lazy_match, don't use directly + //this.max_insert_length = 0; + /* Insert new strings in the hash table only if the match length is not + * greater than this length. This saves time but degrades compression. + * max_insert_length is used only for compression levels <= 3. + */ + + this.level = 0; /* compression level (1..9) */ + this.strategy = 0; /* favor or force Huffman coding*/ + + this.good_match = 0; + /* Use a faster search when the previous match is longer than this */ + + this.nice_match = 0; /* Stop searching when current match exceeds this */ + + /* used by trees.c: */ + + /* Didn't use ct_data typedef below to suppress compiler warning */ + + // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ + // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ + // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ + + // Use flat array of DOUBLE size, with interleaved fata, + // because JS does not support effective + this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2); + this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2); + this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2); + zero(this.dyn_ltree); + zero(this.dyn_dtree); + zero(this.bl_tree); + + this.l_desc = null; /* desc. for literal tree */ + this.d_desc = null; /* desc. for distance tree */ + this.bl_desc = null; /* desc. for bit length tree */ + + //ush bl_count[MAX_BITS+1]; + this.bl_count = new utils.Buf16(MAX_BITS + 1); + /* number of codes at each bit length for an optimal tree */ + + //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ + this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */ + zero(this.heap); + + this.heap_len = 0; /* number of elements in the heap */ + this.heap_max = 0; /* element of largest frequency */ + /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. + * The same heap array is used to build all trees. + */ + + this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1]; + zero(this.depth); + /* Depth of each subtree used as tie breaker for trees of equal frequency + */ + + this.l_buf = 0; /* buffer index for literals or lengths */ + + this.lit_bufsize = 0; + /* Size of match buffer for literals/lengths. There are 4 reasons for + * limiting lit_bufsize to 64K: + * - frequencies can be kept in 16 bit counters + * - if compression is not successful for the first block, all input + * data is still in the window so we can still emit a stored block even + * when input comes from standard input. (This can also be done for + * all blocks if lit_bufsize is not greater than 32K.) + * - if compression is not successful for a file smaller than 64K, we can + * even emit a stored file instead of a stored block (saving 5 bytes). + * This is applicable only for zip (not gzip or zlib). + * - creating new Huffman trees less frequently may not provide fast + * adaptation to changes in the input data statistics. (Take for + * example a binary file with poorly compressible code followed by + * a highly compressible string table.) Smaller buffer sizes give + * fast adaptation but have of course the overhead of transmitting + * trees more frequently. + * - I can't count above 4 + */ + + this.last_lit = 0; /* running index in l_buf */ + + this.d_buf = 0; + /* Buffer index for distances. To simplify the code, d_buf and l_buf have + * the same number of elements. To use different lengths, an extra flag + * array would be necessary. + */ + + this.opt_len = 0; /* bit length of current block with optimal trees */ + this.static_len = 0; /* bit length of current block with static trees */ + this.matches = 0; /* number of string matches in current block */ + this.insert = 0; /* bytes at end of window left to insert */ + + + this.bi_buf = 0; + /* Output buffer. bits are inserted starting at the bottom (least + * significant bits). + */ + this.bi_valid = 0; + /* Number of valid bits in bi_buf. All bits above the last valid bit + * are always zero. + */ + + // Used for window memory init. We safely ignore it for JS. That makes + // sense only for pointers and memory check tools. + //this.high_water = 0; + /* High water mark offset in window for initialized bytes -- bytes above + * this are set to zero in order to avoid memory check warnings when + * longest match routines access bytes past the input. This is then + * updated to the new high water mark. + */ +} + + +function deflateResetKeep(strm) { + var s; + + if (!strm || !strm.state) { + return err(strm, Z_STREAM_ERROR); + } + + strm.total_in = strm.total_out = 0; + strm.data_type = Z_UNKNOWN; + + s = strm.state; + s.pending = 0; + s.pending_out = 0; + + if (s.wrap < 0) { + s.wrap = -s.wrap; + /* was made negative by deflate(..., Z_FINISH); */ + } + s.status = (s.wrap ? INIT_STATE : BUSY_STATE); + strm.adler = (s.wrap === 2) ? + 0 // crc32(0, Z_NULL, 0) + : + 1; // adler32(0, Z_NULL, 0) + s.last_flush = Z_NO_FLUSH; + trees._tr_init(s); + return Z_OK; +} + + +function deflateReset(strm) { + var ret = deflateResetKeep(strm); + if (ret === Z_OK) { + lm_init(strm.state); + } + return ret; +} + + +function deflateSetHeader(strm, head) { + if (!strm || !strm.state) { return Z_STREAM_ERROR; } + if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; } + strm.state.gzhead = head; + return Z_OK; +} + + +function deflateInit2(strm, level, method, windowBits, memLevel, strategy) { + if (!strm) { // === Z_NULL + return Z_STREAM_ERROR; + } + var wrap = 1; + + if (level === Z_DEFAULT_COMPRESSION) { + level = 6; + } + + if (windowBits < 0) { /* suppress zlib wrapper */ + wrap = 0; + windowBits = -windowBits; + } + + else if (windowBits > 15) { + wrap = 2; /* write gzip wrapper instead */ + windowBits -= 16; + } + + + if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || + windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || + strategy < 0 || strategy > Z_FIXED) { + return err(strm, Z_STREAM_ERROR); + } + + + if (windowBits === 8) { + windowBits = 9; + } + /* until 256-byte window bug fixed */ + + var s = new DeflateState(); + + strm.state = s; + s.strm = strm; + + s.wrap = wrap; + s.gzhead = null; + s.w_bits = windowBits; + s.w_size = 1 << s.w_bits; + s.w_mask = s.w_size - 1; + + s.hash_bits = memLevel + 7; + s.hash_size = 1 << s.hash_bits; + s.hash_mask = s.hash_size - 1; + s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH); + + s.window = new utils.Buf8(s.w_size * 2); + s.head = new utils.Buf16(s.hash_size); + s.prev = new utils.Buf16(s.w_size); + + // Don't need mem init magic for JS. + //s.high_water = 0; /* nothing written to s->window yet */ + + s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ + + s.pending_buf_size = s.lit_bufsize * 4; + + //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); + //s->pending_buf = (uchf *) overlay; + s.pending_buf = new utils.Buf8(s.pending_buf_size); + + // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`) + //s->d_buf = overlay + s->lit_bufsize/sizeof(ush); + s.d_buf = 1 * s.lit_bufsize; + + //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; + s.l_buf = (1 + 2) * s.lit_bufsize; + + s.level = level; + s.strategy = strategy; + s.method = method; + + return deflateReset(strm); +} + +function deflateInit(strm, level) { + return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY); +} + + +function deflate(strm, flush) { + var old_flush, s; + var beg, val; // for gzip header write only + + if (!strm || !strm.state || + flush > Z_BLOCK || flush < 0) { + return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR; + } + + s = strm.state; + + if (!strm.output || + (!strm.input && strm.avail_in !== 0) || + (s.status === FINISH_STATE && flush !== Z_FINISH)) { + return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR); + } + + s.strm = strm; /* just in case */ + old_flush = s.last_flush; + s.last_flush = flush; + + /* Write the header */ + if (s.status === INIT_STATE) { + + if (s.wrap === 2) { // GZIP header + strm.adler = 0; //crc32(0L, Z_NULL, 0); + put_byte(s, 31); + put_byte(s, 139); + put_byte(s, 8); + if (!s.gzhead) { // s->gzhead == Z_NULL + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, s.level === 9 ? 2 : + (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? + 4 : 0)); + put_byte(s, OS_CODE); + s.status = BUSY_STATE; + } + else { + put_byte(s, (s.gzhead.text ? 1 : 0) + + (s.gzhead.hcrc ? 2 : 0) + + (!s.gzhead.extra ? 0 : 4) + + (!s.gzhead.name ? 0 : 8) + + (!s.gzhead.comment ? 0 : 16) + ); + put_byte(s, s.gzhead.time & 0xff); + put_byte(s, (s.gzhead.time >> 8) & 0xff); + put_byte(s, (s.gzhead.time >> 16) & 0xff); + put_byte(s, (s.gzhead.time >> 24) & 0xff); + put_byte(s, s.level === 9 ? 2 : + (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? + 4 : 0)); + put_byte(s, s.gzhead.os & 0xff); + if (s.gzhead.extra && s.gzhead.extra.length) { + put_byte(s, s.gzhead.extra.length & 0xff); + put_byte(s, (s.gzhead.extra.length >> 8) & 0xff); + } + if (s.gzhead.hcrc) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0); + } + s.gzindex = 0; + s.status = EXTRA_STATE; + } + } + else // DEFLATE header + { + var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8; + var level_flags = -1; + + if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) { + level_flags = 0; + } else if (s.level < 6) { + level_flags = 1; + } else if (s.level === 6) { + level_flags = 2; + } else { + level_flags = 3; + } + header |= (level_flags << 6); + if (s.strstart !== 0) { header |= PRESET_DICT; } + header += 31 - (header % 31); + + s.status = BUSY_STATE; + putShortMSB(s, header); + + /* Save the adler32 of the preset dictionary: */ + if (s.strstart !== 0) { + putShortMSB(s, strm.adler >>> 16); + putShortMSB(s, strm.adler & 0xffff); + } + strm.adler = 1; // adler32(0L, Z_NULL, 0); + } + } + +//#ifdef GZIP + if (s.status === EXTRA_STATE) { + if (s.gzhead.extra/* != Z_NULL*/) { + beg = s.pending; /* start of bytes to update crc */ + + while (s.gzindex < (s.gzhead.extra.length & 0xffff)) { + if (s.pending === s.pending_buf_size) { + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + flush_pending(strm); + beg = s.pending; + if (s.pending === s.pending_buf_size) { + break; + } + } + put_byte(s, s.gzhead.extra[s.gzindex] & 0xff); + s.gzindex++; + } + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + if (s.gzindex === s.gzhead.extra.length) { + s.gzindex = 0; + s.status = NAME_STATE; + } + } + else { + s.status = NAME_STATE; + } + } + if (s.status === NAME_STATE) { + if (s.gzhead.name/* != Z_NULL*/) { + beg = s.pending; /* start of bytes to update crc */ + //int val; + + do { + if (s.pending === s.pending_buf_size) { + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + flush_pending(strm); + beg = s.pending; + if (s.pending === s.pending_buf_size) { + val = 1; + break; + } + } + // JS specific: little magic to add zero terminator to end of string + if (s.gzindex < s.gzhead.name.length) { + val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff; + } else { + val = 0; + } + put_byte(s, val); + } while (val !== 0); + + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + if (val === 0) { + s.gzindex = 0; + s.status = COMMENT_STATE; + } + } + else { + s.status = COMMENT_STATE; + } + } + if (s.status === COMMENT_STATE) { + if (s.gzhead.comment/* != Z_NULL*/) { + beg = s.pending; /* start of bytes to update crc */ + //int val; + + do { + if (s.pending === s.pending_buf_size) { + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + flush_pending(strm); + beg = s.pending; + if (s.pending === s.pending_buf_size) { + val = 1; + break; + } + } + // JS specific: little magic to add zero terminator to end of string + if (s.gzindex < s.gzhead.comment.length) { + val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff; + } else { + val = 0; + } + put_byte(s, val); + } while (val !== 0); + + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + if (val === 0) { + s.status = HCRC_STATE; + } + } + else { + s.status = HCRC_STATE; + } + } + if (s.status === HCRC_STATE) { + if (s.gzhead.hcrc) { + if (s.pending + 2 > s.pending_buf_size) { + flush_pending(strm); + } + if (s.pending + 2 <= s.pending_buf_size) { + put_byte(s, strm.adler & 0xff); + put_byte(s, (strm.adler >> 8) & 0xff); + strm.adler = 0; //crc32(0L, Z_NULL, 0); + s.status = BUSY_STATE; + } + } + else { + s.status = BUSY_STATE; + } + } +//#endif + + /* Flush as much pending output as possible */ + if (s.pending !== 0) { + flush_pending(strm); + if (strm.avail_out === 0) { + /* Since avail_out is 0, deflate will be called again with + * more output space, but possibly with both pending and + * avail_in equal to zero. There won't be anything to do, + * but this is not an error situation so make sure we + * return OK instead of BUF_ERROR at next call of deflate: + */ + s.last_flush = -1; + return Z_OK; + } + + /* Make sure there is something to do and avoid duplicate consecutive + * flushes. For repeated and useless calls with Z_FINISH, we keep + * returning Z_STREAM_END instead of Z_BUF_ERROR. + */ + } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && + flush !== Z_FINISH) { + return err(strm, Z_BUF_ERROR); + } + + /* User must not provide more input after the first FINISH: */ + if (s.status === FINISH_STATE && strm.avail_in !== 0) { + return err(strm, Z_BUF_ERROR); + } + + /* Start a new block or continue the current one. + */ + if (strm.avail_in !== 0 || s.lookahead !== 0 || + (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) { + var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) : + (s.strategy === Z_RLE ? deflate_rle(s, flush) : + configuration_table[s.level].func(s, flush)); + + if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) { + s.status = FINISH_STATE; + } + if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) { + if (strm.avail_out === 0) { + s.last_flush = -1; + /* avoid BUF_ERROR next call, see above */ + } + return Z_OK; + /* If flush != Z_NO_FLUSH && avail_out == 0, the next call + * of deflate should use the same flush parameter to make sure + * that the flush is complete. So we don't have to output an + * empty block here, this will be done at next call. This also + * ensures that for a very small output buffer, we emit at most + * one empty block. + */ + } + if (bstate === BS_BLOCK_DONE) { + if (flush === Z_PARTIAL_FLUSH) { + trees._tr_align(s); + } + else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */ + + trees._tr_stored_block(s, 0, 0, false); + /* For a full flush, this empty block will be recognized + * as a special marker by inflate_sync(). + */ + if (flush === Z_FULL_FLUSH) { + /*** CLEAR_HASH(s); ***/ /* forget history */ + zero(s.head); // Fill with NIL (= 0); + + if (s.lookahead === 0) { + s.strstart = 0; + s.block_start = 0; + s.insert = 0; + } + } + } + flush_pending(strm); + if (strm.avail_out === 0) { + s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */ + return Z_OK; + } + } + } + //Assert(strm->avail_out > 0, "bug2"); + //if (strm.avail_out <= 0) { throw new Error("bug2");} + + if (flush !== Z_FINISH) { return Z_OK; } + if (s.wrap <= 0) { return Z_STREAM_END; } + + /* Write the trailer */ + if (s.wrap === 2) { + put_byte(s, strm.adler & 0xff); + put_byte(s, (strm.adler >> 8) & 0xff); + put_byte(s, (strm.adler >> 16) & 0xff); + put_byte(s, (strm.adler >> 24) & 0xff); + put_byte(s, strm.total_in & 0xff); + put_byte(s, (strm.total_in >> 8) & 0xff); + put_byte(s, (strm.total_in >> 16) & 0xff); + put_byte(s, (strm.total_in >> 24) & 0xff); + } + else + { + putShortMSB(s, strm.adler >>> 16); + putShortMSB(s, strm.adler & 0xffff); + } + + flush_pending(strm); + /* If avail_out is zero, the application will call deflate again + * to flush the rest. + */ + if (s.wrap > 0) { s.wrap = -s.wrap; } + /* write the trailer only once! */ + return s.pending !== 0 ? Z_OK : Z_STREAM_END; +} + +function deflateEnd(strm) { + var status; + + if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { + return Z_STREAM_ERROR; + } + + status = strm.state.status; + if (status !== INIT_STATE && + status !== EXTRA_STATE && + status !== NAME_STATE && + status !== COMMENT_STATE && + status !== HCRC_STATE && + status !== BUSY_STATE && + status !== FINISH_STATE + ) { + return err(strm, Z_STREAM_ERROR); + } + + strm.state = null; + + return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK; +} + + +/* ========================================================================= + * Initializes the compression dictionary from the given byte + * sequence without producing any compressed output. + */ +function deflateSetDictionary(strm, dictionary) { + var dictLength = dictionary.length; + + var s; + var str, n; + var wrap; + var avail; + var next; + var input; + var tmpDict; + + if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { + return Z_STREAM_ERROR; + } + + s = strm.state; + wrap = s.wrap; + + if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) { + return Z_STREAM_ERROR; + } + + /* when using zlib wrappers, compute Adler-32 for provided dictionary */ + if (wrap === 1) { + /* adler32(strm->adler, dictionary, dictLength); */ + strm.adler = adler32(strm.adler, dictionary, dictLength, 0); + } + + s.wrap = 0; /* avoid computing Adler-32 in read_buf */ + + /* if dictionary would fill window, just replace the history */ + if (dictLength >= s.w_size) { + if (wrap === 0) { /* already empty otherwise */ + /*** CLEAR_HASH(s); ***/ + zero(s.head); // Fill with NIL (= 0); + s.strstart = 0; + s.block_start = 0; + s.insert = 0; + } + /* use the tail */ + // dictionary = dictionary.slice(dictLength - s.w_size); + tmpDict = new utils.Buf8(s.w_size); + utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0); + dictionary = tmpDict; + dictLength = s.w_size; + } + /* insert dictionary into window and hash */ + avail = strm.avail_in; + next = strm.next_in; + input = strm.input; + strm.avail_in = dictLength; + strm.next_in = 0; + strm.input = dictionary; + fill_window(s); + while (s.lookahead >= MIN_MATCH) { + str = s.strstart; + n = s.lookahead - (MIN_MATCH - 1); + do { + /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; + + s.prev[str & s.w_mask] = s.head[s.ins_h]; + + s.head[s.ins_h] = str; + str++; + } while (--n); + s.strstart = str; + s.lookahead = MIN_MATCH - 1; + fill_window(s); + } + s.strstart += s.lookahead; + s.block_start = s.strstart; + s.insert = s.lookahead; + s.lookahead = 0; + s.match_length = s.prev_length = MIN_MATCH - 1; + s.match_available = 0; + strm.next_in = next; + strm.input = input; + strm.avail_in = avail; + s.wrap = wrap; + return Z_OK; +} + + +exports.deflateInit = deflateInit; +exports.deflateInit2 = deflateInit2; +exports.deflateReset = deflateReset; +exports.deflateResetKeep = deflateResetKeep; +exports.deflateSetHeader = deflateSetHeader; +exports.deflate = deflate; +exports.deflateEnd = deflateEnd; +exports.deflateSetDictionary = deflateSetDictionary; +exports.deflateInfo = 'pako deflate (from Nodeca project)'; + +/* Not implemented +exports.deflateBound = deflateBound; +exports.deflateCopy = deflateCopy; +exports.deflateParams = deflateParams; +exports.deflatePending = deflatePending; +exports.deflatePrime = deflatePrime; +exports.deflateTune = deflateTune; +*/ + +},{"../utils/common":1,"./adler32":3,"./crc32":4,"./messages":6,"./trees":7}],6:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +module.exports = { + 2: 'need dictionary', /* Z_NEED_DICT 2 */ + 1: 'stream end', /* Z_STREAM_END 1 */ + 0: '', /* Z_OK 0 */ + '-1': 'file error', /* Z_ERRNO (-1) */ + '-2': 'stream error', /* Z_STREAM_ERROR (-2) */ + '-3': 'data error', /* Z_DATA_ERROR (-3) */ + '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */ + '-5': 'buffer error', /* Z_BUF_ERROR (-5) */ + '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ +}; + +},{}],7:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +/* eslint-disable space-unary-ops */ + +var utils = require('../utils/common'); + +/* Public constants ==========================================================*/ +/* ===========================================================================*/ + + +//var Z_FILTERED = 1; +//var Z_HUFFMAN_ONLY = 2; +//var Z_RLE = 3; +var Z_FIXED = 4; +//var Z_DEFAULT_STRATEGY = 0; + +/* Possible values of the data_type field (though see inflate()) */ +var Z_BINARY = 0; +var Z_TEXT = 1; +//var Z_ASCII = 1; // = Z_TEXT +var Z_UNKNOWN = 2; + +/*============================================================================*/ + + +function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } + +// From zutil.h + +var STORED_BLOCK = 0; +var STATIC_TREES = 1; +var DYN_TREES = 2; +/* The three kinds of block type */ + +var MIN_MATCH = 3; +var MAX_MATCH = 258; +/* The minimum and maximum match lengths */ + +// From deflate.h +/* =========================================================================== + * Internal compression state. + */ + +var LENGTH_CODES = 29; +/* number of length codes, not counting the special END_BLOCK code */ + +var LITERALS = 256; +/* number of literal bytes 0..255 */ + +var L_CODES = LITERALS + 1 + LENGTH_CODES; +/* number of Literal or Length codes, including the END_BLOCK code */ + +var D_CODES = 30; +/* number of distance codes */ + +var BL_CODES = 19; +/* number of codes used to transfer the bit lengths */ + +var HEAP_SIZE = 2 * L_CODES + 1; +/* maximum heap size */ + +var MAX_BITS = 15; +/* All codes must not exceed MAX_BITS bits */ + +var Buf_size = 16; +/* size of bit buffer in bi_buf */ + + +/* =========================================================================== + * Constants + */ + +var MAX_BL_BITS = 7; +/* Bit length codes must not exceed MAX_BL_BITS bits */ + +var END_BLOCK = 256; +/* end of block literal code */ + +var REP_3_6 = 16; +/* repeat previous bit length 3-6 times (2 bits of repeat count) */ + +var REPZ_3_10 = 17; +/* repeat a zero length 3-10 times (3 bits of repeat count) */ + +var REPZ_11_138 = 18; +/* repeat a zero length 11-138 times (7 bits of repeat count) */ + +/* eslint-disable comma-spacing,array-bracket-spacing */ +var extra_lbits = /* extra bits for each length code */ + [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]; + +var extra_dbits = /* extra bits for each distance code */ + [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]; + +var extra_blbits = /* extra bits for each bit length code */ + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]; + +var bl_order = + [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]; +/* eslint-enable comma-spacing,array-bracket-spacing */ + +/* The lengths of the bit length codes are sent in order of decreasing + * probability, to avoid transmitting the lengths for unused bit length codes. + */ + +/* =========================================================================== + * Local data. These are initialized only once. + */ + +// We pre-fill arrays with 0 to avoid uninitialized gaps + +var DIST_CODE_LEN = 512; /* see definition of array dist_code below */ + +// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1 +var static_ltree = new Array((L_CODES + 2) * 2); +zero(static_ltree); +/* The static literal tree. Since the bit lengths are imposed, there is no + * need for the L_CODES extra codes used during heap construction. However + * The codes 286 and 287 are needed to build a canonical tree (see _tr_init + * below). + */ + +var static_dtree = new Array(D_CODES * 2); +zero(static_dtree); +/* The static distance tree. (Actually a trivial tree since all codes use + * 5 bits.) + */ + +var _dist_code = new Array(DIST_CODE_LEN); +zero(_dist_code); +/* Distance codes. The first 256 values correspond to the distances + * 3 .. 258, the last 256 values correspond to the top 8 bits of + * the 15 bit distances. + */ + +var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1); +zero(_length_code); +/* length code for each normalized match length (0 == MIN_MATCH) */ + +var base_length = new Array(LENGTH_CODES); +zero(base_length); +/* First normalized length for each code (0 = MIN_MATCH) */ + +var base_dist = new Array(D_CODES); +zero(base_dist); +/* First normalized distance for each code (0 = distance of 1) */ + + +function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) { + + this.static_tree = static_tree; /* static tree or NULL */ + this.extra_bits = extra_bits; /* extra bits for each code or NULL */ + this.extra_base = extra_base; /* base index for extra_bits */ + this.elems = elems; /* max number of elements in the tree */ + this.max_length = max_length; /* max bit length for the codes */ + + // show if `static_tree` has data or dummy - needed for monomorphic objects + this.has_stree = static_tree && static_tree.length; +} + + +var static_l_desc; +var static_d_desc; +var static_bl_desc; + + +function TreeDesc(dyn_tree, stat_desc) { + this.dyn_tree = dyn_tree; /* the dynamic tree */ + this.max_code = 0; /* largest code with non zero frequency */ + this.stat_desc = stat_desc; /* the corresponding static tree */ +} + + + +function d_code(dist) { + return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)]; +} + + +/* =========================================================================== + * Output a short LSB first on the stream. + * IN assertion: there is enough room in pendingBuf. + */ +function put_short(s, w) { +// put_byte(s, (uch)((w) & 0xff)); +// put_byte(s, (uch)((ush)(w) >> 8)); + s.pending_buf[s.pending++] = (w) & 0xff; + s.pending_buf[s.pending++] = (w >>> 8) & 0xff; +} + + +/* =========================================================================== + * Send a value on a given number of bits. + * IN assertion: length <= 16 and value fits in length bits. + */ +function send_bits(s, value, length) { + if (s.bi_valid > (Buf_size - length)) { + s.bi_buf |= (value << s.bi_valid) & 0xffff; + put_short(s, s.bi_buf); + s.bi_buf = value >> (Buf_size - s.bi_valid); + s.bi_valid += length - Buf_size; + } else { + s.bi_buf |= (value << s.bi_valid) & 0xffff; + s.bi_valid += length; + } +} + + +function send_code(s, c, tree) { + send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/); +} + + +/* =========================================================================== + * Reverse the first len bits of a code, using straightforward code (a faster + * method would use a table) + * IN assertion: 1 <= len <= 15 + */ +function bi_reverse(code, len) { + var res = 0; + do { + res |= code & 1; + code >>>= 1; + res <<= 1; + } while (--len > 0); + return res >>> 1; +} + + +/* =========================================================================== + * Flush the bit buffer, keeping at most 7 bits in it. + */ +function bi_flush(s) { + if (s.bi_valid === 16) { + put_short(s, s.bi_buf); + s.bi_buf = 0; + s.bi_valid = 0; + + } else if (s.bi_valid >= 8) { + s.pending_buf[s.pending++] = s.bi_buf & 0xff; + s.bi_buf >>= 8; + s.bi_valid -= 8; + } +} + + +/* =========================================================================== + * Compute the optimal bit lengths for a tree and update the total bit length + * for the current block. + * IN assertion: the fields freq and dad are set, heap[heap_max] and + * above are the tree nodes sorted by increasing frequency. + * OUT assertions: the field len is set to the optimal bit length, the + * array bl_count contains the frequencies for each bit length. + * The length opt_len is updated; static_len is also updated if stree is + * not null. + */ +function gen_bitlen(s, desc) +// deflate_state *s; +// tree_desc *desc; /* the tree descriptor */ +{ + var tree = desc.dyn_tree; + var max_code = desc.max_code; + var stree = desc.stat_desc.static_tree; + var has_stree = desc.stat_desc.has_stree; + var extra = desc.stat_desc.extra_bits; + var base = desc.stat_desc.extra_base; + var max_length = desc.stat_desc.max_length; + var h; /* heap index */ + var n, m; /* iterate over the tree elements */ + var bits; /* bit length */ + var xbits; /* extra bits */ + var f; /* frequency */ + var overflow = 0; /* number of elements with bit length too large */ + + for (bits = 0; bits <= MAX_BITS; bits++) { + s.bl_count[bits] = 0; + } + + /* In a first pass, compute the optimal bit lengths (which may + * overflow in the case of the bit length tree). + */ + tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */ + + for (h = s.heap_max + 1; h < HEAP_SIZE; h++) { + n = s.heap[h]; + bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1; + if (bits > max_length) { + bits = max_length; + overflow++; + } + tree[n * 2 + 1]/*.Len*/ = bits; + /* We overwrite tree[n].Dad which is no longer needed */ + + if (n > max_code) { continue; } /* not a leaf node */ + + s.bl_count[bits]++; + xbits = 0; + if (n >= base) { + xbits = extra[n - base]; + } + f = tree[n * 2]/*.Freq*/; + s.opt_len += f * (bits + xbits); + if (has_stree) { + s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits); + } + } + if (overflow === 0) { return; } + + // Trace((stderr,"\nbit length overflow\n")); + /* This happens for example on obj2 and pic of the Calgary corpus */ + + /* Find the first bit length which could increase: */ + do { + bits = max_length - 1; + while (s.bl_count[bits] === 0) { bits--; } + s.bl_count[bits]--; /* move one leaf down the tree */ + s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */ + s.bl_count[max_length]--; + /* The brother of the overflow item also moves one step up, + * but this does not affect bl_count[max_length] + */ + overflow -= 2; + } while (overflow > 0); + + /* Now recompute all bit lengths, scanning in increasing frequency. + * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all + * lengths instead of fixing only the wrong ones. This idea is taken + * from 'ar' written by Haruhiko Okumura.) + */ + for (bits = max_length; bits !== 0; bits--) { + n = s.bl_count[bits]; + while (n !== 0) { + m = s.heap[--h]; + if (m > max_code) { continue; } + if (tree[m * 2 + 1]/*.Len*/ !== bits) { + // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); + s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/; + tree[m * 2 + 1]/*.Len*/ = bits; + } + n--; + } + } +} + + +/* =========================================================================== + * Generate the codes for a given tree and bit counts (which need not be + * optimal). + * IN assertion: the array bl_count contains the bit length statistics for + * the given tree and the field len is set for all tree elements. + * OUT assertion: the field code is set for all tree elements of non + * zero code length. + */ +function gen_codes(tree, max_code, bl_count) +// ct_data *tree; /* the tree to decorate */ +// int max_code; /* largest code with non zero frequency */ +// ushf *bl_count; /* number of codes at each bit length */ +{ + var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */ + var code = 0; /* running code value */ + var bits; /* bit index */ + var n; /* code index */ + + /* The distribution counts are first used to generate the code values + * without bit reversal. + */ + for (bits = 1; bits <= MAX_BITS; bits++) { + next_code[bits] = code = (code + bl_count[bits - 1]) << 1; + } + /* Check that the bit counts in bl_count are consistent. The last code + * must be all ones. + */ + //Assert (code + bl_count[MAX_BITS]-1 == (1< length code (0..28) */ + length = 0; + for (code = 0; code < LENGTH_CODES - 1; code++) { + base_length[code] = length; + for (n = 0; n < (1 << extra_lbits[code]); n++) { + _length_code[length++] = code; + } + } + //Assert (length == 256, "tr_static_init: length != 256"); + /* Note that the length 255 (match length 258) can be represented + * in two different ways: code 284 + 5 bits or code 285, so we + * overwrite length_code[255] to use the best encoding: + */ + _length_code[length - 1] = code; + + /* Initialize the mapping dist (0..32K) -> dist code (0..29) */ + dist = 0; + for (code = 0; code < 16; code++) { + base_dist[code] = dist; + for (n = 0; n < (1 << extra_dbits[code]); n++) { + _dist_code[dist++] = code; + } + } + //Assert (dist == 256, "tr_static_init: dist != 256"); + dist >>= 7; /* from now on, all distances are divided by 128 */ + for (; code < D_CODES; code++) { + base_dist[code] = dist << 7; + for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) { + _dist_code[256 + dist++] = code; + } + } + //Assert (dist == 256, "tr_static_init: 256+dist != 512"); + + /* Construct the codes of the static literal tree */ + for (bits = 0; bits <= MAX_BITS; bits++) { + bl_count[bits] = 0; + } + + n = 0; + while (n <= 143) { + static_ltree[n * 2 + 1]/*.Len*/ = 8; + n++; + bl_count[8]++; + } + while (n <= 255) { + static_ltree[n * 2 + 1]/*.Len*/ = 9; + n++; + bl_count[9]++; + } + while (n <= 279) { + static_ltree[n * 2 + 1]/*.Len*/ = 7; + n++; + bl_count[7]++; + } + while (n <= 287) { + static_ltree[n * 2 + 1]/*.Len*/ = 8; + n++; + bl_count[8]++; + } + /* Codes 286 and 287 do not exist, but we must include them in the + * tree construction to get a canonical Huffman tree (longest code + * all ones) + */ + gen_codes(static_ltree, L_CODES + 1, bl_count); + + /* The static distance tree is trivial: */ + for (n = 0; n < D_CODES; n++) { + static_dtree[n * 2 + 1]/*.Len*/ = 5; + static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5); + } + + // Now data ready and we can init static trees + static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS); + static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS); + static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS); + + //static_init_done = true; +} + + +/* =========================================================================== + * Initialize a new block. + */ +function init_block(s) { + var n; /* iterates over tree elements */ + + /* Initialize the trees. */ + for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; } + for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; } + for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; } + + s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1; + s.opt_len = s.static_len = 0; + s.last_lit = s.matches = 0; +} + + +/* =========================================================================== + * Flush the bit buffer and align the output on a byte boundary + */ +function bi_windup(s) +{ + if (s.bi_valid > 8) { + put_short(s, s.bi_buf); + } else if (s.bi_valid > 0) { + //put_byte(s, (Byte)s->bi_buf); + s.pending_buf[s.pending++] = s.bi_buf; + } + s.bi_buf = 0; + s.bi_valid = 0; +} + +/* =========================================================================== + * Copy a stored block, storing first the length and its + * one's complement if requested. + */ +function copy_block(s, buf, len, header) +//DeflateState *s; +//charf *buf; /* the input data */ +//unsigned len; /* its length */ +//int header; /* true if block header must be written */ +{ + bi_windup(s); /* align on byte boundary */ + + if (header) { + put_short(s, len); + put_short(s, ~len); + } +// while (len--) { +// put_byte(s, *buf++); +// } + utils.arraySet(s.pending_buf, s.window, buf, len, s.pending); + s.pending += len; +} + +/* =========================================================================== + * Compares to subtrees, using the tree depth as tie breaker when + * the subtrees have equal frequency. This minimizes the worst case length. + */ +function smaller(tree, n, m, depth) { + var _n2 = n * 2; + var _m2 = m * 2; + return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ || + (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m])); +} + +/* =========================================================================== + * Restore the heap property by moving down the tree starting at node k, + * exchanging a node with the smallest of its two sons if necessary, stopping + * when the heap property is re-established (each father smaller than its + * two sons). + */ +function pqdownheap(s, tree, k) +// deflate_state *s; +// ct_data *tree; /* the tree to restore */ +// int k; /* node to move down */ +{ + var v = s.heap[k]; + var j = k << 1; /* left son of k */ + while (j <= s.heap_len) { + /* Set j to the smallest of the two sons: */ + if (j < s.heap_len && + smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) { + j++; + } + /* Exit if v is smaller than both sons */ + if (smaller(tree, v, s.heap[j], s.depth)) { break; } + + /* Exchange v with the smallest son */ + s.heap[k] = s.heap[j]; + k = j; + + /* And continue down the tree, setting j to the left son of k */ + j <<= 1; + } + s.heap[k] = v; +} + + +// inlined manually +// var SMALLEST = 1; + +/* =========================================================================== + * Send the block data compressed using the given Huffman trees + */ +function compress_block(s, ltree, dtree) +// deflate_state *s; +// const ct_data *ltree; /* literal tree */ +// const ct_data *dtree; /* distance tree */ +{ + var dist; /* distance of matched string */ + var lc; /* match length or unmatched char (if dist == 0) */ + var lx = 0; /* running index in l_buf */ + var code; /* the code to send */ + var extra; /* number of extra bits to send */ + + if (s.last_lit !== 0) { + do { + dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]); + lc = s.pending_buf[s.l_buf + lx]; + lx++; + + if (dist === 0) { + send_code(s, lc, ltree); /* send a literal byte */ + //Tracecv(isgraph(lc), (stderr," '%c' ", lc)); + } else { + /* Here, lc is the match length - MIN_MATCH */ + code = _length_code[lc]; + send_code(s, code + LITERALS + 1, ltree); /* send the length code */ + extra = extra_lbits[code]; + if (extra !== 0) { + lc -= base_length[code]; + send_bits(s, lc, extra); /* send the extra length bits */ + } + dist--; /* dist is now the match distance - 1 */ + code = d_code(dist); + //Assert (code < D_CODES, "bad d_code"); + + send_code(s, code, dtree); /* send the distance code */ + extra = extra_dbits[code]; + if (extra !== 0) { + dist -= base_dist[code]; + send_bits(s, dist, extra); /* send the extra distance bits */ + } + } /* literal or match pair ? */ + + /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ + //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx, + // "pendingBuf overflow"); + + } while (lx < s.last_lit); + } + + send_code(s, END_BLOCK, ltree); +} + + +/* =========================================================================== + * Construct one Huffman tree and assigns the code bit strings and lengths. + * Update the total bit length for the current block. + * IN assertion: the field freq is set for all tree elements. + * OUT assertions: the fields len and code are set to the optimal bit length + * and corresponding code. The length opt_len is updated; static_len is + * also updated if stree is not null. The field max_code is set. + */ +function build_tree(s, desc) +// deflate_state *s; +// tree_desc *desc; /* the tree descriptor */ +{ + var tree = desc.dyn_tree; + var stree = desc.stat_desc.static_tree; + var has_stree = desc.stat_desc.has_stree; + var elems = desc.stat_desc.elems; + var n, m; /* iterate over heap elements */ + var max_code = -1; /* largest code with non zero frequency */ + var node; /* new node being created */ + + /* Construct the initial heap, with least frequent element in + * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. + * heap[0] is not used. + */ + s.heap_len = 0; + s.heap_max = HEAP_SIZE; + + for (n = 0; n < elems; n++) { + if (tree[n * 2]/*.Freq*/ !== 0) { + s.heap[++s.heap_len] = max_code = n; + s.depth[n] = 0; + + } else { + tree[n * 2 + 1]/*.Len*/ = 0; + } + } + + /* The pkzip format requires that at least one distance code exists, + * and that at least one bit should be sent even if there is only one + * possible code. So to avoid special checks later on we force at least + * two codes of non zero frequency. + */ + while (s.heap_len < 2) { + node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0); + tree[node * 2]/*.Freq*/ = 1; + s.depth[node] = 0; + s.opt_len--; + + if (has_stree) { + s.static_len -= stree[node * 2 + 1]/*.Len*/; + } + /* node is 0 or 1 so it does not have extra bits */ + } + desc.max_code = max_code; + + /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, + * establish sub-heaps of increasing lengths: + */ + for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); } + + /* Construct the Huffman tree by repeatedly combining the least two + * frequent nodes. + */ + node = elems; /* next internal node of the tree */ + do { + //pqremove(s, tree, n); /* n = node of least frequency */ + /*** pqremove ***/ + n = s.heap[1/*SMALLEST*/]; + s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--]; + pqdownheap(s, tree, 1/*SMALLEST*/); + /***/ + + m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */ + + s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */ + s.heap[--s.heap_max] = m; + + /* Create a new node father of n and m */ + tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/; + s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1; + tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node; + + /* and insert the new node in the heap */ + s.heap[1/*SMALLEST*/] = node++; + pqdownheap(s, tree, 1/*SMALLEST*/); + + } while (s.heap_len >= 2); + + s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/]; + + /* At this point, the fields freq and dad are set. We can now + * generate the bit lengths. + */ + gen_bitlen(s, desc); + + /* The field len is now set, we can generate the bit codes */ + gen_codes(tree, max_code, s.bl_count); +} + + +/* =========================================================================== + * Scan a literal or distance tree to determine the frequencies of the codes + * in the bit length tree. + */ +function scan_tree(s, tree, max_code) +// deflate_state *s; +// ct_data *tree; /* the tree to be scanned */ +// int max_code; /* and its largest code of non zero frequency */ +{ + var n; /* iterates over all tree elements */ + var prevlen = -1; /* last emitted length */ + var curlen; /* length of current code */ + + var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ + + var count = 0; /* repeat count of the current code */ + var max_count = 7; /* max repeat count */ + var min_count = 4; /* min repeat count */ + + if (nextlen === 0) { + max_count = 138; + min_count = 3; + } + tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */ + + for (n = 0; n <= max_code; n++) { + curlen = nextlen; + nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; + + if (++count < max_count && curlen === nextlen) { + continue; + + } else if (count < min_count) { + s.bl_tree[curlen * 2]/*.Freq*/ += count; + + } else if (curlen !== 0) { + + if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; } + s.bl_tree[REP_3_6 * 2]/*.Freq*/++; + + } else if (count <= 10) { + s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++; + + } else { + s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++; + } + + count = 0; + prevlen = curlen; + + if (nextlen === 0) { + max_count = 138; + min_count = 3; + + } else if (curlen === nextlen) { + max_count = 6; + min_count = 3; + + } else { + max_count = 7; + min_count = 4; + } + } +} + + +/* =========================================================================== + * Send a literal or distance tree in compressed form, using the codes in + * bl_tree. + */ +function send_tree(s, tree, max_code) +// deflate_state *s; +// ct_data *tree; /* the tree to be scanned */ +// int max_code; /* and its largest code of non zero frequency */ +{ + var n; /* iterates over all tree elements */ + var prevlen = -1; /* last emitted length */ + var curlen; /* length of current code */ + + var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ + + var count = 0; /* repeat count of the current code */ + var max_count = 7; /* max repeat count */ + var min_count = 4; /* min repeat count */ + + /* tree[max_code+1].Len = -1; */ /* guard already set */ + if (nextlen === 0) { + max_count = 138; + min_count = 3; + } + + for (n = 0; n <= max_code; n++) { + curlen = nextlen; + nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; + + if (++count < max_count && curlen === nextlen) { + continue; + + } else if (count < min_count) { + do { send_code(s, curlen, s.bl_tree); } while (--count !== 0); + + } else if (curlen !== 0) { + if (curlen !== prevlen) { + send_code(s, curlen, s.bl_tree); + count--; + } + //Assert(count >= 3 && count <= 6, " 3_6?"); + send_code(s, REP_3_6, s.bl_tree); + send_bits(s, count - 3, 2); + + } else if (count <= 10) { + send_code(s, REPZ_3_10, s.bl_tree); + send_bits(s, count - 3, 3); + + } else { + send_code(s, REPZ_11_138, s.bl_tree); + send_bits(s, count - 11, 7); + } + + count = 0; + prevlen = curlen; + if (nextlen === 0) { + max_count = 138; + min_count = 3; + + } else if (curlen === nextlen) { + max_count = 6; + min_count = 3; + + } else { + max_count = 7; + min_count = 4; + } + } +} + + +/* =========================================================================== + * Construct the Huffman tree for the bit lengths and return the index in + * bl_order of the last bit length code to send. + */ +function build_bl_tree(s) { + var max_blindex; /* index of last bit length code of non zero freq */ + + /* Determine the bit length frequencies for literal and distance trees */ + scan_tree(s, s.dyn_ltree, s.l_desc.max_code); + scan_tree(s, s.dyn_dtree, s.d_desc.max_code); + + /* Build the bit length tree: */ + build_tree(s, s.bl_desc); + /* opt_len now includes the length of the tree representations, except + * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. + */ + + /* Determine the number of bit length codes to send. The pkzip format + * requires that at least 4 bit length codes be sent. (appnote.txt says + * 3 but the actual value used is 4.) + */ + for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) { + if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) { + break; + } + } + /* Update opt_len to include the bit length tree and counts */ + s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; + //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", + // s->opt_len, s->static_len)); + + return max_blindex; +} + + +/* =========================================================================== + * Send the header for a block using dynamic Huffman trees: the counts, the + * lengths of the bit length codes, the literal tree and the distance tree. + * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. + */ +function send_all_trees(s, lcodes, dcodes, blcodes) +// deflate_state *s; +// int lcodes, dcodes, blcodes; /* number of codes for each tree */ +{ + var rank; /* index in bl_order */ + + //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); + //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, + // "too many codes"); + //Tracev((stderr, "\nbl counts: ")); + send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */ + send_bits(s, dcodes - 1, 5); + send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */ + for (rank = 0; rank < blcodes; rank++) { + //Tracev((stderr, "\nbl code %2d ", bl_order[rank])); + send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3); + } + //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); + + send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */ + //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); + + send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */ + //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); +} + + +/* =========================================================================== + * Check if the data type is TEXT or BINARY, using the following algorithm: + * - TEXT if the two conditions below are satisfied: + * a) There are no non-portable control characters belonging to the + * "black list" (0..6, 14..25, 28..31). + * b) There is at least one printable character belonging to the + * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). + * - BINARY otherwise. + * - The following partially-portable control characters form a + * "gray list" that is ignored in this detection algorithm: + * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). + * IN assertion: the fields Freq of dyn_ltree are set. + */ +function detect_data_type(s) { + /* black_mask is the bit mask of black-listed bytes + * set bits 0..6, 14..25, and 28..31 + * 0xf3ffc07f = binary 11110011111111111100000001111111 + */ + var black_mask = 0xf3ffc07f; + var n; + + /* Check for non-textual ("black-listed") bytes. */ + for (n = 0; n <= 31; n++, black_mask >>>= 1) { + if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) { + return Z_BINARY; + } + } + + /* Check for textual ("white-listed") bytes. */ + if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 || + s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) { + return Z_TEXT; + } + for (n = 32; n < LITERALS; n++) { + if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) { + return Z_TEXT; + } + } + + /* There are no "black-listed" or "white-listed" bytes: + * this stream either is empty or has tolerated ("gray-listed") bytes only. + */ + return Z_BINARY; +} + + +var static_init_done = false; + +/* =========================================================================== + * Initialize the tree data structures for a new zlib stream. + */ +function _tr_init(s) +{ + + if (!static_init_done) { + tr_static_init(); + static_init_done = true; + } + + s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc); + s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc); + s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc); + + s.bi_buf = 0; + s.bi_valid = 0; + + /* Initialize the first block of the first file: */ + init_block(s); +} + + +/* =========================================================================== + * Send a stored block + */ +function _tr_stored_block(s, buf, stored_len, last) +//DeflateState *s; +//charf *buf; /* input block */ +//ulg stored_len; /* length of input block */ +//int last; /* one if this is the last block for a file */ +{ + send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */ + copy_block(s, buf, stored_len, true); /* with header */ +} + + +/* =========================================================================== + * Send one empty static block to give enough lookahead for inflate. + * This takes 10 bits, of which 7 may remain in the bit buffer. + */ +function _tr_align(s) { + send_bits(s, STATIC_TREES << 1, 3); + send_code(s, END_BLOCK, static_ltree); + bi_flush(s); +} + + +/* =========================================================================== + * Determine the best encoding for the current block: dynamic trees, static + * trees or store, and output the encoded block to the zip file. + */ +function _tr_flush_block(s, buf, stored_len, last) +//DeflateState *s; +//charf *buf; /* input block, or NULL if too old */ +//ulg stored_len; /* length of input block */ +//int last; /* one if this is the last block for a file */ +{ + var opt_lenb, static_lenb; /* opt_len and static_len in bytes */ + var max_blindex = 0; /* index of last bit length code of non zero freq */ + + /* Build the Huffman trees unless a stored block is forced */ + if (s.level > 0) { + + /* Check if the file is binary or text */ + if (s.strm.data_type === Z_UNKNOWN) { + s.strm.data_type = detect_data_type(s); + } + + /* Construct the literal and distance trees */ + build_tree(s, s.l_desc); + // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, + // s->static_len)); + + build_tree(s, s.d_desc); + // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, + // s->static_len)); + /* At this point, opt_len and static_len are the total bit lengths of + * the compressed block data, excluding the tree representations. + */ + + /* Build the bit length tree for the above two trees, and get the index + * in bl_order of the last bit length code to send. + */ + max_blindex = build_bl_tree(s); + + /* Determine the best encoding. Compute the block lengths in bytes. */ + opt_lenb = (s.opt_len + 3 + 7) >>> 3; + static_lenb = (s.static_len + 3 + 7) >>> 3; + + // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", + // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, + // s->last_lit)); + + if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; } + + } else { + // Assert(buf != (char*)0, "lost buf"); + opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ + } + + if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) { + /* 4: two words for the lengths */ + + /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. + * Otherwise we can't have processed more than WSIZE input bytes since + * the last block flush, because compression would have been + * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to + * transform a block into a stored block. + */ + _tr_stored_block(s, buf, stored_len, last); + + } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) { + + send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3); + compress_block(s, static_ltree, static_dtree); + + } else { + send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3); + send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1); + compress_block(s, s.dyn_ltree, s.dyn_dtree); + } + // Assert (s->compressed_len == s->bits_sent, "bad compressed size"); + /* The above check is made mod 2^32, for files larger than 512 MB + * and uLong implemented on 32 bits. + */ + init_block(s); + + if (last) { + bi_windup(s); + } + // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, + // s->compressed_len-7*last)); +} + +/* =========================================================================== + * Save the match info and tally the frequency counts. Return true if + * the current block must be flushed. + */ +function _tr_tally(s, dist, lc) +// deflate_state *s; +// unsigned dist; /* distance of matched string */ +// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ +{ + //var out_length, in_length, dcode; + + s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff; + s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff; + + s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff; + s.last_lit++; + + if (dist === 0) { + /* lc is the unmatched char */ + s.dyn_ltree[lc * 2]/*.Freq*/++; + } else { + s.matches++; + /* Here, lc is the match length - MIN_MATCH */ + dist--; /* dist = match distance - 1 */ + //Assert((ush)dist < (ush)MAX_DIST(s) && + // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && + // (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); + + s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++; + s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++; + } + +// (!) This block is disabled in zlib defaults, +// don't enable it for binary compatibility + +//#ifdef TRUNCATE_BLOCK +// /* Try to guess if it is profitable to stop the current block here */ +// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) { +// /* Compute an upper bound for the compressed length */ +// out_length = s.last_lit*8; +// in_length = s.strstart - s.block_start; +// +// for (dcode = 0; dcode < D_CODES; dcode++) { +// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]); +// } +// out_length >>>= 3; +// //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", +// // s->last_lit, in_length, out_length, +// // 100L - out_length*100L/in_length)); +// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) { +// return true; +// } +// } +//#endif + + return (s.last_lit === s.lit_bufsize - 1); + /* We avoid equality with lit_bufsize because of wraparound at 64K + * on 16 bit machines and because stored blocks are restricted to + * 64K-1 bytes. + */ +} + +exports._tr_init = _tr_init; +exports._tr_stored_block = _tr_stored_block; +exports._tr_flush_block = _tr_flush_block; +exports._tr_tally = _tr_tally; +exports._tr_align = _tr_align; + +},{"../utils/common":1}],8:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +function ZStream() { + /* next input byte */ + this.input = null; // JS specific, because we have no pointers + this.next_in = 0; + /* number of bytes available at input */ + this.avail_in = 0; + /* total number of input bytes read so far */ + this.total_in = 0; + /* next output byte should be put there */ + this.output = null; // JS specific, because we have no pointers + this.next_out = 0; + /* remaining free space at output */ + this.avail_out = 0; + /* total number of bytes output so far */ + this.total_out = 0; + /* last error message, NULL if no error */ + this.msg = ''/*Z_NULL*/; + /* not visible by applications */ + this.state = null; + /* best guess about the data type: binary or text */ + this.data_type = 2/*Z_UNKNOWN*/; + /* adler32 value of the uncompressed data */ + this.adler = 0; +} + +module.exports = ZStream; + +},{}],"/lib/deflate.js":[function(require,module,exports){ +'use strict'; + + +var zlib_deflate = require('./zlib/deflate'); +var utils = require('./utils/common'); +var strings = require('./utils/strings'); +var msg = require('./zlib/messages'); +var ZStream = require('./zlib/zstream'); + +var toString = Object.prototype.toString; + +/* Public constants ==========================================================*/ +/* ===========================================================================*/ + +var Z_NO_FLUSH = 0; +var Z_FINISH = 4; + +var Z_OK = 0; +var Z_STREAM_END = 1; +var Z_SYNC_FLUSH = 2; + +var Z_DEFAULT_COMPRESSION = -1; + +var Z_DEFAULT_STRATEGY = 0; + +var Z_DEFLATED = 8; + +/* ===========================================================================*/ + + +/** + * class Deflate + * + * Generic JS-style wrapper for zlib calls. If you don't need + * streaming behaviour - use more simple functions: [[deflate]], + * [[deflateRaw]] and [[gzip]]. + **/ + +/* internal + * Deflate.chunks -> Array + * + * Chunks of output data, if [[Deflate#onData]] not overridden. + **/ + +/** + * Deflate.result -> Uint8Array|Array + * + * Compressed result, generated by default [[Deflate#onData]] + * and [[Deflate#onEnd]] handlers. Filled after you push last chunk + * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you + * push a chunk with explicit flush (call [[Deflate#push]] with + * `Z_SYNC_FLUSH` param). + **/ + +/** + * Deflate.err -> Number + * + * Error code after deflate finished. 0 (Z_OK) on success. + * You will not need it in real life, because deflate errors + * are possible only on wrong options or bad `onData` / `onEnd` + * custom handlers. + **/ + +/** + * Deflate.msg -> String + * + * Error message, if [[Deflate.err]] != 0 + **/ + + +/** + * new Deflate(options) + * - options (Object): zlib deflate options. + * + * Creates new deflator instance with specified params. Throws exception + * on bad params. Supported options: + * + * - `level` + * - `windowBits` + * - `memLevel` + * - `strategy` + * - `dictionary` + * + * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) + * for more information on these. + * + * Additional options, for internal needs: + * + * - `chunkSize` - size of generated data chunks (16K by default) + * - `raw` (Boolean) - do raw deflate + * - `gzip` (Boolean) - create gzip wrapper + * - `to` (String) - if equal to 'string', then result will be "binary string" + * (each char code [0..255]) + * - `header` (Object) - custom header for gzip + * - `text` (Boolean) - true if compressed data believed to be text + * - `time` (Number) - modification time, unix timestamp + * - `os` (Number) - operation system code + * - `extra` (Array) - array of bytes with extra data (max 65536) + * - `name` (String) - file name (binary string) + * - `comment` (String) - comment (binary string) + * - `hcrc` (Boolean) - true if header crc should be added + * + * ##### Example: + * + * ```javascript + * var pako = require('pako') + * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) + * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); + * + * var deflate = new pako.Deflate({ level: 3}); + * + * deflate.push(chunk1, false); + * deflate.push(chunk2, true); // true -> last chunk + * + * if (deflate.err) { throw new Error(deflate.err); } + * + * console.log(deflate.result); + * ``` + **/ +function Deflate(options) { + if (!(this instanceof Deflate)) return new Deflate(options); + + this.options = utils.assign({ + level: Z_DEFAULT_COMPRESSION, + method: Z_DEFLATED, + chunkSize: 16384, + windowBits: 15, + memLevel: 8, + strategy: Z_DEFAULT_STRATEGY, + to: '' + }, options || {}); + + var opt = this.options; + + if (opt.raw && (opt.windowBits > 0)) { + opt.windowBits = -opt.windowBits; + } + + else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) { + opt.windowBits += 16; + } + + this.err = 0; // error code, if happens (0 = Z_OK) + this.msg = ''; // error message + this.ended = false; // used to avoid multiple onEnd() calls + this.chunks = []; // chunks of compressed data + + this.strm = new ZStream(); + this.strm.avail_out = 0; + + var status = zlib_deflate.deflateInit2( + this.strm, + opt.level, + opt.method, + opt.windowBits, + opt.memLevel, + opt.strategy + ); + + if (status !== Z_OK) { + throw new Error(msg[status]); + } + + if (opt.header) { + zlib_deflate.deflateSetHeader(this.strm, opt.header); + } + + if (opt.dictionary) { + var dict; + // Convert data if needed + if (typeof opt.dictionary === 'string') { + // If we need to compress text, change encoding to utf8. + dict = strings.string2buf(opt.dictionary); + } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') { + dict = new Uint8Array(opt.dictionary); + } else { + dict = opt.dictionary; + } + + status = zlib_deflate.deflateSetDictionary(this.strm, dict); + + if (status !== Z_OK) { + throw new Error(msg[status]); + } + + this._dict_set = true; + } +} + +/** + * Deflate#push(data[, mode]) -> Boolean + * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be + * converted to utf8 byte sequence. + * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. + * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH. + * + * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with + * new compressed chunks. Returns `true` on success. The last data block must have + * mode Z_FINISH (or `true`). That will flush internal pending buffers and call + * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you + * can use mode Z_SYNC_FLUSH, keeping the compression context. + * + * On fail call [[Deflate#onEnd]] with error code and return false. + * + * We strongly recommend to use `Uint8Array` on input for best speed (output + * array format is detected automatically). Also, don't skip last param and always + * use the same type in your code (boolean or number). That will improve JS speed. + * + * For regular `Array`-s make sure all elements are [0..255]. + * + * ##### Example + * + * ```javascript + * push(chunk, false); // push one of data chunks + * ... + * push(chunk, true); // push last chunk + * ``` + **/ +Deflate.prototype.push = function (data, mode) { + var strm = this.strm; + var chunkSize = this.options.chunkSize; + var status, _mode; + + if (this.ended) { return false; } + + _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH); + + // Convert data if needed + if (typeof data === 'string') { + // If we need to compress text, change encoding to utf8. + strm.input = strings.string2buf(data); + } else if (toString.call(data) === '[object ArrayBuffer]') { + strm.input = new Uint8Array(data); + } else { + strm.input = data; + } + + strm.next_in = 0; + strm.avail_in = strm.input.length; + + do { + if (strm.avail_out === 0) { + strm.output = new utils.Buf8(chunkSize); + strm.next_out = 0; + strm.avail_out = chunkSize; + } + status = zlib_deflate.deflate(strm, _mode); /* no bad return value */ + + if (status !== Z_STREAM_END && status !== Z_OK) { + this.onEnd(status); + this.ended = true; + return false; + } + if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) { + if (this.options.to === 'string') { + this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out))); + } else { + this.onData(utils.shrinkBuf(strm.output, strm.next_out)); + } + } + } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END); + + // Finalize on the last chunk. + if (_mode === Z_FINISH) { + status = zlib_deflate.deflateEnd(this.strm); + this.onEnd(status); + this.ended = true; + return status === Z_OK; + } + + // callback interim results if Z_SYNC_FLUSH. + if (_mode === Z_SYNC_FLUSH) { + this.onEnd(Z_OK); + strm.avail_out = 0; + return true; + } + + return true; +}; + + +/** + * Deflate#onData(chunk) -> Void + * - chunk (Uint8Array|Array|String): output data. Type of array depends + * on js engine support. When string output requested, each chunk + * will be string. + * + * By default, stores data blocks in `chunks[]` property and glue + * those in `onEnd`. Override this handler, if you need another behaviour. + **/ +Deflate.prototype.onData = function (chunk) { + this.chunks.push(chunk); +}; + + +/** + * Deflate#onEnd(status) -> Void + * - status (Number): deflate status. 0 (Z_OK) on success, + * other if not. + * + * Called once after you tell deflate that the input stream is + * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) + * or if an error happened. By default - join collected chunks, + * free memory and fill `results` / `err` properties. + **/ +Deflate.prototype.onEnd = function (status) { + // On success - join + if (status === Z_OK) { + if (this.options.to === 'string') { + this.result = this.chunks.join(''); + } else { + this.result = utils.flattenChunks(this.chunks); + } + } + this.chunks = []; + this.err = status; + this.msg = this.strm.msg; +}; + + +/** + * deflate(data[, options]) -> Uint8Array|Array|String + * - data (Uint8Array|Array|String): input data to compress. + * - options (Object): zlib deflate options. + * + * Compress `data` with deflate algorithm and `options`. + * + * Supported options are: + * + * - level + * - windowBits + * - memLevel + * - strategy + * - dictionary + * + * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) + * for more information on these. + * + * Sugar (options): + * + * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify + * negative windowBits implicitly. + * - `to` (String) - if equal to 'string', then result will be "binary string" + * (each char code [0..255]) + * + * ##### Example: + * + * ```javascript + * var pako = require('pako') + * , data = Uint8Array([1,2,3,4,5,6,7,8,9]); + * + * console.log(pako.deflate(data)); + * ``` + **/ +function deflate(input, options) { + var deflator = new Deflate(options); + + deflator.push(input, true); + + // That will never happens, if you don't cheat with options :) + if (deflator.err) { throw deflator.msg || msg[deflator.err]; } + + return deflator.result; +} + + +/** + * deflateRaw(data[, options]) -> Uint8Array|Array|String + * - data (Uint8Array|Array|String): input data to compress. + * - options (Object): zlib deflate options. + * + * The same as [[deflate]], but creates raw data, without wrapper + * (header and adler32 crc). + **/ +function deflateRaw(input, options) { + options = options || {}; + options.raw = true; + return deflate(input, options); +} + + +/** + * gzip(data[, options]) -> Uint8Array|Array|String + * - data (Uint8Array|Array|String): input data to compress. + * - options (Object): zlib deflate options. + * + * The same as [[deflate]], but create gzip wrapper instead of + * deflate one. + **/ +function gzip(input, options) { + options = options || {}; + options.gzip = true; + return deflate(input, options); +} + + +exports.Deflate = Deflate; +exports.deflate = deflate; +exports.deflateRaw = deflateRaw; +exports.gzip = gzip; + +},{"./utils/common":1,"./utils/strings":2,"./zlib/deflate":5,"./zlib/messages":6,"./zlib/zstream":8}]},{},[])("/lib/deflate.js") +}); diff --git a/src/main/webapp/static/plugins/pako/1.0.11/pako_deflate.min.js b/src/main/webapp/static/plugins/pako/1.0.11/pako_deflate.min.js new file mode 100644 index 00000000..77925534 --- /dev/null +++ b/src/main/webapp/static/plugins/pako/1.0.11/pako_deflate.min.js @@ -0,0 +1 @@ +!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=t()}}(function(){return function i(s,h,l){function o(e,t){if(!h[e]){if(!s[e]){var a="function"==typeof require&&require;if(!t&&a)return a(e,!0);if(_)return _(e,!0);var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}var r=h[e]={exports:{}};s[e][0].call(r.exports,function(t){return o(s[e][1][t]||t)},r,r.exports,i,s,h,l)}return h[e].exports}for(var _="function"==typeof require&&require,t=0;t>>6:(a<65536?e[i++]=224|a>>>12:(e[i++]=240|a>>>18,e[i++]=128|a>>>12&63),e[i++]=128|a>>>6&63),e[i++]=128|63&a);return e},a.buf2binstring=function(t){return _(t,t.length)},a.binstring2buf=function(t){for(var e=new l.Buf8(t.length),a=0,n=e.length;a>10&1023,h[n++]=56320|1023&r)}return _(h,n)},a.utf8border=function(t,e){var a;for((e=e||t.length)>t.length&&(e=t.length),a=e-1;0<=a&&128==(192&t[a]);)a--;return a<0?e:0===a?e:a+o[t[a]]>e?a:e}},{"./common":1}],3:[function(t,e,a){"use strict";e.exports=function(t,e,a,n){for(var r=65535&t|0,i=t>>>16&65535|0,s=0;0!==a;){for(a-=s=2e3>>1:t>>>1;e[a]=t}return e}();e.exports=function(t,e,a,n){var r=h,i=n+a;t^=-1;for(var s=n;s>>8^r[255&(t^e[s])];return-1^t}},{}],5:[function(t,e,a){"use strict";var l,u=t("../utils/common"),o=t("./trees"),f=t("./adler32"),c=t("./crc32"),n=t("./messages"),_=0,d=4,p=0,g=-2,m=-1,b=4,r=2,v=8,w=9,i=286,s=30,h=19,y=2*i+1,k=15,z=3,x=258,B=x+z+1,A=42,C=113,S=1,j=2,E=3,U=4;function D(t,e){return t.msg=n[e],e}function I(t){return(t<<1)-(4t.avail_out&&(a=t.avail_out),0!==a&&(u.arraySet(t.output,e.pending_buf,e.pending_out,a,t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))}function T(t,e){o._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,q(t.strm)}function L(t,e){t.pending_buf[t.pending++]=e}function N(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function R(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-B?t.strstart-(t.w_size-B):0,o=t.window,_=t.w_mask,d=t.prev,u=t.strstart+x,f=o[i+s-1],c=o[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(o[(a=e)+s]===c&&o[a+s-1]===f&&o[a]===o[i]&&o[++a]===o[i+1]){i+=2,a++;do{}while(o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&il&&0!=--r);return s<=t.lookahead?s:t.lookahead}function H(t){var e,a,n,r,i,s,h,l,o,_,d=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=d+(d-B)){for(u.arraySet(t.window,t.window,d,d,0),t.match_start-=d,t.strstart-=d,t.block_start-=d,e=a=t.hash_size;n=t.head[--e],t.head[e]=d<=n?n-d:0,--a;);for(e=a=d;n=t.prev[--e],t.prev[e]=d<=n?n-d:0,--a;);r+=d}if(0===t.strm.avail_in)break;if(s=t.strm,h=t.window,l=t.strstart+t.lookahead,o=r,_=void 0,_=s.avail_in,o<_&&(_=o),a=0===_?0:(s.avail_in-=_,u.arraySet(h,s.input,s.next_in,_,l),1===s.state.wrap?s.adler=f(s.adler,h,_,l):2===s.state.wrap&&(s.adler=c(s.adler,h,_,l)),s.next_in+=_,s.total_in+=_,_),t.lookahead+=a,t.lookahead+t.insert>=z)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=(t.ins_h<=z&&(t.ins_h=(t.ins_h<=z)if(n=o._tr_tally(t,t.strstart-t.match_start,t.match_length-z),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=z){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<=z&&(t.ins_h=(t.ins_h<=z&&t.match_length<=t.prev_length){for(r=t.strstart+t.lookahead-z,n=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-z),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=r&&(t.ins_h=(t.ins_h<t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(H(t),0===t.lookahead&&e===_)return S;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,T(t,!1),0===t.strm.avail_out))return S;if(t.strstart-t.block_start>=t.w_size-B&&(T(t,!1),0===t.strm.avail_out))return S}return t.insert=0,e===d?(T(t,!0),0===t.strm.avail_out?E:U):(t.strstart>t.block_start&&(T(t,!1),t.strm.avail_out),S)}),new M(4,4,8,4,F),new M(4,5,16,8,F),new M(4,6,32,32,F),new M(4,4,16,16,K),new M(8,16,32,32,K),new M(8,16,128,128,K),new M(8,32,128,256,K),new M(32,128,258,1024,K),new M(32,258,258,4096,K)],a.deflateInit=function(t,e){return Q(t,e,v,15,8,0)},a.deflateInit2=Q,a.deflateReset=J,a.deflateResetKeep=G,a.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?g:(t.state.gzhead=e,p):g},a.deflate=function(t,e){var a,n,r,i;if(!t||!t.state||5>8&255),L(n,n.gzhead.time>>16&255),L(n,n.gzhead.time>>24&255),L(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),L(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(L(n,255&n.gzhead.extra.length),L(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=c(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(L(n,0),L(n,0),L(n,0),L(n,0),L(n,0),L(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),L(n,3),n.status=C);else{var s=v+(n.w_bits-8<<4)<<8;s|=(2<=n.strategy||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(s|=32),s+=31-s%31,n.status=C,N(n,s),0!==n.strstart&&(N(n,t.adler>>>16),N(n,65535&t.adler)),t.adler=1}if(69===n.status)if(n.gzhead.extra){for(r=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>r&&(t.adler=c(t.adler,n.pending_buf,n.pending-r,r)),q(t),r=n.pending,n.pending!==n.pending_buf_size));)L(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>r&&(t.adler=c(t.adler,n.pending_buf,n.pending-r,r)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){r=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>r&&(t.adler=c(t.adler,n.pending_buf,n.pending-r,r)),q(t),r=n.pending,n.pending===n.pending_buf_size)){i=1;break}L(n,i=n.gzindexr&&(t.adler=c(t.adler,n.pending_buf,n.pending-r,r)),0===i&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){r=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>r&&(t.adler=c(t.adler,n.pending_buf,n.pending-r,r)),q(t),r=n.pending,n.pending===n.pending_buf_size)){i=1;break}L(n,i=n.gzindexr&&(t.adler=c(t.adler,n.pending_buf,n.pending-r,r)),0===i&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&q(t),n.pending+2<=n.pending_buf_size&&(L(n,255&t.adler),L(n,t.adler>>8&255),t.adler=0,n.status=C)):n.status=C),0!==n.pending){if(q(t),0===t.avail_out)return n.last_flush=-1,p}else if(0===t.avail_in&&I(e)<=I(a)&&e!==d)return D(t,-5);if(666===n.status&&0!==t.avail_in)return D(t,-5);if(0!==t.avail_in||0!==n.lookahead||e!==_&&666!==n.status){var h=2===n.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(H(t),0===t.lookahead)){if(e===_)return S;break}if(t.match_length=0,a=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(T(t,!1),0===t.strm.avail_out))return S}return t.insert=0,e===d?(T(t,!0),0===t.strm.avail_out?E:U):t.last_lit&&(T(t,!1),0===t.strm.avail_out)?S:j}(n,e):3===n.strategy?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=x){if(H(t),t.lookahead<=x&&e===_)return S;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=z&&0t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=z?(a=o._tr_tally(t,1,t.match_length-z),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(T(t,!1),0===t.strm.avail_out))return S}return t.insert=0,e===d?(T(t,!0),0===t.strm.avail_out?E:U):t.last_lit&&(T(t,!1),0===t.strm.avail_out)?S:j}(n,e):l[n.level].func(n,e);if(h!==E&&h!==U||(n.status=666),h===S||h===E)return 0===t.avail_out&&(n.last_flush=-1),p;if(h===j&&(1===e?o._tr_align(n):5!==e&&(o._tr_stored_block(n,0,0,!1),3===e&&(O(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),q(t),0===t.avail_out))return n.last_flush=-1,p}return e!==d?p:n.wrap<=0?1:(2===n.wrap?(L(n,255&t.adler),L(n,t.adler>>8&255),L(n,t.adler>>16&255),L(n,t.adler>>24&255),L(n,255&t.total_in),L(n,t.total_in>>8&255),L(n,t.total_in>>16&255),L(n,t.total_in>>24&255)):(N(n,t.adler>>>16),N(n,65535&t.adler)),q(t),0=a.w_size&&(0===i&&(O(a.head),a.strstart=0,a.block_start=0,a.insert=0),o=new u.Buf8(a.w_size),u.arraySet(o,e,_-a.w_size,a.w_size,0),e=o,_=a.w_size),s=t.avail_in,h=t.next_in,l=t.input,t.avail_in=_,t.next_in=0,t.input=e,H(a);a.lookahead>=z;){for(n=a.strstart,r=a.lookahead-(z-1);a.ins_h=(a.ins_h<>>7)]}function L(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function N(t,e,a){t.bi_valid>r-a?(t.bi_buf|=e<>r-t.bi_valid,t.bi_valid+=a-r):(t.bi_buf|=e<>>=1,a<<=1,0<--e;);return a>>>1}function F(t,e,a){var n,r,i=new Array(m+1),s=0;for(n=1;n<=m;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=H(i[h]++,h))}}function K(t){var e;for(e=0;e>1;1<=a;a--)G(t,i,a);for(r=l;a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],G(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,G(t,i,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,l=e.dyn_tree,o=e.max_code,_=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=m;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a>=7;n>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return h;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return o;for(e=32;e>>3,(i=t.static_len+3+7>>>3)<=r&&(r=i)):r=i=a+5,a+4<=r&&-1!==e?Y(t,e,a,n):4===t.strategy||i===r?(N(t,2+(n?1:0),3),J(t,A,C)):(N(t,4+(n?1:0),3),function(t,e,a,n){var r;for(N(t,e-257,5),N(t,a-1,5),N(t,n-4,4),r=0;r>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(j[a]+d+1)]++,t.dyn_dtree[2*T(e)]++),t.last_lit===t.lit_bufsize-1},a._tr_align=function(t){var e;N(t,2,3),R(t,b,A),16===(e=t).bi_valid?(L(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}},{"../utils/common":1}],8:[function(t,e,a){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],"/lib/deflate.js":[function(t,e,a){"use strict";var s=t("./zlib/deflate"),h=t("./utils/common"),l=t("./utils/strings"),r=t("./zlib/messages"),i=t("./zlib/zstream"),o=Object.prototype.toString,_=0,d=-1,u=0,f=8;function c(t){if(!(this instanceof c))return new c(t);this.options=h.assign({level:d,method:f,chunkSize:16384,windowBits:15,memLevel:8,strategy:u,to:""},t||{});var e=this.options;e.raw&&0= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1); +} +_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start + + +// convert string to array (typed, when possible) +exports.string2buf = function (str) { + var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; + + // count binary size + for (m_pos = 0; m_pos < str_len; m_pos++) { + c = str.charCodeAt(m_pos); + if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { + c2 = str.charCodeAt(m_pos + 1); + if ((c2 & 0xfc00) === 0xdc00) { + c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); + m_pos++; + } + } + buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; + } + + // allocate buffer + buf = new utils.Buf8(buf_len); + + // convert + for (i = 0, m_pos = 0; i < buf_len; m_pos++) { + c = str.charCodeAt(m_pos); + if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { + c2 = str.charCodeAt(m_pos + 1); + if ((c2 & 0xfc00) === 0xdc00) { + c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); + m_pos++; + } + } + if (c < 0x80) { + /* one byte */ + buf[i++] = c; + } else if (c < 0x800) { + /* two bytes */ + buf[i++] = 0xC0 | (c >>> 6); + buf[i++] = 0x80 | (c & 0x3f); + } else if (c < 0x10000) { + /* three bytes */ + buf[i++] = 0xE0 | (c >>> 12); + buf[i++] = 0x80 | (c >>> 6 & 0x3f); + buf[i++] = 0x80 | (c & 0x3f); + } else { + /* four bytes */ + buf[i++] = 0xf0 | (c >>> 18); + buf[i++] = 0x80 | (c >>> 12 & 0x3f); + buf[i++] = 0x80 | (c >>> 6 & 0x3f); + buf[i++] = 0x80 | (c & 0x3f); + } + } + + return buf; +}; + +// Helper (used in 2 places) +function buf2binstring(buf, len) { + // On Chrome, the arguments in a function call that are allowed is `65534`. + // If the length of the buffer is smaller than that, we can use this optimization, + // otherwise we will take a slower path. + if (len < 65534) { + if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) { + return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); + } + } + + var result = ''; + for (var i = 0; i < len; i++) { + result += String.fromCharCode(buf[i]); + } + return result; +} + + +// Convert byte array to binary string +exports.buf2binstring = function (buf) { + return buf2binstring(buf, buf.length); +}; + + +// Convert binary string (typed, when possible) +exports.binstring2buf = function (str) { + var buf = new utils.Buf8(str.length); + for (var i = 0, len = buf.length; i < len; i++) { + buf[i] = str.charCodeAt(i); + } + return buf; +}; + + +// convert array to string +exports.buf2string = function (buf, max) { + var i, out, c, c_len; + var len = max || buf.length; + + // Reserve max possible length (2 words per char) + // NB: by unknown reasons, Array is significantly faster for + // String.fromCharCode.apply than Uint16Array. + var utf16buf = new Array(len * 2); + + for (out = 0, i = 0; i < len;) { + c = buf[i++]; + // quick process ascii + if (c < 0x80) { utf16buf[out++] = c; continue; } + + c_len = _utf8len[c]; + // skip 5 & 6 byte codes + if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; } + + // apply mask on first byte + c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; + // join the rest + while (c_len > 1 && i < len) { + c = (c << 6) | (buf[i++] & 0x3f); + c_len--; + } + + // terminated by end of string? + if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } + + if (c < 0x10000) { + utf16buf[out++] = c; + } else { + c -= 0x10000; + utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); + utf16buf[out++] = 0xdc00 | (c & 0x3ff); + } + } + + return buf2binstring(utf16buf, out); +}; + + +// Calculate max possible position in utf8 buffer, +// that will not break sequence. If that's not possible +// - (very small limits) return max size as is. +// +// buf[] - utf8 bytes array +// max - length limit (mandatory); +exports.utf8border = function (buf, max) { + var pos; + + max = max || buf.length; + if (max > buf.length) { max = buf.length; } + + // go back from last position, until start of sequence found + pos = max - 1; + while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } + + // Very small and broken sequence, + // return max, because we should return something anyway. + if (pos < 0) { return max; } + + // If we came to start of buffer - that means buffer is too small, + // return max too. + if (pos === 0) { return max; } + + return (pos + _utf8len[buf[pos]] > max) ? pos : max; +}; + +},{"./common":1}],3:[function(require,module,exports){ +'use strict'; + +// Note: adler32 takes 12% for level 0 and 2% for level 6. +// It isn't worth it to make additional optimizations as in original. +// Small size is preferable. + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +function adler32(adler, buf, len, pos) { + var s1 = (adler & 0xffff) |0, + s2 = ((adler >>> 16) & 0xffff) |0, + n = 0; + + while (len !== 0) { + // Set limit ~ twice less than 5552, to keep + // s2 in 31-bits, because we force signed ints. + // in other case %= will fail. + n = len > 2000 ? 2000 : len; + len -= n; + + do { + s1 = (s1 + buf[pos++]) |0; + s2 = (s2 + s1) |0; + } while (--n); + + s1 %= 65521; + s2 %= 65521; + } + + return (s1 | (s2 << 16)) |0; +} + + +module.exports = adler32; + +},{}],4:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +module.exports = { + + /* Allowed flush values; see deflate() and inflate() below for details */ + Z_NO_FLUSH: 0, + Z_PARTIAL_FLUSH: 1, + Z_SYNC_FLUSH: 2, + Z_FULL_FLUSH: 3, + Z_FINISH: 4, + Z_BLOCK: 5, + Z_TREES: 6, + + /* Return codes for the compression/decompression functions. Negative values + * are errors, positive values are used for special but normal events. + */ + Z_OK: 0, + Z_STREAM_END: 1, + Z_NEED_DICT: 2, + Z_ERRNO: -1, + Z_STREAM_ERROR: -2, + Z_DATA_ERROR: -3, + //Z_MEM_ERROR: -4, + Z_BUF_ERROR: -5, + //Z_VERSION_ERROR: -6, + + /* compression levels */ + Z_NO_COMPRESSION: 0, + Z_BEST_SPEED: 1, + Z_BEST_COMPRESSION: 9, + Z_DEFAULT_COMPRESSION: -1, + + + Z_FILTERED: 1, + Z_HUFFMAN_ONLY: 2, + Z_RLE: 3, + Z_FIXED: 4, + Z_DEFAULT_STRATEGY: 0, + + /* Possible values of the data_type field (though see inflate()) */ + Z_BINARY: 0, + Z_TEXT: 1, + //Z_ASCII: 1, // = Z_TEXT (deprecated) + Z_UNKNOWN: 2, + + /* The deflate compression method */ + Z_DEFLATED: 8 + //Z_NULL: null // Use -1 or null inline, depending on var type +}; + +},{}],5:[function(require,module,exports){ +'use strict'; + +// Note: we can't get significant speed boost here. +// So write code to minimize size - no pregenerated tables +// and array tools dependencies. + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +// Use ordinary array, since untyped makes no boost here +function makeTable() { + var c, table = []; + + for (var n = 0; n < 256; n++) { + c = n; + for (var k = 0; k < 8; k++) { + c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); + } + table[n] = c; + } + + return table; +} + +// Create table on load. Just 255 signed longs. Not a problem. +var crcTable = makeTable(); + + +function crc32(crc, buf, len, pos) { + var t = crcTable, + end = pos + len; + + crc ^= -1; + + for (var i = pos; i < end; i++) { + crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; + } + + return (crc ^ (-1)); // >>> 0; +} + + +module.exports = crc32; + +},{}],6:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +function GZheader() { + /* true if compressed data believed to be text */ + this.text = 0; + /* modification time */ + this.time = 0; + /* extra flags (not used when writing a gzip file) */ + this.xflags = 0; + /* operating system */ + this.os = 0; + /* pointer to extra field or Z_NULL if none */ + this.extra = null; + /* extra field length (valid if extra != Z_NULL) */ + this.extra_len = 0; // Actually, we don't need it in JS, + // but leave for few code modifications + + // + // Setup limits is not necessary because in js we should not preallocate memory + // for inflate use constant limit in 65536 bytes + // + + /* space at extra (only when reading header) */ + // this.extra_max = 0; + /* pointer to zero-terminated file name or Z_NULL */ + this.name = ''; + /* space at name (only when reading header) */ + // this.name_max = 0; + /* pointer to zero-terminated comment or Z_NULL */ + this.comment = ''; + /* space at comment (only when reading header) */ + // this.comm_max = 0; + /* true if there was or will be a header crc */ + this.hcrc = 0; + /* true when done reading gzip header (not used when writing a gzip file) */ + this.done = false; +} + +module.exports = GZheader; + +},{}],7:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +// See state defs from inflate.js +var BAD = 30; /* got a data error -- remain here until reset */ +var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ + +/* + Decode literal, length, and distance codes and write out the resulting + literal and match bytes until either not enough input or output is + available, an end-of-block is encountered, or a data error is encountered. + When large enough input and output buffers are supplied to inflate(), for + example, a 16K input buffer and a 64K output buffer, more than 95% of the + inflate execution time is spent in this routine. + + Entry assumptions: + + state.mode === LEN + strm.avail_in >= 6 + strm.avail_out >= 258 + start >= strm.avail_out + state.bits < 8 + + On return, state.mode is one of: + + LEN -- ran out of enough output space or enough available input + TYPE -- reached end of block code, inflate() to interpret next block + BAD -- error in block data + + Notes: + + - The maximum input bits used by a length/distance pair is 15 bits for the + length code, 5 bits for the length extra, 15 bits for the distance code, + and 13 bits for the distance extra. This totals 48 bits, or six bytes. + Therefore if strm.avail_in >= 6, then there is enough input to avoid + checking for available input while decoding. + + - The maximum bytes that a single length/distance pair can output is 258 + bytes, which is the maximum length that can be coded. inflate_fast() + requires strm.avail_out >= 258 for each loop to avoid checking for + output space. + */ +module.exports = function inflate_fast(strm, start) { + var state; + var _in; /* local strm.input */ + var last; /* have enough input while in < last */ + var _out; /* local strm.output */ + var beg; /* inflate()'s initial strm.output */ + var end; /* while out < end, enough space available */ +//#ifdef INFLATE_STRICT + var dmax; /* maximum distance from zlib header */ +//#endif + var wsize; /* window size or zero if not using window */ + var whave; /* valid bytes in the window */ + var wnext; /* window write index */ + // Use `s_window` instead `window`, avoid conflict with instrumentation tools + var s_window; /* allocated sliding window, if wsize != 0 */ + var hold; /* local strm.hold */ + var bits; /* local strm.bits */ + var lcode; /* local strm.lencode */ + var dcode; /* local strm.distcode */ + var lmask; /* mask for first level of length codes */ + var dmask; /* mask for first level of distance codes */ + var here; /* retrieved table entry */ + var op; /* code bits, operation, extra bits, or */ + /* window position, window bytes to copy */ + var len; /* match length, unused bytes */ + var dist; /* match distance */ + var from; /* where to copy match from */ + var from_source; + + + var input, output; // JS specific, because we have no pointers + + /* copy state to local variables */ + state = strm.state; + //here = state.here; + _in = strm.next_in; + input = strm.input; + last = _in + (strm.avail_in - 5); + _out = strm.next_out; + output = strm.output; + beg = _out - (start - strm.avail_out); + end = _out + (strm.avail_out - 257); +//#ifdef INFLATE_STRICT + dmax = state.dmax; +//#endif + wsize = state.wsize; + whave = state.whave; + wnext = state.wnext; + s_window = state.window; + hold = state.hold; + bits = state.bits; + lcode = state.lencode; + dcode = state.distcode; + lmask = (1 << state.lenbits) - 1; + dmask = (1 << state.distbits) - 1; + + + /* decode literals and length/distances until end-of-block or not enough + input data or output space */ + + top: + do { + if (bits < 15) { + hold += input[_in++] << bits; + bits += 8; + hold += input[_in++] << bits; + bits += 8; + } + + here = lcode[hold & lmask]; + + dolen: + for (;;) { // Goto emulation + op = here >>> 24/*here.bits*/; + hold >>>= op; + bits -= op; + op = (here >>> 16) & 0xff/*here.op*/; + if (op === 0) { /* literal */ + //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? + // "inflate: literal '%c'\n" : + // "inflate: literal 0x%02x\n", here.val)); + output[_out++] = here & 0xffff/*here.val*/; + } + else if (op & 16) { /* length base */ + len = here & 0xffff/*here.val*/; + op &= 15; /* number of extra bits */ + if (op) { + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + } + len += hold & ((1 << op) - 1); + hold >>>= op; + bits -= op; + } + //Tracevv((stderr, "inflate: length %u\n", len)); + if (bits < 15) { + hold += input[_in++] << bits; + bits += 8; + hold += input[_in++] << bits; + bits += 8; + } + here = dcode[hold & dmask]; + + dodist: + for (;;) { // goto emulation + op = here >>> 24/*here.bits*/; + hold >>>= op; + bits -= op; + op = (here >>> 16) & 0xff/*here.op*/; + + if (op & 16) { /* distance base */ + dist = here & 0xffff/*here.val*/; + op &= 15; /* number of extra bits */ + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + } + } + dist += hold & ((1 << op) - 1); +//#ifdef INFLATE_STRICT + if (dist > dmax) { + strm.msg = 'invalid distance too far back'; + state.mode = BAD; + break top; + } +//#endif + hold >>>= op; + bits -= op; + //Tracevv((stderr, "inflate: distance %u\n", dist)); + op = _out - beg; /* max distance in output */ + if (dist > op) { /* see if copy from window */ + op = dist - op; /* distance back in window */ + if (op > whave) { + if (state.sane) { + strm.msg = 'invalid distance too far back'; + state.mode = BAD; + break top; + } + +// (!) This block is disabled in zlib defaults, +// don't enable it for binary compatibility +//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR +// if (len <= op - whave) { +// do { +// output[_out++] = 0; +// } while (--len); +// continue top; +// } +// len -= op - whave; +// do { +// output[_out++] = 0; +// } while (--op > whave); +// if (op === 0) { +// from = _out - dist; +// do { +// output[_out++] = output[from++]; +// } while (--len); +// continue top; +// } +//#endif + } + from = 0; // window index + from_source = s_window; + if (wnext === 0) { /* very common case */ + from += wsize - op; + if (op < len) { /* some from window */ + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; /* rest from output */ + from_source = output; + } + } + else if (wnext < op) { /* wrap around window */ + from += wsize + wnext - op; + op -= wnext; + if (op < len) { /* some from end of window */ + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = 0; + if (wnext < len) { /* some from start of window */ + op = wnext; + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; /* rest from output */ + from_source = output; + } + } + } + else { /* contiguous in window */ + from += wnext - op; + if (op < len) { /* some from window */ + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; /* rest from output */ + from_source = output; + } + } + while (len > 2) { + output[_out++] = from_source[from++]; + output[_out++] = from_source[from++]; + output[_out++] = from_source[from++]; + len -= 3; + } + if (len) { + output[_out++] = from_source[from++]; + if (len > 1) { + output[_out++] = from_source[from++]; + } + } + } + else { + from = _out - dist; /* copy direct from output */ + do { /* minimum length is three */ + output[_out++] = output[from++]; + output[_out++] = output[from++]; + output[_out++] = output[from++]; + len -= 3; + } while (len > 2); + if (len) { + output[_out++] = output[from++]; + if (len > 1) { + output[_out++] = output[from++]; + } + } + } + } + else if ((op & 64) === 0) { /* 2nd level distance code */ + here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; + continue dodist; + } + else { + strm.msg = 'invalid distance code'; + state.mode = BAD; + break top; + } + + break; // need to emulate goto via "continue" + } + } + else if ((op & 64) === 0) { /* 2nd level length code */ + here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; + continue dolen; + } + else if (op & 32) { /* end-of-block */ + //Tracevv((stderr, "inflate: end of block\n")); + state.mode = TYPE; + break top; + } + else { + strm.msg = 'invalid literal/length code'; + state.mode = BAD; + break top; + } + + break; // need to emulate goto via "continue" + } + } while (_in < last && _out < end); + + /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ + len = bits >> 3; + _in -= len; + bits -= len << 3; + hold &= (1 << bits) - 1; + + /* update state and return */ + strm.next_in = _in; + strm.next_out = _out; + strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last)); + strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end)); + state.hold = hold; + state.bits = bits; + return; +}; + +},{}],8:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +var utils = require('../utils/common'); +var adler32 = require('./adler32'); +var crc32 = require('./crc32'); +var inflate_fast = require('./inffast'); +var inflate_table = require('./inftrees'); + +var CODES = 0; +var LENS = 1; +var DISTS = 2; + +/* Public constants ==========================================================*/ +/* ===========================================================================*/ + + +/* Allowed flush values; see deflate() and inflate() below for details */ +//var Z_NO_FLUSH = 0; +//var Z_PARTIAL_FLUSH = 1; +//var Z_SYNC_FLUSH = 2; +//var Z_FULL_FLUSH = 3; +var Z_FINISH = 4; +var Z_BLOCK = 5; +var Z_TREES = 6; + + +/* Return codes for the compression/decompression functions. Negative values + * are errors, positive values are used for special but normal events. + */ +var Z_OK = 0; +var Z_STREAM_END = 1; +var Z_NEED_DICT = 2; +//var Z_ERRNO = -1; +var Z_STREAM_ERROR = -2; +var Z_DATA_ERROR = -3; +var Z_MEM_ERROR = -4; +var Z_BUF_ERROR = -5; +//var Z_VERSION_ERROR = -6; + +/* The deflate compression method */ +var Z_DEFLATED = 8; + + +/* STATES ====================================================================*/ +/* ===========================================================================*/ + + +var HEAD = 1; /* i: waiting for magic header */ +var FLAGS = 2; /* i: waiting for method and flags (gzip) */ +var TIME = 3; /* i: waiting for modification time (gzip) */ +var OS = 4; /* i: waiting for extra flags and operating system (gzip) */ +var EXLEN = 5; /* i: waiting for extra length (gzip) */ +var EXTRA = 6; /* i: waiting for extra bytes (gzip) */ +var NAME = 7; /* i: waiting for end of file name (gzip) */ +var COMMENT = 8; /* i: waiting for end of comment (gzip) */ +var HCRC = 9; /* i: waiting for header crc (gzip) */ +var DICTID = 10; /* i: waiting for dictionary check value */ +var DICT = 11; /* waiting for inflateSetDictionary() call */ +var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ +var TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */ +var STORED = 14; /* i: waiting for stored size (length and complement) */ +var COPY_ = 15; /* i/o: same as COPY below, but only first time in */ +var COPY = 16; /* i/o: waiting for input or output to copy stored block */ +var TABLE = 17; /* i: waiting for dynamic block table lengths */ +var LENLENS = 18; /* i: waiting for code length code lengths */ +var CODELENS = 19; /* i: waiting for length/lit and distance code lengths */ +var LEN_ = 20; /* i: same as LEN below, but only first time in */ +var LEN = 21; /* i: waiting for length/lit/eob code */ +var LENEXT = 22; /* i: waiting for length extra bits */ +var DIST = 23; /* i: waiting for distance code */ +var DISTEXT = 24; /* i: waiting for distance extra bits */ +var MATCH = 25; /* o: waiting for output space to copy string */ +var LIT = 26; /* o: waiting for output space to write literal */ +var CHECK = 27; /* i: waiting for 32-bit check value */ +var LENGTH = 28; /* i: waiting for 32-bit length (gzip) */ +var DONE = 29; /* finished check, done -- remain here until reset */ +var BAD = 30; /* got a data error -- remain here until reset */ +var MEM = 31; /* got an inflate() memory error -- remain here until reset */ +var SYNC = 32; /* looking for synchronization bytes to restart inflate() */ + +/* ===========================================================================*/ + + + +var ENOUGH_LENS = 852; +var ENOUGH_DISTS = 592; +//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); + +var MAX_WBITS = 15; +/* 32K LZ77 window */ +var DEF_WBITS = MAX_WBITS; + + +function zswap32(q) { + return (((q >>> 24) & 0xff) + + ((q >>> 8) & 0xff00) + + ((q & 0xff00) << 8) + + ((q & 0xff) << 24)); +} + + +function InflateState() { + this.mode = 0; /* current inflate mode */ + this.last = false; /* true if processing last block */ + this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ + this.havedict = false; /* true if dictionary provided */ + this.flags = 0; /* gzip header method and flags (0 if zlib) */ + this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */ + this.check = 0; /* protected copy of check value */ + this.total = 0; /* protected copy of output count */ + // TODO: may be {} + this.head = null; /* where to save gzip header information */ + + /* sliding window */ + this.wbits = 0; /* log base 2 of requested window size */ + this.wsize = 0; /* window size or zero if not using window */ + this.whave = 0; /* valid bytes in the window */ + this.wnext = 0; /* window write index */ + this.window = null; /* allocated sliding window, if needed */ + + /* bit accumulator */ + this.hold = 0; /* input bit accumulator */ + this.bits = 0; /* number of bits in "in" */ + + /* for string and stored block copying */ + this.length = 0; /* literal or length of data to copy */ + this.offset = 0; /* distance back to copy string from */ + + /* for table and code decoding */ + this.extra = 0; /* extra bits needed */ + + /* fixed and dynamic code tables */ + this.lencode = null; /* starting table for length/literal codes */ + this.distcode = null; /* starting table for distance codes */ + this.lenbits = 0; /* index bits for lencode */ + this.distbits = 0; /* index bits for distcode */ + + /* dynamic table building */ + this.ncode = 0; /* number of code length code lengths */ + this.nlen = 0; /* number of length code lengths */ + this.ndist = 0; /* number of distance code lengths */ + this.have = 0; /* number of code lengths in lens[] */ + this.next = null; /* next available space in codes[] */ + + this.lens = new utils.Buf16(320); /* temporary storage for code lengths */ + this.work = new utils.Buf16(288); /* work area for code table building */ + + /* + because we don't have pointers in js, we use lencode and distcode directly + as buffers so we don't need codes + */ + //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */ + this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */ + this.distdyn = null; /* dynamic table for distance codes (JS specific) */ + this.sane = 0; /* if false, allow invalid distance too far */ + this.back = 0; /* bits back of last unprocessed length/lit */ + this.was = 0; /* initial length of match */ +} + +function inflateResetKeep(strm) { + var state; + + if (!strm || !strm.state) { return Z_STREAM_ERROR; } + state = strm.state; + strm.total_in = strm.total_out = state.total = 0; + strm.msg = ''; /*Z_NULL*/ + if (state.wrap) { /* to support ill-conceived Java test suite */ + strm.adler = state.wrap & 1; + } + state.mode = HEAD; + state.last = 0; + state.havedict = 0; + state.dmax = 32768; + state.head = null/*Z_NULL*/; + state.hold = 0; + state.bits = 0; + //state.lencode = state.distcode = state.next = state.codes; + state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS); + state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS); + + state.sane = 1; + state.back = -1; + //Tracev((stderr, "inflate: reset\n")); + return Z_OK; +} + +function inflateReset(strm) { + var state; + + if (!strm || !strm.state) { return Z_STREAM_ERROR; } + state = strm.state; + state.wsize = 0; + state.whave = 0; + state.wnext = 0; + return inflateResetKeep(strm); + +} + +function inflateReset2(strm, windowBits) { + var wrap; + var state; + + /* get the state */ + if (!strm || !strm.state) { return Z_STREAM_ERROR; } + state = strm.state; + + /* extract wrap request from windowBits parameter */ + if (windowBits < 0) { + wrap = 0; + windowBits = -windowBits; + } + else { + wrap = (windowBits >> 4) + 1; + if (windowBits < 48) { + windowBits &= 15; + } + } + + /* set number of window bits, free window if different */ + if (windowBits && (windowBits < 8 || windowBits > 15)) { + return Z_STREAM_ERROR; + } + if (state.window !== null && state.wbits !== windowBits) { + state.window = null; + } + + /* update state and reset the rest of it */ + state.wrap = wrap; + state.wbits = windowBits; + return inflateReset(strm); +} + +function inflateInit2(strm, windowBits) { + var ret; + var state; + + if (!strm) { return Z_STREAM_ERROR; } + //strm.msg = Z_NULL; /* in case we return an error */ + + state = new InflateState(); + + //if (state === Z_NULL) return Z_MEM_ERROR; + //Tracev((stderr, "inflate: allocated\n")); + strm.state = state; + state.window = null/*Z_NULL*/; + ret = inflateReset2(strm, windowBits); + if (ret !== Z_OK) { + strm.state = null/*Z_NULL*/; + } + return ret; +} + +function inflateInit(strm) { + return inflateInit2(strm, DEF_WBITS); +} + + +/* + Return state with length and distance decoding tables and index sizes set to + fixed code decoding. Normally this returns fixed tables from inffixed.h. + If BUILDFIXED is defined, then instead this routine builds the tables the + first time it's called, and returns those tables the first time and + thereafter. This reduces the size of the code by about 2K bytes, in + exchange for a little execution time. However, BUILDFIXED should not be + used for threaded applications, since the rewriting of the tables and virgin + may not be thread-safe. + */ +var virgin = true; + +var lenfix, distfix; // We have no pointers in JS, so keep tables separate + +function fixedtables(state) { + /* build fixed huffman tables if first call (may not be thread safe) */ + if (virgin) { + var sym; + + lenfix = new utils.Buf32(512); + distfix = new utils.Buf32(32); + + /* literal/length table */ + sym = 0; + while (sym < 144) { state.lens[sym++] = 8; } + while (sym < 256) { state.lens[sym++] = 9; } + while (sym < 280) { state.lens[sym++] = 7; } + while (sym < 288) { state.lens[sym++] = 8; } + + inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 }); + + /* distance table */ + sym = 0; + while (sym < 32) { state.lens[sym++] = 5; } + + inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 }); + + /* do this just once */ + virgin = false; + } + + state.lencode = lenfix; + state.lenbits = 9; + state.distcode = distfix; + state.distbits = 5; +} + + +/* + Update the window with the last wsize (normally 32K) bytes written before + returning. If window does not exist yet, create it. This is only called + when a window is already in use, or when output has been written during this + inflate call, but the end of the deflate stream has not been reached yet. + It is also called to create a window for dictionary data when a dictionary + is loaded. + + Providing output buffers larger than 32K to inflate() should provide a speed + advantage, since only the last 32K of output is copied to the sliding window + upon return from inflate(), and since all distances after the first 32K of + output will fall in the output data, making match copies simpler and faster. + The advantage may be dependent on the size of the processor's data caches. + */ +function updatewindow(strm, src, end, copy) { + var dist; + var state = strm.state; + + /* if it hasn't been done already, allocate space for the window */ + if (state.window === null) { + state.wsize = 1 << state.wbits; + state.wnext = 0; + state.whave = 0; + + state.window = new utils.Buf8(state.wsize); + } + + /* copy state->wsize or less output bytes into the circular window */ + if (copy >= state.wsize) { + utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0); + state.wnext = 0; + state.whave = state.wsize; + } + else { + dist = state.wsize - state.wnext; + if (dist > copy) { + dist = copy; + } + //zmemcpy(state->window + state->wnext, end - copy, dist); + utils.arraySet(state.window, src, end - copy, dist, state.wnext); + copy -= dist; + if (copy) { + //zmemcpy(state->window, end - copy, copy); + utils.arraySet(state.window, src, end - copy, copy, 0); + state.wnext = copy; + state.whave = state.wsize; + } + else { + state.wnext += dist; + if (state.wnext === state.wsize) { state.wnext = 0; } + if (state.whave < state.wsize) { state.whave += dist; } + } + } + return 0; +} + +function inflate(strm, flush) { + var state; + var input, output; // input/output buffers + var next; /* next input INDEX */ + var put; /* next output INDEX */ + var have, left; /* available input and output */ + var hold; /* bit buffer */ + var bits; /* bits in bit buffer */ + var _in, _out; /* save starting available input and output */ + var copy; /* number of stored or match bytes to copy */ + var from; /* where to copy match bytes from */ + var from_source; + var here = 0; /* current decoding table entry */ + var here_bits, here_op, here_val; // paked "here" denormalized (JS specific) + //var last; /* parent table entry */ + var last_bits, last_op, last_val; // paked "last" denormalized (JS specific) + var len; /* length to copy for repeats, bits to drop */ + var ret; /* return code */ + var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */ + var opts; + + var n; // temporary var for NEED_BITS + + var order = /* permutation of code lengths */ + [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]; + + + if (!strm || !strm.state || !strm.output || + (!strm.input && strm.avail_in !== 0)) { + return Z_STREAM_ERROR; + } + + state = strm.state; + if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */ + + + //--- LOAD() --- + put = strm.next_out; + output = strm.output; + left = strm.avail_out; + next = strm.next_in; + input = strm.input; + have = strm.avail_in; + hold = state.hold; + bits = state.bits; + //--- + + _in = have; + _out = left; + ret = Z_OK; + + inf_leave: // goto emulation + for (;;) { + switch (state.mode) { + case HEAD: + if (state.wrap === 0) { + state.mode = TYPEDO; + break; + } + //=== NEEDBITS(16); + while (bits < 16) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */ + state.check = 0/*crc32(0L, Z_NULL, 0)*/; + //=== CRC2(state.check, hold); + hbuf[0] = hold & 0xff; + hbuf[1] = (hold >>> 8) & 0xff; + state.check = crc32(state.check, hbuf, 2, 0); + //===// + + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = FLAGS; + break; + } + state.flags = 0; /* expect zlib header */ + if (state.head) { + state.head.done = false; + } + if (!(state.wrap & 1) || /* check if zlib header allowed */ + (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) { + strm.msg = 'incorrect header check'; + state.mode = BAD; + break; + } + if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) { + strm.msg = 'unknown compression method'; + state.mode = BAD; + break; + } + //--- DROPBITS(4) ---// + hold >>>= 4; + bits -= 4; + //---// + len = (hold & 0x0f)/*BITS(4)*/ + 8; + if (state.wbits === 0) { + state.wbits = len; + } + else if (len > state.wbits) { + strm.msg = 'invalid window size'; + state.mode = BAD; + break; + } + state.dmax = 1 << len; + //Tracev((stderr, "inflate: zlib header ok\n")); + strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; + state.mode = hold & 0x200 ? DICTID : TYPE; + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + break; + case FLAGS: + //=== NEEDBITS(16); */ + while (bits < 16) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.flags = hold; + if ((state.flags & 0xff) !== Z_DEFLATED) { + strm.msg = 'unknown compression method'; + state.mode = BAD; + break; + } + if (state.flags & 0xe000) { + strm.msg = 'unknown header flags set'; + state.mode = BAD; + break; + } + if (state.head) { + state.head.text = ((hold >> 8) & 1); + } + if (state.flags & 0x0200) { + //=== CRC2(state.check, hold); + hbuf[0] = hold & 0xff; + hbuf[1] = (hold >>> 8) & 0xff; + state.check = crc32(state.check, hbuf, 2, 0); + //===// + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = TIME; + /* falls through */ + case TIME: + //=== NEEDBITS(32); */ + while (bits < 32) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if (state.head) { + state.head.time = hold; + } + if (state.flags & 0x0200) { + //=== CRC4(state.check, hold) + hbuf[0] = hold & 0xff; + hbuf[1] = (hold >>> 8) & 0xff; + hbuf[2] = (hold >>> 16) & 0xff; + hbuf[3] = (hold >>> 24) & 0xff; + state.check = crc32(state.check, hbuf, 4, 0); + //=== + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = OS; + /* falls through */ + case OS: + //=== NEEDBITS(16); */ + while (bits < 16) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if (state.head) { + state.head.xflags = (hold & 0xff); + state.head.os = (hold >> 8); + } + if (state.flags & 0x0200) { + //=== CRC2(state.check, hold); + hbuf[0] = hold & 0xff; + hbuf[1] = (hold >>> 8) & 0xff; + state.check = crc32(state.check, hbuf, 2, 0); + //===// + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = EXLEN; + /* falls through */ + case EXLEN: + if (state.flags & 0x0400) { + //=== NEEDBITS(16); */ + while (bits < 16) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.length = hold; + if (state.head) { + state.head.extra_len = hold; + } + if (state.flags & 0x0200) { + //=== CRC2(state.check, hold); + hbuf[0] = hold & 0xff; + hbuf[1] = (hold >>> 8) & 0xff; + state.check = crc32(state.check, hbuf, 2, 0); + //===// + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + } + else if (state.head) { + state.head.extra = null/*Z_NULL*/; + } + state.mode = EXTRA; + /* falls through */ + case EXTRA: + if (state.flags & 0x0400) { + copy = state.length; + if (copy > have) { copy = have; } + if (copy) { + if (state.head) { + len = state.head.extra_len - state.length; + if (!state.head.extra) { + // Use untyped array for more convenient processing later + state.head.extra = new Array(state.head.extra_len); + } + utils.arraySet( + state.head.extra, + input, + next, + // extra field is limited to 65536 bytes + // - no need for additional size check + copy, + /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/ + len + ); + //zmemcpy(state.head.extra + len, next, + // len + copy > state.head.extra_max ? + // state.head.extra_max - len : copy); + } + if (state.flags & 0x0200) { + state.check = crc32(state.check, input, copy, next); + } + have -= copy; + next += copy; + state.length -= copy; + } + if (state.length) { break inf_leave; } + } + state.length = 0; + state.mode = NAME; + /* falls through */ + case NAME: + if (state.flags & 0x0800) { + if (have === 0) { break inf_leave; } + copy = 0; + do { + // TODO: 2 or 1 bytes? + len = input[next + copy++]; + /* use constant limit because in js we should not preallocate memory */ + if (state.head && len && + (state.length < 65536 /*state.head.name_max*/)) { + state.head.name += String.fromCharCode(len); + } + } while (len && copy < have); + + if (state.flags & 0x0200) { + state.check = crc32(state.check, input, copy, next); + } + have -= copy; + next += copy; + if (len) { break inf_leave; } + } + else if (state.head) { + state.head.name = null; + } + state.length = 0; + state.mode = COMMENT; + /* falls through */ + case COMMENT: + if (state.flags & 0x1000) { + if (have === 0) { break inf_leave; } + copy = 0; + do { + len = input[next + copy++]; + /* use constant limit because in js we should not preallocate memory */ + if (state.head && len && + (state.length < 65536 /*state.head.comm_max*/)) { + state.head.comment += String.fromCharCode(len); + } + } while (len && copy < have); + if (state.flags & 0x0200) { + state.check = crc32(state.check, input, copy, next); + } + have -= copy; + next += copy; + if (len) { break inf_leave; } + } + else if (state.head) { + state.head.comment = null; + } + state.mode = HCRC; + /* falls through */ + case HCRC: + if (state.flags & 0x0200) { + //=== NEEDBITS(16); */ + while (bits < 16) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if (hold !== (state.check & 0xffff)) { + strm.msg = 'header crc mismatch'; + state.mode = BAD; + break; + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + } + if (state.head) { + state.head.hcrc = ((state.flags >> 9) & 1); + state.head.done = true; + } + strm.adler = state.check = 0; + state.mode = TYPE; + break; + case DICTID: + //=== NEEDBITS(32); */ + while (bits < 32) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + strm.adler = state.check = zswap32(hold); + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = DICT; + /* falls through */ + case DICT: + if (state.havedict === 0) { + //--- RESTORE() --- + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + //--- + return Z_NEED_DICT; + } + strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; + state.mode = TYPE; + /* falls through */ + case TYPE: + if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; } + /* falls through */ + case TYPEDO: + if (state.last) { + //--- BYTEBITS() ---// + hold >>>= bits & 7; + bits -= bits & 7; + //---// + state.mode = CHECK; + break; + } + //=== NEEDBITS(3); */ + while (bits < 3) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.last = (hold & 0x01)/*BITS(1)*/; + //--- DROPBITS(1) ---// + hold >>>= 1; + bits -= 1; + //---// + + switch ((hold & 0x03)/*BITS(2)*/) { + case 0: /* stored block */ + //Tracev((stderr, "inflate: stored block%s\n", + // state.last ? " (last)" : "")); + state.mode = STORED; + break; + case 1: /* fixed block */ + fixedtables(state); + //Tracev((stderr, "inflate: fixed codes block%s\n", + // state.last ? " (last)" : "")); + state.mode = LEN_; /* decode codes */ + if (flush === Z_TREES) { + //--- DROPBITS(2) ---// + hold >>>= 2; + bits -= 2; + //---// + break inf_leave; + } + break; + case 2: /* dynamic block */ + //Tracev((stderr, "inflate: dynamic codes block%s\n", + // state.last ? " (last)" : "")); + state.mode = TABLE; + break; + case 3: + strm.msg = 'invalid block type'; + state.mode = BAD; + } + //--- DROPBITS(2) ---// + hold >>>= 2; + bits -= 2; + //---// + break; + case STORED: + //--- BYTEBITS() ---// /* go to byte boundary */ + hold >>>= bits & 7; + bits -= bits & 7; + //---// + //=== NEEDBITS(32); */ + while (bits < 32) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) { + strm.msg = 'invalid stored block lengths'; + state.mode = BAD; + break; + } + state.length = hold & 0xffff; + //Tracev((stderr, "inflate: stored length %u\n", + // state.length)); + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = COPY_; + if (flush === Z_TREES) { break inf_leave; } + /* falls through */ + case COPY_: + state.mode = COPY; + /* falls through */ + case COPY: + copy = state.length; + if (copy) { + if (copy > have) { copy = have; } + if (copy > left) { copy = left; } + if (copy === 0) { break inf_leave; } + //--- zmemcpy(put, next, copy); --- + utils.arraySet(output, input, next, copy, put); + //---// + have -= copy; + next += copy; + left -= copy; + put += copy; + state.length -= copy; + break; + } + //Tracev((stderr, "inflate: stored end\n")); + state.mode = TYPE; + break; + case TABLE: + //=== NEEDBITS(14); */ + while (bits < 14) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257; + //--- DROPBITS(5) ---// + hold >>>= 5; + bits -= 5; + //---// + state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1; + //--- DROPBITS(5) ---// + hold >>>= 5; + bits -= 5; + //---// + state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4; + //--- DROPBITS(4) ---// + hold >>>= 4; + bits -= 4; + //---// +//#ifndef PKZIP_BUG_WORKAROUND + if (state.nlen > 286 || state.ndist > 30) { + strm.msg = 'too many length or distance symbols'; + state.mode = BAD; + break; + } +//#endif + //Tracev((stderr, "inflate: table sizes ok\n")); + state.have = 0; + state.mode = LENLENS; + /* falls through */ + case LENLENS: + while (state.have < state.ncode) { + //=== NEEDBITS(3); + while (bits < 3) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.lens[order[state.have++]] = (hold & 0x07);//BITS(3); + //--- DROPBITS(3) ---// + hold >>>= 3; + bits -= 3; + //---// + } + while (state.have < 19) { + state.lens[order[state.have++]] = 0; + } + // We have separate tables & no pointers. 2 commented lines below not needed. + //state.next = state.codes; + //state.lencode = state.next; + // Switch to use dynamic table + state.lencode = state.lendyn; + state.lenbits = 7; + + opts = { bits: state.lenbits }; + ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts); + state.lenbits = opts.bits; + + if (ret) { + strm.msg = 'invalid code lengths set'; + state.mode = BAD; + break; + } + //Tracev((stderr, "inflate: code lengths ok\n")); + state.have = 0; + state.mode = CODELENS; + /* falls through */ + case CODELENS: + while (state.have < state.nlen + state.ndist) { + for (;;) { + here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/ + here_bits = here >>> 24; + here_op = (here >>> 16) & 0xff; + here_val = here & 0xffff; + + if ((here_bits) <= bits) { break; } + //--- PULLBYTE() ---// + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + if (here_val < 16) { + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + state.lens[state.have++] = here_val; + } + else { + if (here_val === 16) { + //=== NEEDBITS(here.bits + 2); + n = here_bits + 2; + while (bits < n) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + if (state.have === 0) { + strm.msg = 'invalid bit length repeat'; + state.mode = BAD; + break; + } + len = state.lens[state.have - 1]; + copy = 3 + (hold & 0x03);//BITS(2); + //--- DROPBITS(2) ---// + hold >>>= 2; + bits -= 2; + //---// + } + else if (here_val === 17) { + //=== NEEDBITS(here.bits + 3); + n = here_bits + 3; + while (bits < n) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + len = 0; + copy = 3 + (hold & 0x07);//BITS(3); + //--- DROPBITS(3) ---// + hold >>>= 3; + bits -= 3; + //---// + } + else { + //=== NEEDBITS(here.bits + 7); + n = here_bits + 7; + while (bits < n) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + len = 0; + copy = 11 + (hold & 0x7f);//BITS(7); + //--- DROPBITS(7) ---// + hold >>>= 7; + bits -= 7; + //---// + } + if (state.have + copy > state.nlen + state.ndist) { + strm.msg = 'invalid bit length repeat'; + state.mode = BAD; + break; + } + while (copy--) { + state.lens[state.have++] = len; + } + } + } + + /* handle error breaks in while */ + if (state.mode === BAD) { break; } + + /* check for end-of-block code (better have one) */ + if (state.lens[256] === 0) { + strm.msg = 'invalid code -- missing end-of-block'; + state.mode = BAD; + break; + } + + /* build code tables -- note: do not change the lenbits or distbits + values here (9 and 6) without reading the comments in inftrees.h + concerning the ENOUGH constants, which depend on those values */ + state.lenbits = 9; + + opts = { bits: state.lenbits }; + ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts); + // We have separate tables & no pointers. 2 commented lines below not needed. + // state.next_index = opts.table_index; + state.lenbits = opts.bits; + // state.lencode = state.next; + + if (ret) { + strm.msg = 'invalid literal/lengths set'; + state.mode = BAD; + break; + } + + state.distbits = 6; + //state.distcode.copy(state.codes); + // Switch to use dynamic table + state.distcode = state.distdyn; + opts = { bits: state.distbits }; + ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts); + // We have separate tables & no pointers. 2 commented lines below not needed. + // state.next_index = opts.table_index; + state.distbits = opts.bits; + // state.distcode = state.next; + + if (ret) { + strm.msg = 'invalid distances set'; + state.mode = BAD; + break; + } + //Tracev((stderr, 'inflate: codes ok\n')); + state.mode = LEN_; + if (flush === Z_TREES) { break inf_leave; } + /* falls through */ + case LEN_: + state.mode = LEN; + /* falls through */ + case LEN: + if (have >= 6 && left >= 258) { + //--- RESTORE() --- + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + //--- + inflate_fast(strm, _out); + //--- LOAD() --- + put = strm.next_out; + output = strm.output; + left = strm.avail_out; + next = strm.next_in; + input = strm.input; + have = strm.avail_in; + hold = state.hold; + bits = state.bits; + //--- + + if (state.mode === TYPE) { + state.back = -1; + } + break; + } + state.back = 0; + for (;;) { + here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/ + here_bits = here >>> 24; + here_op = (here >>> 16) & 0xff; + here_val = here & 0xffff; + + if (here_bits <= bits) { break; } + //--- PULLBYTE() ---// + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + if (here_op && (here_op & 0xf0) === 0) { + last_bits = here_bits; + last_op = here_op; + last_val = here_val; + for (;;) { + here = state.lencode[last_val + + ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; + here_bits = here >>> 24; + here_op = (here >>> 16) & 0xff; + here_val = here & 0xffff; + + if ((last_bits + here_bits) <= bits) { break; } + //--- PULLBYTE() ---// + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + //--- DROPBITS(last.bits) ---// + hold >>>= last_bits; + bits -= last_bits; + //---// + state.back += last_bits; + } + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + state.back += here_bits; + state.length = here_val; + if (here_op === 0) { + //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? + // "inflate: literal '%c'\n" : + // "inflate: literal 0x%02x\n", here.val)); + state.mode = LIT; + break; + } + if (here_op & 32) { + //Tracevv((stderr, "inflate: end of block\n")); + state.back = -1; + state.mode = TYPE; + break; + } + if (here_op & 64) { + strm.msg = 'invalid literal/length code'; + state.mode = BAD; + break; + } + state.extra = here_op & 15; + state.mode = LENEXT; + /* falls through */ + case LENEXT: + if (state.extra) { + //=== NEEDBITS(state.extra); + n = state.extra; + while (bits < n) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; + //--- DROPBITS(state.extra) ---// + hold >>>= state.extra; + bits -= state.extra; + //---// + state.back += state.extra; + } + //Tracevv((stderr, "inflate: length %u\n", state.length)); + state.was = state.length; + state.mode = DIST; + /* falls through */ + case DIST: + for (;;) { + here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/ + here_bits = here >>> 24; + here_op = (here >>> 16) & 0xff; + here_val = here & 0xffff; + + if ((here_bits) <= bits) { break; } + //--- PULLBYTE() ---// + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + if ((here_op & 0xf0) === 0) { + last_bits = here_bits; + last_op = here_op; + last_val = here_val; + for (;;) { + here = state.distcode[last_val + + ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; + here_bits = here >>> 24; + here_op = (here >>> 16) & 0xff; + here_val = here & 0xffff; + + if ((last_bits + here_bits) <= bits) { break; } + //--- PULLBYTE() ---// + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + //--- DROPBITS(last.bits) ---// + hold >>>= last_bits; + bits -= last_bits; + //---// + state.back += last_bits; + } + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + state.back += here_bits; + if (here_op & 64) { + strm.msg = 'invalid distance code'; + state.mode = BAD; + break; + } + state.offset = here_val; + state.extra = (here_op) & 15; + state.mode = DISTEXT; + /* falls through */ + case DISTEXT: + if (state.extra) { + //=== NEEDBITS(state.extra); + n = state.extra; + while (bits < n) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; + //--- DROPBITS(state.extra) ---// + hold >>>= state.extra; + bits -= state.extra; + //---// + state.back += state.extra; + } +//#ifdef INFLATE_STRICT + if (state.offset > state.dmax) { + strm.msg = 'invalid distance too far back'; + state.mode = BAD; + break; + } +//#endif + //Tracevv((stderr, "inflate: distance %u\n", state.offset)); + state.mode = MATCH; + /* falls through */ + case MATCH: + if (left === 0) { break inf_leave; } + copy = _out - left; + if (state.offset > copy) { /* copy from window */ + copy = state.offset - copy; + if (copy > state.whave) { + if (state.sane) { + strm.msg = 'invalid distance too far back'; + state.mode = BAD; + break; + } +// (!) This block is disabled in zlib defaults, +// don't enable it for binary compatibility +//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR +// Trace((stderr, "inflate.c too far\n")); +// copy -= state.whave; +// if (copy > state.length) { copy = state.length; } +// if (copy > left) { copy = left; } +// left -= copy; +// state.length -= copy; +// do { +// output[put++] = 0; +// } while (--copy); +// if (state.length === 0) { state.mode = LEN; } +// break; +//#endif + } + if (copy > state.wnext) { + copy -= state.wnext; + from = state.wsize - copy; + } + else { + from = state.wnext - copy; + } + if (copy > state.length) { copy = state.length; } + from_source = state.window; + } + else { /* copy from output */ + from_source = output; + from = put - state.offset; + copy = state.length; + } + if (copy > left) { copy = left; } + left -= copy; + state.length -= copy; + do { + output[put++] = from_source[from++]; + } while (--copy); + if (state.length === 0) { state.mode = LEN; } + break; + case LIT: + if (left === 0) { break inf_leave; } + output[put++] = state.length; + left--; + state.mode = LEN; + break; + case CHECK: + if (state.wrap) { + //=== NEEDBITS(32); + while (bits < 32) { + if (have === 0) { break inf_leave; } + have--; + // Use '|' instead of '+' to make sure that result is signed + hold |= input[next++] << bits; + bits += 8; + } + //===// + _out -= left; + strm.total_out += _out; + state.total += _out; + if (_out) { + strm.adler = state.check = + /*UPDATE(state.check, put - _out, _out);*/ + (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out)); + + } + _out = left; + // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too + if ((state.flags ? hold : zswap32(hold)) !== state.check) { + strm.msg = 'incorrect data check'; + state.mode = BAD; + break; + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + //Tracev((stderr, "inflate: check matches trailer\n")); + } + state.mode = LENGTH; + /* falls through */ + case LENGTH: + if (state.wrap && state.flags) { + //=== NEEDBITS(32); + while (bits < 32) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if (hold !== (state.total & 0xffffffff)) { + strm.msg = 'incorrect length check'; + state.mode = BAD; + break; + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + //Tracev((stderr, "inflate: length matches trailer\n")); + } + state.mode = DONE; + /* falls through */ + case DONE: + ret = Z_STREAM_END; + break inf_leave; + case BAD: + ret = Z_DATA_ERROR; + break inf_leave; + case MEM: + return Z_MEM_ERROR; + case SYNC: + /* falls through */ + default: + return Z_STREAM_ERROR; + } + } + + // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave" + + /* + Return from inflate(), updating the total counts and the check value. + If there was no progress during the inflate() call, return a buffer + error. Call updatewindow() to create and/or update the window state. + Note: a memory error from inflate() is non-recoverable. + */ + + //--- RESTORE() --- + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + //--- + + if (state.wsize || (_out !== strm.avail_out && state.mode < BAD && + (state.mode < CHECK || flush !== Z_FINISH))) { + if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) { + state.mode = MEM; + return Z_MEM_ERROR; + } + } + _in -= strm.avail_in; + _out -= strm.avail_out; + strm.total_in += _in; + strm.total_out += _out; + state.total += _out; + if (state.wrap && _out) { + strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/ + (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out)); + } + strm.data_type = state.bits + (state.last ? 64 : 0) + + (state.mode === TYPE ? 128 : 0) + + (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0); + if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) { + ret = Z_BUF_ERROR; + } + return ret; +} + +function inflateEnd(strm) { + + if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) { + return Z_STREAM_ERROR; + } + + var state = strm.state; + if (state.window) { + state.window = null; + } + strm.state = null; + return Z_OK; +} + +function inflateGetHeader(strm, head) { + var state; + + /* check state */ + if (!strm || !strm.state) { return Z_STREAM_ERROR; } + state = strm.state; + if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; } + + /* save header structure */ + state.head = head; + head.done = false; + return Z_OK; +} + +function inflateSetDictionary(strm, dictionary) { + var dictLength = dictionary.length; + + var state; + var dictid; + var ret; + + /* check state */ + if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; } + state = strm.state; + + if (state.wrap !== 0 && state.mode !== DICT) { + return Z_STREAM_ERROR; + } + + /* check for correct dictionary identifier */ + if (state.mode === DICT) { + dictid = 1; /* adler32(0, null, 0)*/ + /* dictid = adler32(dictid, dictionary, dictLength); */ + dictid = adler32(dictid, dictionary, dictLength, 0); + if (dictid !== state.check) { + return Z_DATA_ERROR; + } + } + /* copy dictionary to window using updatewindow(), which will amend the + existing dictionary if appropriate */ + ret = updatewindow(strm, dictionary, dictLength, dictLength); + if (ret) { + state.mode = MEM; + return Z_MEM_ERROR; + } + state.havedict = 1; + // Tracev((stderr, "inflate: dictionary set\n")); + return Z_OK; +} + +exports.inflateReset = inflateReset; +exports.inflateReset2 = inflateReset2; +exports.inflateResetKeep = inflateResetKeep; +exports.inflateInit = inflateInit; +exports.inflateInit2 = inflateInit2; +exports.inflate = inflate; +exports.inflateEnd = inflateEnd; +exports.inflateGetHeader = inflateGetHeader; +exports.inflateSetDictionary = inflateSetDictionary; +exports.inflateInfo = 'pako inflate (from Nodeca project)'; + +/* Not implemented +exports.inflateCopy = inflateCopy; +exports.inflateGetDictionary = inflateGetDictionary; +exports.inflateMark = inflateMark; +exports.inflatePrime = inflatePrime; +exports.inflateSync = inflateSync; +exports.inflateSyncPoint = inflateSyncPoint; +exports.inflateUndermine = inflateUndermine; +*/ + +},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +var utils = require('../utils/common'); + +var MAXBITS = 15; +var ENOUGH_LENS = 852; +var ENOUGH_DISTS = 592; +//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); + +var CODES = 0; +var LENS = 1; +var DISTS = 2; + +var lbase = [ /* Length codes 257..285 base */ + 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, + 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 +]; + +var lext = [ /* Length codes 257..285 extra */ + 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78 +]; + +var dbase = [ /* Distance codes 0..29 base */ + 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, + 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, + 8193, 12289, 16385, 24577, 0, 0 +]; + +var dext = [ /* Distance codes 0..29 extra */ + 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, + 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, + 28, 28, 29, 29, 64, 64 +]; + +module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) +{ + var bits = opts.bits; + //here = opts.here; /* table entry for duplication */ + + var len = 0; /* a code's length in bits */ + var sym = 0; /* index of code symbols */ + var min = 0, max = 0; /* minimum and maximum code lengths */ + var root = 0; /* number of index bits for root table */ + var curr = 0; /* number of index bits for current table */ + var drop = 0; /* code bits to drop for sub-table */ + var left = 0; /* number of prefix codes available */ + var used = 0; /* code entries in table used */ + var huff = 0; /* Huffman code */ + var incr; /* for incrementing code, index */ + var fill; /* index for replicating entries */ + var low; /* low bits for current root entry */ + var mask; /* mask for low root bits */ + var next; /* next available space in table */ + var base = null; /* base value table to use */ + var base_index = 0; +// var shoextra; /* extra bits table to use */ + var end; /* use base and extra for symbol > end */ + var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */ + var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */ + var extra = null; + var extra_index = 0; + + var here_bits, here_op, here_val; + + /* + Process a set of code lengths to create a canonical Huffman code. The + code lengths are lens[0..codes-1]. Each length corresponds to the + symbols 0..codes-1. The Huffman code is generated by first sorting the + symbols by length from short to long, and retaining the symbol order + for codes with equal lengths. Then the code starts with all zero bits + for the first code of the shortest length, and the codes are integer + increments for the same length, and zeros are appended as the length + increases. For the deflate format, these bits are stored backwards + from their more natural integer increment ordering, and so when the + decoding tables are built in the large loop below, the integer codes + are incremented backwards. + + This routine assumes, but does not check, that all of the entries in + lens[] are in the range 0..MAXBITS. The caller must assure this. + 1..MAXBITS is interpreted as that code length. zero means that that + symbol does not occur in this code. + + The codes are sorted by computing a count of codes for each length, + creating from that a table of starting indices for each length in the + sorted table, and then entering the symbols in order in the sorted + table. The sorted table is work[], with that space being provided by + the caller. + + The length counts are used for other purposes as well, i.e. finding + the minimum and maximum length codes, determining if there are any + codes at all, checking for a valid set of lengths, and looking ahead + at length counts to determine sub-table sizes when building the + decoding tables. + */ + + /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ + for (len = 0; len <= MAXBITS; len++) { + count[len] = 0; + } + for (sym = 0; sym < codes; sym++) { + count[lens[lens_index + sym]]++; + } + + /* bound code lengths, force root to be within code lengths */ + root = bits; + for (max = MAXBITS; max >= 1; max--) { + if (count[max] !== 0) { break; } + } + if (root > max) { + root = max; + } + if (max === 0) { /* no symbols to code at all */ + //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */ + //table.bits[opts.table_index] = 1; //here.bits = (var char)1; + //table.val[opts.table_index++] = 0; //here.val = (var short)0; + table[table_index++] = (1 << 24) | (64 << 16) | 0; + + + //table.op[opts.table_index] = 64; + //table.bits[opts.table_index] = 1; + //table.val[opts.table_index++] = 0; + table[table_index++] = (1 << 24) | (64 << 16) | 0; + + opts.bits = 1; + return 0; /* no symbols, but wait for decoding to report error */ + } + for (min = 1; min < max; min++) { + if (count[min] !== 0) { break; } + } + if (root < min) { + root = min; + } + + /* check for an over-subscribed or incomplete set of lengths */ + left = 1; + for (len = 1; len <= MAXBITS; len++) { + left <<= 1; + left -= count[len]; + if (left < 0) { + return -1; + } /* over-subscribed */ + } + if (left > 0 && (type === CODES || max !== 1)) { + return -1; /* incomplete set */ + } + + /* generate offsets into symbol table for each length for sorting */ + offs[1] = 0; + for (len = 1; len < MAXBITS; len++) { + offs[len + 1] = offs[len] + count[len]; + } + + /* sort symbols by length, by symbol order within each length */ + for (sym = 0; sym < codes; sym++) { + if (lens[lens_index + sym] !== 0) { + work[offs[lens[lens_index + sym]]++] = sym; + } + } + + /* + Create and fill in decoding tables. In this loop, the table being + filled is at next and has curr index bits. The code being used is huff + with length len. That code is converted to an index by dropping drop + bits off of the bottom. For codes where len is less than drop + curr, + those top drop + curr - len bits are incremented through all values to + fill the table with replicated entries. + + root is the number of index bits for the root table. When len exceeds + root, sub-tables are created pointed to by the root entry with an index + of the low root bits of huff. This is saved in low to check for when a + new sub-table should be started. drop is zero when the root table is + being filled, and drop is root when sub-tables are being filled. + + When a new sub-table is needed, it is necessary to look ahead in the + code lengths to determine what size sub-table is needed. The length + counts are used for this, and so count[] is decremented as codes are + entered in the tables. + + used keeps track of how many table entries have been allocated from the + provided *table space. It is checked for LENS and DIST tables against + the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in + the initial root table size constants. See the comments in inftrees.h + for more information. + + sym increments through all symbols, and the loop terminates when + all codes of length max, i.e. all codes, have been processed. This + routine permits incomplete codes, so another loop after this one fills + in the rest of the decoding tables with invalid code markers. + */ + + /* set up for code type */ + // poor man optimization - use if-else instead of switch, + // to avoid deopts in old v8 + if (type === CODES) { + base = extra = work; /* dummy value--not used */ + end = 19; + + } else if (type === LENS) { + base = lbase; + base_index -= 257; + extra = lext; + extra_index -= 257; + end = 256; + + } else { /* DISTS */ + base = dbase; + extra = dext; + end = -1; + } + + /* initialize opts for loop */ + huff = 0; /* starting code */ + sym = 0; /* starting code symbol */ + len = min; /* starting code length */ + next = table_index; /* current table to fill in */ + curr = root; /* current table index bits */ + drop = 0; /* current bits to drop from code for index */ + low = -1; /* trigger new sub-table when len > root */ + used = 1 << root; /* use root table entries */ + mask = used - 1; /* mask for comparing low */ + + /* check available table space */ + if ((type === LENS && used > ENOUGH_LENS) || + (type === DISTS && used > ENOUGH_DISTS)) { + return 1; + } + + /* process all codes and make table entries */ + for (;;) { + /* create table entry */ + here_bits = len - drop; + if (work[sym] < end) { + here_op = 0; + here_val = work[sym]; + } + else if (work[sym] > end) { + here_op = extra[extra_index + work[sym]]; + here_val = base[base_index + work[sym]]; + } + else { + here_op = 32 + 64; /* end of block */ + here_val = 0; + } + + /* replicate for those indices with low len bits equal to huff */ + incr = 1 << (len - drop); + fill = 1 << curr; + min = fill; /* save offset to next table */ + do { + fill -= incr; + table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0; + } while (fill !== 0); + + /* backwards increment the len-bit code huff */ + incr = 1 << (len - 1); + while (huff & incr) { + incr >>= 1; + } + if (incr !== 0) { + huff &= incr - 1; + huff += incr; + } else { + huff = 0; + } + + /* go to next symbol, update count, len */ + sym++; + if (--count[len] === 0) { + if (len === max) { break; } + len = lens[lens_index + work[sym]]; + } + + /* create new sub-table if needed */ + if (len > root && (huff & mask) !== low) { + /* if first time, transition to sub-tables */ + if (drop === 0) { + drop = root; + } + + /* increment past last table */ + next += min; /* here min is 1 << curr */ + + /* determine length of next table */ + curr = len - drop; + left = 1 << curr; + while (curr + drop < max) { + left -= count[curr + drop]; + if (left <= 0) { break; } + curr++; + left <<= 1; + } + + /* check for enough space */ + used += 1 << curr; + if ((type === LENS && used > ENOUGH_LENS) || + (type === DISTS && used > ENOUGH_DISTS)) { + return 1; + } + + /* point entry in root table to sub-table */ + low = huff & mask; + /*table.op[low] = curr; + table.bits[low] = root; + table.val[low] = next - opts.table_index;*/ + table[low] = (root << 24) | (curr << 16) | (next - table_index) |0; + } + } + + /* fill in remaining table entry if code is incomplete (guaranteed to have + at most one remaining entry, since if the code is incomplete, the + maximum code length that was allowed to get this far is one bit) */ + if (huff !== 0) { + //table.op[next + huff] = 64; /* invalid code marker */ + //table.bits[next + huff] = len - drop; + //table.val[next + huff] = 0; + table[next + huff] = ((len - drop) << 24) | (64 << 16) |0; + } + + /* set return parameters */ + //opts.table_index += used; + opts.bits = root; + return 0; +}; + +},{"../utils/common":1}],10:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +module.exports = { + 2: 'need dictionary', /* Z_NEED_DICT 2 */ + 1: 'stream end', /* Z_STREAM_END 1 */ + 0: '', /* Z_OK 0 */ + '-1': 'file error', /* Z_ERRNO (-1) */ + '-2': 'stream error', /* Z_STREAM_ERROR (-2) */ + '-3': 'data error', /* Z_DATA_ERROR (-3) */ + '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */ + '-5': 'buffer error', /* Z_BUF_ERROR (-5) */ + '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ +}; + +},{}],11:[function(require,module,exports){ +'use strict'; + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +function ZStream() { + /* next input byte */ + this.input = null; // JS specific, because we have no pointers + this.next_in = 0; + /* number of bytes available at input */ + this.avail_in = 0; + /* total number of input bytes read so far */ + this.total_in = 0; + /* next output byte should be put there */ + this.output = null; // JS specific, because we have no pointers + this.next_out = 0; + /* remaining free space at output */ + this.avail_out = 0; + /* total number of bytes output so far */ + this.total_out = 0; + /* last error message, NULL if no error */ + this.msg = ''/*Z_NULL*/; + /* not visible by applications */ + this.state = null; + /* best guess about the data type: binary or text */ + this.data_type = 2/*Z_UNKNOWN*/; + /* adler32 value of the uncompressed data */ + this.adler = 0; +} + +module.exports = ZStream; + +},{}],"/lib/inflate.js":[function(require,module,exports){ +'use strict'; + + +var zlib_inflate = require('./zlib/inflate'); +var utils = require('./utils/common'); +var strings = require('./utils/strings'); +var c = require('./zlib/constants'); +var msg = require('./zlib/messages'); +var ZStream = require('./zlib/zstream'); +var GZheader = require('./zlib/gzheader'); + +var toString = Object.prototype.toString; + +/** + * class Inflate + * + * Generic JS-style wrapper for zlib calls. If you don't need + * streaming behaviour - use more simple functions: [[inflate]] + * and [[inflateRaw]]. + **/ + +/* internal + * inflate.chunks -> Array + * + * Chunks of output data, if [[Inflate#onData]] not overridden. + **/ + +/** + * Inflate.result -> Uint8Array|Array|String + * + * Uncompressed result, generated by default [[Inflate#onData]] + * and [[Inflate#onEnd]] handlers. Filled after you push last chunk + * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you + * push a chunk with explicit flush (call [[Inflate#push]] with + * `Z_SYNC_FLUSH` param). + **/ + +/** + * Inflate.err -> Number + * + * Error code after inflate finished. 0 (Z_OK) on success. + * Should be checked if broken data possible. + **/ + +/** + * Inflate.msg -> String + * + * Error message, if [[Inflate.err]] != 0 + **/ + + +/** + * new Inflate(options) + * - options (Object): zlib inflate options. + * + * Creates new inflator instance with specified params. Throws exception + * on bad params. Supported options: + * + * - `windowBits` + * - `dictionary` + * + * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) + * for more information on these. + * + * Additional options, for internal needs: + * + * - `chunkSize` - size of generated data chunks (16K by default) + * - `raw` (Boolean) - do raw inflate + * - `to` (String) - if equal to 'string', then result will be converted + * from utf8 to utf16 (javascript) string. When string output requested, + * chunk length can differ from `chunkSize`, depending on content. + * + * By default, when no options set, autodetect deflate/gzip data format via + * wrapper header. + * + * ##### Example: + * + * ```javascript + * var pako = require('pako') + * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) + * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); + * + * var inflate = new pako.Inflate({ level: 3}); + * + * inflate.push(chunk1, false); + * inflate.push(chunk2, true); // true -> last chunk + * + * if (inflate.err) { throw new Error(inflate.err); } + * + * console.log(inflate.result); + * ``` + **/ +function Inflate(options) { + if (!(this instanceof Inflate)) return new Inflate(options); + + this.options = utils.assign({ + chunkSize: 16384, + windowBits: 0, + to: '' + }, options || {}); + + var opt = this.options; + + // Force window size for `raw` data, if not set directly, + // because we have no header for autodetect. + if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) { + opt.windowBits = -opt.windowBits; + if (opt.windowBits === 0) { opt.windowBits = -15; } + } + + // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate + if ((opt.windowBits >= 0) && (opt.windowBits < 16) && + !(options && options.windowBits)) { + opt.windowBits += 32; + } + + // Gzip header has no info about windows size, we can do autodetect only + // for deflate. So, if window size not set, force it to max when gzip possible + if ((opt.windowBits > 15) && (opt.windowBits < 48)) { + // bit 3 (16) -> gzipped data + // bit 4 (32) -> autodetect gzip/deflate + if ((opt.windowBits & 15) === 0) { + opt.windowBits |= 15; + } + } + + this.err = 0; // error code, if happens (0 = Z_OK) + this.msg = ''; // error message + this.ended = false; // used to avoid multiple onEnd() calls + this.chunks = []; // chunks of compressed data + + this.strm = new ZStream(); + this.strm.avail_out = 0; + + var status = zlib_inflate.inflateInit2( + this.strm, + opt.windowBits + ); + + if (status !== c.Z_OK) { + throw new Error(msg[status]); + } + + this.header = new GZheader(); + + zlib_inflate.inflateGetHeader(this.strm, this.header); + + // Setup dictionary + if (opt.dictionary) { + // Convert data if needed + if (typeof opt.dictionary === 'string') { + opt.dictionary = strings.string2buf(opt.dictionary); + } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') { + opt.dictionary = new Uint8Array(opt.dictionary); + } + if (opt.raw) { //In raw mode we need to set the dictionary early + status = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary); + if (status !== c.Z_OK) { + throw new Error(msg[status]); + } + } + } +} + +/** + * Inflate#push(data[, mode]) -> Boolean + * - data (Uint8Array|Array|ArrayBuffer|String): input data + * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. + * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH. + * + * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with + * new output chunks. Returns `true` on success. The last data block must have + * mode Z_FINISH (or `true`). That will flush internal pending buffers and call + * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you + * can use mode Z_SYNC_FLUSH, keeping the decompression context. + * + * On fail call [[Inflate#onEnd]] with error code and return false. + * + * We strongly recommend to use `Uint8Array` on input for best speed (output + * format is detected automatically). Also, don't skip last param and always + * use the same type in your code (boolean or number). That will improve JS speed. + * + * For regular `Array`-s make sure all elements are [0..255]. + * + * ##### Example + * + * ```javascript + * push(chunk, false); // push one of data chunks + * ... + * push(chunk, true); // push last chunk + * ``` + **/ +Inflate.prototype.push = function (data, mode) { + var strm = this.strm; + var chunkSize = this.options.chunkSize; + var dictionary = this.options.dictionary; + var status, _mode; + var next_out_utf8, tail, utf8str; + + // Flag to properly process Z_BUF_ERROR on testing inflate call + // when we check that all output data was flushed. + var allowBufError = false; + + if (this.ended) { return false; } + _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH); + + // Convert data if needed + if (typeof data === 'string') { + // Only binary strings can be decompressed on practice + strm.input = strings.binstring2buf(data); + } else if (toString.call(data) === '[object ArrayBuffer]') { + strm.input = new Uint8Array(data); + } else { + strm.input = data; + } + + strm.next_in = 0; + strm.avail_in = strm.input.length; + + do { + if (strm.avail_out === 0) { + strm.output = new utils.Buf8(chunkSize); + strm.next_out = 0; + strm.avail_out = chunkSize; + } + + status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */ + + if (status === c.Z_NEED_DICT && dictionary) { + status = zlib_inflate.inflateSetDictionary(this.strm, dictionary); + } + + if (status === c.Z_BUF_ERROR && allowBufError === true) { + status = c.Z_OK; + allowBufError = false; + } + + if (status !== c.Z_STREAM_END && status !== c.Z_OK) { + this.onEnd(status); + this.ended = true; + return false; + } + + if (strm.next_out) { + if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) { + + if (this.options.to === 'string') { + + next_out_utf8 = strings.utf8border(strm.output, strm.next_out); + + tail = strm.next_out - next_out_utf8; + utf8str = strings.buf2string(strm.output, next_out_utf8); + + // move tail + strm.next_out = tail; + strm.avail_out = chunkSize - tail; + if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); } + + this.onData(utf8str); + + } else { + this.onData(utils.shrinkBuf(strm.output, strm.next_out)); + } + } + } + + // When no more input data, we should check that internal inflate buffers + // are flushed. The only way to do it when avail_out = 0 - run one more + // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR. + // Here we set flag to process this error properly. + // + // NOTE. Deflate does not return error in this case and does not needs such + // logic. + if (strm.avail_in === 0 && strm.avail_out === 0) { + allowBufError = true; + } + + } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END); + + if (status === c.Z_STREAM_END) { + _mode = c.Z_FINISH; + } + + // Finalize on the last chunk. + if (_mode === c.Z_FINISH) { + status = zlib_inflate.inflateEnd(this.strm); + this.onEnd(status); + this.ended = true; + return status === c.Z_OK; + } + + // callback interim results if Z_SYNC_FLUSH. + if (_mode === c.Z_SYNC_FLUSH) { + this.onEnd(c.Z_OK); + strm.avail_out = 0; + return true; + } + + return true; +}; + + +/** + * Inflate#onData(chunk) -> Void + * - chunk (Uint8Array|Array|String): output data. Type of array depends + * on js engine support. When string output requested, each chunk + * will be string. + * + * By default, stores data blocks in `chunks[]` property and glue + * those in `onEnd`. Override this handler, if you need another behaviour. + **/ +Inflate.prototype.onData = function (chunk) { + this.chunks.push(chunk); +}; + + +/** + * Inflate#onEnd(status) -> Void + * - status (Number): inflate status. 0 (Z_OK) on success, + * other if not. + * + * Called either after you tell inflate that the input stream is + * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) + * or if an error happened. By default - join collected chunks, + * free memory and fill `results` / `err` properties. + **/ +Inflate.prototype.onEnd = function (status) { + // On success - join + if (status === c.Z_OK) { + if (this.options.to === 'string') { + // Glue & convert here, until we teach pako to send + // utf8 aligned strings to onData + this.result = this.chunks.join(''); + } else { + this.result = utils.flattenChunks(this.chunks); + } + } + this.chunks = []; + this.err = status; + this.msg = this.strm.msg; +}; + + +/** + * inflate(data[, options]) -> Uint8Array|Array|String + * - data (Uint8Array|Array|String): input data to decompress. + * - options (Object): zlib inflate options. + * + * Decompress `data` with inflate/ungzip and `options`. Autodetect + * format via wrapper header by default. That's why we don't provide + * separate `ungzip` method. + * + * Supported options are: + * + * - windowBits + * + * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) + * for more information. + * + * Sugar (options): + * + * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify + * negative windowBits implicitly. + * - `to` (String) - if equal to 'string', then result will be converted + * from utf8 to utf16 (javascript) string. When string output requested, + * chunk length can differ from `chunkSize`, depending on content. + * + * + * ##### Example: + * + * ```javascript + * var pako = require('pako') + * , input = pako.deflate([1,2,3,4,5,6,7,8,9]) + * , output; + * + * try { + * output = pako.inflate(input); + * } catch (err) + * console.log(err); + * } + * ``` + **/ +function inflate(input, options) { + var inflator = new Inflate(options); + + inflator.push(input, true); + + // That will never happens, if you don't cheat with options :) + if (inflator.err) { throw inflator.msg || msg[inflator.err]; } + + return inflator.result; +} + + +/** + * inflateRaw(data[, options]) -> Uint8Array|Array|String + * - data (Uint8Array|Array|String): input data to decompress. + * - options (Object): zlib inflate options. + * + * The same as [[inflate]], but creates raw data, without wrapper + * (header and adler32 crc). + **/ +function inflateRaw(input, options) { + options = options || {}; + options.raw = true; + return inflate(input, options); +} + + +/** + * ungzip(data[, options]) -> Uint8Array|Array|String + * - data (Uint8Array|Array|String): input data to decompress. + * - options (Object): zlib inflate options. + * + * Just shortcut to [[inflate]], because it autodetects format + * by header.content. Done for convenience. + **/ + + +exports.Inflate = Inflate; +exports.inflate = inflate; +exports.inflateRaw = inflateRaw; +exports.ungzip = inflate; + +},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js") +}); diff --git a/src/main/webapp/static/plugins/pako/1.0.11/pako_inflate.min.js b/src/main/webapp/static/plugins/pako/1.0.11/pako_inflate.min.js new file mode 100644 index 00000000..a191a78a --- /dev/null +++ b/src/main/webapp/static/plugins/pako/1.0.11/pako_inflate.min.js @@ -0,0 +1 @@ +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=e()}}(function(){return function r(o,s,f){function l(t,e){if(!s[t]){if(!o[t]){var i="function"==typeof require&&require;if(!e&&i)return i(t,!0);if(d)return d(t,!0);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}var a=s[t]={exports:{}};o[t][0].call(a.exports,function(e){return l(o[t][1][e]||e)},a,a.exports,r,o,s,f)}return s[t].exports}for(var d="function"==typeof require&&require,e=0;e>>6:(i<65536?t[r++]=224|i>>>12:(t[r++]=240|i>>>18,t[r++]=128|i>>>12&63),t[r++]=128|i>>>6&63),t[r++]=128|63&i);return t},i.buf2binstring=function(e){return d(e,e.length)},i.binstring2buf=function(e){for(var t=new f.Buf8(e.length),i=0,n=t.length;i>10&1023,s[n++]=56320|1023&a)}return d(s,n)},i.utf8border=function(e,t){var i;for((t=t||e.length)>e.length&&(t=e.length),i=t-1;0<=i&&128==(192&e[i]);)i--;return i<0?t:0===i?t:i+l[e[i]]>t?i:t}},{"./common":1}],3:[function(e,t,i){"use strict";t.exports=function(e,t,i,n){for(var a=65535&e|0,r=e>>>16&65535|0,o=0;0!==i;){for(i-=o=2e3>>1:e>>>1;t[i]=e}return t}();t.exports=function(e,t,i,n){var a=s,r=n+i;e^=-1;for(var o=n;o>>8^a[255&(e^t[o])];return-1^e}},{}],6:[function(e,t,i){"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],7:[function(e,t,i){"use strict";t.exports=function(e,t){var i,n,a,r,o,s,f,l,d,c,u,h,b,m,w,k,_,g,v,p,x,y,S,E,Z;i=e.state,n=e.next_in,E=e.input,a=n+(e.avail_in-5),r=e.next_out,Z=e.output,o=r-(t-e.avail_out),s=r+(e.avail_out-257),f=i.dmax,l=i.wsize,d=i.whave,c=i.wnext,u=i.window,h=i.hold,b=i.bits,m=i.lencode,w=i.distcode,k=(1<>>=v=g>>>24,b-=v,0===(v=g>>>16&255))Z[r++]=65535&g;else{if(!(16&v)){if(0==(64&v)){g=m[(65535&g)+(h&(1<>>=v,b-=v),b<15&&(h+=E[n++]<>>=v=g>>>24,b-=v,!(16&(v=g>>>16&255))){if(0==(64&v)){g=w[(65535&g)+(h&(1<>>=v,b-=v,(v=r-o)>3,h&=(1<<(b-=p<<3))-1,e.next_in=n,e.next_out=r,e.avail_in=n>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function r(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new z.Buf16(320),this.work=new z.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function o(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=F,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new z.Buf32(n),t.distcode=t.distdyn=new z.Buf32(a),t.sane=1,t.back=-1,T):U}function s(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,o(e)):U}function f(e,t){var i,n;return e&&e.state?(n=e.state,t<0?(i=0,t=-t):(i=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=r.wsize?(z.arraySet(r.window,t,i-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):(n<(a=r.wsize-r.wnext)&&(a=n),z.arraySet(r.window,t,i-n,a,r.wnext),(n-=a)?(z.arraySet(r.window,t,i-n,n,0),r.wnext=n,r.whave=r.wsize):(r.wnext+=a,r.wnext===r.wsize&&(r.wnext=0),r.whave>>8&255,i.check=N(i.check,B,2,0),d=l=0,i.mode=2;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&l)<<8)+(l>>8))%31){e.msg="incorrect header check",i.mode=30;break}if(8!=(15&l)){e.msg="unknown compression method",i.mode=30;break}if(d-=4,x=8+(15&(l>>>=4)),0===i.wbits)i.wbits=x;else if(x>i.wbits){e.msg="invalid window size",i.mode=30;break}i.dmax=1<>8&1),512&i.flags&&(B[0]=255&l,B[1]=l>>>8&255,i.check=N(i.check,B,2,0)),d=l=0,i.mode=3;case 3:for(;d<32;){if(0===s)break e;s--,l+=n[r++]<>>8&255,B[2]=l>>>16&255,B[3]=l>>>24&255,i.check=N(i.check,B,4,0)),d=l=0,i.mode=4;case 4:for(;d<16;){if(0===s)break e;s--,l+=n[r++]<>8),512&i.flags&&(B[0]=255&l,B[1]=l>>>8&255,i.check=N(i.check,B,2,0)),d=l=0,i.mode=5;case 5:if(1024&i.flags){for(;d<16;){if(0===s)break e;s--,l+=n[r++]<>>8&255,i.check=N(i.check,B,2,0)),d=l=0}else i.head&&(i.head.extra=null);i.mode=6;case 6:if(1024&i.flags&&(s<(h=i.length)&&(h=s),h&&(i.head&&(x=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),z.arraySet(i.head.extra,n,r,h,x)),512&i.flags&&(i.check=N(i.check,n,h,r)),s-=h,r+=h,i.length-=h),i.length))break e;i.length=0,i.mode=7;case 7:if(2048&i.flags){if(0===s)break e;for(h=0;x=n[r+h++],i.head&&x&&i.length<65536&&(i.head.name+=String.fromCharCode(x)),x&&h>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=12;break;case 10:for(;d<32;){if(0===s)break e;s--,l+=n[r++]<>>=7&d,d-=7&d,i.mode=27;break}for(;d<3;){if(0===s)break e;s--,l+=n[r++]<>>=1)){case 0:i.mode=14;break;case 1:if(H(i),i.mode=20,6!==t)break;l>>>=2,d-=2;break e;case 2:i.mode=17;break;case 3:e.msg="invalid block type",i.mode=30}l>>>=2,d-=2;break;case 14:for(l>>>=7&d,d-=7&d;d<32;){if(0===s)break e;s--,l+=n[r++]<>>16^65535)){e.msg="invalid stored block lengths",i.mode=30;break}if(i.length=65535&l,d=l=0,i.mode=15,6===t)break e;case 15:i.mode=16;case 16:if(h=i.length){if(s>>=5,d-=5,i.ndist=1+(31&l),l>>>=5,d-=5,i.ncode=4+(15&l),l>>>=4,d-=4,286>>=3,d-=3}for(;i.have<19;)i.lens[A[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,S={bits:i.lenbits},y=C(0,i.lens,0,19,i.lencode,0,i.work,S),i.lenbits=S.bits,y){e.msg="invalid code lengths set",i.mode=30;break}i.have=0,i.mode=19;case 19:for(;i.have>>16&255,_=65535&Z,!((w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>>=w,d-=w,i.lens[i.have++]=_;else{if(16===_){for(E=w+2;d>>=w,d-=w,0===i.have){e.msg="invalid bit length repeat",i.mode=30;break}x=i.lens[i.have-1],h=3+(3&l),l>>>=2,d-=2}else if(17===_){for(E=w+3;d>>=w)),l>>>=3,d-=3}else{for(E=w+7;d>>=w)),l>>>=7,d-=7}if(i.have+h>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=30;break}for(;h--;)i.lens[i.have++]=x}}if(30===i.mode)break;if(0===i.lens[256]){e.msg="invalid code -- missing end-of-block",i.mode=30;break}if(i.lenbits=9,S={bits:i.lenbits},y=C(I,i.lens,0,i.nlen,i.lencode,0,i.work,S),i.lenbits=S.bits,y){e.msg="invalid literal/lengths set",i.mode=30;break}if(i.distbits=6,i.distcode=i.distdyn,S={bits:i.distbits},y=C(D,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,S),i.distbits=S.bits,y){e.msg="invalid distances set",i.mode=30;break}if(i.mode=20,6===t)break e;case 20:i.mode=21;case 21:if(6<=s&&258<=f){e.next_out=o,e.avail_out=f,e.next_in=r,e.avail_in=s,i.hold=l,i.bits=d,O(e,u),o=e.next_out,a=e.output,f=e.avail_out,r=e.next_in,n=e.input,s=e.avail_in,l=i.hold,d=i.bits,12===i.mode&&(i.back=-1);break}for(i.back=0;k=(Z=i.lencode[l&(1<>>16&255,_=65535&Z,!((w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>g)])>>>16&255,_=65535&Z,!(g+(w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>>=g,d-=g,i.back+=g}if(l>>>=w,d-=w,i.back+=w,i.length=_,0===k){i.mode=26;break}if(32&k){i.back=-1,i.mode=12;break}if(64&k){e.msg="invalid literal/length code",i.mode=30;break}i.extra=15&k,i.mode=22;case 22:if(i.extra){for(E=i.extra;d>>=i.extra,d-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=23;case 23:for(;k=(Z=i.distcode[l&(1<>>16&255,_=65535&Z,!((w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>g)])>>>16&255,_=65535&Z,!(g+(w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>>=g,d-=g,i.back+=g}if(l>>>=w,d-=w,i.back+=w,64&k){e.msg="invalid distance code",i.mode=30;break}i.offset=_,i.extra=15&k,i.mode=24;case 24:if(i.extra){for(E=i.extra;d>>=i.extra,d-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg="invalid distance too far back",i.mode=30;break}i.mode=25;case 25:if(0===f)break e;if(h=u-f,i.offset>h){if((h=i.offset-h)>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=30;break}h>i.wnext?(h-=i.wnext,b=i.wsize-h):b=i.wnext-h,h>i.length&&(h=i.length),m=i.window}else m=a,b=o-i.offset,h=i.length;for(fh?(m=O[C+o[g]],w=A[z+o[g]]):(m=96,w=0),f=1<<_-S,v=l=1<>S)+(l-=f)]=b<<24|m<<16|w|0,0!==l;);for(f=1<<_-1;B&f;)f>>=1;if(0!==f?(B&=f-1,B+=f):B=0,g++,0==--R[_]){if(_===p)break;_=t[i+o[g]]}if(x<_&&(B&c)!==d){for(0===S&&(S=x),u+=v,E=1<<(y=_-S);y+S