diff --git "a/\345\221\250\350\212\267\350\216\271/20220520-\346\226\207\344\273\266\347\232\204\344\270\212\344\274\240\344\270\216\344\270\213\350\275\275.md" "b/\345\221\250\350\212\267\350\216\271/20220520-\346\226\207\344\273\266\347\232\204\344\270\212\344\274\240\344\270\216\344\270\213\350\275\275.md" index 46f31f08cebde5cd4ddf7ac63e76e4ffee5b4134..0e44e796ce9405b37ef2b61476a5ccad178a0a24 100644 --- "a/\345\221\250\350\212\267\350\216\271/20220520-\346\226\207\344\273\266\347\232\204\344\270\212\344\274\240\344\270\216\344\270\213\350\275\275.md" +++ "b/\345\221\250\350\212\267\350\216\271/20220520-\346\226\207\344\273\266\347\232\204\344\270\212\344\274\240\344\270\216\344\270\213\350\275\275.md" @@ -24,7 +24,7 @@ !isset:如果没有设置这个变量 -5. imp-name:临时文件 +5. tmp-name:临时文件 6. xlsm:自带代码,无法运行 @@ -42,231 +42,92 @@ -# 作业 +# 文件上传 ```php+HTML -// 实现一个文件上传,限制只能上传pdf和word格式,大小为1M以内。 - + - 上传文件 + 表单 -
-
- -
+
+ + + + + + + + + + +
-"; +"; -echo "类型:".$file['type']."
"; -echo "大小:".$file['size']."Kb"."
"; -echo "临时保存位置:".$file['tmp_name']."
"; - -// 上传1M以内的文件 -$allow_size = 10204*10240;// 1M -if($file['size']>$allow_size){ - echo "本系统只允许上传{$allow_size}大小的文件,你上传的文件大小是:{$file['size']}"; - die("上传文件超过允许的范围!"); -} - -$name=$file['name']; - -//echo "文件后缀是:".$namearr[count($namearr)-1];// -// 有个函数可以直接得到数组的最后一个值,用end -$namearr =explode('.',$name); -$a =end($namearr); - -// 假设只允许上传jpg png的格式的文件 -$sz =array("pdf","word");// 0 -$sz[]="xlsm"; +// 定义一个盒子来放我的文件,并把我的文件设置成$_FILES(不设置访问权限) +$myfile=$_FILES['myfile']; -// 在数组找一个值。如果找到就返回这个值的键名或索引,找不到就false -$b = array_search($a,$sz); -if($b===false){ - die("不允许的格式!"); -} - -// 假设你要指定 保存的目录 -if(is_dir('./c')){ // 先判断这个路径 是不是一个目录 - $path = './c/';// 如果是就把这个路径设置为保存的目录 -}else{ - mkdir('./c'); // 如果不存在 这个目录 ,就自己建一个 - $path = './c/'; -} -die(); -$ret = move_uploaded_file($file['tmp_name'], $path.$name); -if($ret){ - echo "保存成功!点击查看"; -}else{ - echo "保存失败!"; +// 判断文件是否上传成功(error) 0:没有错误 +// 1:超过了允许上传的文件的大小 +// 2:超过了允许上传的最大文件数量 +// 3:文件只有部分被上传 +// 4.没有文件被上传 +// 6.找不到临时文件 +// 7.文件放入临时文件时失败 +if ($myfile['error']!=0){// 如果我提交的文件中的error不等于0则输出文件上传失败 + echo "文件上传失败"; } -``` - - - -# 干货 - -```php+HTML -"; -//print_r($_FILES); -// 判断文件是否上传成功 通过error的代码 。0 表示没有错误就是上传成功 -$myfile = $_FILES['myfile']; - - -if($myfile['error']!=0){ -die("上传发生错误!"); -} -//echo "文件名:".$myfile['name']."
"; -//echo "类型:".$myfile['type']."
"; -//echo "大小:".$myfile['size']."字节 =".($myfile['size']/1024)."KB
"; -//echo "临时保存位置:".$myfile['tmp_name']."
"; - - // 如果我们只能允许上传1M以内的文件 1024*1024 1B=1024字节 1KB=1024B -$allow_size = 10204*10240;// 1M -if($myfile['size']>$allow_size){ - echo "本系统只允许上传{$allow_size}大小的文件,你上传的文件大小是:{$myfile['size']}"; - - die("上传文件超过允许的范围!"); -} -$name = $myfile['name']; -// 检测文件类型是否符合要求 -$namearr =explode('.',$name); -//echo "文件后缀是:".$namearr[count($namearr)-1];// -// 有个函数可以直接得到数组的最后一个值,用end - -$hz =end($namearr); -// 假设只允许上传jpg png的格式的文件 -$okhz =array('jpg','png','gif','mp4',"xlsx","psd");// 0 -//$okhz[]="xlsm"; -//$isok = array_search($hz,$okhz);// 在数组找一个值。如果找到就返回这个值的键名或索引,找不到就false -//if($isok===false){ -// die("不允许的格式!"); -//} - -// 直接判断一个值在不在一个数组里 用in_array() -$isok = in_array($hz,$okhz);// 找到就返回 true 否则false -if($isok==false){ - exit("不允许的格式!"); -} - - -//if (($hz!='jpg') && ($hz!='png')){ -// echo $hz; -// die("不允许的文件格式!"); -//} -// 如果以上检测都通过了。说明文件满足要求。可以保存在服务器 - - -// 假设你要指定 保存的目录 - -if(is_dir('./class17')){ // 先判断这个路径 是不是一个目录 - $path = './class17/';// 如果是就把这个路径设置为保存的目录 +$daxiao=1024*1024; // 因为在后台的sizi中默认的单位是字节 +if ($myfile['sizi']>$daxiao){ + echo "本系统只允许上传{$daxiao}大小的文件,你上传的文件的大小是:{$myfile['sizi']}"; + die("你所上传的文件的大小超过允许的范围");// die:程序死亡并停止 +} + +// 定义一个盒子放我提交的文件的文件名 +$name=$myfile['name']; +// 用分割函数explode()把文件名打散为数组(分割成n段),用逗号分割开来,再定义一个盒子$fengename装起来 +$fengename=explode(",",$name); +//用end函数得到数组的最后一个值,再定义一个盒子$end装起来 +$end=end($fengename); +// 假设只允许上传jpg、gif、png、jpeg的格式的文件,定义一个数组$geshi给它们装起来 +$geshi=array('jpg','gif','png','jpeg'); +// 判断一个值在不在一个数组里 用in_array()函数,找到就返回 true 否则false,再定义一个盒子$tof装得到的true或false +$tof=in_array($end,$geshi);// 判断$end里的值在不在$geshi里,找到就返回 true 否则false +if ($tof==false){ + echo "你上传的文件属于不允许的格式"; +} + +// 假设你要指定 保存的目录,先判断这个路径 是不是一个目录 +if (is_dir('./class7')){ + // 如果是就把这个路径设置为保存的目录并用盒子$ml装起来 + $ml='./class7'; }else{ - mkdir('./class17'); // 如果不存在 这个目录 ,就自己建一个 - $path = './class17/'; + // 如果不存在这个目录 ,就自己建一个,并用盒子$lj装起来 + mkdir('./class7'); + $ml='./class7'; } -die(); -$ret = move_uploaded_file($myfile['tmp_name'], $path.$name); - -if($ret){ - echo "文件保存成功!查看"; -}else{ - echo "文件保存失败!"; -} -``` - -```php+HTML -"; -//echo "你提交的姓名是:".$_GET['username']; -//echo "你提交的密码是:".$_GET['pwd']; - -// 案例:判断用户名和密码是否正确 - - -if(!isset($_GET['submit']) || $_GET['submit']!='提交'){ - die("非法访问!"); -} - - -// 1,假设数据库里这样的 -$user = "admin"; -$pwd = "666"; - -// 2 这是用户提交的数据 -$username= $_GET['username']; -$password= $_GET['pwd']; - - -// 3 判断 +// 用move_uploaded_file()函数,把文件从临时存储的地方 转移到$ml(./class7)这个目录下,并取新文件名($name),再定义一个盒子$move装起来 +$move=move_uploaded_file($myfile['tmp_name'],$ml.$name);// 注意:这个$name也可以随意重新定义,但最好用原文件名即$name -if($username!=$user || $password!=$pwd){ - echo "用户名错误或密码错误!" ; +if ($move){ + // 如果移动成功,临时文件就跳转到$ml(./class7)目录下,并取新文件名($name),且保存,点击即可查看 + echo "文件保存成功 查看"; }else{ - echo "登录成功!"; + echo "文件保存失败"; } ``` diff --git "a/\345\221\250\350\212\267\350\216\271/20220525-PHP+Mysql+\350\241\250\346\240\274\350\241\250\345\215\225.md" "b/\345\221\250\350\212\267\350\216\271/20220525-PHP+Mysql+\350\241\250\346\240\274\350\241\250\345\215\225.md" new file mode 100644 index 0000000000000000000000000000000000000000..c6f8576e699b1bcce8c4e97cf271cc04079ee708 --- /dev/null +++ "b/\345\221\250\350\212\267\350\216\271/20220525-PHP+Mysql+\350\241\250\346\240\274\350\241\250\345\215\225.md" @@ -0,0 +1,211 @@ +# 笔记 + +1. html中的meta是字符集的意思 +2. 想要修改或上传数据就要放入表单(input) + + + +# 作业 + +```php+HTML + + +添加学生信息 + + +

添加学生信息

+
+ + + + + +
id
name
score
|
+
+ + + +返回主页
"; +}else{ + echo ""; // history.go(-1):返回上一步 +} + + + + + 学生管理系统 - 首页 + + + + +

学生管理系统 - 首页

+ + + + + + + "; + } else { + + while ($arr = mysqli_fetch_assoc($result)) { // 从数据里得到一行,以数组的形式返回 + ?> + + + + + + + + + + +
idnamescore
没有数据!
编辑| 删除
+添加学生信息 + + + +返回主页"; +}else{ + echo ""; +} + + + + + 学生管理系统 - 首页 + + + +

学生管理系统 - 首页

+
+ + + + + + + + + + + + + + + + + +
学号
姓名
年龄
+
+ + + +返回主页"; +}else{ + echo ""; +} +``` + diff --git "a/\345\221\250\350\212\267\350\216\271/20220601-Cookie+Session\344\274\232\350\257\235.md" "b/\345\221\250\350\212\267\350\216\271/20220601-Cookie+Session\344\274\232\350\257\235.md" new file mode 100644 index 0000000000000000000000000000000000000000..73c7ba7ac7a002f56cebb8ce477916c87fa8db7a --- /dev/null +++ "b/\345\221\250\350\212\267\350\216\271/20220601-Cookie+Session\344\274\232\350\257\235.md" @@ -0,0 +1,129 @@ +# 笔记 + +1. 表单快捷键:!+Tab + +2. th就是td,但th能加粗 + +3. 复制当前行:ctrl+D + +4. action:表示数据提交给谁(php的文件名.php) // 后面不写就默认给自己 + +5. onclick:点击后会发生的事 + +6. alert:警告(弹出一个弹窗) + +7. include_once:引入数据库的文件 + +8. 一个$:键名 + + 两个$:变量 + +9. history.go(-1):返回上一级 + +10. continue:跳过此次循环 + +11. mysql_affected_rows( ):得到最近一次query运行影响的行数 + +12. 加密:md5(”需要进行加密的字符串“) + +1. 通过setcookie( )函数创建Cookie: + + ```php + bool setcookie( string $name, string $value,有效期 ) + + // 函数 + $name变量名 + $value 值 + $expire用于表示Cookie的有效期, + $path用于表示Cookie在服务器端的有效路径, + $domain用于表示Cookie的有效域名, + $secure用于指定Cookie是否通过安全的HTTPS连接来传输 + ``` + +2. 读取Cooike: + + ```php + // 定义一个$val作为盒子来接收 + $val = $_ COOKIE ['key']; + // 例: + + setcookie("loginTime",time(),time()+60) + if(isset$_COOKIE['loginTime'])){// isset? 是否被设置 + echo "你上次的访问时间是".@("Y-m-d H-i-s",$_COOKIE['loginTime']);// 格式化日期 + }else{ + echo "首次访问本网站"; + } + ``` + +5. 空:empty( ) + +6. Session:页面与页面之间的传递 + +7. Cookie:将网页的变量存在电脑里 + +8. time( ):当前时间 + +9. 创建会话需要通过依稀啊步骤:启动会话——注册会话——使用会话——保存会话 + + ```php + // 启动会话: + bool session_start() + // bool是session_start()函数的返回值类型,如果session启动成功,该函数返回true,否则返回false + // 例: + +A.0 +B.1 +C.2 +D.3 +3、定义关联数组的时,其键名与值之间的分隔符是? B +A.-> +B.=> +C.: +D.# +4、下列说法正确的是? B +A. 数组的下标必须为数字,且从“0”开始 +B. 数组的下标必须是连续的 +C. 数组中的元素类型必须一致 +D. 数组的下标可以是字符串 弱类型语言 + + +二、简答题(12分) +1:PHP中变量有哪些基本数据类型? +字符串型、整型、浮点型、布尔型 +2:控制流程语句有哪些? +条件控制语句:if else、switch +跳转控制语句:break、continue +循环控制语句:do while、while、for循环 + + +三、编程题(50分): + + + + +';// 换行 +} +?> + +1 && <2,这样就没有意义 + if ($a%$c==0) { + $b=0; + } + } + if ($b==1){ + echo $a." "; + } +} +}?> + +四、操作题(30分): +"周芷莹","age"=>19,"sex"=>'女',"score"=>80); +foreach ($a as $b){ + echo $b." "; +} +?> + +"red","b"=>"green","c"=>"blue"); +$key=array_search("red",$a); +echo $key; +?> + + +``` + diff --git "a/\345\221\250\350\212\267\350\216\271/20220610-PHP\347\254\254\344\272\214\346\254\241\345\244\247\344\275\234\344\270\232.md" "b/\345\221\250\350\212\267\350\216\271/20220610-PHP\347\254\254\344\272\214\346\254\241\345\244\247\344\275\234\344\270\232.md" new file mode 100644 index 0000000000000000000000000000000000000000..21e98e780d299446a59b265e3f1198aff3958637 --- /dev/null +++ "b/\345\221\250\350\212\267\350\216\271/20220610-PHP\347\254\254\344\272\214\346\254\241\345\244\247\344\275\234\344\270\232.md" @@ -0,0 +1,295 @@ +# 作业 + +```php+HTML +一、选择题(6分) +1、下面哪项描述是错误的? A +A.静态成员必须实例化对象才能使用 +B.成员变量需要用public protected private修饰,在定义变量时不再需要var关键字 +C.类中的普通方法只能实例化对象才能进行调用 +D.包含抽象方法的类必须为抽象类,抽象类不能被实例化 +2、关于面向对象的说法不正确的是? D +A:OOP是面向对象的简称 +B:静态方法不用实例化对象就能调用 +C:类里面的$this关键字代表该对象本身 +D:普通方法不用实例化对象就能调用 +3、面向对象的三大特性中哪个不属于封装的做法? B +A 将成员变为私有的 +B 将成员变为公有的 +C 封装方法来操作成员 +D 使用private修饰方法 + +二、简答题(4分) +1:面象对象的三大特性是什么? +多态,封装,继承 + +三、操作题(90分) +1、制作一个文件上传的页面,完成文件上传功能。(30分) +限制规则: +上传的文件不能超过1M, +上传文件的类型只能是jpg、gif、png、jpeg, +对上传的文件进行保存。 +// a.php + + + + + 表单 + + +
+ + + + + + + + + + +
+ + + +// a.1.php +'; // 代码整齐排列 +// print_r:打印 +// $_FILES:超全局数组(它不受访问限制,在任何地方都可以看) +print_r($_FILES); // 打印超全局数组 +// 我的文件名:myfile + +// 定义一个盒子来放我的文件,并把我的文件设置成$_FILES(不设置访问权限) +$myfile=$_FILES['myfile']; + + +// 判断文件是否上传成功(error) 0:没有错误 +// 1:超过了允许上传的文件的大小 +// 2:超过了允许上传的最大文件数量 +// 3:文件只有部分被上传 +// 4.没有文件被上传 +// 6.找不到临时文件 +// 7.文件放入临时文件时失败 +if ($myfile['error']!=0){// 如果我提交的文件中的error不等于0则输出文件上传失败 + echo "文件上传失败"; + die(); +} + +// 如果我们只能允许上传1M以内的文件 1024*1024 1B=1024字节 1KB=1024B +$daxiao=1024*1024; // 因为在后台的size中默认的单位是字节 +if ($myfile['size']>$daxiao){ + echo "本系统只允许上传{$daxiao}大小的文件,你上传的文件的大小是:{$myfile['size']}"; + die("你所上传的文件的大小超过允许的范围");// die:程序死亡并停止 +} + +// 定义一个盒子放我提交的文件的文件名 +$name=$myfile['name']; +// 用分割函数explode()把文件名打散为数组(分割成n段),用逗号分割开来,再定义一个盒子$fengename装起来 +$fengename=explode(".",$name); +//用end函数得到数组的最后一个值,再定义一个盒子$end装起来 +$end=end($fengename); +// 假设只允许上传jpg、gif、png、jpeg的格式的文件,定义一个数组$geshi给它们装起来 +$geshi=array('jpg','gif','png','jpeg'); +// 判断一个值在不在一个数组里 用in_array()函数,找到就返回 true 否则false,再定义一个盒子$tof装得到的true或false +$tof=in_array($end,$geshi);// 判断$end里的值在不在$geshi里,找到就返回 true 否则false +if ($tof==false){ + echo "你上传的文件属于不允许的格式"; + die(); +} + +// 假设你要指定 保存的目录,先判断这个路径 是不是一个目录 +if (is_dir('./class7')){ + // 如果是就把这个路径设置为保存的目录并用盒子$ml装起来 + $ml='./class7'; +}else{ + // 如果不存在这个目录 ,就自己建一个,并用盒子$lj装起来 + mkdir('./class7'); + $ml='./class7'; +} + +// 用move_uploaded_file()函数,把文件从临时存储的地方 转移到$ml(./class7)这个目录下,并取新文件名($name),再定义一个盒子$move装起来 +$move=move_uploaded_file($myfile['tmp_name'],$ml.$name);// 注意:这个$name也可以随意重新定义,但最好用原文件名即$name + +if ($move){ + // 如果移动成功,临时文件就跳转到$ml(./class7)目录下,并取新文件名($name),且保存,点击即可查看 + echo "文件保存成功 查看"; +}else{ + echo "文件保存失败"; + die(); +} + +2、创建如下数据库和表。(10分) +create database company charset utf8; +use company; +CREATE table department( +id int PRIMARY key auto_increment COMMENT '部门ID', +name varchar(32) not null unique COMMENT '部门名称', +description varchar(1024) COMMENT '部门简介'); +INSERT into department(id,name,description) VALUES(1,"人力资源部","管理人员信息"),(2,"市场部","负责市场客户开发及客户维护"),(3,"财务部","负责公司财务"),(4,"软件开发部","负责公司软件开发"); + +3、实现对部门信息数据的增删改查。(50分) [详细的图片见word] +// link.php(连接数据库) + + +新增 + + + + "; + echo ""; + echo ""; + + } + ?> +
部门编号部门名称部门描述操作
$id$name$jieshao更新 删除
+ +// update.php + +
+ + + + + + +
部门名称
部门描述
+
+ +// update_do.php +0){ + echo "数据更新成功"; +}else{ + echo "数据更新失败"; +} + +// delete.php +0){ + echo "删除成功 查看"; +}else{ + echo "删除失败"; +} + +// add.php +查看"; + }else{ + die("添加失败!"); + } +} +?> + + + + + + 添加数据 + + +
+ + + + +
部门名称
部门描述
+
+ + + +注意:在表单中没有输入框的就要写value,但文件上传例外 +``` + diff --git "a/\345\221\250\350\212\267\350\216\271/PHP\347\275\221\347\253\231\345\274\200\345\217\221\347\273\223\350\257\276\350\200\203\350\257\225/PHP\345\212\250\346\200\201\347\275\221\347\253\231\345\274\200\345\217\221\347\273\223\350\257\276\350\200\203\350\257\225.docx" "b/\345\221\250\350\212\267\350\216\271/PHP\347\275\221\347\253\231\345\274\200\345\217\221\347\273\223\350\257\276\350\200\203\350\257\225/PHP\345\212\250\346\200\201\347\275\221\347\253\231\345\274\200\345\217\221\347\273\223\350\257\276\350\200\203\350\257\225.docx" new file mode 100644 index 0000000000000000000000000000000000000000..7ed75373548dfee9d209245939c8eab864d0df4d Binary files /dev/null and "b/\345\221\250\350\212\267\350\216\271/PHP\347\275\221\347\253\231\345\274\200\345\217\221\347\273\223\350\257\276\350\200\203\350\257\225/PHP\345\212\250\346\200\201\347\275\221\347\253\231\345\274\200\345\217\221\347\273\223\350\257\276\350\200\203\350\257\225.docx" differ diff --git "a/\345\221\250\350\212\267\350\216\271/PHP\347\275\221\347\253\231\345\274\200\345\217\221\347\273\223\350\257\276\350\200\203\350\257\225/untitled2/.idea/.gitignore" "b/\345\221\250\350\212\267\350\216\271/PHP\347\275\221\347\253\231\345\274\200\345\217\221\347\273\223\350\257\276\350\200\203\350\257\225/untitled2/.idea/.gitignore" new file mode 100644 index 0000000000000000000000000000000000000000..35410cacdc5e87f985c93a96520f5e11a5c822e4 --- /dev/null +++ "b/\345\221\250\350\212\267\350\216\271/PHP\347\275\221\347\253\231\345\274\200\345\217\221\347\273\223\350\257\276\350\200\203\350\257\225/untitled2/.idea/.gitignore" @@ -0,0 +1,8 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml +# 基于编辑器的 HTTP 客户端请求 +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git "a/\345\221\250\350\212\267\350\216\271/PHP\347\275\221\347\253\231\345\274\200\345\217\221\347\273\223\350\257\276\350\200\203\350\257\225/untitled2/.idea/modules.xml" "b/\345\221\250\350\212\267\350\216\271/PHP\347\275\221\347\253\231\345\274\200\345\217\221\347\273\223\350\257\276\350\200\203\350\257\225/untitled2/.idea/modules.xml" new file mode 100644 index 0000000000000000000000000000000000000000..62738f47eaed7344af693fabb72d93c18662d078 --- /dev/null +++ "b/\345\221\250\350\212\267\350\216\271/PHP\347\275\221\347\253\231\345\274\200\345\217\221\347\273\223\350\257\276\350\200\203\350\257\225/untitled2/.idea/modules.xml" @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git "a/\345\221\250\350\212\267\350\216\271/PHP\347\275\221\347\253\231\345\274\200\345\217\221\347\273\223\350\257\276\350\200\203\350\257\225/untitled2/.idea/untitled2.iml" "b/\345\221\250\350\212\267\350\216\271/PHP\347\275\221\347\253\231\345\274\200\345\217\221\347\273\223\350\257\276\350\200\203\350\257\225/untitled2/.idea/untitled2.iml" new file mode 100644 index 0000000000000000000000000000000000000000..c956989b29ad0767edc6cf3a202545927c3d1e76 --- /dev/null +++ "b/\345\221\250\350\212\267\350\216\271/PHP\347\275\221\347\253\231\345\274\200\345\217\221\347\273\223\350\257\276\350\200\203\350\257\225/untitled2/.idea/untitled2.iml" @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git "a/\345\221\250\350\212\267\350\216\271/PHP\347\275\221\347\253\231\345\274\200\345\217\221\347\273\223\350\257\276\350\200\203\350\257\225/untitled2/add.php" "b/\345\221\250\350\212\267\350\216\271/PHP\347\275\221\347\253\231\345\274\200\345\217\221\347\273\223\350\257\276\350\200\203\350\257\225/untitled2/add.php" new file mode 100644 index 0000000000000000000000000000000000000000..85b4543542c808527e9544c85f911b9676b7cc53 --- /dev/null +++ "b/\345\221\250\350\212\267\350\216\271/PHP\347\275\221\347\253\231\345\274\200\345\217\221\347\273\223\350\257\276\350\200\203\350\257\225/untitled2/add.php" @@ -0,0 +1,34 @@ +查看"; + }else{ + die("添加失败!"); + } +} +?> + + + + + + 新增 + + +
+ + + + + + +
图书名称:
国际标准书号:
作者:
+
+ + diff --git "a/\345\221\250\350\212\267\350\216\271/PHP\347\275\221\347\253\231\345\274\200\345\217\221\347\273\223\350\257\276\350\200\203\350\257\225/untitled2/delete.php" "b/\345\221\250\350\212\267\350\216\271/PHP\347\275\221\347\253\231\345\274\200\345\217\221\347\273\223\350\257\276\350\200\203\350\257\225/untitled2/delete.php" new file mode 100644 index 0000000000000000000000000000000000000000..88362d8f68af458cce3297df9fd2c7af68723c8b --- /dev/null +++ "b/\345\221\250\350\212\267\350\216\271/PHP\347\275\221\347\253\231\345\274\200\345\217\221\347\273\223\350\257\276\350\200\203\350\257\225/untitled2/delete.php" @@ -0,0 +1,23 @@ +0 +$sum=mysqli_affected_rows($link); + +if ($sum>0){ + echo "数据删除成功 查看>"; +}else{ + echo "删除失败"; +} +?> + + diff --git "a/\345\221\250\350\212\267\350\216\271/PHP\347\275\221\347\253\231\345\274\200\345\217\221\347\273\223\350\257\276\350\200\203\350\257\225/untitled2/index.php" "b/\345\221\250\350\212\267\350\216\271/PHP\347\275\221\347\253\231\345\274\200\345\217\221\347\273\223\350\257\276\350\200\203\350\257\225/untitled2/index.php" new file mode 100644 index 0000000000000000000000000000000000000000..935792bf9ac205e0bf496daee702ffadb0c7c81a --- /dev/null +++ "b/\345\221\250\350\212\267\350\216\271/PHP\347\275\221\347\253\231\345\274\200\345\217\221\347\273\223\350\257\276\350\200\203\350\257\225/untitled2/index.php" @@ -0,0 +1,17 @@ + + + + + + 首页 + + +
+ 请输入图书名称: +
+ + + diff --git "a/\345\221\250\350\212\267\350\216\271/PHP\347\275\221\347\253\231\345\274\200\345\217\221\347\273\223\350\257\276\350\200\203\350\257\225/untitled2/link.php" "b/\345\221\250\350\212\267\350\216\271/PHP\347\275\221\347\253\231\345\274\200\345\217\221\347\273\223\350\257\276\350\200\203\350\257\225/untitled2/link.php" new file mode 100644 index 0000000000000000000000000000000000000000..cf98940e962ec2978f8ec18ab0a0201ad4237588 --- /dev/null +++ "b/\345\221\250\350\212\267\350\216\271/PHP\347\275\221\347\253\231\345\274\200\345\217\221\347\273\223\350\257\276\350\200\203\350\257\225/untitled2/link.php" @@ -0,0 +1,6 @@ + + + + + + 首页 + + + +新增 +
+
+ + + + "; + echo ""; + echo ""; + + } + ?> +
图书编号图书名称国际标准书号作者
$book_id$book_name$isbn$author删除
+
+新增 + + + diff --git "a/\345\221\250\350\212\267\350\216\271/PHP\347\275\221\347\253\231\345\274\200\345\217\221\347\273\223\350\257\276\350\200\203\350\257\225/untitled2/\346\263\250\346\204\217.txt" "b/\345\221\250\350\212\267\350\216\271/PHP\347\275\221\347\253\231\345\274\200\345\217\221\347\273\223\350\257\276\350\200\203\350\257\225/untitled2/\346\263\250\346\204\217.txt" new file mode 100644 index 0000000000000000000000000000000000000000..212220802196c0bb4087a26ebaee07b902aadb21 --- /dev/null +++ "b/\345\221\250\350\212\267\350\216\271/PHP\347\275\221\347\253\231\345\274\200\345\217\221\347\273\223\350\257\276\350\200\203\350\257\225/untitled2/\346\263\250\346\204\217.txt" @@ -0,0 +1 @@ +如果打开后运行不了,说明头顶的文件(D盘里的那个)被删了 \ No newline at end of file diff --git "a/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_PHP_\345\244\247\344\272\214/php\350\257\225\345\215\267\344\272\214/ddlb.txt" "b/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_PHP_\345\244\247\344\272\214/php\350\257\225\345\215\267\344\272\214/ddlb.txt" new file mode 100644 index 0000000000000000000000000000000000000000..e9521c44f75627f86ba121af9a44d4be4dd95eab --- /dev/null +++ "b/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_PHP_\345\244\247\344\272\214/php\350\257\225\345\215\267\344\272\214/ddlb.txt" @@ -0,0 +1,52 @@ + + + + + + + չʾҳ + + +
+ +
+ + > + "; + echo ""; + echo ""; + } + ?> +
ҩµµʱջռ˵绰ջַͷʽ״̬ʱע
$id$MedicineName$UserName$AddTime$RealName$Mobile$Address$SendType$State$SendTime$Remark
+ + diff --git "a/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_PHP_\345\244\247\344\272\214/php\350\257\225\345\215\267\344\272\214/link.txt" "b/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_PHP_\345\244\247\344\272\214/php\350\257\225\345\215\267\344\272\214/link.txt" new file mode 100644 index 0000000000000000000000000000000000000000..67404951ca36abbd4f266f2bc5aec343923ee204 --- /dev/null +++ "b/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_PHP_\345\244\247\344\272\214/php\350\257\225\345\215\267\344\272\214/link.txt" @@ -0,0 +1,5 @@ +location.href='ddlb.php' + "; + } else { + echo "¼ʧ"; + } + } +} +?> + + + + + + login + + +

û¼

+
+ + + + +
û
+
+ + diff --git "a/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_PHP_\345\244\247\344\272\214/php\350\257\225\345\215\267\344\272\214/ordermedicinedb.sql" "b/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_PHP_\345\244\247\344\272\214/php\350\257\225\345\215\267\344\272\214/ordermedicinedb.sql" new file mode 100644 index 0000000000000000000000000000000000000000..ebef46d8d840d93802a7ec585228391b38e2a94a --- /dev/null +++ "b/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_PHP_\345\244\247\344\272\214/php\350\257\225\345\215\267\344\272\214/ordermedicinedb.sql" @@ -0,0 +1,93 @@ +/* +Navicat MySQL Data Transfer + +Source Server : zzy +Source Server Version : 50730 +Source Host : 127.0.0.1:3306 +Source Database : ordermedicinedb + +Target Server Type : MYSQL +Target Server Version : 50730 +File Encoding : 65001 + +Date: 2022-06-22 16:24:44 +*/ + +SET FOREIGN_KEY_CHECKS=0; + +-- ---------------------------- +-- Table structure for orderinfo +-- ---------------------------- +DROP TABLE IF EXISTS `orderinfo`; +CREATE TABLE `orderinfo` ( + `Id` int(11) NOT NULL AUTO_INCREMENT, + `MedicineName` varchar(255) NOT NULL, + `UserId` int(11) NOT NULL, + `AddTime` datetime NOT NULL, + `RealName` varchar(255) NOT NULL, + `Mobile` varchar(255) NOT NULL, + `Address` varchar(300) NOT NULL, + `State` int(11) NOT NULL, + `SendTime` datetime DEFAULT NULL, + `SendType` bit(1) NOT NULL, + `Remark` varchar(500) DEFAULT NULL, + PRIMARY KEY (`Id`), + KEY `fk_UserId` (`UserId`), + CONSTRAINT `fk_UserId` FOREIGN KEY (`UserId`) REFERENCES `userinfo` (`UserId`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; + +-- ---------------------------- +-- Records of orderinfo +-- ---------------------------- +INSERT INTO `orderinfo` VALUES ('1', '9991', '1', '2022-06-22 16:16:53', 'aaaaa', '123456', '福建', '1', null, '\0', null); +INSERT INTO `orderinfo` VALUES ('2', '9992', '2', '2022-06-22 16:18:07', 'bbbbb', '321456', '湖北', '2', null, '', null); +INSERT INTO `orderinfo` VALUES ('3', '9993', '3', '2022-06-22 16:18:35', 'ccccc', '456512', '江西', '1', null, '', null); + +-- ---------------------------- +-- Table structure for ps1 +-- ---------------------------- +DROP TABLE IF EXISTS `ps1`; +CREATE TABLE `ps1` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(300) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; + +-- ---------------------------- +-- Records of ps1 +-- ---------------------------- +INSERT INTO `ps1` VALUES ('1', '未配送'); +INSERT INTO `ps1` VALUES ('2', '已配送'); + +-- ---------------------------- +-- Table structure for ps2 +-- ---------------------------- +DROP TABLE IF EXISTS `ps2`; +CREATE TABLE `ps2` ( + `id` int(11) NOT NULL, + `name` varchar(300) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- ---------------------------- +-- Records of ps2 +-- ---------------------------- +INSERT INTO `ps2` VALUES ('0', '商家配送'); +INSERT INTO `ps2` VALUES ('1', '自提'); + +-- ---------------------------- +-- Table structure for userinfo +-- ---------------------------- +DROP TABLE IF EXISTS `userinfo`; +CREATE TABLE `userinfo` ( + `UserId` int(11) NOT NULL AUTO_INCREMENT, + `UserName` varchar(255) NOT NULL, + `Password` varchar(20) NOT NULL, + PRIMARY KEY (`UserId`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; + +-- ---------------------------- +-- Records of userinfo +-- ---------------------------- +INSERT INTO `userinfo` VALUES ('1', 'a', '1aa'); +INSERT INTO `userinfo` VALUES ('2', 'b', '1bb'); +INSERT INTO `userinfo` VALUES ('3', 'c', '1cc'); diff --git "a/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_PHP_\345\244\247\344\272\214/\350\257\225\345\215\267_PHP_\345\244\247\344\272\214.zip" "b/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_PHP_\345\244\247\344\272\214/\350\257\225\345\215\267_PHP_\345\244\247\344\272\214.zip" new file mode 100644 index 0000000000000000000000000000000000000000..54f042e24b0ff2d36113ade2a94324023c4dd489 Binary files /dev/null and "b/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_PHP_\345\244\247\344\272\214/\350\257\225\345\215\267_PHP_\345\244\247\344\272\214.zip" differ diff --git "a/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/untitled2/.idea/modules.xml" "b/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/untitled2/.idea/modules.xml" new file mode 100644 index 0000000000000000000000000000000000000000..62738f47eaed7344af693fabb72d93c18662d078 --- /dev/null +++ "b/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/untitled2/.idea/modules.xml" @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git "a/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/untitled2/.idea/untitled2.iml" "b/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/untitled2/.idea/untitled2.iml" new file mode 100644 index 0000000000000000000000000000000000000000..c956989b29ad0767edc6cf3a202545927c3d1e76 --- /dev/null +++ "b/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/untitled2/.idea/untitled2.iml" @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git "a/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/untitled2/.idea/workspace.xml" "b/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/untitled2/.idea/workspace.xml" new file mode 100644 index 0000000000000000000000000000000000000000..e7886eb1332898fa01cc07e6570f652e7855648d --- /dev/null +++ "b/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/untitled2/.idea/workspace.xml" @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + { + "keyToString": { + "RunOnceActivity.OpenProjectViewOnStart": "true", + "RunOnceActivity.ShowReadmeOnStart": "true", + "WebServerToolWindowFactoryState": "false", + "node.js.detected.package.eslint": "true", + "node.js.detected.package.tslint": "true", + "node.js.selected.package.eslint": "(autodetect)", + "node.js.selected.package.tslint": "(autodetect)", + "vue.rearranger.settings.migration": "true" + } +} + + + + + 1655127413432 + + + + + + \ No newline at end of file diff --git "a/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/untitled2/add.php" "b/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/untitled2/add.php" new file mode 100644 index 0000000000000000000000000000000000000000..7f37da191095ca52e7eb1e03e3e15e4c5ba27f02 --- /dev/null +++ "b/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/untitled2/add.php" @@ -0,0 +1,48 @@ +查看"; + }else{ + echo $sql; + die("数据添加失败"); + } +} +?> + + + + + 新增页面 + + + +
+ + + + + + +
用户名
邮箱
性别未知
省份 +
爱好篮球 + 读书 + 插画 + 编程 + 弹琴 +
+
+ +
+ + diff --git "a/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/untitled2/delete.php" "b/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/untitled2/delete.php" new file mode 100644 index 0000000000000000000000000000000000000000..4776e97dd231f0a242802baca5da976fb991689a --- /dev/null +++ "b/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/untitled2/delete.php" @@ -0,0 +1,14 @@ +0){ + echo "数据删除成功 查看"; + }else{ + echo $sql; + die("数据删除失败"); + } +} \ No newline at end of file diff --git "a/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/untitled2/link.php" "b/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/untitled2/link.php" new file mode 100644 index 0000000000000000000000000000000000000000..74893e399916d8ae34cbfd9f595023e995d06f62 --- /dev/null +++ "b/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/untitled2/link.php" @@ -0,0 +1,4 @@ + + + + + + 展示页面 + + + + + + "; + echo ""; + echo ""; + } + ?> +
id用户名邮箱性别省份爱好操作
$u_id$u_name$u_email$u_sex $u_province$u_hobby删除
+ + diff --git "a/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\350\257\225\345\215\267_Web_\345\244\247\344\272\214.zip" "b/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\350\257\225\345\215\267_Web_\345\244\247\344\272\214.zip" new file mode 100644 index 0000000000000000000000000000000000000000..36dfd3aa0ba9e03db3195db34196e4b378552b9d Binary files /dev/null and "b/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\350\257\225\345\215\267_Web_\345\244\247\344\272\214.zip" differ diff --git "a/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\350\257\225\345\215\267.pdf" "b/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\350\257\225\345\215\267.pdf" new file mode 100644 index 0000000000000000000000000000000000000000..d389877c4a32eeb70906c23fb000fc2a2143ab1e Binary files /dev/null and "b/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\350\257\225\345\215\267.pdf" differ diff --git "a/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\351\231\204\344\273\266\357\274\232\345\275\225\345\261\217\345\267\245\345\205\267/\345\275\225\345\261\217\345\267\245\345\205\267.exe" "b/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\351\231\204\344\273\266\357\274\232\345\275\225\345\261\217\345\267\245\345\205\267/\345\275\225\345\261\217\345\267\245\345\205\267.exe" new file mode 100644 index 0000000000000000000000000000000000000000..e5c9de58229d4b9797bf05aa9a7ad72087f9d4b0 Binary files /dev/null and "b/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\351\231\204\344\273\266\357\274\232\345\275\225\345\261\217\345\267\245\345\205\267/\345\275\225\345\261\217\345\267\245\345\205\267.exe" differ diff --git "a/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\351\231\204\344\273\266\357\274\232\345\275\225\345\261\217\345\267\245\345\205\267/\345\275\225\345\261\217\345\267\245\345\205\267\346\223\215\344\275\234\346\211\213\345\206\214.docx" "b/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\351\231\204\344\273\266\357\274\232\345\275\225\345\261\217\345\267\245\345\205\267/\345\275\225\345\261\217\345\267\245\345\205\267\346\223\215\344\275\234\346\211\213\345\206\214.docx" new file mode 100644 index 0000000000000000000000000000000000000000..591b6b17525b8580a5b09c5e329a9d8f4ef6f062 Binary files /dev/null and "b/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\351\231\204\344\273\266\357\274\232\345\275\225\345\261\217\345\267\245\345\205\267/\345\275\225\345\261\217\345\267\245\345\205\267\346\223\215\344\275\234\346\211\213\345\206\214.docx" differ diff --git "a/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\351\231\204\344\273\266\357\274\232\350\257\225\345\215\267\346\211\200\351\234\200\345\205\266\345\256\203\350\265\204\346\226\231/axios.min.js" "b/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\351\231\204\344\273\266\357\274\232\350\257\225\345\215\267\346\211\200\351\234\200\345\205\266\345\256\203\350\265\204\346\226\231/axios.min.js" new file mode 100644 index 0000000000000000000000000000000000000000..e8e4fc1603835b88f1fdb9c65a08d52fa0e90cc8 --- /dev/null +++ "b/\345\221\250\350\212\267\350\216\271/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\350\257\225\345\215\267_Web_\345\244\247\344\272\214/\351\231\204\344\273\266\357\274\232\350\257\225\345\215\267\346\211\200\351\234\200\345\205\266\345\256\203\350\265\204\346\226\231/axios.min.js" @@ -0,0 +1,3 @@ +/* axios v0.27.2 | (c) 2022 by Matt Zabriskie */ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.axios=t():e.axios=t()}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=13)}([function(e,t,n){"use strict";var r,o=n(4),i=Object.prototype.toString,s=(r=Object.create(null),function(e){var t=i.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())});function a(e){return e=e.toLowerCase(),function(t){return s(t)===e}}function u(e){return Array.isArray(e)}function c(e){return void 0===e}var f=a("ArrayBuffer");function l(e){return null!==e&&"object"==typeof e}function p(e){if("object"!==s(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var d=a("Date"),h=a("File"),m=a("Blob"),v=a("FileList");function y(e){return"[object Function]"===i.call(e)}var g=a("URLSearchParams");function E(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),u(e))for(var n=0,r=e.length;n0;)s[i=r[o]]||(t[i]=e[i],s[i]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:a,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;var t=e.length;if(c(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:O,isFileList:v}},function(e,t,n){"use strict";var r=n(0);function o(e,t,n,r,o){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}r.inherits(o,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var i=o.prototype,s={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(e){s[e]={value:e}})),Object.defineProperties(o,s),Object.defineProperty(i,"isAxiosError",{value:!0}),o.from=function(e,t,n,s,a,u){var c=Object.create(i);return r.toFlatObject(e,c,(function(e){return e!==Error.prototype})),o.call(c,e.message,t,n,s,a),c.name=e.name,u&&Object.assign(c,u),c},e.exports=o},function(e,t,n){"use strict";var r=n(1);function o(e){r.call(this,null==e?"canceled":e,r.ERR_CANCELED),this.name="CanceledError"}n(0).inherits(o,r,{__CANCEL__:!0}),e.exports=o},function(e,t,n){"use strict";var r=n(0),o=n(19),i=n(1),s=n(6),a=n(7),u={"Content-Type":"application/x-www-form-urlencoded"};function c(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var f,l={transitional:s,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(f=n(8)),f),transformRequest:[function(e,t){if(o(t,"Accept"),o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e))return e;if(r.isArrayBufferView(e))return e.buffer;if(r.isURLSearchParams(e))return c(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var n,i=r.isObject(e),s=t&&t["Content-Type"];if((n=r.isFileList(e))||i&&"multipart/form-data"===s){var u=this.env&&this.env.FormData;return a(n?{"files[]":e}:e,u&&new u)}return i||"application/json"===s?(c(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||l.transitional,n=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,s=!n&&"json"===this.responseType;if(s||o&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(s){if("SyntaxError"===e.name)throw i.from(e,i.ERR_BAD_RESPONSE,this,null,this.response);throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:n(27)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){l.headers[e]=r.merge(u)})),e.exports=l},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([n]):s[t]?s[t]+", "+n:n}})),s):s}},function(e,t,n){"use strict";var r=n(0);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},function(e,t){e.exports=null},function(e,t,n){"use strict";var r=n(12).version,o=n(1),i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var s={};i.transitional=function(e,t,n){function i(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,a){if(!1===e)throw new o(i(r," has been removed"+(t?" in "+t:"")),o.ERR_DEPRECATED);return t&&!s[r]&&(s[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,a)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new o("options must be an object",o.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),i=r.length;i-- >0;){var s=r[i],a=t[s];if(a){var u=e[s],c=void 0===u||a(u,s,e);if(!0!==c)throw new o("option "+s+" must be "+c,o.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new o("Unknown option "+s,o.ERR_BAD_OPTION)}},validators:i}},function(e,t,n){"use strict";var r=n(2);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t= 0 && Math.floor(n) === n && isFinite(val) + } + + function isPromise (val) { + return ( + isDef(val) && + typeof val.then === 'function' && + typeof val.catch === 'function' + ) + } + + /** + * Convert a value to a string that is actually rendered. + */ + function toString (val) { + return val == null + ? '' + : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString) + ? JSON.stringify(val, null, 2) + : String(val) + } + + /** + * Convert an input value to a number for persistence. + * If the conversion fails, return original string. + */ + function toNumber (val) { + var n = parseFloat(val); + return isNaN(n) ? val : n + } + + /** + * Make a map and return a function for checking if a key + * is in that map. + */ + function makeMap ( + str, + expectsLowerCase + ) { + var map = Object.create(null); + var list = str.split(','); + for (var i = 0; i < list.length; i++) { + map[list[i]] = true; + } + return expectsLowerCase + ? function (val) { return map[val.toLowerCase()]; } + : function (val) { return map[val]; } + } + + /** + * Check if a tag is a built-in tag. + */ + var isBuiltInTag = makeMap('slot,component', true); + + /** + * Check if an attribute is a reserved attribute. + */ + var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is'); + + /** + * Remove an item from an array. + */ + function remove (arr, item) { + if (arr.length) { + var index = arr.indexOf(item); + if (index > -1) { + return arr.splice(index, 1) + } + } + } + + /** + * Check whether an object has the property. + */ + var hasOwnProperty = Object.prototype.hasOwnProperty; + function hasOwn (obj, key) { + return hasOwnProperty.call(obj, key) + } + + /** + * Create a cached version of a pure function. + */ + function cached (fn) { + var cache = Object.create(null); + return (function cachedFn (str) { + var hit = cache[str]; + return hit || (cache[str] = fn(str)) + }) + } + + /** + * Camelize a hyphen-delimited string. + */ + var camelizeRE = /-(\w)/g; + var camelize = cached(function (str) { + return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; }) + }); + + /** + * Capitalize a string. + */ + var capitalize = cached(function (str) { + return str.charAt(0).toUpperCase() + str.slice(1) + }); + + /** + * Hyphenate a camelCase string. + */ + var hyphenateRE = /\B([A-Z])/g; + var hyphenate = cached(function (str) { + return str.replace(hyphenateRE, '-$1').toLowerCase() + }); + + /** + * Simple bind polyfill for environments that do not support it, + * e.g., PhantomJS 1.x. Technically, we don't need this anymore + * since native bind is now performant enough in most browsers. + * But removing it would mean breaking code that was able to run in + * PhantomJS 1.x, so this must be kept for backward compatibility. + */ + + /* istanbul ignore next */ + function polyfillBind (fn, ctx) { + function boundFn (a) { + var l = arguments.length; + return l + ? l > 1 + ? fn.apply(ctx, arguments) + : fn.call(ctx, a) + : fn.call(ctx) + } + + boundFn._length = fn.length; + return boundFn + } + + function nativeBind (fn, ctx) { + return fn.bind(ctx) + } + + var bind = Function.prototype.bind + ? nativeBind + : polyfillBind; + + /** + * Convert an Array-like object to a real Array. + */ + function toArray (list, start) { + start = start || 0; + var i = list.length - start; + var ret = new Array(i); + while (i--) { + ret[i] = list[i + start]; + } + return ret + } + + /** + * Mix properties into target object. + */ + function extend (to, _from) { + for (var key in _from) { + to[key] = _from[key]; + } + return to + } + + /** + * Merge an Array of Objects into a single Object. + */ + function toObject (arr) { + var res = {}; + for (var i = 0; i < arr.length; i++) { + if (arr[i]) { + extend(res, arr[i]); + } + } + return res + } + + /* eslint-disable no-unused-vars */ + + /** + * Perform no operation. + * Stubbing args to make Flow happy without leaving useless transpiled code + * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/). + */ + function noop (a, b, c) {} + + /** + * Always return false. + */ + var no = function (a, b, c) { return false; }; + + /* eslint-enable no-unused-vars */ + + /** + * Return the same value. + */ + var identity = function (_) { return _; }; + + /** + * Generate a string containing static keys from compiler modules. + */ + function genStaticKeys (modules) { + return modules.reduce(function (keys, m) { + return keys.concat(m.staticKeys || []) + }, []).join(',') + } + + /** + * Check if two values are loosely equal - that is, + * if they are plain objects, do they have the same shape? + */ + function looseEqual (a, b) { + if (a === b) { return true } + var isObjectA = isObject(a); + var isObjectB = isObject(b); + if (isObjectA && isObjectB) { + try { + var isArrayA = Array.isArray(a); + var isArrayB = Array.isArray(b); + if (isArrayA && isArrayB) { + return a.length === b.length && a.every(function (e, i) { + return looseEqual(e, b[i]) + }) + } else if (a instanceof Date && b instanceof Date) { + return a.getTime() === b.getTime() + } else if (!isArrayA && !isArrayB) { + var keysA = Object.keys(a); + var keysB = Object.keys(b); + return keysA.length === keysB.length && keysA.every(function (key) { + return looseEqual(a[key], b[key]) + }) + } else { + /* istanbul ignore next */ + return false + } + } catch (e) { + /* istanbul ignore next */ + return false + } + } else if (!isObjectA && !isObjectB) { + return String(a) === String(b) + } else { + return false + } + } + + /** + * Return the first index at which a loosely equal value can be + * found in the array (if value is a plain object, the array must + * contain an object of the same shape), or -1 if it is not present. + */ + function looseIndexOf (arr, val) { + for (var i = 0; i < arr.length; i++) { + if (looseEqual(arr[i], val)) { return i } + } + return -1 + } + + /** + * Ensure a function is called only once. + */ + function once (fn) { + var called = false; + return function () { + if (!called) { + called = true; + fn.apply(this, arguments); + } + } + } + + var SSR_ATTR = 'data-server-rendered'; + + var ASSET_TYPES = [ + 'component', + 'directive', + 'filter' + ]; + + var LIFECYCLE_HOOKS = [ + 'beforeCreate', + 'created', + 'beforeMount', + 'mounted', + 'beforeUpdate', + 'updated', + 'beforeDestroy', + 'destroyed', + 'activated', + 'deactivated', + 'errorCaptured', + 'serverPrefetch' + ]; + + /* */ + + + + var config = ({ + /** + * Option merge strategies (used in core/util/options) + */ + // $flow-disable-line + optionMergeStrategies: Object.create(null), + + /** + * Whether to suppress warnings. + */ + silent: false, + + /** + * Show production mode tip message on boot? + */ + productionTip: "development" !== 'production', + + /** + * Whether to enable devtools + */ + devtools: "development" !== 'production', + + /** + * Whether to record perf + */ + performance: false, + + /** + * Error handler for watcher errors + */ + errorHandler: null, + + /** + * Warn handler for watcher warns + */ + warnHandler: null, + + /** + * Ignore certain custom elements + */ + ignoredElements: [], + + /** + * Custom user key aliases for v-on + */ + // $flow-disable-line + keyCodes: Object.create(null), + + /** + * Check if a tag is reserved so that it cannot be registered as a + * component. This is platform-dependent and may be overwritten. + */ + isReservedTag: no, + + /** + * Check if an attribute is reserved so that it cannot be used as a component + * prop. This is platform-dependent and may be overwritten. + */ + isReservedAttr: no, + + /** + * Check if a tag is an unknown element. + * Platform-dependent. + */ + isUnknownElement: no, + + /** + * Get the namespace of an element + */ + getTagNamespace: noop, + + /** + * Parse the real tag name for the specific platform. + */ + parsePlatformTagName: identity, + + /** + * Check if an attribute must be bound using property, e.g. value + * Platform-dependent. + */ + mustUseProp: no, + + /** + * Perform updates asynchronously. Intended to be used by Vue Test Utils + * This will significantly reduce performance if set to false. + */ + async: true, + + /** + * Exposed for legacy reasons + */ + _lifecycleHooks: LIFECYCLE_HOOKS + }); + + /* */ + + /** + * unicode letters used for parsing html tags, component names and property paths. + * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname + * skipping \u10000-\uEFFFF due to it freezing up PhantomJS + */ + var unicodeRegExp = /a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/; + + /** + * Check if a string starts with $ or _ + */ + function isReserved (str) { + var c = (str + '').charCodeAt(0); + return c === 0x24 || c === 0x5F + } + + /** + * Define a property. + */ + function def (obj, key, val, enumerable) { + Object.defineProperty(obj, key, { + value: val, + enumerable: !!enumerable, + writable: true, + configurable: true + }); + } + + /** + * Parse simple path. + */ + var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]")); + function parsePath (path) { + if (bailRE.test(path)) { + return + } + var segments = path.split('.'); + return function (obj) { + for (var i = 0; i < segments.length; i++) { + if (!obj) { return } + obj = obj[segments[i]]; + } + return obj + } + } + + /* */ + + // can we use __proto__? + var hasProto = '__proto__' in {}; + + // Browser environment sniffing + var inBrowser = typeof window !== 'undefined'; + var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform; + var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase(); + var UA = inBrowser && window.navigator.userAgent.toLowerCase(); + var isIE = UA && /msie|trident/.test(UA); + var isIE9 = UA && UA.indexOf('msie 9.0') > 0; + var isEdge = UA && UA.indexOf('edge/') > 0; + var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android'); + var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios'); + var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge; + var isPhantomJS = UA && /phantomjs/.test(UA); + var isFF = UA && UA.match(/firefox\/(\d+)/); + + // Firefox has a "watch" function on Object.prototype... + var nativeWatch = ({}).watch; + + var supportsPassive = false; + if (inBrowser) { + try { + var opts = {}; + Object.defineProperty(opts, 'passive', ({ + get: function get () { + /* istanbul ignore next */ + supportsPassive = true; + } + })); // https://github.com/facebook/flow/issues/285 + window.addEventListener('test-passive', null, opts); + } catch (e) {} + } + + // this needs to be lazy-evaled because vue may be required before + // vue-server-renderer can set VUE_ENV + var _isServer; + var isServerRendering = function () { + if (_isServer === undefined) { + /* istanbul ignore if */ + if (!inBrowser && !inWeex && typeof global !== 'undefined') { + // detect presence of vue-server-renderer and avoid + // Webpack shimming the process + _isServer = global['process'] && global['process'].env.VUE_ENV === 'server'; + } else { + _isServer = false; + } + } + return _isServer + }; + + // detect devtools + var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__; + + /* istanbul ignore next */ + function isNative (Ctor) { + return typeof Ctor === 'function' && /native code/.test(Ctor.toString()) + } + + var hasSymbol = + typeof Symbol !== 'undefined' && isNative(Symbol) && + typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys); + + var _Set; + /* istanbul ignore if */ // $flow-disable-line + if (typeof Set !== 'undefined' && isNative(Set)) { + // use native Set when available. + _Set = Set; + } else { + // a non-standard Set polyfill that only works with primitive keys. + _Set = /*@__PURE__*/(function () { + function Set () { + this.set = Object.create(null); + } + Set.prototype.has = function has (key) { + return this.set[key] === true + }; + Set.prototype.add = function add (key) { + this.set[key] = true; + }; + Set.prototype.clear = function clear () { + this.set = Object.create(null); + }; + + return Set; + }()); + } + + /* */ + + var warn = noop; + var tip = noop; + var generateComponentTrace = (noop); // work around flow check + var formatComponentName = (noop); + + { + var hasConsole = typeof console !== 'undefined'; + var classifyRE = /(?:^|[-_])(\w)/g; + var classify = function (str) { return str + .replace(classifyRE, function (c) { return c.toUpperCase(); }) + .replace(/[-_]/g, ''); }; + + warn = function (msg, vm) { + var trace = vm ? generateComponentTrace(vm) : ''; + + if (config.warnHandler) { + config.warnHandler.call(null, msg, vm, trace); + } else if (hasConsole && (!config.silent)) { + console.error(("[Vue warn]: " + msg + trace)); + } + }; + + tip = function (msg, vm) { + if (hasConsole && (!config.silent)) { + console.warn("[Vue tip]: " + msg + ( + vm ? generateComponentTrace(vm) : '' + )); + } + }; + + formatComponentName = function (vm, includeFile) { + if (vm.$root === vm) { + return '' + } + var options = typeof vm === 'function' && vm.cid != null + ? vm.options + : vm._isVue + ? vm.$options || vm.constructor.options + : vm; + var name = options.name || options._componentTag; + var file = options.__file; + if (!name && file) { + var match = file.match(/([^/\\]+)\.vue$/); + name = match && match[1]; + } + + return ( + (name ? ("<" + (classify(name)) + ">") : "") + + (file && includeFile !== false ? (" at " + file) : '') + ) + }; + + var repeat = function (str, n) { + var res = ''; + while (n) { + if (n % 2 === 1) { res += str; } + if (n > 1) { str += str; } + n >>= 1; + } + return res + }; + + generateComponentTrace = function (vm) { + if (vm._isVue && vm.$parent) { + var tree = []; + var currentRecursiveSequence = 0; + while (vm) { + if (tree.length > 0) { + var last = tree[tree.length - 1]; + if (last.constructor === vm.constructor) { + currentRecursiveSequence++; + vm = vm.$parent; + continue + } else if (currentRecursiveSequence > 0) { + tree[tree.length - 1] = [last, currentRecursiveSequence]; + currentRecursiveSequence = 0; + } + } + tree.push(vm); + vm = vm.$parent; + } + return '\n\nfound in\n\n' + tree + .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm) + ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)") + : formatComponentName(vm))); }) + .join('\n') + } else { + return ("\n\n(found in " + (formatComponentName(vm)) + ")") + } + }; + } + + /* */ + + var uid = 0; + + /** + * A dep is an observable that can have multiple + * directives subscribing to it. + */ + var Dep = function Dep () { + this.id = uid++; + this.subs = []; + }; + + Dep.prototype.addSub = function addSub (sub) { + this.subs.push(sub); + }; + + Dep.prototype.removeSub = function removeSub (sub) { + remove(this.subs, sub); + }; + + Dep.prototype.depend = function depend () { + if (Dep.target) { + Dep.target.addDep(this); + } + }; + + Dep.prototype.notify = function notify () { + // stabilize the subscriber list first + var subs = this.subs.slice(); + if (!config.async) { + // subs aren't sorted in scheduler if not running async + // we need to sort them now to make sure they fire in correct + // order + subs.sort(function (a, b) { return a.id - b.id; }); + } + for (var i = 0, l = subs.length; i < l; i++) { + subs[i].update(); + } + }; + + // The current target watcher being evaluated. + // This is globally unique because only one watcher + // can be evaluated at a time. + Dep.target = null; + var targetStack = []; + + function pushTarget (target) { + targetStack.push(target); + Dep.target = target; + } + + function popTarget () { + targetStack.pop(); + Dep.target = targetStack[targetStack.length - 1]; + } + + /* */ + + var VNode = function VNode ( + tag, + data, + children, + text, + elm, + context, + componentOptions, + asyncFactory + ) { + this.tag = tag; + this.data = data; + this.children = children; + this.text = text; + this.elm = elm; + this.ns = undefined; + this.context = context; + this.fnContext = undefined; + this.fnOptions = undefined; + this.fnScopeId = undefined; + this.key = data && data.key; + this.componentOptions = componentOptions; + this.componentInstance = undefined; + this.parent = undefined; + this.raw = false; + this.isStatic = false; + this.isRootInsert = true; + this.isComment = false; + this.isCloned = false; + this.isOnce = false; + this.asyncFactory = asyncFactory; + this.asyncMeta = undefined; + this.isAsyncPlaceholder = false; + }; + + var prototypeAccessors = { child: { configurable: true } }; + + // DEPRECATED: alias for componentInstance for backwards compat. + /* istanbul ignore next */ + prototypeAccessors.child.get = function () { + return this.componentInstance + }; + + Object.defineProperties( VNode.prototype, prototypeAccessors ); + + var createEmptyVNode = function (text) { + if ( text === void 0 ) text = ''; + + var node = new VNode(); + node.text = text; + node.isComment = true; + return node + }; + + function createTextVNode (val) { + return new VNode(undefined, undefined, undefined, String(val)) + } + + // optimized shallow clone + // used for static nodes and slot nodes because they may be reused across + // multiple renders, cloning them avoids errors when DOM manipulations rely + // on their elm reference. + function cloneVNode (vnode) { + var cloned = new VNode( + vnode.tag, + vnode.data, + // #7975 + // clone children array to avoid mutating original in case of cloning + // a child. + vnode.children && vnode.children.slice(), + vnode.text, + vnode.elm, + vnode.context, + vnode.componentOptions, + vnode.asyncFactory + ); + cloned.ns = vnode.ns; + cloned.isStatic = vnode.isStatic; + cloned.key = vnode.key; + cloned.isComment = vnode.isComment; + cloned.fnContext = vnode.fnContext; + cloned.fnOptions = vnode.fnOptions; + cloned.fnScopeId = vnode.fnScopeId; + cloned.asyncMeta = vnode.asyncMeta; + cloned.isCloned = true; + return cloned + } + + /* + * not type checking this file because flow doesn't play well with + * dynamically accessing methods on Array prototype + */ + + var arrayProto = Array.prototype; + var arrayMethods = Object.create(arrayProto); + + var methodsToPatch = [ + 'push', + 'pop', + 'shift', + 'unshift', + 'splice', + 'sort', + 'reverse' + ]; + + /** + * Intercept mutating methods and emit events + */ + methodsToPatch.forEach(function (method) { + // cache original method + var original = arrayProto[method]; + def(arrayMethods, method, function mutator () { + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + var result = original.apply(this, args); + var ob = this.__ob__; + var inserted; + switch (method) { + case 'push': + case 'unshift': + inserted = args; + break + case 'splice': + inserted = args.slice(2); + break + } + if (inserted) { ob.observeArray(inserted); } + // notify change + ob.dep.notify(); + return result + }); + }); + + /* */ + + var arrayKeys = Object.getOwnPropertyNames(arrayMethods); + + /** + * In some cases we may want to disable observation inside a component's + * update computation. + */ + var shouldObserve = true; + + function toggleObserving (value) { + shouldObserve = value; + } + + /** + * Observer class that is attached to each observed + * object. Once attached, the observer converts the target + * object's property keys into getter/setters that + * collect dependencies and dispatch updates. + */ + var Observer = function Observer (value) { + this.value = value; + this.dep = new Dep(); + this.vmCount = 0; + def(value, '__ob__', this); + if (Array.isArray(value)) { + if (hasProto) { + protoAugment(value, arrayMethods); + } else { + copyAugment(value, arrayMethods, arrayKeys); + } + this.observeArray(value); + } else { + this.walk(value); + } + }; + + /** + * Walk through all properties and convert them into + * getter/setters. This method should only be called when + * value type is Object. + */ + Observer.prototype.walk = function walk (obj) { + var keys = Object.keys(obj); + for (var i = 0; i < keys.length; i++) { + defineReactive$$1(obj, keys[i]); + } + }; + + /** + * Observe a list of Array items. + */ + Observer.prototype.observeArray = function observeArray (items) { + for (var i = 0, l = items.length; i < l; i++) { + observe(items[i]); + } + }; + + // helpers + + /** + * Augment a target Object or Array by intercepting + * the prototype chain using __proto__ + */ + function protoAugment (target, src) { + /* eslint-disable no-proto */ + target.__proto__ = src; + /* eslint-enable no-proto */ + } + + /** + * Augment a target Object or Array by defining + * hidden properties. + */ + /* istanbul ignore next */ + function copyAugment (target, src, keys) { + for (var i = 0, l = keys.length; i < l; i++) { + var key = keys[i]; + def(target, key, src[key]); + } + } + + /** + * Attempt to create an observer instance for a value, + * returns the new observer if successfully observed, + * or the existing observer if the value already has one. + */ + function observe (value, asRootData) { + if (!isObject(value) || value instanceof VNode) { + return + } + var ob; + if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) { + ob = value.__ob__; + } else if ( + shouldObserve && + !isServerRendering() && + (Array.isArray(value) || isPlainObject(value)) && + Object.isExtensible(value) && + !value._isVue + ) { + ob = new Observer(value); + } + if (asRootData && ob) { + ob.vmCount++; + } + return ob + } + + /** + * Define a reactive property on an Object. + */ + function defineReactive$$1 ( + obj, + key, + val, + customSetter, + shallow + ) { + var dep = new Dep(); + + var property = Object.getOwnPropertyDescriptor(obj, key); + if (property && property.configurable === false) { + return + } + + // cater for pre-defined getter/setters + var getter = property && property.get; + var setter = property && property.set; + if ((!getter || setter) && arguments.length === 2) { + val = obj[key]; + } + + var childOb = !shallow && observe(val); + Object.defineProperty(obj, key, { + enumerable: true, + configurable: true, + get: function reactiveGetter () { + var value = getter ? getter.call(obj) : val; + if (Dep.target) { + dep.depend(); + if (childOb) { + childOb.dep.depend(); + if (Array.isArray(value)) { + dependArray(value); + } + } + } + return value + }, + set: function reactiveSetter (newVal) { + var value = getter ? getter.call(obj) : val; + /* eslint-disable no-self-compare */ + if (newVal === value || (newVal !== newVal && value !== value)) { + return + } + /* eslint-enable no-self-compare */ + if (customSetter) { + customSetter(); + } + // #7981: for accessor properties without setter + if (getter && !setter) { return } + if (setter) { + setter.call(obj, newVal); + } else { + val = newVal; + } + childOb = !shallow && observe(newVal); + dep.notify(); + } + }); + } + + /** + * Set a property on an object. Adds the new property and + * triggers change notification if the property doesn't + * already exist. + */ + function set (target, key, val) { + if (isUndef(target) || isPrimitive(target) + ) { + warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target)))); + } + if (Array.isArray(target) && isValidArrayIndex(key)) { + target.length = Math.max(target.length, key); + target.splice(key, 1, val); + return val + } + if (key in target && !(key in Object.prototype)) { + target[key] = val; + return val + } + var ob = (target).__ob__; + if (target._isVue || (ob && ob.vmCount)) { + warn( + 'Avoid adding reactive properties to a Vue instance or its root $data ' + + 'at runtime - declare it upfront in the data option.' + ); + return val + } + if (!ob) { + target[key] = val; + return val + } + defineReactive$$1(ob.value, key, val); + ob.dep.notify(); + return val + } + + /** + * Delete a property and trigger change if necessary. + */ + function del (target, key) { + if (isUndef(target) || isPrimitive(target) + ) { + warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target)))); + } + if (Array.isArray(target) && isValidArrayIndex(key)) { + target.splice(key, 1); + return + } + var ob = (target).__ob__; + if (target._isVue || (ob && ob.vmCount)) { + warn( + 'Avoid deleting properties on a Vue instance or its root $data ' + + '- just set it to null.' + ); + return + } + if (!hasOwn(target, key)) { + return + } + delete target[key]; + if (!ob) { + return + } + ob.dep.notify(); + } + + /** + * Collect dependencies on array elements when the array is touched, since + * we cannot intercept array element access like property getters. + */ + function dependArray (value) { + for (var e = (void 0), i = 0, l = value.length; i < l; i++) { + e = value[i]; + e && e.__ob__ && e.__ob__.dep.depend(); + if (Array.isArray(e)) { + dependArray(e); + } + } + } + + /* */ + + /** + * Option overwriting strategies are functions that handle + * how to merge a parent option value and a child option + * value into the final value. + */ + var strats = config.optionMergeStrategies; + + /** + * Options with restrictions + */ + { + strats.el = strats.propsData = function (parent, child, vm, key) { + if (!vm) { + warn( + "option \"" + key + "\" can only be used during instance " + + 'creation with the `new` keyword.' + ); + } + return defaultStrat(parent, child) + }; + } + + /** + * Helper that recursively merges two data objects together. + */ + function mergeData (to, from) { + if (!from) { return to } + var key, toVal, fromVal; + + var keys = hasSymbol + ? Reflect.ownKeys(from) + : Object.keys(from); + + for (var i = 0; i < keys.length; i++) { + key = keys[i]; + // in case the object is already observed... + if (key === '__ob__') { continue } + toVal = to[key]; + fromVal = from[key]; + if (!hasOwn(to, key)) { + set(to, key, fromVal); + } else if ( + toVal !== fromVal && + isPlainObject(toVal) && + isPlainObject(fromVal) + ) { + mergeData(toVal, fromVal); + } + } + return to + } + + /** + * Data + */ + function mergeDataOrFn ( + parentVal, + childVal, + vm + ) { + if (!vm) { + // in a Vue.extend merge, both should be functions + if (!childVal) { + return parentVal + } + if (!parentVal) { + return childVal + } + // when parentVal & childVal are both present, + // we need to return a function that returns the + // merged result of both functions... no need to + // check if parentVal is a function here because + // it has to be a function to pass previous merges. + return function mergedDataFn () { + return mergeData( + typeof childVal === 'function' ? childVal.call(this, this) : childVal, + typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal + ) + } + } else { + return function mergedInstanceDataFn () { + // instance merge + var instanceData = typeof childVal === 'function' + ? childVal.call(vm, vm) + : childVal; + var defaultData = typeof parentVal === 'function' + ? parentVal.call(vm, vm) + : parentVal; + if (instanceData) { + return mergeData(instanceData, defaultData) + } else { + return defaultData + } + } + } + } + + strats.data = function ( + parentVal, + childVal, + vm + ) { + if (!vm) { + if (childVal && typeof childVal !== 'function') { + warn( + 'The "data" option should be a function ' + + 'that returns a per-instance value in component ' + + 'definitions.', + vm + ); + + return parentVal + } + return mergeDataOrFn(parentVal, childVal) + } + + return mergeDataOrFn(parentVal, childVal, vm) + }; + + /** + * Hooks and props are merged as arrays. + */ + function mergeHook ( + parentVal, + childVal + ) { + var res = childVal + ? parentVal + ? parentVal.concat(childVal) + : Array.isArray(childVal) + ? childVal + : [childVal] + : parentVal; + return res + ? dedupeHooks(res) + : res + } + + function dedupeHooks (hooks) { + var res = []; + for (var i = 0; i < hooks.length; i++) { + if (res.indexOf(hooks[i]) === -1) { + res.push(hooks[i]); + } + } + return res + } + + LIFECYCLE_HOOKS.forEach(function (hook) { + strats[hook] = mergeHook; + }); + + /** + * Assets + * + * When a vm is present (instance creation), we need to do + * a three-way merge between constructor options, instance + * options and parent options. + */ + function mergeAssets ( + parentVal, + childVal, + vm, + key + ) { + var res = Object.create(parentVal || null); + if (childVal) { + assertObjectType(key, childVal, vm); + return extend(res, childVal) + } else { + return res + } + } + + ASSET_TYPES.forEach(function (type) { + strats[type + 's'] = mergeAssets; + }); + + /** + * Watchers. + * + * Watchers hashes should not overwrite one + * another, so we merge them as arrays. + */ + strats.watch = function ( + parentVal, + childVal, + vm, + key + ) { + // work around Firefox's Object.prototype.watch... + if (parentVal === nativeWatch) { parentVal = undefined; } + if (childVal === nativeWatch) { childVal = undefined; } + /* istanbul ignore if */ + if (!childVal) { return Object.create(parentVal || null) } + { + assertObjectType(key, childVal, vm); + } + if (!parentVal) { return childVal } + var ret = {}; + extend(ret, parentVal); + for (var key$1 in childVal) { + var parent = ret[key$1]; + var child = childVal[key$1]; + if (parent && !Array.isArray(parent)) { + parent = [parent]; + } + ret[key$1] = parent + ? parent.concat(child) + : Array.isArray(child) ? child : [child]; + } + return ret + }; + + /** + * Other object hashes. + */ + strats.props = + strats.methods = + strats.inject = + strats.computed = function ( + parentVal, + childVal, + vm, + key + ) { + if (childVal && "development" !== 'production') { + assertObjectType(key, childVal, vm); + } + if (!parentVal) { return childVal } + var ret = Object.create(null); + extend(ret, parentVal); + if (childVal) { extend(ret, childVal); } + return ret + }; + strats.provide = mergeDataOrFn; + + /** + * Default strategy. + */ + var defaultStrat = function (parentVal, childVal) { + return childVal === undefined + ? parentVal + : childVal + }; + + /** + * Validate component names + */ + function checkComponents (options) { + for (var key in options.components) { + validateComponentName(key); + } + } + + function validateComponentName (name) { + if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) { + warn( + 'Invalid component name: "' + name + '". Component names ' + + 'should conform to valid custom element name in html5 specification.' + ); + } + if (isBuiltInTag(name) || config.isReservedTag(name)) { + warn( + 'Do not use built-in or reserved HTML elements as component ' + + 'id: ' + name + ); + } + } + + /** + * Ensure all props option syntax are normalized into the + * Object-based format. + */ + function normalizeProps (options, vm) { + var props = options.props; + if (!props) { return } + var res = {}; + var i, val, name; + if (Array.isArray(props)) { + i = props.length; + while (i--) { + val = props[i]; + if (typeof val === 'string') { + name = camelize(val); + res[name] = { type: null }; + } else { + warn('props must be strings when using array syntax.'); + } + } + } else if (isPlainObject(props)) { + for (var key in props) { + val = props[key]; + name = camelize(key); + res[name] = isPlainObject(val) + ? val + : { type: val }; + } + } else { + warn( + "Invalid value for option \"props\": expected an Array or an Object, " + + "but got " + (toRawType(props)) + ".", + vm + ); + } + options.props = res; + } + + /** + * Normalize all injections into Object-based format + */ + function normalizeInject (options, vm) { + var inject = options.inject; + if (!inject) { return } + var normalized = options.inject = {}; + if (Array.isArray(inject)) { + for (var i = 0; i < inject.length; i++) { + normalized[inject[i]] = { from: inject[i] }; + } + } else if (isPlainObject(inject)) { + for (var key in inject) { + var val = inject[key]; + normalized[key] = isPlainObject(val) + ? extend({ from: key }, val) + : { from: val }; + } + } else { + warn( + "Invalid value for option \"inject\": expected an Array or an Object, " + + "but got " + (toRawType(inject)) + ".", + vm + ); + } + } + + /** + * Normalize raw function directives into object format. + */ + function normalizeDirectives (options) { + var dirs = options.directives; + if (dirs) { + for (var key in dirs) { + var def$$1 = dirs[key]; + if (typeof def$$1 === 'function') { + dirs[key] = { bind: def$$1, update: def$$1 }; + } + } + } + } + + function assertObjectType (name, value, vm) { + if (!isPlainObject(value)) { + warn( + "Invalid value for option \"" + name + "\": expected an Object, " + + "but got " + (toRawType(value)) + ".", + vm + ); + } + } + + /** + * Merge two option objects into a new one. + * Core utility used in both instantiation and inheritance. + */ + function mergeOptions ( + parent, + child, + vm + ) { + { + checkComponents(child); + } + + if (typeof child === 'function') { + child = child.options; + } + + normalizeProps(child, vm); + normalizeInject(child, vm); + normalizeDirectives(child); + + // Apply extends and mixins on the child options, + // but only if it is a raw options object that isn't + // the result of another mergeOptions call. + // Only merged options has the _base property. + if (!child._base) { + if (child.extends) { + parent = mergeOptions(parent, child.extends, vm); + } + if (child.mixins) { + for (var i = 0, l = child.mixins.length; i < l; i++) { + parent = mergeOptions(parent, child.mixins[i], vm); + } + } + } + + var options = {}; + var key; + for (key in parent) { + mergeField(key); + } + for (key in child) { + if (!hasOwn(parent, key)) { + mergeField(key); + } + } + function mergeField (key) { + var strat = strats[key] || defaultStrat; + options[key] = strat(parent[key], child[key], vm, key); + } + return options + } + + /** + * Resolve an asset. + * This function is used because child instances need access + * to assets defined in its ancestor chain. + */ + function resolveAsset ( + options, + type, + id, + warnMissing + ) { + /* istanbul ignore if */ + if (typeof id !== 'string') { + return + } + var assets = options[type]; + // check local registration variations first + if (hasOwn(assets, id)) { return assets[id] } + var camelizedId = camelize(id); + if (hasOwn(assets, camelizedId)) { return assets[camelizedId] } + var PascalCaseId = capitalize(camelizedId); + if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] } + // fallback to prototype chain + var res = assets[id] || assets[camelizedId] || assets[PascalCaseId]; + if (warnMissing && !res) { + warn( + 'Failed to resolve ' + type.slice(0, -1) + ': ' + id, + options + ); + } + return res + } + + /* */ + + + + function validateProp ( + key, + propOptions, + propsData, + vm + ) { + var prop = propOptions[key]; + var absent = !hasOwn(propsData, key); + var value = propsData[key]; + // boolean casting + var booleanIndex = getTypeIndex(Boolean, prop.type); + if (booleanIndex > -1) { + if (absent && !hasOwn(prop, 'default')) { + value = false; + } else if (value === '' || value === hyphenate(key)) { + // only cast empty string / same name to boolean if + // boolean has higher priority + var stringIndex = getTypeIndex(String, prop.type); + if (stringIndex < 0 || booleanIndex < stringIndex) { + value = true; + } + } + } + // check default value + if (value === undefined) { + value = getPropDefaultValue(vm, prop, key); + // since the default value is a fresh copy, + // make sure to observe it. + var prevShouldObserve = shouldObserve; + toggleObserving(true); + observe(value); + toggleObserving(prevShouldObserve); + } + { + assertProp(prop, key, value, vm, absent); + } + return value + } + + /** + * Get the default value of a prop. + */ + function getPropDefaultValue (vm, prop, key) { + // no default, return undefined + if (!hasOwn(prop, 'default')) { + return undefined + } + var def = prop.default; + // warn against non-factory defaults for Object & Array + if (isObject(def)) { + warn( + 'Invalid default value for prop "' + key + '": ' + + 'Props with type Object/Array must use a factory function ' + + 'to return the default value.', + vm + ); + } + // the raw prop value was also undefined from previous render, + // return previous default value to avoid unnecessary watcher trigger + if (vm && vm.$options.propsData && + vm.$options.propsData[key] === undefined && + vm._props[key] !== undefined + ) { + return vm._props[key] + } + // call factory function for non-Function types + // a value is Function if its prototype is function even across different execution context + return typeof def === 'function' && getType(prop.type) !== 'Function' + ? def.call(vm) + : def + } + + /** + * Assert whether a prop is valid. + */ + function assertProp ( + prop, + name, + value, + vm, + absent + ) { + if (prop.required && absent) { + warn( + 'Missing required prop: "' + name + '"', + vm + ); + return + } + if (value == null && !prop.required) { + return + } + var type = prop.type; + var valid = !type || type === true; + var expectedTypes = []; + if (type) { + if (!Array.isArray(type)) { + type = [type]; + } + for (var i = 0; i < type.length && !valid; i++) { + var assertedType = assertType(value, type[i], vm); + expectedTypes.push(assertedType.expectedType || ''); + valid = assertedType.valid; + } + } + + var haveExpectedTypes = expectedTypes.some(function (t) { return t; }); + if (!valid && haveExpectedTypes) { + warn( + getInvalidTypeMessage(name, value, expectedTypes), + vm + ); + return + } + var validator = prop.validator; + if (validator) { + if (!validator(value)) { + warn( + 'Invalid prop: custom validator check failed for prop "' + name + '".', + vm + ); + } + } + } + + var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol|BigInt)$/; + + function assertType (value, type, vm) { + var valid; + var expectedType = getType(type); + if (simpleCheckRE.test(expectedType)) { + var t = typeof value; + valid = t === expectedType.toLowerCase(); + // for primitive wrapper objects + if (!valid && t === 'object') { + valid = value instanceof type; + } + } else if (expectedType === 'Object') { + valid = isPlainObject(value); + } else if (expectedType === 'Array') { + valid = Array.isArray(value); + } else { + try { + valid = value instanceof type; + } catch (e) { + warn('Invalid prop type: "' + String(type) + '" is not a constructor', vm); + valid = false; + } + } + return { + valid: valid, + expectedType: expectedType + } + } + + var functionTypeCheckRE = /^\s*function (\w+)/; + + /** + * Use function string name to check built-in types, + * because a simple equality check will fail when running + * across different vms / iframes. + */ + function getType (fn) { + var match = fn && fn.toString().match(functionTypeCheckRE); + return match ? match[1] : '' + } + + function isSameType (a, b) { + return getType(a) === getType(b) + } + + function getTypeIndex (type, expectedTypes) { + if (!Array.isArray(expectedTypes)) { + return isSameType(expectedTypes, type) ? 0 : -1 + } + for (var i = 0, len = expectedTypes.length; i < len; i++) { + if (isSameType(expectedTypes[i], type)) { + return i + } + } + return -1 + } + + function getInvalidTypeMessage (name, value, expectedTypes) { + var message = "Invalid prop: type check failed for prop \"" + name + "\"." + + " Expected " + (expectedTypes.map(capitalize).join(', ')); + var expectedType = expectedTypes[0]; + var receivedType = toRawType(value); + // check if we need to specify expected value + if ( + expectedTypes.length === 1 && + isExplicable(expectedType) && + isExplicable(typeof value) && + !isBoolean(expectedType, receivedType) + ) { + message += " with value " + (styleValue(value, expectedType)); + } + message += ", got " + receivedType + " "; + // check if we need to specify received value + if (isExplicable(receivedType)) { + message += "with value " + (styleValue(value, receivedType)) + "."; + } + return message + } + + function styleValue (value, type) { + if (type === 'String') { + return ("\"" + value + "\"") + } else if (type === 'Number') { + return ("" + (Number(value))) + } else { + return ("" + value) + } + } + + var EXPLICABLE_TYPES = ['string', 'number', 'boolean']; + function isExplicable (value) { + return EXPLICABLE_TYPES.some(function (elem) { return value.toLowerCase() === elem; }) + } + + function isBoolean () { + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; }) + } + + /* */ + + function handleError (err, vm, info) { + // Deactivate deps tracking while processing error handler to avoid possible infinite rendering. + // See: https://github.com/vuejs/vuex/issues/1505 + pushTarget(); + try { + if (vm) { + var cur = vm; + while ((cur = cur.$parent)) { + var hooks = cur.$options.errorCaptured; + if (hooks) { + for (var i = 0; i < hooks.length; i++) { + try { + var capture = hooks[i].call(cur, err, vm, info) === false; + if (capture) { return } + } catch (e) { + globalHandleError(e, cur, 'errorCaptured hook'); + } + } + } + } + } + globalHandleError(err, vm, info); + } finally { + popTarget(); + } + } + + function invokeWithErrorHandling ( + handler, + context, + args, + vm, + info + ) { + var res; + try { + res = args ? handler.apply(context, args) : handler.call(context); + if (res && !res._isVue && isPromise(res) && !res._handled) { + res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); }); + // issue #9511 + // avoid catch triggering multiple times when nested calls + res._handled = true; + } + } catch (e) { + handleError(e, vm, info); + } + return res + } + + function globalHandleError (err, vm, info) { + if (config.errorHandler) { + try { + return config.errorHandler.call(null, err, vm, info) + } catch (e) { + // if the user intentionally throws the original error in the handler, + // do not log it twice + if (e !== err) { + logError(e, null, 'config.errorHandler'); + } + } + } + logError(err, vm, info); + } + + function logError (err, vm, info) { + { + warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm); + } + /* istanbul ignore else */ + if ((inBrowser || inWeex) && typeof console !== 'undefined') { + console.error(err); + } else { + throw err + } + } + + /* */ + + var isUsingMicroTask = false; + + var callbacks = []; + var pending = false; + + function flushCallbacks () { + pending = false; + var copies = callbacks.slice(0); + callbacks.length = 0; + for (var i = 0; i < copies.length; i++) { + copies[i](); + } + } + + // Here we have async deferring wrappers using microtasks. + // In 2.5 we used (macro) tasks (in combination with microtasks). + // However, it has subtle problems when state is changed right before repaint + // (e.g. #6813, out-in transitions). + // Also, using (macro) tasks in event handler would cause some weird behaviors + // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109). + // So we now use microtasks everywhere, again. + // A major drawback of this tradeoff is that there are some scenarios + // where microtasks have too high a priority and fire in between supposedly + // sequential events (e.g. #4521, #6690, which have workarounds) + // or even between bubbling of the same event (#6566). + var timerFunc; + + // The nextTick behavior leverages the microtask queue, which can be accessed + // via either native Promise.then or MutationObserver. + // MutationObserver has wider support, however it is seriously bugged in + // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It + // completely stops working after triggering a few times... so, if native + // Promise is available, we will use it: + /* istanbul ignore next, $flow-disable-line */ + if (typeof Promise !== 'undefined' && isNative(Promise)) { + var p = Promise.resolve(); + timerFunc = function () { + p.then(flushCallbacks); + // In problematic UIWebViews, Promise.then doesn't completely break, but + // it can get stuck in a weird state where callbacks are pushed into the + // microtask queue but the queue isn't being flushed, until the browser + // needs to do some other work, e.g. handle a timer. Therefore we can + // "force" the microtask queue to be flushed by adding an empty timer. + if (isIOS) { setTimeout(noop); } + }; + isUsingMicroTask = true; + } else if (!isIE && typeof MutationObserver !== 'undefined' && ( + isNative(MutationObserver) || + // PhantomJS and iOS 7.x + MutationObserver.toString() === '[object MutationObserverConstructor]' + )) { + // Use MutationObserver where native Promise is not available, + // e.g. PhantomJS, iOS7, Android 4.4 + // (#6466 MutationObserver is unreliable in IE11) + var counter = 1; + var observer = new MutationObserver(flushCallbacks); + var textNode = document.createTextNode(String(counter)); + observer.observe(textNode, { + characterData: true + }); + timerFunc = function () { + counter = (counter + 1) % 2; + textNode.data = String(counter); + }; + isUsingMicroTask = true; + } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) { + // Fallback to setImmediate. + // Technically it leverages the (macro) task queue, + // but it is still a better choice than setTimeout. + timerFunc = function () { + setImmediate(flushCallbacks); + }; + } else { + // Fallback to setTimeout. + timerFunc = function () { + setTimeout(flushCallbacks, 0); + }; + } + + function nextTick (cb, ctx) { + var _resolve; + callbacks.push(function () { + if (cb) { + try { + cb.call(ctx); + } catch (e) { + handleError(e, ctx, 'nextTick'); + } + } else if (_resolve) { + _resolve(ctx); + } + }); + if (!pending) { + pending = true; + timerFunc(); + } + // $flow-disable-line + if (!cb && typeof Promise !== 'undefined') { + return new Promise(function (resolve) { + _resolve = resolve; + }) + } + } + + /* */ + + var mark; + var measure; + + { + var perf = inBrowser && window.performance; + /* istanbul ignore if */ + if ( + perf && + perf.mark && + perf.measure && + perf.clearMarks && + perf.clearMeasures + ) { + mark = function (tag) { return perf.mark(tag); }; + measure = function (name, startTag, endTag) { + perf.measure(name, startTag, endTag); + perf.clearMarks(startTag); + perf.clearMarks(endTag); + // perf.clearMeasures(name) + }; + } + } + + /* not type checking this file because flow doesn't play well with Proxy */ + + var initProxy; + + { + var allowedGlobals = makeMap( + 'Infinity,undefined,NaN,isFinite,isNaN,' + + 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' + + 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,' + + 'require' // for Webpack/Browserify + ); + + var warnNonPresent = function (target, key) { + warn( + "Property or method \"" + key + "\" is not defined on the instance but " + + 'referenced during render. Make sure that this property is reactive, ' + + 'either in the data option, or for class-based components, by ' + + 'initializing the property. ' + + 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.', + target + ); + }; + + var warnReservedPrefix = function (target, key) { + warn( + "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " + + 'properties starting with "$" or "_" are not proxied in the Vue instance to ' + + 'prevent conflicts with Vue internals. ' + + 'See: https://vuejs.org/v2/api/#data', + target + ); + }; + + var hasProxy = + typeof Proxy !== 'undefined' && isNative(Proxy); + + if (hasProxy) { + var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact'); + config.keyCodes = new Proxy(config.keyCodes, { + set: function set (target, key, value) { + if (isBuiltInModifier(key)) { + warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key)); + return false + } else { + target[key] = value; + return true + } + } + }); + } + + var hasHandler = { + has: function has (target, key) { + var has = key in target; + var isAllowed = allowedGlobals(key) || + (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data)); + if (!has && !isAllowed) { + if (key in target.$data) { warnReservedPrefix(target, key); } + else { warnNonPresent(target, key); } + } + return has || !isAllowed + } + }; + + var getHandler = { + get: function get (target, key) { + if (typeof key === 'string' && !(key in target)) { + if (key in target.$data) { warnReservedPrefix(target, key); } + else { warnNonPresent(target, key); } + } + return target[key] + } + }; + + initProxy = function initProxy (vm) { + if (hasProxy) { + // determine which proxy handler to use + var options = vm.$options; + var handlers = options.render && options.render._withStripped + ? getHandler + : hasHandler; + vm._renderProxy = new Proxy(vm, handlers); + } else { + vm._renderProxy = vm; + } + }; + } + + /* */ + + var seenObjects = new _Set(); + + /** + * Recursively traverse an object to evoke all converted + * getters, so that every nested property inside the object + * is collected as a "deep" dependency. + */ + function traverse (val) { + _traverse(val, seenObjects); + seenObjects.clear(); + } + + function _traverse (val, seen) { + var i, keys; + var isA = Array.isArray(val); + if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) { + return + } + if (val.__ob__) { + var depId = val.__ob__.dep.id; + if (seen.has(depId)) { + return + } + seen.add(depId); + } + if (isA) { + i = val.length; + while (i--) { _traverse(val[i], seen); } + } else { + keys = Object.keys(val); + i = keys.length; + while (i--) { _traverse(val[keys[i]], seen); } + } + } + + /* */ + + var normalizeEvent = cached(function (name) { + var passive = name.charAt(0) === '&'; + name = passive ? name.slice(1) : name; + var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first + name = once$$1 ? name.slice(1) : name; + var capture = name.charAt(0) === '!'; + name = capture ? name.slice(1) : name; + return { + name: name, + once: once$$1, + capture: capture, + passive: passive + } + }); + + function createFnInvoker (fns, vm) { + function invoker () { + var arguments$1 = arguments; + + var fns = invoker.fns; + if (Array.isArray(fns)) { + var cloned = fns.slice(); + for (var i = 0; i < cloned.length; i++) { + invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler"); + } + } else { + // return handler return value for single handlers + return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler") + } + } + invoker.fns = fns; + return invoker + } + + function updateListeners ( + on, + oldOn, + add, + remove$$1, + createOnceHandler, + vm + ) { + var name, def$$1, cur, old, event; + for (name in on) { + def$$1 = cur = on[name]; + old = oldOn[name]; + event = normalizeEvent(name); + if (isUndef(cur)) { + warn( + "Invalid handler for event \"" + (event.name) + "\": got " + String(cur), + vm + ); + } else if (isUndef(old)) { + if (isUndef(cur.fns)) { + cur = on[name] = createFnInvoker(cur, vm); + } + if (isTrue(event.once)) { + cur = on[name] = createOnceHandler(event.name, cur, event.capture); + } + add(event.name, cur, event.capture, event.passive, event.params); + } else if (cur !== old) { + old.fns = cur; + on[name] = old; + } + } + for (name in oldOn) { + if (isUndef(on[name])) { + event = normalizeEvent(name); + remove$$1(event.name, oldOn[name], event.capture); + } + } + } + + /* */ + + function mergeVNodeHook (def, hookKey, hook) { + if (def instanceof VNode) { + def = def.data.hook || (def.data.hook = {}); + } + var invoker; + var oldHook = def[hookKey]; + + function wrappedHook () { + hook.apply(this, arguments); + // important: remove merged hook to ensure it's called only once + // and prevent memory leak + remove(invoker.fns, wrappedHook); + } + + if (isUndef(oldHook)) { + // no existing hook + invoker = createFnInvoker([wrappedHook]); + } else { + /* istanbul ignore if */ + if (isDef(oldHook.fns) && isTrue(oldHook.merged)) { + // already a merged invoker + invoker = oldHook; + invoker.fns.push(wrappedHook); + } else { + // existing plain hook + invoker = createFnInvoker([oldHook, wrappedHook]); + } + } + + invoker.merged = true; + def[hookKey] = invoker; + } + + /* */ + + function extractPropsFromVNodeData ( + data, + Ctor, + tag + ) { + // we are only extracting raw values here. + // validation and default values are handled in the child + // component itself. + var propOptions = Ctor.options.props; + if (isUndef(propOptions)) { + return + } + var res = {}; + var attrs = data.attrs; + var props = data.props; + if (isDef(attrs) || isDef(props)) { + for (var key in propOptions) { + var altKey = hyphenate(key); + { + var keyInLowerCase = key.toLowerCase(); + if ( + key !== keyInLowerCase && + attrs && hasOwn(attrs, keyInLowerCase) + ) { + tip( + "Prop \"" + keyInLowerCase + "\" is passed to component " + + (formatComponentName(tag || Ctor)) + ", but the declared prop name is" + + " \"" + key + "\". " + + "Note that HTML attributes are case-insensitive and camelCased " + + "props need to use their kebab-case equivalents when using in-DOM " + + "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"." + ); + } + } + checkProp(res, props, key, altKey, true) || + checkProp(res, attrs, key, altKey, false); + } + } + return res + } + + function checkProp ( + res, + hash, + key, + altKey, + preserve + ) { + if (isDef(hash)) { + if (hasOwn(hash, key)) { + res[key] = hash[key]; + if (!preserve) { + delete hash[key]; + } + return true + } else if (hasOwn(hash, altKey)) { + res[key] = hash[altKey]; + if (!preserve) { + delete hash[altKey]; + } + return true + } + } + return false + } + + /* */ + + // The template compiler attempts to minimize the need for normalization by + // statically analyzing the template at compile time. + // + // For plain HTML markup, normalization can be completely skipped because the + // generated render function is guaranteed to return Array. There are + // two cases where extra normalization is needed: + + // 1. When the children contains components - because a functional component + // may return an Array instead of a single root. In this case, just a simple + // normalization is needed - if any child is an Array, we flatten the whole + // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep + // because functional components already normalize their own children. + function simpleNormalizeChildren (children) { + for (var i = 0; i < children.length; i++) { + if (Array.isArray(children[i])) { + return Array.prototype.concat.apply([], children) + } + } + return children + } + + // 2. When the children contains constructs that always generated nested Arrays, + // e.g.